Relacs Numerics Library  0.9.8
Classes | Namespaces | Functions
stats.h File Reference
#include <cmath>
#include <vector>
Include dependency graph for stats.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  numerical_traits< T >
 
struct  numerical_traits< signed char >
 
struct  numerical_traits< unsigned char >
 
struct  numerical_traits< signed short >
 
struct  numerical_traits< unsigned short >
 
struct  numerical_traits< signed int >
 
struct  numerical_traits< unsigned int >
 
struct  numerical_traits< signed long >
 
struct  numerical_traits< unsigned long >
 
struct  numerical_iterator_traits< Iterator >
 
struct  numerical_container_traits< Container >
 

Namespaces

 relacs
 

Functions

template<typename RandomIter >
iterator_traits< RandomIter >
::value_type 
median (RandomIter first, RandomIter last)
 
template<typename Container >
Container::value_type median (const Container &vec)
 
template<typename RandomIter >
iterator_traits< RandomIter >
::value_type 
quantile (double f, RandomIter first, RandomIter last)
 
template<typename Container >
Container::value_type quantile (double f, const Container &vec)
 
template<typename ForwardIter >
double rank (ForwardIter first, ForwardIter last)
 
template<typename Container >
double rank (Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
min (ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type min (const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
min (int &index, ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type min (int &index, const Container &vec)
 
template<typename ForwardIter >
int minIndex (ForwardIter first, ForwardIter last)
 
template<typename Container >
int minIndex (const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
max (ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type max (const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
max (int &index, ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type max (int &index, const Container &vec)
 
template<typename ForwardIter >
int maxIndex (ForwardIter first, ForwardIter last)
 
template<typename Container >
int maxIndex (const Container &vec)
 
template<typename ForwardIter >
void minMax (typename iterator_traits< ForwardIter >::value_type &min, typename iterator_traits< ForwardIter >::value_type &max, ForwardIter first, ForwardIter last)
 
template<typename Container >
void minMax (typename Container::value_type &min, typename Container::value_type &max, const Container &vec)
 
template<typename ForwardIter >
void minMax (typename iterator_traits< ForwardIter >::value_type &min, int &minindex, typename iterator_traits< ForwardIter >::value_type &max, int &maxindex, ForwardIter first, ForwardIter last)
 
template<typename Container >
void minMax (typename Container::value_type &min, int &minindex, typename Container::value_type &max, int &maxindex, const Container &vec)
 
template<typename ForwardIter >
void minMaxIndex (int &minindex, int &maxindex, ForwardIter first, ForwardIter last)
 
template<typename Container >
void minMaxIndex (int &minindex, int &maxindex, const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
minAbs (ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type minAbs (const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
maxAbs (ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type maxAbs (const Container &vec)
 
template<typename ForwardIter >
int clip (typename iterator_traits< ForwardIter >::value_type min, typename iterator_traits< ForwardIter >::value_type max, ForwardIter first, ForwardIter last)
 
template<typename Container >
int clip (typename Container::value_type min, typename Container::value_type max, Container &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >::mean_type 
mean (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::mean_type 
mean (const ContainerX &vecx)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >::mean_type 
wmean (ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::mean_type 
wmean (const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterS >
numerical_iterator_traits
< ForwardIterX >::mean_type 
smean (ForwardIterX firstx, ForwardIterX lastx, ForwardIterS firsts, ForwardIterS lasts)
 
template<typename ContainerX , typename ContainerS >
numerical_container_traits
< ContainerX >::mean_type 
smean (const ContainerX &vecx, const ContainerS &vecs)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >::mean_type 
meanStdev (typename numerical_iterator_traits< ForwardIterX >::variance_type &stdev, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::mean_type 
meanStdev (typename numerical_container_traits< ContainerX >::variance_type &stdev, const ContainerX &vecx)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >::mean_type 
wmeanStdev (typename numerical_iterator_traits< ForwardIterX >::variance_type &stdev, ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::mean_type 
wmeanStdev (typename numerical_container_traits< ContainerX >::variance_type &stdev, const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterS >
numerical_iterator_traits
< ForwardIterX >::mean_type 
smeanStdev (typename numerical_iterator_traits< ForwardIterX >::variance_type &stdev, ForwardIterX firstx, ForwardIterX lastx, ForwardIterS firsts, ForwardIterS lasts)
 
template<typename ContainerX , typename ContainerS >
numerical_container_traits
< ContainerX >::mean_type 
smeanStdev (typename numerical_container_traits< ContainerX >::variance_type &stdev, const ContainerX &vecx, const ContainerS &vecs)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
variance (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
variance (const ContainerX &vecx)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
varianceKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
varianceKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vecx)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
varianceFixed (typename numerical_iterator_traits< ForwardIterX >::mean_type fixedmean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
varianceFixed (typename numerical_container_traits< ContainerX >::mean_type fixedmean, const ContainerX &vecx)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wvariance (ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wvariance (const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wvarianceKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wvarianceKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
stdev (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
stdev (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
stdevKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
stdevKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
stdevFixed (typename numerical_iterator_traits< ForwardIterX >::mean_type fixedmean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
stdevFixed (typename numerical_container_traits< ContainerX >::mean_type fixedmean, const ContainerX &vec)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wstdev (ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wstdev (const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wstdevKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wstdevKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
sem (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
sem (const Container &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
semKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
semKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
semFixed (typename numerical_iterator_traits< ForwardIterX >::mean_type fixedmean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
semFixed (typename numerical_container_traits< ContainerX >::mean_type fixedmean, const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
absdev (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
absdev (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
absdevKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
absdevKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vec)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wabsdev (ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wabsdev (const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterW >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
wabsdevKnown (typename numerical_iterator_traits< ForwardIterX >::mean_type mean, ForwardIterX firstx, ForwardIterX lastx, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerW >
numerical_container_traits
< ContainerX >::variance_type 
wabsdevKnown (typename numerical_container_traits< ContainerX >::mean_type mean, const ContainerX &vecx, const ContainerW &vecw)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
rms (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
rms (const Container &vec)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
skewness (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
skewness (const Container &vec)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
kurtosis (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
kurtosis (const Container &vec)
 
template<typename ForwardIter >
iterator_traits< ForwardIter >
::value_type 
sum (ForwardIter first, ForwardIter last)
 
template<typename Container >
Container::value_type sum (const Container &vec)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
squaredSum (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
squaredSum (const Container &vec)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
magnitude (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
magnitude (const Container &vec)
 
template<typename ForwardIter >
numerical_iterator_traits
< ForwardIter >::variance_type 
power (ForwardIter first, ForwardIter last)
 
template<typename Container >
numerical_container_traits
< Container >::variance_type 
power (const Container &vec)
 
template<typename ForwardIterX , typename ForwardIterY >
iterator_traits< ForwardIterX >
::value_type 
dot (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty)
 
template<typename ContainerX , typename ContainerY >
ContainerX::value_type dot (const ContainerX &vecx, const ContainerY &vecy)
 
template<typename ContainerX , typename ContainerY >
void average (ContainerX &x, const vector< ContainerY > &y)
 
template<typename ContainerX , typename ContainerS , typename ContainerY >
void average (ContainerX &x, ContainerS &s, const vector< ContainerY > &y)
 
template<typename ForwardIterX , typename ForwardIterY >
double cov (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty)
 
template<typename ContainerX , typename ContainerY >
double cov (const ContainerX &vecx, const ContainerY &vecy)
 
template<typename ForwardIterX , typename ForwardIterY >
double corrCoef (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty)
 
template<typename ContainerX , typename ContainerY >
double corrCoef (const ContainerX &vecx, const ContainerY &vecy)
 
template<typename ForwardIterX , typename ForwardIterY , typename ForwardIterW >
double wcorrCoef (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, ForwardIterW firstw, ForwardIterW lastw)
 
template<typename ContainerX , typename ContainerY , typename ContainerW >
double wcorrCoef (const ContainerX &vecx, const ContainerY &vecy, const ContainerW &vecw)
 
template<typename ForwardIterX , typename ForwardIterY , typename ForwardIterS >
double scorrCoef (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, ForwardIterS firsts, ForwardIterS lasts)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
double scorrCoef (const ContainerX &vecx, const ContainerY &vecy, const ContainerS &vecs)
 
template<typename ForwardIterX , typename ForwardIterY >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
chisq (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty)
 
template<typename ContainerX , typename ContainerY >
numerical_container_traits
< ContainerX >::variance_type 
chisq (const ContainerX &vecx, const ContainerY &vecy)
 
template<typename ForwardIterX , typename ForwardIterY , typename ForwardIterS >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
chisq (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, ForwardIterS firsts, ForwardIterS lasts)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
numerical_container_traits
< ContainerX >::variance_type 
chisq (const ContainerX &vecx, const ContainerY &vecy, const ContainerS &vecs)
 
template<typename ForwardIterX , typename ForwardIterY >
void serialCorr (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty)
 
template<typename ContainerX , typename ContainerY >
void serialCorr (const ContainerX &vecx, ContainerY &vecy)
 
template<typename ForwardIterX , typename ForwardIterY >
void propFit (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, double &m, double &mu, double &chisq)
 
template<typename ContainerX , typename ContainerY >
void propFit (const ContainerX &vecx, const ContainerY &vecy, double &m, double &mu, double &chisq)
 
template<typename ForwardIterX , typename ForwardIterY , typename ForwardIterS >
void propFit (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, ForwardIterS firsts, ForwardIterS lasts, double &m, double &mu, double &chisq)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
void propFit (const ContainerX &vecx, const ContainerY &vecy, const ContainerY &vecs, double &m, double &mu, double &chisq)
 
template<typename ForwardIterX , typename ForwardIterY >
void lineFit (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, double &b, double &bu, double &m, double &mu, double &chisq)
 
template<typename ContainerX , typename ContainerY >
void lineFit (const ContainerX &vecx, const ContainerY &vecy, double &b, double &bu, double &m, double &mu, double &chisq)
 
template<typename ForwardIterX , typename ForwardIterY , typename ForwardIterS >
void lineFit (ForwardIterX firstx, ForwardIterX lastx, ForwardIterY firsty, ForwardIterY lasty, ForwardIterS firsts, ForwardIterS lasts, double &b, double &bu, double &m, double &mu, double &chisq)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
void lineFit (const ContainerX &vecx, const ContainerY &vecy, const ContainerY &vecs, double &b, double &bu, double &m, double &mu, double &chisq)
 
template<typename ForwardIterX >
void detrend (ForwardIterX firstx, ForwardIterX lastx)
 
template<typename ContainerX >
void detrend (ContainerX &vecx)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
sem (const ContainerX &vecx)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
rms (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
rms (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
skewness (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
skewness (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
kurtosis (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
kurtosis (const ContainerX &vec)
 
template<typename ForwardIterX >
iterator_traits< ForwardIterX >
::value_type 
sum (ForwardIterX first, ForwardIterX last)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
squaredSum (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
squaredSum (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
magnitude (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX >
numerical_container_traits
< ContainerX >::variance_type 
magnitude (const ContainerX &vec)
 
template<typename ForwardIterX >
numerical_iterator_traits
< ForwardIterX >
::variance_type 
power (ForwardIterX first, ForwardIterX last)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
void propFit (const ContainerX &vecx, const ContainerY &vecy, const ContainerS &vecs, double &m, double &mu, double &chisq)
 
template<typename ContainerX , typename ContainerY , typename ContainerS >
void lineFit (const ContainerX &vecx, const ContainerY &vecy, const ContainerS &vecs, double &b, double &bu, double &m, double &mu, double &chisq)