tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRank (Operator)
Name
tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRank
— Select the element of rank n of a tuple.
Signature
Description
tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRankTupleSelectRank
sorts the elements of the tuple
TupleTupleTupleTupletuple
and returns the element of rank n in SelectedSelectedSelectedSelectedselected
.
RankIndexRankIndexRankIndexRankIndexrankIndex
determines the index of the element to select.
Thus, RankIndexRankIndexRankIndexRankIndexrankIndex
may only contain integer values (any floating point
number in RankIndexRankIndexRankIndexRankIndexrankIndex
must represent an integer value without
fraction). Indices of tuple elements start at 0, i.e. the lowest
tuple element has the index 0.
Exception: Empty input tuples
If RankIndexRankIndexRankIndexRankIndexrankIndex
is empty, the operator returns an empty tuple.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRankTupleSelectRank
,
which can be used in an expression in the following syntax:
Selected := select_rank(Tuple, RankIndex)
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
TupleTupleTupleTupletuple
(input_control) number(-array) →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Input tuple.
RankIndexRankIndexRankIndexRankIndexrankIndex
(input_control) number →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Rank of the element to select.
SelectedSelectedSelectedSelectedselected
(output_control) number →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Selected tuple element.
Alternatives
tuple_sort_indextuple_sort_indexTupleSortIndexTupleSortIndexTupleSortIndex
,
tuple_sorttuple_sortTupleSortTupleSortTupleSort
See also
tuple_mediantuple_medianTupleMedianTupleMedianTupleMedian
,
tuple_selecttuple_selectTupleSelectTupleSelectTupleSelect
Module
Foundation