DUtils::Math Class Reference

Math functions. More...

#include <Math.hpp>

List of all members.

Classes

struct  bool2type

Static Public Member Functions

template<class T >
static double Mean (const std::vector< T > &v)
template<class T >
static double Stdev (const std::vector< T > &v)
template<class T >
static double Stdev (const std::vector< T > &v, double mean)
template<class T >
static double Median (const std::vector< T > &v)
template<class T >
static T Min (const std::vector< T > &v)
template<class T >
static T Max (const std::vector< T > &v)
template<class T >
static T signedAngle (T angle)
template<class T >
static T absoluteAngle (T angle)

Static Protected Member Functions

template<class T >
static T MinMax (const std::vector< T > &v, bool minormax, bool2type< true >)
template<class T >
static T MinMax (const std::vector< T > &v, bool minormax, bool2type< false >)

Detailed Description

Math functions.


Member Function Documentation

template<class T >
static T DUtils::Math::absoluteAngle ( angle  )  [inline, static]

Converts an angle in (-180..180] into an angle in [0..360)

Parameters:
angle angle in degrees
Returns:
absolute angle in degrees
template<class T >
static T DUtils::Math::Max ( const std::vector< T > &  v  )  [inline, static]

Returns the maximum value of v

Parameters:
v 
Returns:
minimum value
template<class T >
static double DUtils::Math::Mean ( const std::vector< T > &  v  )  [inline, static]

Returns the mean of a population

Parameters:
v population vector
template<class T >
static double DUtils::Math::Median ( const std::vector< T > &  v  )  [inline, static]

Returns the median of a population

Parameters:
v 
template<class T >
static T DUtils::Math::Min ( const std::vector< T > &  v  )  [inline, static]

Returns the minimum value of v

Parameters:
v 
Returns:
minimum value
template<class T >
T DUtils::Math::MinMax ( const std::vector< T > &  v,
bool  minormax,
bool2type< false >   
) [inline, static, protected]

Returns the minimum or maximum for non-numeric types

Parameters:
v 
minormax true for calculating the min, false otherwise
template<class T >
T DUtils::Math::MinMax ( const std::vector< T > &  v,
bool  minormax,
bool2type< true >   
) [inline, static, protected]

Returns the minimum or maximum for numeric types

Parameters:
v 
minormax true for calculating the min, false otherwise
template<class T >
static T DUtils::Math::signedAngle ( angle  )  [inline, static]

Converts an angle in [0..360) into an angle in (-180..180]

Parameters:
angle angle in degrees
Returns:
signed angle in degrees
template<class T >
static double DUtils::Math::Stdev ( const std::vector< T > &  v,
double  mean 
) [inline, static]

Returns the standard deviation of a population

Parameters:
v population vector
mean the mean of the population
template<class T >
static double DUtils::Math::Stdev ( const std::vector< T > &  v  )  [inline, static]

Returns the standard deviation of a population

Parameters:
v population vector

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Friends
Generated on Thu Feb 7 19:16:00 2013 by  doxygen 1.6.3