BivarStats Class Template Reference
[Mathematical algorithms]

#include <BivarStats.hpp>

Collaboration diagram for BivarStats:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class gpstk::BivarStats< T >

Conventional statistics for two samples.

Constructor does the same as clear(); use this when starting a new series of input samples.

Definition at line 50 of file BivarStats.hpp.

Public Member Functions

void clear (void)
 This assumes that the accessors will check for n>0, which they do.
size_t n (void) const
 Return the sample size.
minimumX (void) const
maximumX (void) const
minimumY (void) const
maximumY (void) const
averageX (void) const
averageY (void) const
varianceX (void) const
varianceY (void) const
stdDevX (void) const
stdDevY (void) const
slope (void) const
 Return slope of best-fit line Y=slope*X + intercept.
intercept (void) const
 Return intercept of best-fit line Y=slope*X + intercept.
sigmaSlope (void) const
 Return uncertainty in slope.
correlation (void) const
sigmaYX (void) const
 return conditional uncertainty = uncertainty y given x
eval (const T &x) const
 compute intercept + x * slope
BivarStats< T > & operator+= (BivarStats< T > &S)
 combine two BivarStats (assumed to be taken from the same or equivalent samples)
Stats< T > estimateDeviation (const std::vector< std::pair< T, T > > &d) const
Constructors.
Various ways to construct a BivarStats object.

Parameters:
x the data to use for the independent variable
y the data to use for the dependent variable
scale whether data is scaled internally (default: false)


 BivarStats (bool scale=false)
 BivarStats (const T &x, const T &, bool scale=false)
 BivarStats (const std::vector< T > &x, const std::vector< T > &y, bool scale=false)
 BivarStats (const std::vector< std::pair< T, T > > &d, bool scale=false)
 BivarStats (const Vector< T > &x, const Vector< T > &y, bool scale=false)
Addition Functions
Add data to the statistics.

void add (const T &x, const T &y)
void add (const std::vector< T > &x, const std::vector< T > &y)
void add (const std::vector< std::pair< T, T > > &d)
void add (const Vector< T > &x, const Vector< T > &y)
Subtraction Functions
Subtract data from the statistics.

void subtract (const T &x, const T &y)
void subtract (const std::vector< T > &x, const std::vector< T > &y)
void subtract (const std::vector< std::pair< T, T > > &d)
void subtract (const Vector< T > &x, const Vector< T > &y)


Member Function Documentation

Stats< T > estimateDeviation const std::vector< std::pair< T, T > > &  d  )  const
 

Definition at line 424 of file BivarStats.hpp.

References Stats::Add(), BivarStats::eval(), and gpstk::max().

T eval const T &  x  )  const [inline]
 

compute intercept + x * slope

Definition at line 114 of file BivarStats.hpp.

Referenced by BivarStats::estimateDeviation().


The documentation for this class was generated from the following file:
Generated on Thu Feb 9 03:31:33 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1