gt

Syntax

gt(X, Y)

or

X>Y

Arguments

X and Y is a scalar/pair/vector/matrix/set. If X or Y is a pair/vector/matrix, the other is a scalar or a pair/vector/matrix of the same size.

Details

If neither X nor Y is a set, return the element-by-element comparison of X>Y.

If both X and Y are sets, check if Y is a proper subset of X.

Examples

1 2 3 > 2;
// output
[false,false,true]

1 2 3>0 2 4;
// output
[true,false,false]

2:3>1:6;
// output
true : false

m1=1..6$2:3;
m1;
#0 #1 #2
1 3 5
2 4 6
m1 gt 4;
#0 #1 #2
false false true
false false true
m2=6..1$2:3;
m2;
#0 #1 #2
6 4 2
5 3 1
m1>m2;
#0 #1 #2
false false true
false true true

Set operation: If X>Y then Y is a proper subset of X.

x=set(4 6);
x;

set(6,4)

y=set(8 9 4 6);
y;

set(6,4,9,8)
y>x;
// output
true

x>y;
// output
false

x>x;
// output
false  // x is not a proper subset of x