SelectStrictI
SelectStrictI
SelectStrictI[ list op value ] returns the positions of the elements of a list that certainly satisfy a condition.
Usages
SelectStrictI[ list op value ]
SelectStrictI works like SelectI, but only selects the elements for which the comparison is certainly True. Comparisons that cannot be decided, for example because an element is a variable, are not selected.
| Example | in | out |
|---|---|---|
a >= 2 cannot be decided, so a is not selected. |
SelectStrictI[ {0, 1, a, 3} >= 2 ] |
{4} |
b = a cannot be decided, so b is not selected. |
SelectStrictI[ {a, b, a} = a ] |
{1, 3} |
Numbers larger than 4. |
SelectStrictI[ {5, 1, 8} > 4 ] |
{1, 3} |
| Comparing with a variable: nothing can be decided. | SelectStrictI[ {1, 2, 3} > x ] |
{} |
Details
- Compare with
SelectI:SelectI[ {a, b, a} = a ]gives{1, 2, 3}andSelectI[ {1, 2, 3} > x ]gives{1, 2, 3}.