select |
Functions | |
template<typename T , typename R > | |
const T & | select_1 (const T &a, const T &b, const T &c, R r) |
template<typename T , typename R > | |
T & | select_1 (T &a, T &b, T &c, R r) |
template<typename T , typename R > | |
T & | select_1_ab (T &a, T &b, T &c, R r) |
template<typename T , typename R > | |
const T & | select_1_ab (const T &a, const T &b, const T &c, R r) |
template<typename T , typename R > | |
const T & | select_1_ac (const T &a, const T &b, const T &c, R r) |
template<typename T , typename R > | |
T & | select_1_ac (T &a, T &b, T &c, R r) |
Detailed Description
The select() algorithms are building blocks for other algorithms such as median() and clamp(). The general form of a select algorithm is:
select_<argument_index>_<argument_ordering>()
For example: select_1_ac(a, b, c)
means "select the second element (index starts at
zero) assuming that arguments \c a and \c b are supplied in non-decreasing order."
Althought we don't provide select functions with two arguments, adobe::min is select_0 and adobe::max is select_1.
All of the select function are stable. An algorithm is stable if it respects the original order of equivalent objects. So if we think of minimum and maximum as selecting, respectively, the smallest and second-smallest from a list of two arguments, stability requires that when called with equivalent elements, minimum should return the first and maximum the second.
Function Documentation
const T& adobe::select_1 | ( | const T & | a, |
const T & | b, | ||
const T & | c, | ||
R | r | ||
) |
select_1 implementation
Definition at line 92 of file algorithm/select.hpp.
T& adobe::select_1 | ( | T & | a, |
T & | b, | ||
T & | c, | ||
R | r | ||
) |
select_1 implementation
Definition at line 100 of file algorithm/select.hpp.
T& adobe::select_1_ab | ( | T & | a, |
T & | b, | ||
T & | c, | ||
R | r | ||
) |
select_1_ab implementation
Definition at line 81 of file algorithm/select.hpp.
const T& adobe::select_1_ab | ( | const T & | a, |
const T & | b, | ||
const T & | c, | ||
R | r | ||
) |
select_1_ab implementation
Definition at line 70 of file algorithm/select.hpp.
const T& adobe::select_1_ac | ( | const T & | a, |
const T & | b, | ||
const T & | c, | ||
R | r | ||
) |
select_1_ac implementation
Definition at line 48 of file algorithm/select.hpp.
T& adobe::select_1_ac | ( | T & | a, |
T & | b, | ||
T & | c, | ||
R | r | ||
) |
select_1_ac implementation
Definition at line 59 of file algorithm/select.hpp.