Set, comparison, and Boolean operations
Set operations
Comparison operations
Example
Table 3: Examples for the comparison of tuples
| 1st Operand |
Operation |
2nd Operand |
Result |
1 |
== |
1.0 |
true |
[] |
== |
[] |
true |
'' |
== |
[] |
false |
[1,'2'] |
== |
[1,2] |
false |
[1,2,3] |
== |
[1,2] |
false |
[4711,'Hugo'] |
== |
[4711,'Hugo'] |
true |
'Hugo' |
== |
'hugo' |
false |
2 |
> |
1 |
true |
2 |
> |
1.0 |
true |
[5,4,1] |
> |
[5,4] |
true |
[2,1] |
> |
[2,0] |
true |
true |
> |
false |
true |
'Hugo' |
< |
'hugo' |
true |
Elementwise comparison operations
Example
Table 5: Examples for the elementwise comparison of tuples
| 1st Operand |
Operation |
2nd Operand |
Result |
[1,2,3] |
[<] |
[3,2,1] |
[1,0,0] |
['a','b','c'] |
[==] |
'b' |
[0,1,0] |
['a','b','c'] |
[<] |
['b'] |
[1,0,0] |
Boolean Operations
Table 6: Boolean operations
| Operation |
Meaning |
HALCON operator |
l1 and l2 |
logical βandβ |
tuple_and |
l1 xor l2 |
logical βxorβ |
tuple_xor |
l1 or l2 |
logical βorβ |
tuple_or |
not l |
negation |
tuple_not |