PowerSum Class Reference

#include <PowerSum.hpp>

List of all members.

Public Types

typedef std::list< double
>::const_iterator 
dlc_iterator

Public Member Functions

 PowerSum ()
void clear () throw ()
 Reset all sums.
void add (double x) throw ()
 Add a single value to the sums.
void subtract (double x) throw ()
 Remove a single value from the sums.
void add (dlc_iterator b, dlc_iterator e) throw ()
 Adds all value in the list to the sums.
void subtract (dlc_iterator b, dlc_iterator e) throw ()
 Removes all values in the list from the sums.
double moment (int i) const throw ()
 See http://mathworld.wolfram.com/SampleCentralMoment.html for computing the central moments from the power sums.
long size () const throw ()
 Reuturn the number of points in the current sum.
double average () const throw ()
 Computes the indicated value.
double variance () const throw ()
double skew () const throw ()
double kurtosis () const throw ()
void dump (std::ostream &str) const throw ()

Static Public Attributes

const int order = 4


Member Typedef Documentation

typedef std::list<double>::const_iterator dlc_iterator
 

Definition at line 71 of file PowerSum.hpp.


Constructor & Destructor Documentation

PowerSum  )  [inline]
 

Definition at line 54 of file PowerSum.hpp.


Member Function Documentation

void add dlc_iterator  b,
dlc_iterator  e
throw ()
 

Adds all value in the list to the sums.

Definition at line 67 of file PowerSum.cpp.

void add double  x  )  throw ()
 

Add a single value to the sums.

Definition at line 51 of file PowerSum.cpp.

double average  )  const throw ()
 

Computes the indicated value.

Definition at line 107 of file PowerSum.cpp.

void clear  )  throw ()
 

Reset all sums.

Definition at line 44 of file PowerSum.cpp.

void dump std::ostream &  str  )  const throw ()
 

Definition at line 137 of file PowerSum.cpp.

References gpstk::sqrt().

double kurtosis  )  const throw ()
 

Definition at line 129 of file PowerSum.cpp.

References PowerSum::moment().

double moment int  i  )  const throw ()
 

See http://mathworld.wolfram.com/SampleCentralMoment.html for computing the central moments from the power sums.

Definition at line 83 of file PowerSum.cpp.

Referenced by PowerSum::kurtosis(), PowerSum::skew(), and PowerSum::variance().

long size void   )  const throw () [inline]
 

Reuturn the number of points in the current sum.

Definition at line 84 of file PowerSum.hpp.

double skew  )  const throw ()
 

Definition at line 122 of file PowerSum.cpp.

References PowerSum::moment(), and gpstk::pow().

void subtract dlc_iterator  b,
dlc_iterator  e
throw ()
 

Removes all values in the list from the sums.

See the warning with the subtract(double) method.

Definition at line 74 of file PowerSum.cpp.

void subtract double  x  )  throw ()
 

Remove a single value from the sums.

Note that the higher order sums can get quite large in magnitude. When removing a value that is far from the average, it is possible for numerical error to creep into the sums. One way around this is to simply recompute the sums from scratch when this happens.

Definition at line 59 of file PowerSum.cpp.

double variance  )  const throw ()
 

Definition at line 115 of file PowerSum.cpp.

References PowerSum::moment().


Member Data Documentation

const int order = 4 [static]
 

Definition at line 56 of file PowerSum.hpp.


The documentation for this class was generated from the following files:
Generated on Fri Dec 6 03:31:21 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1