![]() |
SynAPSE
0.6.0
Synergistic Analysis of Phase Space Evolution
|
Set of functions that compose the Statistics package. More...
#include <iostream>#include <vector>#include <string>#include <map>#include <ctime>#include <algorithm>#include "TMath.h"#include "TF1.h"#include "TRobustEstimator.h"#include "Assert.hh"#include "Matrix.hh"#include "Statistics-inl.hh"Go to the source code of this file.
Namespaces | |
| Math | |
| Mathematics environment (includes Statistics and Geometry packages) | |
Functions | |
| double | Math::Mean (const std::vector< double > &vx) |
| Computes the mean of a variable sample. More... | |
| double | Math::MeanError (const std::vector< double > &vx, const std::vector< double > &vex=std::vector< double >()) |
| Computes the error on the mean of a variable sample. More... | |
| double | Math::MeanMError (const std::vector< double > &vex) |
| Computes the measurement error on the mean of a variable sample. More... | |
| double | Math::MeanSError (const std::vector< double > &vx) |
| Computes the statistical error on the mean of a variable sample. More... | |
| double | Math::RobustMean (const std::vector< double > &vx) |
| Computes the MCD robust mean of a variable sample. More... | |
| void | Math::DecrementMean (const size_t &n, double &mean, const double &x) |
| Removes an element from a precomputed mean. More... | |
| void | Math::IncrementMean (const size_t &n, double &mean, const double &x) |
| Adds an element to a precomputed mean. More... | |
| double | Math::TMean (const std::vector< double > &vx, const double &frac) |
| Computes the trimmed mean of a variable sample. More... | |
| double | Math::TMeanSError (const std::vector< double > &vx, const double &frac) |
| Computes the statistical error on the trimmed mean of a variable sample. More... | |
| double | Math::WMean (const std::vector< double > &vx, const double &frac) |
| Computes the winsorized mean of a variable sample. More... | |
| double | Math::Variance (const std::vector< double > &vx) |
| Computes the variance of a variable sample. More... | |
| double | Math::VarianceError (const std::vector< double > &vx, const std::vector< double > &vex=std::vector< double >()) |
| Computes the error on the variance of a variable sample. More... | |
| double | Math::VarianceMError (const std::vector< double > &vx, const std::vector< double > &vex=std::vector< double >()) |
| Computes the measurement error on the variance of a variable sample. More... | |
| double | Math::VarianceSError (const std::vector< double > &vx) |
| Computes the statistical error on the variance of a variable sample. More... | |
| double | Math::RMS (const std::vector< double > &vx) |
| Computes the standard deviation of a variable sample. More... | |
| double | Math::RMSError (const std::vector< double > &vx, const std::vector< double > &vex=std::vector< double >()) |
| Computes the error on the standard deviation of a variable sample. More... | |
| double | Math::RMSMError (const std::vector< double > &vx, const std::vector< double > &vex) |
| Computes the measurement error on the standard deviation of a variable sample. More... | |
| double | Math::RMSSError (const std::vector< double > &vx) |
| Computes the statistical error on the standard deviation of a variable sample. More... | |
| double | Math::WRMS (const std::vector< double > &vx, const double &frac) |
| Computes the winsorized standard deviation of a variable sample. More... | |
| double | Math::Covariance (const std::vector< double > &vx, const std::vector< double > &vy) |
| Computes the covariance of two variable samples. More... | |
| double | Math::CovarianceError (const std::vector< double > &vx, const std::vector< double > &vy, const std::vector< double > &vex=std::vector< double >(), const std::vector< double > &vey=std::vector< double >()) |
| Computes the error on the covariance of two variable samples. More... | |
| double | Math::CovarianceMError (const std::vector< double > &vx, const std::vector< double > &vy, const std::vector< double > &vex, const std::vector< double > &vey) |
| Computes the measurement error on the covariance of two variable samples. More... | |
| double | Math::CovarianceSError (const std::vector< double > &vx, const std::vector< double > &vy) |
| Computes the statistical error on the covariance of two variable samples. More... | |
| void | Math::IncrementCovariance (const size_t &n, double &cov, const double &xmean, const double &ymean, const double &x, const double &y) |
| Adds an pair of elements from a precomputed covariance. More... | |
| void | Math::DecrementCovariance (const size_t &n, double &cov, const double &xmean, const double &ymean, const double &x, const double &y) |
| Removes an pair of elements from a precomputed covariance. More... | |
| Matrix< double > | Math::CovarianceMatrix (const Matrix< double > &mat) |
| Returns the covariance matrix of a multivariate sample. More... | |
| Matrix< double > | Math::RobustCovarianceMatrix (const Matrix< double > &mat, const double hh=0) |
| Returns the MCD robust covariance matrix of a multivariate sample. More... | |
| void | Math::DecrementCovarianceMatrix (const size_t &n, Matrix< double > &covmat, const std::vector< double > &means, const std::vector< double > &v) |
| Removes an element array from a precomputed covariance matrix. More... | |
| void | Math::IncrementCovarianceMatrix (const size_t &n, Matrix< double > &covmat, const std::vector< double > &means, const std::vector< double > &v) |
| Adds an element array to a precomputed covariance matrix. More... | |
| double | Math::DeterminantError (const Matrix< double > &mat, const Matrix< double > &mat_error=Matrix< double >()) |
| Returns the exact error on the determinant of the covariance matrix. More... | |
| double | Math::DeterminantMError (const Matrix< double > &mat, const Matrix< double > &mat_error) |
| Returns the measurement error on the determinant of the covariance matrix. More... | |
| double | Math::DeterminantSError (const Matrix< double > &mat) |
| Returns the statistical error on the determinant of the covariance matrix. More... | |
| double | Math::Median (const std::vector< double > &vx) |
| Computes the median of a variable sample. More... | |
| double | Math::MedianSError (const size_t n, const double &density) |
| Computes the statistical error on the median of a variable sample. More... | |
| double | Math::LWidth (const std::vector< double > &vx, const double &p) |
| Computes the Lebesgues width for a given metric (RMS = L2) More... | |
| double | Math::Quantile (const std::vector< double > &vx, const double &alpha) |
| Computes the quantile of a variable sample at probability alpha. More... | |
| double | Math::QuantileSError (const size_t n, const double &alpha, const double &density) |
| Computes the statistical error on the quantile of a variable sample at probability alpha. More... | |
| double | Math::Mode (const std::vector< double > &vx) |
| Computes the most probable value of the variable sample. More... | |
| double | Math::Min (const std::vector< double > &vx) |
| Returns the minimum value in the array. More... | |
| double | Math::Max (const std::vector< double > &vx) |
| Returns the maximum value in the array. More... | |
| double | Math::Mahalanobis (const Matrix< double > &invcov, const Matrix< double > &vec) |
| Returns the Mahalanobis distance of a point to a distribution. More... | |
| double | Math::MahalanobisSquared (const Matrix< double > &invcov, const Matrix< double > &vec) |
| Returns the squared Mahalanobis distance of a point to a distribution. More... | |
| double | Math::GeneralisedDistance (const double &rhoR, const double &rho0) |
| Returns the generalised distance of a point to a distribution. More... | |
| double | Math::GeneralisedDistanceSquared (const double &rhoR, const double &rho0) |
| Returns the squared generalised distance of a point to a distribution. More... | |
| size_t | Math::Factorial (const size_t n) |
| Returns the factorial of the provided integer. More... | |
| template<typename T > | |
| void | Math::Trim (std::vector< T > &vx, const double &frac) |
| Trim the n% lowest and n% largest values. More... | |
| template<typename T > | |
| std::vector< T > | Math::Trimmed (std::vector< T > vx, const double &frac) |
| Trim the n% lowest and n% largest values. More... | |
| template<typename T > | |
| void | Math::Winsorize (std::vector< T > &vx, const double &frac) |
| Winsorize to keep only a fraction frac of the original sample. More... | |
| template<typename T > | |
| std::vector< T > | Math::Winsorized (std::vector< T > vx, const double &frac) |
| Winsorize to keep only a fraction frac of the original sample. More... | |
| template<typename I > | |
| I | Math::RandomElement (I begin, I end) |
| Randomly select a single element from an array. More... | |
| template<typename T > | |
| std::vector< T > | Math::Resample (const std::vector< T > &vx, size_t m=0, const bool rep=true) |
| Randomly resample n data points into m data points with or without replacement. More... | |
Set of functions that compose the Statistics package.
1.8.6