min_element finds the smallest element in the range [first, first+N)
More...
#include </home/runner/work/tfel/tfel/include/TFEL/FSAlgorithm/min_element.hxx>
|
|
template<typename ForwardIterator> |
| static TFEL_FSALGORITHM_INLINE ForwardIterator | exe_ (ForwardIterator p, ForwardIterator q) |
|
template<typename ForwardIterator, typename BinaryPredicate> |
| static TFEL_FSALGORITHM_INLINE ForwardIterator | exe_ (ForwardIterator p, ForwardIterator q, BinaryPredicate comp) |
| template<typename ForwardIterator> |
| static TFEL_FSALGORITHM_INLINE ForwardIterator | exe (ForwardIterator p) |
| template<typename ForwardIterator, typename BinaryPredicate> |
| static TFEL_FSALGORITHM_INLINE ForwardIterator | exe (ForwardIterator p, BinaryPredicate comp) |
template<unsigned int N>
class tfel::fsalgo::min_element< N >
min_element finds the smallest element in the range [first, first+N)
- Template Parameters
-
| N | number of elements of the range. |
This documentation is mostly inspired from: http://www.sgi.com/tech/stl/min_element.html
- Author
- Thomas Helfer
- Date
- 30/06/2006
◆ exe() [1/2]
template<unsigned int N>
template<typename ForwardIterator>
It returns the first iterator i in [first, first+N) such that no other iterator in [first, last) points to a value smaller than *i. The return value is first+N if and only if [first, last) is an empty range.
- Template Parameters
-
| ForwardIterator | iterator to the elements. |
- Parameters
-
| [in] | p | iterator to the first element |
- Returns
- ForwardIterator to the minimum element
- Precondition
- ForwardIterator is a model of Forward Iterator.
- ForwardIterator's value type is LessThan Comparable.
- Author
- Thomas Helfer
- Date
- 30/06/2006
◆ exe() [2/2]
template<unsigned int N>
template<typename ForwardIterator, typename BinaryPredicate>
This version version returns the first iterator i in [first, first+N) such that, for every iterator j in [first, first+N), comp(*i, *j) is false, where comp is a binary predicate given in argument
- Template Parameters
-
| ForwardIterator | iterator to the elements. |
| BinaryPredicate | comparison function |
- Parameters
-
| [in] | p | iterator to the first element |
| [in] | comp | comparison function |
- Returns
- ForwardIterator to the minimum element
- Precondition
- ForwardIterator is a model of Forward Iterator.
- BinaryPredicate is a model of Binary Predicate.
- ForwardIterator's value type is convertible to BinaryPredicate's first argument type and second argument type.
- Author
- Thomas Helfer
- Date
- 30/06/2006
The documentation for this class was generated from the following file: