KlassenKlassenKlassenKlassen | | | | Operatoren

tuple_intersectiontuple_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection (Operator)

Name

tuple_intersectiontuple_intersectionTupleIntersectiontuple_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)

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

Herror 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

void HOperatorSetX.TupleIntersection(
[in] VARIANT Set1, [in] VARIANT Set2, [out] VARIANT* Intersection)

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

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

HTuple HTuple.TupleIntersection(HTuple set2)

Beschreibung

tuple_intersectiontuple_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection liefert die Schnittmenge von Set1Set1Set1Set1Set1set1 und Set2Set2Set2Set2Set2set2 in IntersectionIntersectionIntersectionIntersectionIntersectionintersection 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 Set1Set1Set1Set1Set1set1 und Set2Set2Set2Set2Set2set2 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_intersectionTupleIntersectiontuple_intersectionTupleIntersectionTupleIntersection, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Intersection := intersection(Set1, Set2)

Parallelisierung

Parameter

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*)

Eingabe-Tupel.

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*)

Eingabe-Tupel.

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

Die Schnittmenge aus den zwei Eingabe-Tupeln.

Ergebnis

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

Alternativen

tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion

Siehe auch

tuple_differencetuple_differenceTupleDifferencetuple_differenceTupleDifferenceTupleDifference, tuple_symmdifftuple_symmdiffTupleSymmdifftuple_symmdiffTupleSymmdiffTupleSymmdiff, tuple_uniontuple_unionTupleUniontuple_unionTupleUnionTupleUnion

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren