Classes | Static Public Member Functions | Static Public Attributes | Private Member Functions
Math Class Reference

Generic math and statistics functions. More...

#include <Math.h>

List of all members.

Classes

struct  WeightedValue

Static Public Member Functions

static double angleToPercent (double newAngle, double oldAngle)
static float angleVariance (float meanAngle, const std::vector< float > &angles)
static Point2D center (std::vector< Point2D > &points)
static float deg2Rad (float deg)
static double horizontalViewAngle (double diagonalAngle, double aspectRatio)
template<class ValueT >
static ValueT max (ValueT a, ValueT b)
template<class ContainerT >
static double mean (const ContainerT &values)
static float meanAngle (const std::vector< float > &angles)
static float meanAngleWeighted (const std::vector< WeightedValue > &weightedAngles)
template<class ValueT >
static ValueT min (ValueT a, ValueT b)
static float minTurnAngle (float angle1, float angle2)
static double percentToAngle (double percent, double angle)
static float rad2Deg (float rad)
static double random01 (unsigned long init=0)
static double randomGauss (float variance=1.0)
template<class ContainerT >
static double variance (const ContainerT &values)
static double verticalViewAngle (double diagonalAngle, double aspectRatio)

Static Public Attributes

static const double Pi = 3.14159265358979323846

Private Member Functions

 Math ()
 The constructor.
 ~Math ()
 The destructor.

Detailed Description

Generic math and statistics functions.

Author:
David Gossow (RX)

Definition at line 22 of file Math.h.


Constructor & Destructor Documentation

Math::Math ( ) [private]

The constructor.

Math::~Math ( ) [private]

The destructor.


Member Function Documentation

static double Math::angleToPercent ( double  newAngle,
double  oldAngle 
) [inline, static]
Returns:
ratio between one dimension seen under old viewangle and dimension under new viewangle

Definition at line 67 of file Math.h.

static float Math::angleVariance ( float  meanAngle,
const std::vector< float > &  angles 
) [static]
Returns:
variance for given mean
static Point2D Math::center ( std::vector< Point2D > &  points) [static]
static float Math::deg2Rad ( float  deg) [inline, static]

Definition at line 58 of file Math.h.

static double Math::horizontalViewAngle ( double  diagonalAngle,
double  aspectRatio 
) [inline, static]
Returns:
horizontal view angle corresponding to diagonal view angle and aspect ratio (e.g. 4.0/3.0)

Definition at line 73 of file Math.h.

template<class ValueT >
static ValueT Math::max ( ValueT  a,
ValueT  b 
) [inline, static]

Definition at line 85 of file Math.h.

template<class ContainerT >
double Math::mean ( const ContainerT &  values) [static]
Returns:
mean value

Definition at line 98 of file Math.h.

static float Math::meanAngle ( const std::vector< float > &  angles) [static]
Returns:
mean angle of given values
Note:
there are always two possible choices for the mean angle. This function returns the one with the smallest deviation
Works for angles in [-Pi..Pi], negative angles are treated
static float Math::meanAngleWeighted ( const std::vector< WeightedValue > &  weightedAngles) [static]
template<class ValueT >
static ValueT Math::min ( ValueT  a,
ValueT  b 
) [inline, static]

Definition at line 82 of file Math.h.

static float Math::minTurnAngle ( float  angle1,
float  angle2 
) [static]
Returns:
minimal angle needed to turn from angle 1 to angle 2 [-Pi..Pi]
static double Math::percentToAngle ( double  percent,
double  angle 
) [inline, static]
Returns:
angle under which the ratio between dimension seen under old viewangle and new viewangle equals percent

Definition at line 70 of file Math.h.

static float Math::rad2Deg ( float  rad) [inline, static]

Definition at line 60 of file Math.h.

static double Math::random01 ( unsigned long  init = 0) [static]
static double Math::randomGauss ( float  variance = 1.0) [static]
template<class ContainerT >
double Math::variance ( const ContainerT &  values) [static]
Returns:
variance of given values

Definition at line 113 of file Math.h.

static double Math::verticalViewAngle ( double  diagonalAngle,
double  aspectRatio 
) [inline, static]
Returns:
vertical view angle corresponding to diagonal view angle and aspect ratio (e.g. 4.0/3.0)

Definition at line 76 of file Math.h.


Member Data Documentation

const double Math::Pi = 3.14159265358979323846 [static]

Definition at line 32 of file Math.h.


The documentation for this class was generated from the following file:


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09