Skip to content

tuple_intersectionTupleIntersectionTupleIntersectiontuple_intersectiontuple_intersection🔗

説明🔗

tuple_intersectionTupleIntersectionTupleIntersectiontuple_intersectiontuple_intersection — 2 つの入力 tuple の交差セットを計算する。

書式🔗

tuple_intersection( tuple Set1, tuple Set2, out tuple Intersection )void TupleIntersection( const HTuple& Set1, const HTuple& Set2, HTuple* Intersection )static void HOperatorSet.TupleIntersection( HTuple set1, HTuple set2, out HTuple intersection )def tuple_intersection( set_1: HTupleType, set_2: HTupleType ) -> Sequence[HTupleElementType]

def tuple_intersection_s( set_1: HTupleType, set_2: HTupleType ) -> HTupleElementTypeHerror tuple_intersection( const Hlong Set1, const Hlong Set2, Hlong* Intersection )

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

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

HTuple HTuple.TupleIntersection( HTuple set2 )

説明🔗

tuple_intersectionTupleIntersection は、Intersectionintersectionintersection の Set1set1set_1 と Set2set2set_2 から交差セットを返します。例えば、 Set1set1set_1 の値が [0,1,3,3,5] で、Set2set2set_2 の値が [2,3,5, 10] の場合、出力 Intersectionintersectionintersection は [3,5] です。 また、このオペレーターでは、入力 tuple 内で混合タイプの要素を使用 できます。 ただし、異なるタイプを含む要素は、異なる要素と見なされます(例え ば、1.0 と 1 は異なります)。また、これは、Set1set1set_1 と Set2set2set_2 が異なるタイプの要素を含む場合、交差セットは空である 場合があることを意味します。例えば、Set1set1set_1 の値が [2,5,3] で、Set2set2set_2 の値が [2.0,5.0,0,10] の場合、出力 Intersectionintersectionintersection は空です。 tuple_intersectionTupleIntersection から結果として得られるtuple要素の順序は、 入力tuple内の順序と必ずしも一致しないことに注意してください。

例外: 入力tuple が 空🔗

どちらかの、または両方の入力tupleが空の場合、この関数は空のtupleを返します。

HDevelopインライン演算🔗

HDevelopは tuple_intersectionTupleIntersection の代わりとなるインライン演算を備えており、以下の構文形式で使 用することができます::

Intersection := intersection(Set1, Set2)

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 内部データレベルで自動的に並列演算処理を実施

パラメーター🔗

Set1set1set_1 (input_control) tuple(-array) → (integer / real / string / handle)HTuple (Hlong / double / HString / HHandle)HTuple (int / long / double / string / HHandle)HTupleTypeHtuple (Hlong / double / char* / handle)

入力 Tuple

Set2set2set_2 (input_control) tuple(-array) → (integer / real / string / handle)HTuple (Hlong / double / HString / HHandle)HTuple (int / long / double / string / HHandle)HTupleTypeHtuple (Hlong / double / char* / handle)

入力 Tuple

Intersectionintersectionintersection (output_control) tuple(-array) → (integer / real / string / handle)HTuple (Hlong / double / HString / HHandle)HTuple (int / long / double / string / HHandle)Sequence[HTupleElementType]Htuple (Hlong / double / char* / handle)

2 つの入力 tuple の交差セット

結果🔗

パラメーターが有効ならば、オペレーター tuple_intersectionTupleIntersection は値 2 (H_MSG_TRUE) を返します。

他のオペレーターとの組み合わせ🔗

組み合わせ

他の選択候補

tuple_unionTupleUnion

関連項目

tuple_differenceTupleDifference, tuple_symmdiffTupleSymmdiff, tuple_unionTupleUnion

モジュール🔗

Foundation