ClassesClassesClassesClasses | | | | Operators

tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion (Operator)

Name

tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion — Compute the union set of two input tuples.

Signature

tuple_union( : : Set1, Set2 : Union)

Herror tuple_union(const Hlong Set1, const Hlong Set2, Hlong* Union)

Herror T_tuple_union(const Htuple Set1, const Htuple Set2, Htuple* Union)

Herror tuple_union(const HTuple& Set1, const HTuple& Set2, Hlong* Union)

Herror tuple_union(const HTuple& Set1, const HTuple& Set2, HTuple* Union)

void TupleUnion(const HTuple& Set1, const HTuple& Set2, HTuple* Union)

HTuple HTuple::TupleUnion(const HTuple& Set2) const

void HOperatorSetX.TupleUnion(
[in] VARIANT Set1, [in] VARIANT Set2, [out] VARIANT* Union)

VARIANT HTupleX.TupleUnion(
[in] VARIANT Set1, [in] VARIANT Set2)

static void HOperatorSet.TupleUnion(HTuple set1, HTuple set2, out HTuple union)

HTuple HTuple.TupleUnion(HTuple set2)

Description

tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion returns the union set from Set1Set1Set1Set1Set1set1 and Set2Set2Set2Set2Set2set2 in UnionUnionUnionUnionUnionunion. For example, if Set1Set1Set1Set1Set1set1 contains the values [0,1,3,3,5] and Set2Set2Set2Set2Set2set2 contains the values [3,4], the output UnionUnionUnionUnionUnionunion is [0,1,3,4,5]. 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. For example, the union of [2,5,3] and [4.0,5.0] is [2,5,3,4.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_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion, which can be used in an expression in the following syntax:

Union := union(Set1, Set2)

Parallelization

Parameters

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.

UnionUnionUnionUnionUnionunion (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

The union set of two input tuples.

Result

If the parameters are valid, the operator tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion returns the value 2 (H_MSG_TRUE).

Alternatives

tuple_intersectiontuple_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection

See also

tuple_differencetuple_differenceTupleDifferencetuple_differenceTupleDifferenceTupleDifference, tuple_intersectiontuple_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection, tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff

Module

Foundation


ClassesClassesClassesClasses | | | | Operators