Evo C++ Library v0.5.1
Functions
EvoAlgs

Evo general algorithm helpers. More...

Functions

template<class T >
T & applymax (T &val, T &max)
 
template<class T >
T & applymin (T &val, T &min)
 
template<class T >
T & applyminmax (T &val, T &min, T &max)
 
template<class T >
T & constrain (T &val, T &min, T &max)
 
template<class T >
T & constrainmax (T &val, T &max)
 
template<class T >
T & constrainmin (T &val, T &min)
 
template<class T >
first (T val1, T val2)
 
template<class T >
first (T val1, T val2, T val3)
 
template<class T >
T & max (T &a, T &b)
 Returns highest of given values. More...
 
template<class T >
T & max (T &a, T &b, T &c)
 Returns highest of given values. More...
 
template<class T >
T & min (T &a, T &b)
 Returns lowest of given values. More...
 
template<class T >
T & min (T &a, T &b, T &c)
 Returns lowest of given values. More...
 
template<class T >
bool validate (T &val, T &min, T &max)
 
template<class T >
T & validate (T &val, T &min, T &max, T &invalid)
 

Detailed Description

Evo general algorithm helpers.

Function Documentation

◆ applymax()

T& evo::applymax ( T &  val,
T &  max 
)
inline

◆ applymin()

T& evo::applymin ( T &  val,
T &  min 
)
inline

◆ applyminmax()

T& evo::applyminmax ( T &  val,
T &  min,
T &  max 
)
inline

◆ constrain()

T& evo::constrain ( T &  val,
T &  min,
T &  max 
)
inline

◆ constrainmax()

T& evo::constrainmax ( T &  val,
T &  max 
)
inline

◆ constrainmin()

T& evo::constrainmin ( T &  val,
T &  min 
)
inline

◆ first() [1/2]

T evo::first ( val1,
val2 
)
inline

◆ first() [2/2]

T evo::first ( val1,
val2,
val3 
)
inline

◆ max() [1/2]

T& evo::max ( T &  a,
T &  b 
)
inline

Returns highest of given values.

Parameters
aValue a.
bValue b.
Returns
Highest value (a or b).

◆ max() [2/2]

T& evo::max ( T &  a,
T &  b,
T &  c 
)
inline

Returns highest of given values.

Parameters
aValue a.
bValue b.
cValue c.
Returns
Highest value (a, b, or c).

◆ min() [1/2]

T& evo::min ( T &  a,
T &  b 
)
inline

Returns lowest of given values.

Parameters
aValue a.
bValue b.
Returns
Lowest value (a or b).

◆ min() [2/2]

T& evo::min ( T &  a,
T &  b,
T &  c 
)
inline

Returns lowest of given values.

Parameters
aValue a.
bValue b.
cValue c.
Returns
Lowest value (a, b, or c).

◆ validate() [1/2]

bool evo::validate ( T &  val,
T &  min,
T &  max 
)
inline

◆ validate() [2/2]

T& evo::validate ( T &  val,
T &  min,
T &  max,
T &  invalid 
)
inline