Go to the documentation of this file.
177 static T
multiply(
const T& val1,
const T& val2);
184 static T
sqrt(
const T& val);
204 #include "impl/running_stats.hpp"
static T sqrt(const T &val)
Return the square root of the given value (whatever meaning that might have).
Computation of running average and variance using Welford's algorithm.
void removeSample(T x)
Remove a sample from the statistics.
RunningStats< T > operator-(const RunningStats< T > &other) const
Subtract the sequence represented by other from the sequence represented by this and return the updat...
T var
Sk term of the computation such that var(X0...Xk) = this->var/this->count.
RunningStats< T > & operator-=(const RunningStats< T > &other)
Subtract the sequence represented by other from the sequence represented by this and update the stats...
static T zero()
Return a T value representing zero.
void reset()
Reset the statistics to represent an empty sequence.
T getSampleVariance() const
Get the sample variance of stored samples (like variance, but divided by count-1 instead of count,...
T getStandardDeviation() const
Get standard deviation of stored samples.
T getMean() const
Get the mean of stored samples.
T mean
Mean of represented samples.
RunningStats< T > & operator+=(const RunningStats< T > &other)
Combine the two sequences represented by this and other and represent their joint stats.
T getVariance() const
Get the variance of stored samples.
static T multiply(const T &val1, const T &val2)
val1 * val2
RunningStats< T > operator+(const RunningStats< T > &other) const
Combine the two sequences represented by this and other and represent their joint stats.
size_t getCount() const
Get the number of stored samples.
static T multiplyScalar(const T &val, double scalar)
val * scalar
size_t count
Number of represented samples.
void addSample(T x)
Add a new sample to the statistics.
cras_cpp_common
Author(s): Martin Pecka
autogenerated on Tue Nov 26 2024 03:49:04