nth_element (STL/CLR)

分区元素范围,在范围内正确定位序列的第 n 个元素,以使序列中位于此元素之前的所有元素小于或等于此元素,位于此元素之后的所有元素大于或等于此元素。

template<class _RanIt> inline
    void nth_element(_RanIt _First, _RanIt _Nth, _RanIt _Last);
template<class _RanIt, class _Pr> inline
    void nth_element(_RanIt _First, _RanIt _Nth, _RanIt _Last,
        _Pr _Pred);

备注

此函数行为与 STL nth_element函数相同。 有关详细信息,请参阅nth_element

要求

标头: <cliext/algorithm>

命名空间: cliext

请参见

参考

algorithm (STL/CLR)