tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndextuple_sort_index (Operator)

Name

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndextuple_sort_index — Sortieren eines Tupels und Rückgabe der Indizes des sortierten Tupels.

Signatur

tuple_sort_index( : : Tuple : Indices)

Herror tuple_sort_index(const Hlong Tuple, Hlong* Indices)

Herror T_tuple_sort_index(const Htuple Tuple, Htuple* Indices)

void TupleSortIndex(const HTuple& Tuple, HTuple* Indices)

HTuple HTuple::TupleSortIndex() const

static void HOperatorSet.TupleSortIndex(HTuple tuple, out HTuple indices)

HTuple HTuple.TupleSortIndex()

def tuple_sort_index(tuple: MaybeSequence[Union[float, int, str]]) -> Sequence[int]

def tuple_sort_index_s(tuple: MaybeSequence[Union[float, int, str]]) -> int

Beschreibung

tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index sortiert die Elemente des Eingabetupels TupleTupleTupleTupletupletuple in aufsteigender Reihenfolge und liefert als Resultat die Indizes der Elemente des sortierten Tupels (bezogen auf das Eingabetupel) in dem Ergebnistupel IndicesIndicesIndicesIndicesindicesindices zurück. Als Voraussetzung hierfür müssen alle Elemente von TupleTupleTupleTupletupletuple vergleichbar sein, das heißt, entweder TupleTupleTupleTupletupletuple besteht gänzlich aus Strings oder es enthält ausschließlich Zahlen, wobei in letzterem Fall auch ganze Zahlen und Gleitkommazahlen auch vermischt auftreten dürfen.

Sonderfall: Leeres Eingabetupel

Falls das Eingabetupel leer ist, gibt der Operator ein leeres Tupel zurück.

HDevelop Inline-Operation

HDevelop unterstützt eine Inline-Operation für tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index, die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden kann:

Indices := sort_index(Tuple)

Ausführungsinformationen

Parameter

TupleTupleTupleTupletupletuple (input_control)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Eingabetupel.

IndicesIndicesIndicesIndicesindicesindices (output_control)  integer(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Sortiertes Tupel.

Alternativen

tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort, tuple_inversetuple_inverseTupleInverseTupleInverseTupleInversetuple_inverse

Modul

Foundation