Wiselib
Public Types | Public Member Functions
wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES > Class Template Reference

Class that provides statistic information. More...

#include <localization_statistic.h>

List of all members.

Public Types

typedef OsModel_P OsModel
typedef list_static< OsModel,
double, MAX_ENTRIES > 
List
typedef List::iterator ListIterator
typedef LocalizationStatistic
< OsModel, MAX_ENTRIES > 
self_type

Public Member Functions

void clear (void)
construction / destruction
 LocalizationStatistic ()
 LocalizationStatistic (const self_type &)
 ~LocalizationStatistic ()
adding values
void add (double)
 Add value to internal representation.
LocalizationStatisticoperator+= (double)
 Add value to internal representation.
statistic methods
double mean (void)
 This method gives the mean of all values with:

\[ \mu = \frac{1}{N}\sum^N_{i=1}x_i \]

.

double variance (void)
 This method gives the variance of all values with:

\[ \sigma^2 = \frac{1}{N}\sum^N_{i=1}{(x_i - \mu)^2} \]

.

double std_dev (void)
 This method gives the standard deviation of all values with:

\[ \sigma = \sqrt{\sigma^2} \]

.

double min (void)
double max (void)
some internal info
size_t size (void)
List as_list (void)

Detailed Description

template<typename OsModel_P, int MAX_ENTRIES = 20>
class wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >

Class that provides statistic information.

This class provides statistic information such like mean, variance and standard deviation.


Member Typedef Documentation

template<typename OsModel_P, int MAX_ENTRIES = 20>
typedef list_static<OsModel, double, MAX_ENTRIES> wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::List
template<typename OsModel_P, int MAX_ENTRIES = 20>
typedef List::iterator wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::ListIterator
template<typename OsModel_P, int MAX_ENTRIES = 20>
typedef OsModel_P wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::OsModel
template<typename OsModel_P, int MAX_ENTRIES = 20>
typedef LocalizationStatistic<OsModel, MAX_ENTRIES> wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::self_type

Constructor & Destructor Documentation

template<typename OsModel_P , int MAX_ENTRIES>
wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::LocalizationStatistic ( )
template<typename OsModel_P , int MAX_ENTRIES>
wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::LocalizationStatistic ( const self_type ls)
template<typename OsModel_P , int MAX_ENTRIES>
wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::~LocalizationStatistic ( )

Member Function Documentation

template<typename OsModel_P , int MAX_ENTRIES>
void wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::add ( double  value)

Add value to internal representation.

See also:
operator+=()
template<typename OsModel_P , int MAX_ENTRIES>
LocalizationStatistic< OsModel_P, MAX_ENTRIES >::List wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::as_list ( void  )
Returns:
Values as list representation
template<typename OsModel_P , int MAX_ENTRIES>
void wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::clear ( void  )
template<typename OsModel_P , int MAX_ENTRIES>
double wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::max ( void  )
Returns:
Maximum of all values
template<typename OsModel_P , int MAX_ENTRIES>
double wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::mean ( void  )

This method gives the mean of all values with:

\[ \mu = \frac{1}{N}\sum^N_{i=1}x_i \]

.

Returns:
average of all values
See also:
variance(), std_dev()
template<typename OsModel_P , int MAX_ENTRIES>
double wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::min ( void  )
Returns:
Minimum of all values
template<typename OsModel_P , int MAX_ENTRIES>
LocalizationStatistic< OsModel_P, MAX_ENTRIES >::self_type & wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::operator+= ( double  value)

Add value to internal representation.

See also:
add()
template<typename OsModel_P , int MAX_ENTRIES>
size_t wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::size ( void  )
Returns:
Number of values
template<typename OsModel_P , int MAX_ENTRIES>
double wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::std_dev ( void  )

This method gives the standard deviation of all values with:

\[ \sigma = \sqrt{\sigma^2} \]

.

Returns:
standard deviation of all values
See also:
mean(), variance()
template<typename OsModel_P , int MAX_ENTRIES>
double wiselib::LocalizationStatistic< OsModel_P, MAX_ENTRIES >::variance ( void  )

This method gives the variance of all values with:

\[ \sigma^2 = \frac{1}{N}\sum^N_{i=1}{(x_i - \mu)^2} \]

.

Returns:
variance of all values
See also:
mean(), std_dev()

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines