tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndextuple_sort_index (算子名称)
名称
tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndextuple_sort_index
— Sort the elements of a tuple and return the indices of the sorted tuple.
参数签名
Herror tuple_sort_index(const Hlong Tuple, Hlong* Indices)
Herror T_tuple_sort_index(const Htuple Tuple, Htuple* Indices)
def tuple_sort_index(tuple: MaybeSequence[Union[float, int, str]]) -> Sequence[int]
def tuple_sort_index_s(tuple: MaybeSequence[Union[float, int, str]]) -> int
描述
tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index
sorts all elements of TupleTupleTupleTupletupletuple
in
ascending order and returns the indices of the elements of the
sorted tuple (in relation to the input tuple TupleTupleTupleTupletupletuple
) with
IndicesIndicesIndicesIndicesindicesindices
. As a precondition the single elements of
TupleTupleTupleTupletupletuple
must be comparable. Thus, TupleTupleTupleTupletupletuple
must
either exclusively consist of strings or it must only contain
(integer or floating point) numbers. In the latter case integers
and floating point numbers may be mixed.
Exception: Empty input tuple
If the input tuple is empty, the operator returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index
,
which can be used in an expression in the following syntax:
Indices := sort_index(Tuple)
运行信息
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
参数表
TupleTupleTupleTupletupletuple
(input_control) tuple(-array) →
HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Input tuple.
IndicesIndicesIndicesIndicesindicesindices
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Sorted tuple.
可替代算子
tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort
,
tuple_inversetuple_inverseTupleInverseTupleInverseTupleInversetuple_inverse
模块
Foundation