Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Functions
Saf/Algo/Selection/Range/MinMax.h File Reference

Find minimum and maximum in a range.
More...

#include "../../../Collection/Pair.h"
#include "../Predicate.h"
#include "../../Type/IteratorTraits.h"

Go to the source code of this file.

Namespaces

namespace  Saf
 Global library namespace.
namespace  Saf::Algo
 Generic data handling algorithms and structures.
namespace  Saf::Algo::Selection
 Selection algorithms.
namespace  Saf::Algo::Selection::Range
 Selection algorithms on sequences.

Functions

template<class FwdIter , class Comp >
FwdIter Saf::Algo::Selection::Range::Max (FwdIter begin, FwdIter end, Comp comp)
 Find the iterator max such that for all iterators j in the range [begin, end) it holds that comp(*max, *j) == false.
template<class FwdIter >
FwdIter Saf::Algo::Selection::Range::Max (FwdIter begin, FwdIter end)
 Find the iterator max such that for all iterators j in the range [begin, end) it holds that !(*max < *j).
template<class FwdIter , class Comp >
FwdIter Saf::Algo::Selection::Range::Min (FwdIter begin, FwdIter end, Comp comp)
 Find the iterator min such that for all iterators j in the range [begin, end) it holds that comp(*j, *min) == false.
template<class FwdIter >
FwdIter Saf::Algo::Selection::Range::Min (FwdIter begin, FwdIter end)
 Find the iterator min such that for all iterators j in the range [begin, end) it holds that !(*j < *min).
template<class FwdIter , class Comp >
Collection::Pair< FwdIter,
FwdIter > 
Saf::Algo::Selection::Range::MinMax (FwdIter begin, FwdIter end, Comp comp)
 Find the iterators to the minimum and maximum elements in the range [begin, end).
template<class FwdIter >
Collection::Pair< FwdIter,
FwdIter > 
Saf::Algo::Selection::Range::MinMax (FwdIter begin, FwdIter end)
 Find the iterators to the minimum and maximum elements in the range [begin, end).

Detailed Description

Find minimum and maximum in a range.
Author:
Ondrej Danek ondre.nosp@m.j.da.nosp@m.nek@g.nosp@m.mail.nosp@m..com
Date:
2012