Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Namespaces | Functions
Saf::Algo::Selection Namespace Reference

Selection algorithms. More...

Namespaces

namespace  Range
 Selection algorithms on sequences.

Functions

template<class T >
Max (const T &x, const T &y)
 Get a maximum of two numbers.
template<class T , class Pred >
Max (const T &x, const T &y, Pred pred)
 Get a maximum of two numbers using a predicate pred.
template<class T >
Max (const T &x, const T &y, const T &z)
 Get a maximum of three numbers.
template<class T , class Pred >
Max (const T &x, const T &y, const T &z, Pred pred)
 Get a maximum of three numbers using a predicate pred.
template<class T , class Pred >
Median (const T &x, const T &y, const T &z, Pred pred)
 Get median of three values using predicate pred.
template<class T >
Median (const T &x, const T &y, const T &z)
 Get median of three values (using the standard less than comparator).
template<class T >
Min (const T &x, const T &y)
 Get a minimum of two numbers.
template<class T , class Pred >
Min (const T &x, const T &y, Pred pred)
 Get a minimum of two numbers using a predicate pred.
template<class T >
Min (const T &x, const T &y, const T &z)
 Get a minimum of three numbers.
template<class T , class Pred >
Min (const T &x, const T &y, const T &z, Pred pred)
 Get a minimum of three numbers using a predicate pred.
template<class T , class Pred >
Collection::Pair< T, T > MinMax (const T &x, const T &y, Pred pred)
 Get simultaneously a minimum and a maximum of two values.
template<class T >
Collection::Pair< T, T > MinMax (const T &x, const T &y)
 Get simultaneously a minimum and a maximum of two values.
template<class T , class Pred >
Collection::Pair< T, T > MinMax (const T &x, const T &y, const T &z, Pred pred)
 Get simultaneously a minimum and a maximum of three values.
template<class T >
Collection::Pair< T, T > MinMax (const T &x, const T &y, const T &z)
 Get simultaneously a minimum and a maximum of three values.

Detailed Description

Selection algorithms.


Function Documentation

template<class T >
T Saf::Algo::Selection::Max ( const T &  x,
const T &  y 
) [inline]

Get a maximum of two numbers.

template<class T , class Pred >
T Saf::Algo::Selection::Max ( const T &  x,
const T &  y,
Pred  pred 
) [inline]

Get a maximum of two numbers using a predicate pred.

template<class T >
T Saf::Algo::Selection::Max ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Get a maximum of three numbers.

template<class T , class Pred >
T Saf::Algo::Selection::Max ( const T &  x,
const T &  y,
const T &  z,
Pred  pred 
) [inline]

Get a maximum of three numbers using a predicate pred.

template<class T , class Pred >
T Saf::Algo::Selection::Median ( const T &  x,
const T &  y,
const T &  z,
Pred  pred 
) [inline]

Get median of three values using predicate pred.

Parameters:
[in]xFirst value.
[in]ySecond value.
[in]zThird value.
[in]predBinary comparison predicate.
template<class T >
T Saf::Algo::Selection::Median ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Get median of three values (using the standard less than comparator).

Parameters:
[in]xFirst value.
[in]ySecond value.
[in]zThird value.
template<class T >
T Saf::Algo::Selection::Min ( const T &  x,
const T &  y 
) [inline]

Get a minimum of two numbers.

template<class T , class Pred >
T Saf::Algo::Selection::Min ( const T &  x,
const T &  y,
Pred  pred 
) [inline]

Get a minimum of two numbers using a predicate pred.

template<class T >
T Saf::Algo::Selection::Min ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Get a minimum of three numbers.

template<class T , class Pred >
T Saf::Algo::Selection::Min ( const T &  x,
const T &  y,
const T &  z,
Pred  pred 
) [inline]

Get a minimum of three numbers using a predicate pred.

template<class T , class Pred >
Collection::Pair<T,T> Saf::Algo::Selection::MinMax ( const T &  x,
const T &  y,
Pred  pred 
) [inline]

Get simultaneously a minimum and a maximum of two values.

template<class T >
Collection::Pair<T,T> Saf::Algo::Selection::MinMax ( const T &  x,
const T &  y 
) [inline]

Get simultaneously a minimum and a maximum of two values.

template<class T , class Pred >
Collection::Pair<T,T> Saf::Algo::Selection::MinMax ( const T &  x,
const T &  y,
const T &  z,
Pred  pred 
) [inline]

Get simultaneously a minimum and a maximum of three values.

template<class T >
Collection::Pair<T,T> Saf::Algo::Selection::MinMax ( const T &  x,
const T &  y,
const T &  z 
) [inline]

Get simultaneously a minimum and a maximum of three values.