tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectiontuple_intersection (Operator)
Name
tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectiontuple_intersection — Berechnet die Schnittmenge von zwei Tupeln.
Signatur
def tuple_intersection(set_1: HTupleType, set_2: HTupleType) -> Sequence[HTupleElementType]
def tuple_intersection_s(set_1: HTupleType, set_2: HTupleType) -> HTupleElementType
Beschreibung
tuple_intersectiontuple_intersectionTupleIntersectionTupleIntersectionTupleIntersectiontuple_intersection liefert die Schnittmenge von
Set1Set1Set1Set1set1set_1 und Set2Set2Set2Set2set2set_2 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 Set1Set1Set1Set1set1set_1
und Set2Set2Set2Set2set2set_2 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_intersectionTupleIntersectionTupleIntersectionTupleIntersectiontuple_intersection,
die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden
kann:
Intersection := intersection(Set1, Set2)
Ausführungsinformationen
- Multithreading-Typ: independent (läuft parallel auch zu exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf interner Datenebene.
Parameter
Set1Set1Set1Set1set1set_1 (input_control) tuple(-array) → HTupleHTupleTypeHTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)
Eingabe-Tupel.
Set2Set2Set2Set2set2set_2 (input_control) tuple(-array) → HTupleHTupleTypeHTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)
Eingabe-Tupel.
IntersectionIntersectionIntersectionIntersectionintersectionintersection (output_control) tuple(-array) → HTupleSequence[HTupleElementType]HTupleHtuple (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_intersectionTupleIntersectionTupleIntersectionTupleIntersectiontuple_intersection
den Wert TRUE.
Alternativen
tuple_uniontuple_unionTupleUnionTupleUnionTupleUniontuple_union
Siehe auch
tuple_differencetuple_differenceTupleDifferenceTupleDifferenceTupleDifferencetuple_difference,
tuple_symmdifftuple_symmdiffTupleSymmdiffTupleSymmdiffTupleSymmdifftuple_symmdiff,
tuple_uniontuple_unionTupleUnionTupleUnionTupleUniontuple_union
Modul
Foundation