Name
tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff — Compute the symmetric difference set of two input tuples.
tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff returns the symmetric difference set from
Set1Set1Set1Set1Set1set1 and Set2Set2Set2Set2Set2set2 in SymmDiffSymmDiffSymmDiffSymmDiffSymmDiffsymmDiff. For example,
if Set1Set1Set1Set1Set1set1 contains the values [0,1,3,3,5] and Set2Set2Set2Set2Set2set2
contains the values [2,3,5,10], the output SymmDiffSymmDiffSymmDiffSymmDiffSymmDiffsymmDiff is [0,1,2,10].
The operator also allows mixed types of elements in the input tuples.
However, the elements with different types will be considered as
different elements, i.e. 1.0 and 1 are different. Also, this means, if
Set1Set1Set1Set1Set1set1 and Set2Set2Set2Set2Set2set2 have different types of elements, their
symmetric difference set could be the union. For example, if Set1Set1Set1Set1Set1set1
contains the values [2,5,3] and Set2Set2Set2Set2Set2set2 contains the values [2.0,5.0],
the output SymmDiffSymmDiffSymmDiffSymmDiffSymmDiffsymmDiff is [2,5,3,2.0,5.0].
Exception: Empty input tuples
If both of the input tuples are empty, the operator returns an
empty tuple. If one of the input tuples is empty and the other is not,
the output corresponds to the input tuple that is not empty.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff,
which can be used in an expression in the following syntax:
SymmDiff := symmdiff(Set1, Set2)
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Set1Set1Set1Set1Set1set1 (input_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)
Input tuple.
Set2Set2Set2Set2Set2set2 (input_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)
Input tuple.
The symmetric difference set of two input tuples.
If the parameters are valid, the operator
tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff returns the value 2 (H_MSG_TRUE).
tuple_differencetuple_differenceTupleDifferencetuple_differenceTupleDifferenceTupleDifference
tuple_differencetuple_differenceTupleDifferencetuple_differenceTupleDifferenceTupleDifference,
tuple_intersectiontuple_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection,
tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion
Foundation