@@ -9697,20 +9697,6 @@ <h4>Aggregate Algebra</h4>
9697
9697
..., agg<sub>n</sub>→val<sub>n</sub> | key in K and key→val<sub>i</sub> in
9698
9698
S<sub>i</sub> for each 1 ≤ i ≤ n }</p>
9699
9699
</div>
9700
- <p>Flatten is a function which is used to collapse a sequence of lists into a single list.
9701
- For example, [(1, 2), (3, 4)] becomes (1, 2, 3, 4).</p>
9702
- <div class="defn">
9703
- <p><b>Definition: <span id="defn_Flatten">Flatten</span></b></p>
9704
- <p>The Flatten(S) function takes a sequence S of lists,
9705
- i.e., S = [L<sub>1</sub>, L<sub>2</sub>, ..., L<sub>m</sub>]
9706
- where every L<sub>i</sub> is a list,
9707
- and returns the list ( x | L in S and x in L ).</p>
9708
- </div>
9709
- <p>Card is a function that returns the cardinality of a sequence or a list of elements (which may be solution mappings or other types of elements, depending on the context).
9710
- <div class="defn">
9711
- <p><b>Definition: <span id="defn_Card">Card</span></b></p>
9712
- <p>Given a sequence or a list |L|, Card(|L|) is the cardinality of |L|.</p>
9713
- </div>
9714
9700
<section id="setFunctions">
9715
9701
<h5>Set Functions</h5>
9716
9702
<p>The set functions which underlie SPARQL aggregates all have a common signature:
@@ -9731,6 +9717,33 @@ <h5>Set Functions</h5>
9731
9717
this requires the parser to know whether some IRI refers to a function, cast, or
9732
9718
aggregate before it can determine if there are any errors in a query where aggregates
9733
9719
are used.</p>
9720
+ <p>The definitions of the set functions in the following sections
9721
+ are based on two functions, <a href="#defn_Flatten">Flatten</a>
9722
+ and <a href="#defn_Card">Card</a>, which are defined as follows.</p>
9723
+ <p><a href="#defn_Flatten">Flatten</a> is a function which is
9724
+ used to collapse a sequence of lists into a single list.
9725
+ For example, [(1, 2), (3, 4)] becomes (1, 2, 3, 4).</p>
9726
+ <div class="defn">
9727
+ <p><b>Definition: <span id="defn_Flatten">Flatten</span></b></p>
9728
+ <p>Let <var>S</var> be a sequence of lists,
9729
+ i.e., <var>S</var> =
9730
+ [<var>L<sub>1</sub></var>,
9731
+ <var>L<sub>2</sub></var>, ...,
9732
+ <var>L<sub><var>m</var></sub></var>]
9733
+ where, for every <var>i</var> ∈ {1, ..., <var>m</var>},
9734
+ <var>L<sub><var>i</var></sub></var> is a list.</p>
9735
+ <p>Flatten(<var>S</var>) is the list
9736
+ ( <var>x</var> | <var>L</var> in <var>S</var> and
9737
+ <var>x</var> in <var>L</var> ).</p>
9738
+ </div>
9739
+ <p><a href="#defn_Card">Card</a> is a function that returns the
9740
+ cardinality of a sequence or a list of elements (which may be
9741
+ solution mappings or other types of elements, depending on the
9742
+ context).
9743
+ <div class="defn">
9744
+ <p><b>Definition: <span id="defn_Card">Card</span></b></p>
9745
+ <p>Given a sequence or a list |L|, Card(|L|) is the cardinality of |L|.</p>
9746
+ </div>
9734
9747
</section>
9735
9748
9736
9749
<section id="aggCount">
0 commit comments