ClassesClassesClassesClasses | | | | Operators

tuple_findtuple_findTupleFindtuple_findTupleFindTupleFind (Operator)

Name

tuple_findtuple_findTupleFindtuple_findTupleFindTupleFind — Return the indices of all occurrences of a tuple within another tuple.

Signature

tuple_find( : : Tuple, ToFind : Indices)

Herror tuple_find(const Hlong Tuple, const Hlong ToFind, Hlong* Indices)

Herror T_tuple_find(const Htuple Tuple, const Htuple ToFind, Htuple* Indices)

Herror tuple_find(const HTuple& Tuple, const HTuple& ToFind, Hlong* Indices)

Herror tuple_find(const HTuple& Tuple, const HTuple& ToFind, HTuple* Indices)

void TupleFind(const HTuple& Tuple, const HTuple& ToFind, HTuple* Indices)

HTuple HTuple::TupleFind(const HTuple& ToFind) const

void HOperatorSetX.TupleFind(
[in] VARIANT Tuple, [in] VARIANT ToFind, [out] VARIANT* Indices)

VARIANT HTupleX.TupleFind(
[in] VARIANT Tuple, [in] VARIANT ToFind)

static void HOperatorSet.TupleFind(HTuple tuple, HTuple toFind, out HTuple indices)

HTuple HTuple.TupleFind(HTuple toFind)

Description

tuple_findtuple_findTupleFindtuple_findTupleFindTupleFind searches in TupleTupleTupleTupleTupletuple in ascending order for all occurrences of the values of the second tuple ToFindToFindToFindToFindToFindtoFind and returns the indices in IndicesIndicesIndicesIndicesIndicesindices (in relation to the first input tuple TupleTupleTupleTupleTupletuple). For example, if TupleTupleTupleTupleTupletuple contains the values [3,4,5,6,1,2,3,4,0] and ToFindToFindToFindToFindToFindtoFind contains the values [3,4], the output tuple IndicesIndicesIndicesIndicesIndicesindices will contain the values [0,6]. If the first tuple does not contain the second tuple as a subtuple, tuple_findtuple_findTupleFindtuple_findTupleFindTupleFind returns -1 in IndicesIndicesIndicesIndicesIndicesindices. It is allowed to mix strings and numbers in the input tuples.

Parallelization

Parameters

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

Input tuple to examine.

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

Input tuple with values to find.

IndicesIndicesIndicesIndicesIndicesindices (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Indices of the occurrences of the values to find in the tuple to examine.

Alternatives

tuple_sorttuple_sortTupleSorttuple_sortTupleSortTupleSort, tuple_inversetuple_inverseTupleInversetuple_inverseTupleInverseTupleInverse

Module

Foundation


ClassesClassesClassesClasses | | | | Operators