AbstractAggregate Javadocs missing

3 views
Skip to first unread message

zachary...@wavestrike.com

unread,
Oct 19, 2015, 3:55:42 PM10/19/15
to Stardog

Michael Grove

unread,
Oct 20, 2015, 7:06:30 AM10/20/15
to stardog
Thanks for pointing out the omission!

Cheers,

Mike

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Zachary Whitley

unread,
Oct 20, 2015, 7:23:16 AM10/20/15
to sta...@clarkparsia.com
Am I correct that the copy constructor is how you pass state from one result to the next and the multiplicity lets you avoid avoid calling it for a bajillion identical results? 

Is the multiplicity based on the entire result bindings or just the arguments to the aggregate?
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Michael Grove

unread,
Oct 20, 2015, 8:26:38 AM10/20/15
to stardog
On Tue, Oct 20, 2015 at 7:23 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Am I correct that the copy constructor is how you pass state from one result to the next

No, the copy constructor is used during optimization when making copies of query plans.
 
and the multiplicity lets you avoid avoid calling it for a bajillion identical results? 

Is the multiplicity based on the entire result bindings or just the arguments to the aggregate?

Sort of.  If you have the intermediate solutions, { x=urn:a, y=urn:b }, { x=urn:a, y=urn:b }, that's represented as { x=urn:a, y=urn:b } x 2 (the multiplicity) rather than two solution sets.  So, for example, when counting, you have to take into account the multiplicities of the solution's you're encountering, not just the solutions themselves.

Cheers,

Mike

zachary...@wavestrike.com

unread,
Oct 20, 2015, 9:55:21 AM10/20/15
to Stardog


On Tuesday, October 20, 2015 at 8:26:38 AM UTC-4, Michael Grove wrote:
On Tue, Oct 20, 2015 at 7:23 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Am I correct that the copy constructor is how you pass state from one result to the next

No, the copy constructor is used during optimization when making copies of query plans.

Got it. So is a shallow copy sufficient or does it need to be a deep copy?

Michael Grove

unread,
Oct 20, 2015, 9:59:41 AM10/20/15
to stardog
On Tue, Oct 20, 2015 at 9:55 AM, <zachary...@wavestrike.com> wrote:


On Tuesday, October 20, 2015 at 8:26:38 AM UTC-4, Michael Grove wrote:
On Tue, Oct 20, 2015 at 7:23 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Am I correct that the copy constructor is how you pass state from one result to the next

No, the copy constructor is used during optimization when making copies of query plans.

Got it. So is a shallow copy sufficient or does it need to be a deep copy?

For your own copy constructor?  You'd want a deep copy.

zachary...@wavestrike.com

unread,
Oct 20, 2015, 3:07:29 PM10/20/15
to Stardog


On Tuesday, October 20, 2015 at 9:59:41 AM UTC-4, Michael Grove wrote:


On Tue, Oct 20, 2015 at 9:55 AM, <zachary...@wavestrike.com> wrote:


On Tuesday, October 20, 2015 at 8:26:38 AM UTC-4, Michael Grove wrote:
On Tue, Oct 20, 2015 at 7:23 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Am I correct that the copy constructor is how you pass state from one result to the next

No, the copy constructor is used during optimization when making copies of query plans.

Got it. So is a shallow copy sufficient or does it need to be a deep copy?

For your own copy constructor?  You'd want a deep copy.

Ok, one last stupid question. In the Gmean.java example on aggregates is there any particular reason that it uses the Multiply and Root functions? (Other than they're there, they work, and why not?). Just wondering if there was something particular in the implementation that required it or maybe used it or if it just made for a clean example without any  unnecessary dependencies.

Michael Grove

unread,
Oct 20, 2015, 3:12:23 PM10/20/15
to stardog
On Tue, Oct 20, 2015 at 3:07 PM, <zachary...@wavestrike.com> wrote:


On Tuesday, October 20, 2015 at 9:59:41 AM UTC-4, Michael Grove wrote:


On Tue, Oct 20, 2015 at 9:55 AM, <zachary...@wavestrike.com> wrote:


On Tuesday, October 20, 2015 at 8:26:38 AM UTC-4, Michael Grove wrote:
On Tue, Oct 20, 2015 at 7:23 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Am I correct that the copy constructor is how you pass state from one result to the next

No, the copy constructor is used during optimization when making copies of query plans.

Got it. So is a shallow copy sufficient or does it need to be a deep copy?

For your own copy constructor?  You'd want a deep copy.

Ok, one last stupid question. In the Gmean.java example on aggregates is there any particular reason that it uses the Multiply and Root functions? (Other than they're there, they work, and why not?). Just wondering if there was something particular in the implementation that required it or maybe used it or if it just made for a clean example without any  unnecessary dependencies.

Primarily the latter.  The count aggregate already knows how to count wrt to multiplicities in solution sets, so there was no point in re-implementating that logic.  And Multiply & Root know how to perform those math ops over Value objects, so again, no need to reimplement.  There's nothing special about using them other than it's a simpler implementation.

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages