tuple_sorttuple_sortTupleSortTupleSorttuple_sort (算子)
名称
tuple_sorttuple_sortTupleSortTupleSorttuple_sort — 按升序对元组的元素进行排序。
签名
def tuple_sort(tuple: MaybeSequence[Union[float, int, str]]) -> Sequence[Union[float, int, str]]
def tuple_sort_s(tuple: MaybeSequence[Union[float, int, str]]) -> Union[float, int, str]
描述
tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort sorts all elements of TupleTupleTupleTupletupletuple in ascending order
and returns the result with SortedSortedSortedSortedsortedsorted. 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.
例外:空输入元组
If the input tuple is empty, the operator returns an empty tuple.
HDevelop 内联操作
HDevelop provides an in-line operation for tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort,
which can be used in an expression in the following syntax:
Sorted := sort(Tuple)
执行信息
- 多线程类型:独立(即使使用独占算子也能并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在内部数据级别上自动并行化。
参数
TupleTupleTupleTupletupletuple (输入控制) tuple(-array) → HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Input tuple.
SortedSortedSortedSortedsortedsorted (输出控制) tuple(-array) → HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Sorted tuple.
替代
tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index,
tuple_inversetuple_inverseTupleInverseTupleInverseTupleInversetuple_inverse
模块
基础