#include <Stats.hpp>
Inheritance diagram for Stats:


Constructor does the same as Reset(); use this when starting a new series of input samples. Results are available at any time by calling N(), Minimum(), Maximum(), Average(), Variance() and StdDev(). NB. Variance is normalized with 1/(N-1) and StdDev is sqrt(Variance). NB. This class may not give exactly correct results with non-floating types, (for which it is not intended).
Definition at line 50 of file Stats.hpp.
Public Member Functions | |
| Stats () | |
| constructor | |
| Stats (Vector< T > &X, Vector< T > &W) | |
| constructor given a vector of data | |
| void | Reset (void) |
| reset, i.e. ignore earlier data and restart sampling | |
| unsigned int | N (void) const |
| access the sample size | |
| T | Minimum (void) const |
| return minimum value | |
| T | Maximum (void) const |
| return maximum value | |
| T | Average (void) const |
| return computed average | |
| T | Variance (void) const |
| return computed variance | |
| T | StdDev (void) const |
| return computed standard deviation | |
| T | Normalization (void) const |
| return the normalization constant = sum weights | |
| bool | Weighted (void) const |
| return weight flag | |
| void | Add (const T &x, const T &wt_in=T()) |
| add a single sample to the computation of statistics, with optional weight | |
| void | Add (Vector< T > &X, Vector< T > w=Vector< T >()) |
| add a Vector<T> of samples to the computation of statistics, with optional weights | |
| void | Subtract (const T x, const T wt_in=T()) |
| remove a sample from the computation of statistics (can't do min and max). | |
| void | Subtract (Vector< T > &X) |
| remove a Vector<T> of samples to the computation of statistics | |
| void | Load (unsigned int in_n, T in_min, T in_max, T in_ave, T in_var, bool wtd=false, T norm=1.0) |
| define private members directly; useful in continuing with an object that was earlier saved (e.g. | |
| Stats< T > & | operator+= (const Stats< T > &S) |
| combine two Stats (assumed taken from the same or equivalent samples); both must be either weighted or unweighted. | |
|
|
constructor
|
|
||||||||||||
|
constructor given a vector of data
|
|
||||||||||||
|
add a Vector<T> of samples to the computation of statistics, with optional weights
|
|
||||||||||||
|
add a single sample to the computation of statistics, with optional weight
Definition at line 104 of file Stats.hpp. Referenced by GDCPass::detectGFslips(), GDCPass::detectGFsmallSlips(), BivarStats::estimateDeviation(), GDCPass::foundGFsmallSlip(), GDCPass::GFphaseResiduals(), GDCPass::GFslipFix(), PolyTest(), ObsClockModel::simpleOrdClock(), SatPass::smooth(), GDCPass::WLconsistencyCheck(), and GDCPass::WLstatSweep(). |
|
|
return computed average
Definition at line 77 of file Stats.hpp. Referenced by LinearClockModel::addEpoch(), EpochClockModel::addEpoch(), GDCPass::finish(), GDCPass::foundGFsmallSlip(), GDCPass::GFslipFix(), gpstk::operator<<(), ObsClockModel::simpleOrdClock(), SatPass::smooth(), GDCPass::WLconsistencyCheck(), and GDCPass::WLstatSweep(). |
|
||||||||||||||||||||||||||||||||
|
define private members directly; useful in continuing with an object that was earlier saved (e.g. to a file). |
|
|
return maximum value
Definition at line 74 of file Stats.hpp. Referenced by GDCPass::finish(), GDCPass::foundGFsmallSlip(), gpstk::operator<<(), and SatPass::smooth(). |
|
|
return minimum value
Definition at line 71 of file Stats.hpp. Referenced by GDCPass::finish(), GDCPass::foundGFsmallSlip(), gpstk::operator<<(), and SatPass::smooth(). |
|
|
access the sample size
Definition at line 68 of file Stats.hpp. Referenced by EpochClockModel::addEpoch(), GDCPass::finish(), GDCPass::foundGFsmallSlip(), GDCPass::GFslipFix(), gpstk::operator<<(), ObsClockModel::simpleOrdClock(), SatPass::smooth(), GDCPass::WLconsistencyCheck(), and GDCPass::WLstatSweep(). |
|
|
return the normalization constant = sum weights
|
|
|
combine two Stats (assumed taken from the same or equivalent samples); both must be either weighted or unweighted. NB. Beware using this with very small sample size. |
|
|
reset, i.e. ignore earlier data and restart sampling
Definition at line 65 of file Stats.hpp. Referenced by GDCPass::detectGFslips(), GDCPass::detectGFsmallSlips(), GDCPass::detectWLsmallSlips(), GDCPass::GFphaseResiduals(), PolyTest(), Segment::Segment(), and ObsClockModel::simpleOrdClock(). |
|
|
return computed standard deviation
Definition at line 91 of file Stats.hpp. Referenced by GDCPass::finish(), GDCPass::foundGFsmallSlip(), GDCPass::GFslipFix(), gpstk::operator<<(), ObsClockModel::simpleOrdClock(), SatPass::smooth(), GDCPass::WLconsistencyCheck(), and GDCPass::WLstatSweep(). |
|
|
remove a Vector<T> of samples to the computation of statistics
|
|
||||||||||||
|
remove a sample from the computation of statistics (can't do min and max). TD test this... Definition at line 153 of file Stats.hpp. Referenced by GDCPass::detectGFsmallSlips(), and GDCPass::WLstatSweep(). |
|
|
return computed variance
Definition at line 84 of file Stats.hpp. Referenced by GDCPass::foundGFsmallSlip(), gpstk::operator<<(), and GDCPass::WLstatSweep(). |
|
|
return weight flag
|
1.3.9.1