W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2010

Re: Evaluation of aggregates

From: Axel Polleres <axel.polleres@deri.org>
Date: Mon, 20 Sep 2010 15:30:14 +0200
Message-Id: <97D292FA-2A39-4974-815D-59E726ED7A10@deri.org>
To: Andy Seaborne <andy.seaborne@epimorphics.com>, SPARQL Working Group <public-rdf-dawg@w3.org>

On 20 Sep 2010, at 15:23, Andy Seaborne wrote:

> 
> 
> On 20/09/10 11:30, Axel Polleres wrote:
> >> >  Just define:
> >> >  Sum(S) = op:numeric-add(S0, Sum(S1..n)) when|S|  >  1 if S0 is a number
> >> >  Sum(S) = op:numeric-add(0, Sum(S1..n)) when|S|  >  1 if S0 is not a number
> > is not as straightforward as Flatten op:numeric-add, but could be an option.
> >
> 
> I don't understand that. The flatten operation is independent of the
> specific aggregation - it doesn't remove non-numbers:

yes, that's what meant to say, the current definition just via flatten and 
then "delegating" directly to op:numeric-add doesn't cover that aspect yet. 
what you write here should work, but it is an extension of the current 
Definition of Sum

Anyways, don't we need to extend Definition of Sum also to cover errors, 
or do you intend this covered by "if S0 is not a number" ?

> 
> [[
> Definition: Flatten
> 
> The Flatten(M) function takes a multiset of lists, M {(L1, L2, ...),
> ...}, and returns the multiset given by the multiset union of { Li | L
> in M } for all i in L.
> ]]
> 
> Could be changed to take a condition on the members produced.
> 
> Avg() works if Sum() does.

agreed.

Axel


> 
>         Andy
> 
Received on Monday, 20 September 2010 13:30:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:43 GMT