8.11   Summary of HDevelop Tuple Operations

Functionality HDevelop Operation HALCON operator

concatenation [t1,t2] tuple_concat
number of elements |t| tuple_length
select tuple elements t1[t2] tuple_select
select tuple slice t[i1:i2] tuple_select_range
select tuple elements subset(t,i) tuple_select
first elements firstn(t,i) tuple_first_n
last elements lastn(t,i) tuple_last_n
select by mask select_mask(t1,t2) tuple_select_mask
remove tuple elements remove(t,i) tuple_remove
lookup tuple values find(t1,t2) tuple_find
replace elements replace(t1,t2,t3) tuple_replace
find first occurrences find_first(t1,t2) tuple_find_first
find last occurrences find_last(t1,t2) tuple_find_last
unify tuple elements uniq(t) tuple_uniq
tuple creation [i1:i2:i3] tuple_gen_sequence
tuple creation [i1:i2] tuple_gen_sequence
tuple creation gen_tuple_const(i1,i2) tuple_gen_const

division a1 / a2 tuple_div
multiplication a1 * a2 tuple_mult
modulo a1 % a2 tuple_mod
addition a1 + a2 tuple_add
subtraction a1 - a2 tuple_sub
negation -a tuple_neg

left shift lsh(i1,i2) tuple_lsh
right shift rsh(i1,i2) tuple_rsh
bitwise and i1 band i2 tuple_band
bitwise xor i1 bxor i2 tuple_bxor
bitwise or i1 bor i2 tuple_bor
bitwise complement bnot i tuple_bnot

string conversion v$s tuple_string
string concatenation v1 + v2 tuple_add
search character strchr(s1,s2) tuple_strchr
search character (reverse) strrchr(s1,s2) tuple_strrchr
search string strstr(s1,s2) tuple_strstr
search string (reverse) strrstr(s1,s2) tuple_strrstr
length of string strlen(s) tuple_strlen
first characters str_firstn(s,i) tuple_str_first_n
last characters str_lastn(s,i) tuple_str_last_n
select character s{i} tuple_str_bit_select
select substring s{i1:i2} tuple_str_bit_select
split string split(s1,s2) tuple_split
regular expression match regexp_match(s1,s2) tuple_regexp_match
regular expression replace regexp_replace(s1,s2,s3) tuple_regexp_replace
regular expression select regexp_select(s1,s2) tuple_regexp_select
regular expression test regexp_test(s1,s2) tuple_regexp_test
regular expression test s1 =~ s2 tuple_regexp_test

difference difference(t1,t2) tuple_difference
intersection intersection(t1,t2) tuple_intersection
symmetric difference symmdiff(t1,t2) tuple_symmdiff
union union(t1,t2) tuple_union

less than t1 < t2 tuple_less
greater than t1 > t2 tuple_greater
less or equal t1 <= t2 tuple_less_equal
greater or equal t1 >= t2 tuple_greater_equal
equal t1 == t2 tuple_equal
equal t1 = t2 (legacy) tuple_equal
not equal t1 != t2 tuple_not_equal
not equal t1 # t2 (legacy) tuple_not_equal

less than (elementwise) t1 [<] t2 tuple_less_elem
greater than (elementwise) t1 [>] t2 tuple_greater_elem
less or equal (elementwise) t1 [<=] t2 tuple_less_equal_elem
greater or equal (elementwise) t1 [>=] t2 tuple_greater_equal_elem
equal (elementwise) t1 [==] t2 tuple_equal_elem
equal (elementwise) t1 [=] t2 (legacy) tuple_equal_elem
not equal (elementwise) t1 [!=] t2 tuple_not_equal_elem
not equal (elementwise) t1 [#] t2 (legacy) tuple_not_equal_elem

logical and l1 and l2 tuple_and
logical xor l1 xor l2 tuple_xor
logical or l1 or l2 tuple_or
negation not l tuple_not

sine sin(a) tuple_sin
cosine cos(a) tuple_cos
tangent tan(a) tuple_tan
arc sine asin(a) tuple_asin
arc cosine acos(a) tuple_acos
arc tangent atan(a) tuple_atan
arc tangent2 atan2(a1,a2) tuple_atan2
hyperbolic sine sinh(a) tuple_sinh
hyperbolic cosine cosh(a) tuple_cosh
hyperbolic tangent tanh(a) tuple_tanh
inverse hyperbolic sine asinh(a) tuple_asinh
inverse hyperbolic cosine acosh(a) tuple_acosh
inverse hyperbolic tangent atanh(a) tuple_atanh

exponential function exp(a) tuple_exp
base 2 exponential function exp2(a) tuple_exp2
base 10 exponential function exp10(a) tuple_exp10
natural logarithm log(a) tuple_log
base 2 logarithm log2(a) tuple_log2
base 10 logarithm log10(a) tuple_log10
power function pow(a1,a2) tuple_pow
ldexp function ldexp(a1,a2) tuple_ldexp
gamma function tgamma(a) tuple_tgamma
logarithm of the absolute value of the gamma function lgamma(a) tuple_lgamma
error function erf(a) tuple_erf
complementary error function erfc(a) tuple_erfc

minimum min(t) tuple_min
elementwise minimum min2(t1,t2) tuple_min2
maximum max(t) tuple_max
elementwise maximum max2(t1,t2) tuple_max2
sum function sum(t) tuple_sum
mean value mean(a) tuple_mean
standard deviation deviation(a) tuple_deviation
cumulative sum cumul(a) tuple_cumul
median median(a) tuple_median
element rank select_rank(a,i) tuple_select_rank
square root sqrt(a) tuple_sqrt
cube root cbrt(a) tuple_cbrt
hypotenuse hypot(a,b) tuple_hypot
radians to degrees deg(a) tuple_deg
degrees to radians rad(a) tuple_rad
integer to real real(a) tuple_real
real to integer int(a) tuple_int
real to integer round(a) tuple_round
absolute value abs(a) tuple_abs
floating absolute value fabs(a) tuple_fabs
ceiling function ceil(a) tuple_ceil
floor function floor(a) tuple_floor
fractional part fmod(a1,a2) tuple_fmod
elementwise sign sgn(a) tuple_sgn

sort elements sort(t) tuple_sort
sort elements (returns index) sort_index(t) tuple_sort_index
reverse element order inverse(t) tuple_inverse
test for numeric value is_number(v) tuple_is_number
string to number number(v) tuple_number
environment variable environment(s) tuple_environment
convert strings of length 1 into character codes ord(a) tuple_ord
inverse of ord(a) chr(a) tuple_chr
convert strings into character codes ords(s) tuple_ords
inverse of ords(s) chrt(i) tuple_chrt
random number rand(a) tuple_rand

test for handle values is_handle(t) tuple_is_handle
test for integer values is_int(t) tuple_is_int
test for mixed values is_mixed(t) tuple_is_mixed
test for numerical values is_number(t) tuple_is_number
test for real values is_real(t) tuple_is_real
test for string values is_string(t) tuple_is_string
test for valid handles is_valid_handle tuple_is_valid_handle
get semantic type sem_type(t) tuple_sem_type
get type value type(t) tuple_type

test for handle values (elementwise) is_handle_elem(t) tuple_is_handle_elem
test for integer values (elementwise) is_int_elem(t) tuple_is_int_elem
test for real values (elementwise) is_real_elem(t) tuple_is_real_elem
test for string values (elementwise) is_string_elem(t) tuple_is_string_elem
get semantic type (elementwise) sem_type_elem(t) tuple_sem_type_elem
get type value (elementwise) type_elem(t) tuple_type_elem