min_element

min_element is to Finds the first occurrence of smallest element in a specified range where the ordering criterion may be specified by a binary predicate.

Function Descriptions,Parameters,Return Value,

Function Descriptions

template<class ForwardIterator>
ForwardIterator min_element( ForwardIterator _First, ForwardIterator _Last );
template<class ForwardIterator, class BinaryPredicate>
ForwardIterator min_element( ForwardIterator _First, ForwardIterator _Last, BinaryPredicate _Comp );

Parameters

_FirstA
forward iterator addressing the position of the first element in the range to be searched for the largest element.
_LastA
forward iterator addressing the position one past the final element in the range to be searched for the largest element.
_CompUser
-defined predicate function object that defines the sense in which one element is greater than another. The binary predicate takes two arguments and should return true when the first element is less than the second element and false otherwise.

Return Value

A forward iterator addressing the position of the first occurrence of the smallest element in the range searched.

相關詞條

熱門詞條

聯絡我們