tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRanktuple_select_rank (算子)
名称
tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRanktuple_select_rank — 选择元组中排名 n 的元素。
签名
def tuple_select_rank(tuple: MaybeSequence[Union[float, int]], rank_index: Union[float, int]) -> Union[float, int]
描述
tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRankTupleSelectRanktuple_select_rank sorts the elements of the tuple
TupleTupleTupleTupletupletuple and returns the element of rank n in SelectedSelectedSelectedSelectedselectedselected.
RankIndexRankIndexRankIndexRankIndexrankIndexrank_index determines the index of the element to select.
Thus, RankIndexRankIndexRankIndexRankIndexrankIndexrank_index may only contain integer values (any floating point
number in RankIndexRankIndexRankIndexRankIndexrankIndexrank_index must represent an integer value without
fraction). Indices of tuple elements start at 0, i.e. the lowest
tuple element has the index 0.
例外:空输入元组
If RankIndexRankIndexRankIndexRankIndexrankIndexrank_index is empty, the operator returns an empty tuple.
HDevelop 内联操作
HDevelop provides an in-line operation for tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRankTupleSelectRanktuple_select_rank,
which can be used in an expression in the following syntax:
Selected := select_rank(Tuple, RankIndex)
执行信息
- 多线程类型:独立(即使使用独占算子也能并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
TupleTupleTupleTupletupletuple (输入控制) number(-array) → HTupleMaybeSequence[Union[float, int]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Input tuple.
RankIndexRankIndexRankIndexRankIndexrankIndexrank_index (输入控制) number → HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Rank of the element to select.
SelectedSelectedSelectedSelectedselectedselected (输出控制) number → HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Selected tuple element.
替代
tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndextuple_sort_index,
tuple_sorttuple_sortTupleSortTupleSortTupleSorttuple_sort
另见
tuple_mediantuple_medianTupleMedianTupleMedianTupleMediantuple_median,
tuple_selecttuple_selectTupleSelectTupleSelectTupleSelecttuple_select
模块
基础