OCL Operators product
No edit summary
(Updated Edited template to July 12, 2025.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
=== product ( c2 : Collection(T2) ) : Set(Tuple(first : T, second : T2)) ===
=== 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*.
Line 11: Line 12:
|<nowiki>Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}</nowiki>
|<nowiki>Set{Tuple{3, 3.0}, Tuple{3, 4.0}, Tuple{4, 3.0}, Tuple{4, 4.0}}</nowiki>
|}
|}
[[Category:OCLOperators]]
[[Category:OCL Collection Operators]]
{{Edited|July|12|2025}}

Latest revision as of 05:59, 20 January 2025

This page was created by Stephanie@mdriven.net on 2023-03-28. Last edited by Edgar on 2025-01-20.

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}}
MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments