Mathematical algorithms


Namespaces

namespace  gpstk::Robust
 Robust statistics.

Classes

class  CodeKalmanSolver
 This class computes the code-based solution using a simple Kalman solver. More...
class  SolverLMS
 This class computes the Least Mean Squares Solution of a given equations set. More...
class  SolverPPP
 This class computes the Precise Point Positioning (PPP) solution using a Kalman solver that combines ionosphere-free code and phase measurements. More...
class  SolverPPPFB
 This class computes the Precise Point Positioning (PPP) solution using a Kalman solver that combines ionosphere-free code and phase measurements. More...
class  SolverWMS
 This class computes the Weighted Least Mean Squares Solution of a given equations set. More...
class  AllanDeviation
 Compute the overlapping Allan variance of the phase data provided. More...
class  BaseDistribution
 This is a base class for statistical distributions. More...
class  BivarStats
 Conventional statistics for two samples. More...
class  Chi2Distribution
 This class implements the Chi-square distribution. More...
class  ExpressionException
 This class provides the ability to resolve general mathematical expressions at run time. More...
class  Expression
class  FilterBase
 Abstract base class for filter algorithms. More...
class  FIRDifferentiator5thOrder
 This class implements a Finite Impulsive Response (FIR) Differentiator filter of 5th order designed according to central difference approximation. More...
class  GaussianDistribution
 This class implements the Gaussian (or normal) distribution. More...
class  PolyFit
 Compute a polynomial fit of the form sum[X(i)*t**i] = d, that is solve for coefficients X given a set of data pairs (t,d). More...
class  RungeKutta4
 The RungeKutta4 class provides a collection of integration routines that work on a Matrix of doubles. More...
class  SimpleKalmanFilter
 This class computes the solution using a Kalman filter. More...
class  SolverBase
 Abstract base class for solver algorithms. More...
class  Stats
 Conventional statistics for one sample. More...
class  TwoSampleStats
 Conventional statistics for two samples. More...
class  StudentDistribution
 This class implements the t-Student distribution. More...

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)


 gpstk::BivarStats::BivarStats (bool scale=false)
 gpstk::BivarStats::BivarStats (const T &x, const T &, bool scale=false)
 gpstk::BivarStats::BivarStats (const std::vector< T > &x, const std::vector< T > &y, bool scale=false)
 gpstk::BivarStats::BivarStats (const std::vector< std::pair< T, T > > &d, bool scale=false)
 gpstk::BivarStats::BivarStats (const Vector< T > &x, const Vector< T > &y, bool scale=false)

Addition Functions

Add data to the statistics.

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

Subtraction Functions

Subtract data from the statistics.

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

Typedefs

typedef std::map< Variable,
double > 
gpstk::VariableDataMap
 Handy type definition.

Functions

template<typename T>
int gpstk::Qsort_compare (const T &a, const T &b)
 Comparison function for sorting.
template<typename T>
void gpstk::insert (T *sa, int na, int(*comp)(const T &, const T &)=gpstk::Qsort_compare)
 Insert sort.
template<typename T>
void gpstk::QSort (T *sa, int na, int(*comp)(const T &, const T &)=gpstk::Qsort_compare)
 Quick sort in memory, with insert sort for small arrays.
template<typename T, typename S>
void gpstk::insert (T *sa, S *pa, int na, int(*comp)(const T &, const T &)=gpstk::Qsort_compare)
 Insert sort one vector, keeping a second parallel.
template<typename T, typename S>
void gpstk::QSort (T *sa, S *pa, int na, int(*comp)(const T &, const T &)=gpstk::Qsort_compare)
 Quick sort of one vector, keeping another parallel.
template<typename T>
gpstk::errfc (T x) throw ()
 Approximation to complimentary error function with fractional error everywhere less than 1.2e-7.
template<typename T>
gpstk::normalCDF (T m, T s, T x) throw ()
 Cumulative distribution function CDF for the normal distribution with mean m and standard deviation s (square root of variance).
double gpstk::ADtest (double *xd, const int nd, double m, double s, bool save_flag=true) throw (Exception)
 Anderson-Darling test statistic, which is a variant of the Kolmogorov-Smirnoff test, comparing the distribution of data with mean m and standard deviation s to the normal distribution.
std::ostream & gpstk::operator<< (std::ostream &s, const AllanDeviation &a)
template<class T>
std::ostream & gpstk::operator<< (std::ostream &s, const BivarStats< T > &BVS)
 Output operator for BivarStats class.
template<class T>
gpstk::LagrangeInterpolation (const std::vector< T > &X, const std::vector< T > &Y, T x)
 This is a straightforward version of Lagrange Interpolation, and it is here for the following existing LagrangeInterpolation is buggy (corrupt when input data size is 2).
template<class T>
gpstk::LagrangeInterpolation (const std::vector< T > &X, const std::vector< T > &Y, const T &x, T &err)
 Perform Lagrange interpolation on the data (X[i],Y[i]), i=1,N (N=X.size()), returning the value of Y(x).
template<class T>
void gpstk::LagrangeInterpolation (const std::vector< T > &X, const std::vector< T > &Y, const T &x, T &y, T &dydx)
 Perform Lagrange interpolation on the data (X[i],Y[i]), i=1,N (N=X.size()), returning the value of Y(x) and dY(x)/dX.
template<class T>
gpstk::LagrangeInterpolating2ndDerivative (const std::vector< T > &pos, const std::vector< T > &val, T desiredPos)
 Returns the second derivative of Lagrange interpolation.
template<class T>
gpstk::RSS (T aa, T bb, T cc)
 Perform the root sum square of aa, bb and cc.
template<class T>
gpstk::RSS (T aa, T bb)
 Perform the root sum square of aa, bb.
template<class T>
gpstk::RSS (T aa, T bb, T cc, T dd)
 Perform the root sum square of aa, bb, cc and dd.
double gpstk::Round (double x)
double gpstk::gamma (double val)
 Computes the Gamma function using a simple Lanczos approximation.
double gpstk::lngamma (double val)
 Computes the natural logarithm of Gamma function using the Lanczos approximation.
double gpstk::lower_gamma (const double a, const double z)
 Lower incomplete gamma function.
double gpstk::upper_gamma (const double a, const double z)
 Upper incomplete gamma function.
double gpstk::gammaP (const double a, const double z)
 Lower incomplete regularized gamma function P(a,z).
double gpstk::gammaQ (const double a, const double z)
 Upper incomplete regularized gamma function Q(a,z).
double gpstk::factorial (const int n)
 Computes factorial of integer number n.
double gpstk::factorial (const double d)
 Computes factorial of double number n.
double gpstk::erf (const double x)
 Error function.
double gpstk::erfc (const double x)
 Complementary error function.
double gpstk::inverf (const double z)
 Inverse of error function.
double gpstk::beta (const double x, const double y)
 Beta function.
double gpstk::lnbeta (double x, double y)
 Computes the natural logarithm of Beta function.
double gpstk::regIncompleteBeta (const double x, const double a, const double b) throw (InvalidParameter)
 Computes the regularized incomplete Beta function Ix(a,b).
template<class T>
std::ostream & gpstk::operator<< (std::ostream &s, const Stats< T > &ST)
 Output operator for Stats class.
template<class T>
std::ostream & gpstk::operator<< (std::ostream &s, const TwoSampleStats< T > &TSS)
 Output operator for TwoSampleStats class.
template<class T>
gpstk::median (const Vector< T > &v)
 Compute the median of a gpstk::Vector.
template<class T>
gpstk::median (const std::vector< T > &v)
 Compute the median of a std::vector.
void gpstk::BivarStats::clear (void)
 This assumes that the accessors will check for n>0, which they do.
size_t gpstk::BivarStats::n (void) const
 Return the sample size.
gpstk::BivarStats::minimumX (void) const
gpstk::BivarStats::maximumX (void) const
gpstk::BivarStats::minimumY (void) const
gpstk::BivarStats::maximumY (void) const
gpstk::BivarStats::averageX (void) const
gpstk::BivarStats::averageY (void) const
gpstk::BivarStats::varianceX (void) const
gpstk::BivarStats::varianceY (void) const
gpstk::BivarStats::stdDevX (void) const
gpstk::BivarStats::stdDevY (void) const
gpstk::BivarStats::slope (void) const
 Return slope of best-fit line Y=slope*X + intercept.
gpstk::BivarStats::intercept (void) const
 Return intercept of best-fit line Y=slope*X + intercept.
gpstk::BivarStats::sigmaSlope (void) const
 Return uncertainty in slope.
gpstk::BivarStats::correlation (void) const
gpstk::BivarStats::sigmaYX (void) const
 return conditional uncertainty = uncertainty y given x
BivarStats< T > & gpstk::BivarStats::operator+= (BivarStats< T > &S)
 combine two BivarStats (assumed to be taken from the same or equivalent samples)


Typedef Documentation

typedef std::map< Variable, double > VariableDataMap
 

Handy type definition.

Definition at line 50 of file SolverGeneral.hpp.

Referenced by ConstraintSystem::constraintMatrix(), and ConstraintSystem::setConstraint().


Function Documentation

void add const Vector< T > &  x,
const Vector< T > &  y
[inherited]
 

Definition at line 246 of file BivarStats.hpp.

References BivarStats::add(), and Vector::size().

void add const std::vector< std::pair< T, T > > &  d  )  [inherited]
 

Definition at line 238 of file BivarStats.hpp.

References BivarStats::add(), and gpstk::max().

void add const std::vector< T > &  x,
const std::vector< T > &  y
[inherited]
 

Definition at line 228 of file BivarStats.hpp.

References BivarStats::add().

void add const T &  x,
const T &  y
[inherited]
 

Definition at line 189 of file BivarStats.hpp.

References ABS.

Referenced by BivarStats::add(), and BivarStats::BivarStats().

double ADtest double *  xd,
const int  nd,
double  m,
double  s,
bool  save_flag = true
throw (Exception)
 

Anderson-Darling test statistic, which is a variant of the Kolmogorov-Smirnoff test, comparing the distribution of data with mean m and standard deviation s to the normal distribution.

NB. If ADtest > 0.752 then normality hypothesis is rejected for 5% level test.

Parameters:
xd array of data.
nd length of array xd.
mean mean of the data.
stddev standard deviation of the data.
save_flag if true (default) array xd will NOT be changed, otherwise it will be sorted.

Definition at line 392 of file RobustStats.cpp.

References GPSTK_RETHROW, GPSTK_THROW, and gpstk::QSort().

T averageX void   )  const [inherited]
 

Definition at line 331 of file BivarStats.hpp.

Referenced by BivarStats::intercept().

T averageY void   )  const [inherited]
 

Definition at line 334 of file BivarStats.hpp.

Referenced by BivarStats::intercept().

double beta const double  x,
const double  y
 

Beta function.

Warning:
This version may not work for values > 130.0

Definition at line 713 of file SpecialFunctions.cpp.

References gpstk::gamma().

Referenced by gpstk::getAlpha().

BivarStats const Vector< T > &  x,
const Vector< T > &  y,
bool  scale = false
[inherited]
 

Definition at line 182 of file BivarStats.hpp.

References BivarStats::add().

BivarStats const std::vector< std::pair< T, T > > &  d,
bool  scale = false
[inherited]
 

Definition at line 175 of file BivarStats.hpp.

References BivarStats::add().

BivarStats const std::vector< T > &  x,
const std::vector< T > &  y,
bool  scale = false
[inherited]
 

Definition at line 167 of file BivarStats.hpp.

References BivarStats::add().

BivarStats const T &  x,
const T &  ,
bool  scale = false
[inherited]
 

Definition at line 160 of file BivarStats.hpp.

References BivarStats::add().

BivarStats bool  scale = false  )  [inherited]
 

Definition at line 155 of file BivarStats.hpp.

void clear void   )  [inherited]
 

This assumes that the accessors will check for n>0, which they do.

Definition at line 316 of file BivarStats.hpp.

T correlation void   )  const [inherited]
 

Definition at line 384 of file BivarStats.hpp.

References BivarStats::stdDevX(), and BivarStats::stdDevY().

Referenced by BivarStats::sigmaYX().

double erf const double  x  ) 
 

Error function.

This is a C++ implementation of the free Python code found in:

http://code.activestate.com/recipes/576391/

Such code was based in a C code base with OpenBSD license from:

==================================================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.

Developed at SunPro, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved. ====================================================

Definition at line 339 of file SpecialFunctions.cpp.

References gpstk::erf1(), gpstk::erf2(), gpstk::erf3(), gpstk::erf4(), and gpstk::erf5().

Referenced by GaussianDistribution::cdf(), gpstk::erfc(), and gpstk::inverf().

double erfc const double  x  ) 
 

Complementary error function.

Definition at line 650 of file SpecialFunctions.cpp.

References gpstk::erf().

T errfc x  )  throw ()
 

Approximation to complimentary error function with fractional error everywhere less than 1.2e-7.

Ref. Numerical Recipes part 6.2. NB. error function erf = 1-erfc

Parameters:
x input argument.
Returns:
complimentary error function of x

Definition at line 236 of file RobustStats.hpp.

double factorial const double  d  ) 
 

Computes factorial of double number n.

d < 360 has been tested

Definition at line 273 of file SpecialFunctions.cpp.

Referenced by gpstk::binomialCoeff().

double factorial const int  n  ) 
 

Computes factorial of integer number n.

This implementation typically gives 15 correct decimal places, and returns the result as double.

Definition at line 249 of file SpecialFunctions.cpp.

References gpstk::gamma().

double gamma const double  val  ) 
 

Computes the Gamma function using a simple Lanczos approximation.

This implementation typically gives 15 correct decimal places, and it is adapted from free Python code found in:

http://en.wikipedia.org/wiki/Lanczos_approximation

Warning:
Be aware that Gamma function is not defined for 0, -1, -2,...

Definition at line 50 of file SpecialFunctions.cpp.

References gpstk::exp(), gpstk::pow(), and gpstk::sin().

Referenced by gpstk::beta(), gpstk::factorial(), gpstk::gammaP(), SunPosition::getPositionCIS(), gpstk::incompletebetaps(), ObsRngDev::ObsRngDev(), ComputeIonoModel::Process(), gpstk::regIncompleteBeta(), and gpstk::upper_gamma().

double gammaP const double  a,
const double  z
 

Lower incomplete regularized gamma function P(a,z).

Definition at line 229 of file SpecialFunctions.cpp.

References gpstk::gamma(), and gpstk::lower_gamma().

Referenced by Chi2Distribution::cdf(), and gpstk::gammaQ().

double gammaQ const double  a,
const double  z
 

Upper incomplete regularized gamma function Q(a,z).

Definition at line 237 of file SpecialFunctions.cpp.

References gpstk::gammaP().

void insert T *  sa,
S *  pa,
int  na,
int(*)(const T &, const T &)  comp = gpstk::Qsort_compare
 

Insert sort one vector, keeping a second parallel.

See the single-vector version of insert.

Parameters:
sa is the array of type T to be sorted.
pa is the array of type S to be kept parallel to the first.
na length of the array to be sorted.

Definition at line 155 of file RobustStats.hpp.

Referenced by ConfDataSection::insert(), and gpstk::QSort().

void insert T *  sa,
int  na,
int(*)(const T &, const T &)  comp = gpstk::Qsort_compare
 

Insert sort.

operator>() and operator<() must be defined for T, and a user comparison function comp(T,T) may be passed to override the default Qsort_compare().

Parameters:
sa is the array of type T to be sorted.
na length of the array to be sorted.

Definition at line 82 of file RobustStats.hpp.

T intercept void   )  const [inherited]
 

Return intercept of best-fit line Y=slope*X + intercept.

Definition at line 366 of file BivarStats.hpp.

References BivarStats::averageX(), BivarStats::averageY(), and BivarStats::slope().

double inverf const double  z  ) 
 

Inverse of error function.

\ warning Value "z" must be in the range (-1, 1)

Definition at line 663 of file SpecialFunctions.cpp.

References gpstk::erf(), and gpstk::exp().

Referenced by GaussianDistribution::invcdf().

T LagrangeInterpolating2ndDerivative const std::vector< T > &  pos,
const std::vector< T > &  val,
desiredPos
 

Returns the second derivative of Lagrange interpolation.

Definition at line 183 of file MiscMath.hpp.

References gpstk::sum().

void LagrangeInterpolation const std::vector< T > &  X,
const std::vector< T > &  Y,
const T &  x,
T &  y,
T &  dydx
 

Perform Lagrange interpolation on the data (X[i],Y[i]), i=1,N (N=X.size()), returning the value of Y(x) and dY(x)/dX.

Assumes that x is between X[k-1] and X[k], where k=N/2. Warning: for use with the precise (SP3) ephemeris only when velocity is not available; estimates of velocity, and especially clock drift, not as accurate.

Definition at line 146 of file MiscMath.hpp.

Referenced by PositionSatStore::getAcceleration(), ClockSatStore::getClockBias(), ClockSatStore::getClockDrift(), PositionSatStore::getPosition(), PositionSatStore::getValue(), ClockSatStore::getValue(), and PositionSatStore::getVelocity().

T LagrangeInterpolation const std::vector< T > &  X,
const std::vector< T > &  Y,
const T &  x,
T &  err
 

Perform Lagrange interpolation on the data (X[i],Y[i]), i=1,N (N=X.size()), returning the value of Y(x).

Also return an estimate of the estimation error in 'err'. Assumes k=X.size() is even, and that x is between X[j-1] and X[j], where j=k/2.

Definition at line 97 of file MiscMath.hpp.

References ABS.

T LagrangeInterpolation const std::vector< T > &  X,
const std::vector< T > &  Y,
x
 

This is a straightforward version of Lagrange Interpolation, and it is here for the following existing LagrangeInterpolation is buggy (corrupt when input data size is 2).

template <class t=""> T LagrangeInterpolation(const std::vector<T>& X, const std::vector<T>& Y, const T& x, T& err);

Please DO KEEP THIS function unless you fix the existing bug.(Wei Yan)

Definition at line 70 of file MiscMath.hpp.

References GPSTK_ASSERT.

Referenced by EpochDataStore::getData().

double lnbeta double  x,
double  y
 

Computes the natural logarithm of Beta function.

Warning:
This version does not work for values <= 0.0

Definition at line 726 of file SpecialFunctions.cpp.

References gpstk::lngamma().

double lngamma double  val  ) 
 

Computes the natural logarithm of Gamma function using the Lanczos approximation.

Warning:
This version does not work for values <= 0.0

Definition at line 108 of file SpecialFunctions.cpp.

References log, and gpstk::sin().

Referenced by gpstk::contfracIncompGamma(), gpstk::incompletebetaps(), gpstk::lnbeta(), StudentDistribution::pdf(), Chi2Distribution::pdf(), and gpstk::seriesIncompGamma().

double lower_gamma const double  a,
const double  z
 

Lower incomplete gamma function.

Definition at line 204 of file SpecialFunctions.cpp.

References gpstk::abs(), gpstk::exp(), gpstk::kummerFunc(), and log.

Referenced by gpstk::gammaP(), and gpstk::upper_gamma().

T maximumX void   )  const [inherited]
 

Definition at line 324 of file BivarStats.hpp.

T maximumY void   )  const [inherited]
 

Definition at line 328 of file BivarStats.hpp.

T median const std::vector< T > &  v  )  [inline]
 

Compute the median of a std::vector.

Definition at line 530 of file Stats.hpp.

T median const Vector< T > &  v  )  [inline]
 

Compute the median of a gpstk::Vector.

Definition at line 502 of file Stats.hpp.

Referenced by GDCPass::WLsigmaStrip().

T minimumX void   )  const [inherited]
 

Definition at line 322 of file BivarStats.hpp.

T minimumY void   )  const [inherited]
 

Definition at line 326 of file BivarStats.hpp.

size_t n void   )  const [inline, inherited]
 

Return the sample size.

Definition at line 319 of file BivarStats.hpp.

T normalCDF m,
s,
x
throw ()
 

Cumulative distribution function CDF for the normal distribution with mean m and standard deviation s (square root of variance).

Return 0 if s is zero.

Parameters:
m mean of the distribution
s standard deviation (sqrt of variance) of the distribution, > 0.
x value at which to compute the CDF.
Returns:
cumulative normal distribution(m,s) evaluated at x

Definition at line 255 of file RobustStats.hpp.

BivarStats< T > & operator+= BivarStats< T > &  S  )  [inherited]
 

combine two BivarStats (assumed to be taken from the same or equivalent samples)

Definition at line 405 of file BivarStats.hpp.

References gpstk::max(), gpstk::min(), BivarStats::ns, BivarStats::scaleX, BivarStats::scaleY, BivarStats::sumX, BivarStats::sumX2, BivarStats::sumXY, BivarStats::sumY, BivarStats::sumY2, BivarStats::xMax, BivarStats::xMin, BivarStats::yMax, and BivarStats::yMin.

std::ostream& operator<< std::ostream &  s,
const TwoSampleStats< T > &  TSS
 

Output operator for TwoSampleStats class.

Definition at line 476 of file Stats.hpp.

References TwoSampleStats::AverageX(), TwoSampleStats::AverageY(), TwoSampleStats::Correlation(), TwoSampleStats::Intercept(), TwoSampleStats::MaximumX(), TwoSampleStats::MaximumY(), TwoSampleStats::MinimumX(), TwoSampleStats::MinimumY(), TwoSampleStats::N(), TwoSampleStats::SigmaSlope(), TwoSampleStats::SigmaYX(), TwoSampleStats::Slope(), TwoSampleStats::StdDevX(), TwoSampleStats::StdDevY(), TwoSampleStats::VarianceX(), and TwoSampleStats::VarianceY().

std::ostream& operator<< std::ostream &  s,
const Stats< T > &  ST
 

Output operator for Stats class.

Definition at line 265 of file Stats.hpp.

References Stats::Average(), Stats::Maximum(), Stats::Minimum(), Stats::N(), Stats::StdDev(), and Stats::Variance().

std::ostream& operator<< std::ostream &  s,
const BivarStats< T > &  BVS
 

Output operator for BivarStats class.

Definition at line 135 of file BivarStats.hpp.

std::ostream& operator<< std::ostream &  s,
const AllanDeviation &  a
 

Definition at line 97 of file AllanDeviation.hpp.

void QSort T *  sa,
S *  pa,
int  na,
int(*)(const T &, const T &)  comp = gpstk::Qsort_compare
 

Quick sort of one vector, keeping another parallel.

See the single-vector version of QSort.

Parameters:
sa is the array of type T to be sorted.
pa is the array of type S to be kept parallel to the first.
na length of the array to be sorted.
comp (optional) the comparison function to be used.

Definition at line 184 of file RobustStats.hpp.

References gpstk::insert().

Referenced by gpstk::ADtest(), gpstk::Robust::Median(), gpstk::Robust::MedianAbsoluteDeviation(), and gpstk::QSort().

void QSort T *  sa,
int  na,
int(*)(const T &, const T &)  comp = gpstk::Qsort_compare
 

Quick sort in memory, with insert sort for small arrays.

operator>() and operator<() must be defined for T, and a user comparison function comp(T,T) may be passed to override the default Qsort_compare().

Parameters:
sa is the array of type T to be sorted.
na length of the array to be sorted.
comp (optional) the comparison function to be used.

Definition at line 107 of file RobustStats.hpp.

References gpstk::insert(), and gpstk::QSort().

int Qsort_compare const T &  a,
const T &  b
 

Comparison function for sorting.

Default comparision function int comp(T a, T b) returns 1 if a > b, -1 if a < b, and 0 if a==b. A user defined comparison function may be passed as a calling argument to the sort routines.

Parameters:
a and b objects of type T to be compared
Returns:
1 if a > b, -1 if a < b, or 0 if a==b.

Definition at line 70 of file RobustStats.hpp.

double regIncompleteBeta const double  x,
const double  a,
const double  b
throw (InvalidParameter)
 

Computes the regularized incomplete Beta function Ix(a,b).

This code is a C++ implementation and adaptation from code found in Cephes Math Library Release 2.8, copyright by Stephen L. Moshier, released under a BSD license.

Definition at line 1042 of file SpecialFunctions.cpp.

References gpstk::gamma(), GPSTK_THROW, gpstk::incompletebetafe(), gpstk::incompletebetafe2(), gpstk::incompletebetaps(), and gpstk::pow().

Referenced by StudentDistribution::cdf().

double Round double  x  )  [inline]
 

Definition at line 323 of file MiscMath.hpp.

T RSS aa,
bb,
cc,
dd
 

Perform the root sum square of aa, bb, cc and dd.

Definition at line 306 of file MiscMath.hpp.

References ABS, SQRT, gpstk::swap(), and swapValues.

T RSS aa,
bb
 

Perform the root sum square of aa, bb.

Definition at line 298 of file MiscMath.hpp.

References gpstk::RSS().

T RSS aa,
bb,
cc
 

Perform the root sum square of aa, bb and cc.

Examples:
example7.cpp.

Definition at line 256 of file MiscMath.hpp.

References ABS, and SQRT.

Referenced by PRSolution2::AutonomousPRSolution(), Position::convertCartesianToSpherical(), PRSolution::DOPCompute(), and gpstk::range().

T sigmaSlope void   )  const [inherited]
 

Return uncertainty in slope.

Definition at line 375 of file BivarStats.hpp.

References BivarStats::sigmaYX(), SQRT, and BivarStats::stdDevX().

T sigmaYX void   )  const [inherited]
 

return conditional uncertainty = uncertainty y given x

Definition at line 394 of file BivarStats.hpp.

References BivarStats::correlation(), SQRT, and BivarStats::stdDevY().

Referenced by BivarStats::sigmaSlope().

T slope void   )  const [inherited]
 

Return slope of best-fit line Y=slope*X + intercept.

Definition at line 356 of file BivarStats.hpp.

Referenced by BivarStats::intercept().

T stdDevX void   )  const [inherited]
 

Definition at line 351 of file BivarStats.hpp.

References SQRT, and BivarStats::varianceX().

Referenced by BivarStats::correlation(), and BivarStats::sigmaSlope().

T stdDevY void   )  const [inherited]
 

Definition at line 353 of file BivarStats.hpp.

References SQRT, and BivarStats::varianceY().

Referenced by BivarStats::correlation(), and BivarStats::sigmaYX().

void subtract const Vector< T > &  x,
const Vector< T > &  y
[inherited]
 

Definition at line 305 of file BivarStats.hpp.

References Vector::size(), and BivarStats::subtract().

void subtract const std::vector< std::pair< T, T > > &  d  )  [inherited]
 

Definition at line 297 of file BivarStats.hpp.

References gpstk::max(), and BivarStats::subtract().

void subtract const std::vector< T > &  x,
const std::vector< T > &  y
[inherited]
 

Definition at line 287 of file BivarStats.hpp.

References Vector::size(), and BivarStats::subtract().

void subtract const T &  x,
const T &  y
[inherited]
 

Definition at line 256 of file BivarStats.hpp.

Referenced by BivarStats::subtract().

double upper_gamma const double  a,
const double  z
 

Upper incomplete gamma function.

Definition at line 219 of file SpecialFunctions.cpp.

References gpstk::gamma(), and gpstk::lower_gamma().

T varianceX void   )  const [inherited]
 

Definition at line 339 of file BivarStats.hpp.

Referenced by BivarStats::stdDevX().

T varianceY void   )  const [inherited]
 

Definition at line 345 of file BivarStats.hpp.

Referenced by BivarStats::stdDevY().


Generated on Sat May 18 03:31:34 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1