OCL Operators product
(Created page with "Returns a Set of Tuples which represents the cartesian product of self with *c2*.")
 
(Automatically adding template at the end of the page.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== product ( c2 : Collection(T2) ) : Set(Tuple(first : T, second : T2)) ===
Returns a Set of Tuples which represents the cartesian product of self with *c2*.
Returns a Set of Tuples which represents the cartesian product of self with *c2*.
{| class="wikitable"
!Expression
!Result
|-
|Sequence{3, 4}->product(Bag{3.0, 4.0})
|<nowiki>Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}</nowiki>
|-
|Set{3, 4}->product(OrderedSet{3.0, 4.0})
|<nowiki>Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}</nowiki>
|}
[[Category:OCL Collection Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:44, 10 February 2024

product ( c2 : Collection(T2) ) : Set(Tuple(first : T, second : T2))

Returns a Set of Tuples which represents the cartesian product of self with *c2*.

Expression Result
Sequence{3, 4}->product(Bag{3.0, 4.0}) Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}
Set{3, 4}->product(OrderedSet{3.0, 4.0}) Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}
This page was edited more than 11 months ago on 02/10/2024. What links here