The OPTMODEL Procedure |
CROSS Expression |
The CROSS expression returns the crossproduct of its set operands. The result is the set of tuples formed by concatenating the tuple value of each member of the left operand with the tuple value of each member of the right operand. Scalar set members are treated as tuples of length 1. The following code demonstrates the CROSS operator:
proc optmodel; set s1 = 1..2; set<string> s2 = {'a', 'b'}; set<number, string> s3=s1 cross s2; put 's3 is ' s3; set<number, string, number> s4 = s3 cross 4..5; put 's4 is ' s4;
This code produces the output in Figure 8.30.
Copyright © SAS Institute, Inc. All Rights Reserved.