tuple_findTupleFindTupleFindtuple_findtuple_find
説明
tuple_findTupleFindTupleFindtuple_findtuple_find — 他の tuple 内から特定の tupleを検索しすべてのインデックスを返す。
書式
tuple_find( tuple Tuple, tuple ToFind, out integer Indices )void TupleFind( const HTuple& Tuple, const HTuple& ToFind, HTuple* Indices )static void HOperatorSet.TupleFind( HTuple tuple, HTuple toFind, out HTuple indices )def tuple_find( tuple: MaybeSequence[Union[float, int, str]], to_find: MaybeSequence[Union[float, int, str]] ) -> Sequence[int]
def tuple_find_s( tuple: MaybeSequence[Union[float, int, str]], to_find: MaybeSequence[Union[float, int, str]] ) -> intHerror tuple_find( const Hlong Tuple, const Hlong ToFind, Hlong* Indices )
Herror T_tuple_find( const Htuple Tuple, const Htuple ToFind, Htuple* Indices )
HTuple HTuple::TupleFind( const HTuple& ToFind ) const
HTuple HTuple.TupleFind( HTuple toFind )
説明
tuple_findTupleFind は、1 つ目の tuple Tupletupletuple 内から 2 つ目の
tuple ToFindtoFindto_findを連続的に探索し、1 つ目の入力 tuple
Tupletupletuple に一致した要素のインデックスを Indicesindicesindices に返します。
例えば、もし Tupletupletuple が [3,4,5,6,1,2,3,4,0] で ToFindtoFindto_find
が [3,4] であった場合、出力 tuple Indicesindicesindices は [0,6] とな
ります。
もし 1 つ目の tuple が 2 つ目の tuple を含まない場合、
tuple_findTupleFind に Indicesindicesindices に-1 を返します。入力 tuples
には数字と文字が混在しても構いません。
例外: 入力tuple が 空
どちらかの、または両方の入力tupleが空の場合、この関数は空のtupleを返します。
HDevelopインライン演算
HDevelopは tuple_findTupleFind の代わりとなるインライン演算を備えており、以下の構文形式で使
用することができます::
Indices := find(Tuple, ToFind)
実行情報
実行情報
パラメーター
Tupletupletuple (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[float, int, str]]Htuple (Hlong / double / char*)
入力 tuple 1
ToFindtoFindto_find (input_control) tuple(-array) → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)MaybeSequence[Union[float, int, str]]Htuple (Hlong / double / char*)
入力 tuple 2
Indicesindicesindices (output_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)
Tuple に出現した ToFind のインデックス
他のオペレーターとの組み合わせ
組み合わせ
他の選択候補
tuple_find_firstTupleFindFirst, tuple_find_lastTupleFindLast, tuple_sortTupleSort, tuple_inverseTupleInverse, tuple_equal_elemTupleEqualElem
モジュール
Foundation