tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersection (Operator)

Name

tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersection — Berechnet die Schnittmenge von zwei Tupeln.

Signatur

tuple_intersection( : : Set1, Set2 : Intersection)

Herror tuple_intersection(const Hlong Set1, const Hlong Set2, Hlong* Intersection)

Herror T_tuple_intersection(const Htuple Set1, const Htuple Set2, Htuple* Intersection)

void TupleIntersection(const HTuple& Set1, const HTuple& Set2, HTuple* Intersection)

HTuple HTuple::TupleIntersection(const HTuple& Set2) const

static void HOperatorSet.TupleIntersection(HTuple set1, HTuple set2, out HTuple intersection)

HTuple HTuple.TupleIntersection(HTuple set2)

Beschreibung

tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectionTupleIntersection liefert die Schnittmenge von Set1Set1Set1Set1set1 und Set2Set2Set2Set2set2 in IntersectionIntersectionIntersectionIntersectionintersection zurück. Der Schnitt von [0,1,3,3,5] und [2,3,5,10] ist zum Beispiel [3,5]. Elemente unterschiedlichen Typs werden als unterschiedliche Elemente betrachtet, das heißt, 1.0 und 1 sind nicht gleich. Wenn Set1Set1Set1Set1set1 und Set2Set2Set2Set2set2 unterschiedliche Elementtypen enthalten, kann ihre Schnittmenge leer sein. So ist zum Beispiel der Schnitt von [2.0,5.0,0,10] und [2,5,3] leer.

Sonderfall: Leere Eingabetupel

Falls eines oder beide der Eingabetupel leer sind, gibt der Operator ein leeres Tupel zurück.

HDevelop Inline-Operation

HDevelop unterstützt eine Inline-Operation für tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectionTupleIntersection, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Intersection := intersection(Set1, Set2)

Ausführungsinformationen

Parameter

Set1Set1Set1Set1set1 (input_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)

Eingabe-Tupel.

Set2Set2Set2Set2set2 (input_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)

Eingabe-Tupel.

IntersectionIntersectionIntersectionIntersectionintersection (output_control)  tuple(-array) HTupleHTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)

Die Schnittmenge aus den zwei Eingabe-Tupeln.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectionTupleIntersection den Wert 2 (H_MSG_TRUE).

Alternativen

tuple_uniontuple_unionTupleUnionTupleUnionTupleUnion

Siehe auch

tuple_differencetuple_differenceTupleDifferenceTupleDifferenceTupleDifference, tuple_symmdifftuple_symmdiffTupleSymmdiffTupleSymmdiffTupleSymmdiff, tuple_uniontuple_unionTupleUnionTupleUnionTupleUnion

Modul

Foundation