Classes | |
class | itpp::Stat |
A class for sampling a signal and calculating statistics. More... | |
Functions | |
double | itpp::mean (const vec &v) |
The mean value. More... | |
std::complex< double > | itpp::mean (const cvec &v) |
The mean value. More... | |
double | itpp::mean (const svec &v) |
The mean value. More... | |
double | itpp::mean (const ivec &v) |
The mean value. More... | |
double | itpp::mean (const mat &m) |
The mean value. More... | |
std::complex< double > | itpp::mean (const cmat &m) |
The mean value. More... | |
double | itpp::mean (const smat &m) |
The mean value. More... | |
double | itpp::mean (const imat &m) |
The mean value. More... | |
template<class T > | |
double | itpp::geometric_mean (const Vec< T > &v) |
The geometric mean of a vector. More... | |
template<class T > | |
double | itpp::geometric_mean (const Mat< T > &m) |
The geometric mean of a matrix. More... | |
template<class T > | |
double | itpp::median (const Vec< T > &v) |
The median. More... | |
double | itpp::norm (const cvec &v) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)) More... | |
template<class T > | |
double | itpp::norm (const Vec< T > &v) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)) More... | |
double | itpp::norm (const cvec &v, int p) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p) More... | |
template<class T > | |
double | itpp::norm (const Vec< T > &v, int p) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p) More... | |
double | itpp::norm (const cvec &v, const std::string &s) |
Calculate the Frobenius norm for s = "fro" (equal to 2-norm) More... | |
template<class T > | |
double | itpp::norm (const Vec< T > &v, const std::string &s) |
Calculate the Frobenius norm for s = "fro" (equal to 2-norm) More... | |
double | itpp::norm (const mat &m, int p) |
double | itpp::norm (const cmat &m, int p) |
double | itpp::norm (const mat &m, const std::string &s) |
Calculate the Frobenius norm of a matrix for s = "fro". More... | |
double | itpp::norm (const cmat &m, const std::string &s) |
Calculate the Frobenius norm of a matrix for s = "fro". More... | |
double | itpp::variance (const cvec &v) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased. More... | |
template<class T > | |
double | itpp::variance (const Vec< T > &v) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased. More... | |
template<class T > | |
double | itpp::energy (const Vec< T > &v) |
Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2) More... | |
bool | itpp::within_tolerance (double x, double xref, double tol=1e-14) |
Return true if the input value x is within the tolerance tol of the reference value xref . More... | |
bool | itpp::within_tolerance (std::complex< double > x, std::complex< double > xref, double tol=1e-14) |
Return true if the input value x is within the tolerance tol of the reference value xref . More... | |
bool | itpp::within_tolerance (const vec &x, const vec &xref, double tol=1e-14) |
Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref . More... | |
bool | itpp::within_tolerance (const cvec &x, const cvec &xref, double tol=1e-14) |
Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref . More... | |
bool | itpp::within_tolerance (const mat &X, const mat &Xref, double tol=1e-14) |
Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref . More... | |
bool | itpp::within_tolerance (const cmat &X, const cmat &Xref, double tol=1e-14) |
Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref . More... | |
double | itpp::moment (const vec &x, const int r) |
Calculate the central moment of vector x. More... | |
double | itpp::skewness (const vec &x) |
Calculate the skewness excess of the input vector x. More... | |
double | itpp::kurtosisexcess (const vec &x) |
Calculate the kurtosis excess of the input vector x. More... | |
double | itpp::kurtosis (const vec &x) |
Calculate the kurtosis of the input vector x. More... | |
ITPP_EXPORT double itpp::mean | ( | const vec & | v | ) |
The mean value.
Definition at line 36 of file misc_stat.cpp.
References itpp::sum().
Referenced by itpp::Complex_Normal_RNG::Complex_Normal_RNG(), itpp::cov(), itpp::Complex_Normal_RNG::get_setup(), itpp::MOG_generic::log_lhood_single_gaus_internal(), itpp::moment(), itpp::Normal_RNG::operator()(), remmean(), itpp::Laplace_RNG::sample(), itpp::Sawtooth_Source::Sawtooth_Source(), itpp::Normal_RNG::setup(), itpp::Complex_Normal_RNG::setup(), itpp::Sine_Source::Sine_Source(), itpp::Square_Source::Square_Source(), and itpp::Triangle_Source::Triangle_Source().
ITPP_EXPORT std::complex< double > itpp::mean | ( | const cvec & | v | ) |
ITPP_EXPORT double itpp::mean | ( | const svec & | v | ) |
ITPP_EXPORT double itpp::mean | ( | const ivec & | v | ) |
ITPP_EXPORT double itpp::mean | ( | const mat & | m | ) |
ITPP_EXPORT std::complex< double > itpp::mean | ( | const cmat & | m | ) |
ITPP_EXPORT double itpp::mean | ( | const smat & | m | ) |
ITPP_EXPORT double itpp::mean | ( | const imat & | m | ) |
double itpp::geometric_mean | ( | const Vec< T > & | v | ) |
The geometric mean of a vector.
Definition at line 139 of file misc_stat.h.
References itpp::exp(), itpp::Vec< Num_T >::length(), itpp::log(), and itpp::prod().
double itpp::geometric_mean | ( | const Mat< T > & | m | ) |
The geometric mean of a matrix.
Definition at line 146 of file misc_stat.h.
References itpp::Mat< Num_T >::cols(), itpp::exp(), itpp::log(), itpp::prod(), and itpp::Mat< Num_T >::rows().
double itpp::median | ( | const Vec< T > & | v | ) |
ITPP_EXPORT double itpp::norm | ( | const cvec & | v | ) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
Definition at line 77 of file misc_stat.cpp.
References itpp::norm(), and itpp::sqrt().
Referenced by itpp::energy(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::FIR_Fading_Generator::Jakes_filter(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), mpower(), itpp::norm(), itpp::Newton_Search::search(), itpp::Line_Search::search(), itpp::TDL_Channel::set_channel_profile(), itpp::Spread_1d::set_code(), and itpp::Multicode_Spread_1d::set_codes().
double itpp::norm | ( | const Vec< T > & | v | ) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
Definition at line 166 of file misc_stat.h.
References itpp::Vec< Num_T >::size(), itpp::sqr(), and itpp::sqrt().
ITPP_EXPORT double itpp::norm | ( | const cvec & | v, |
int | p | ||
) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p)
Definition at line 86 of file misc_stat.cpp.
References itpp::norm(), and itpp::pow().
double itpp::norm | ( | const Vec< T > & | v, |
int | p | ||
) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p)
Definition at line 180 of file misc_stat.h.
References itpp::pow(), and itpp::Vec< Num_T >::size().
ITPP_EXPORT double itpp::norm | ( | const cvec & | v, |
const std::string & | |||
) |
Calculate the Frobenius norm for s = "fro" (equal to 2-norm)
Definition at line 95 of file misc_stat.cpp.
References itpp::norm().
double itpp::norm | ( | const Vec< T > & | v, |
const std::string & | s | ||
) |
Calculate the Frobenius norm for s = "fro" (equal to 2-norm)
Definition at line 194 of file misc_stat.h.
References it_assert, itpp::Vec< Num_T >::size(), itpp::sqr(), and itpp::sqrt().
ITPP_EXPORT double itpp::norm | ( | const mat & | m, |
int | p = 2 |
||
) |
Calculate the p-norm of a real matrix
p = 1: max(svd(m)) p = 2: max(sum(abs(X)))
Default if no p is given is the 2-norm
Definition at line 105 of file misc_stat.cpp.
References itpp::abs(), it_assert, itpp::max(), itpp::sum(), and itpp::svd().
ITPP_EXPORT double itpp::norm | ( | const cmat & | m, |
int | p = 2 |
||
) |
Calculate the p-norm of a complex matrix
p = 1: max(svd(m)) p = 2: max(sum(abs(X)))
Default if no p is given is the 2-norm
Definition at line 121 of file misc_stat.cpp.
References itpp::abs(), it_assert, itpp::max(), itpp::sum(), and itpp::svd().
ITPP_EXPORT double itpp::norm | ( | const mat & | m, |
const std::string & | s | ||
) |
Calculate the Frobenius norm of a matrix for s = "fro".
Definition at line 133 of file misc_stat.cpp.
References it_assert, and itpp::sqrt().
ITPP_EXPORT double itpp::norm | ( | const cmat & | m, |
const std::string & | s | ||
) |
Calculate the Frobenius norm of a matrix for s = "fro".
Definition at line 146 of file misc_stat.cpp.
References it_assert, itpp::norm(), and itpp::sqrt().
Referenced by itpp::norm(), and itpp::variance().
ITPP_EXPORT double itpp::variance | ( | const cvec & | v | ) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased.
Definition at line 159 of file misc_stat.cpp.
References itpp::norm(), and itpp::sum().
Referenced by itpp::AR1_Normal_RNG::AR1_Normal_RNG(), itpp::Complex_Normal_RNG::Complex_Normal_RNG(), itpp::Normal_RNG::get_setup(), itpp::Laplace_RNG::get_setup(), itpp::AR1_Normal_RNG::get_setup(), itpp::Complex_Normal_RNG::get_setup(), itpp::kurtosisexcess(), itpp::Laplace_RNG::Laplace_RNG(), itpp::Normal_RNG::setup(), itpp::Laplace_RNG::setup(), itpp::AR1_Normal_RNG::setup(), itpp::Complex_Normal_RNG::setup(), and itpp::skewness().
double itpp::variance | ( | const Vec< T > & | v | ) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased.
Definition at line 237 of file misc_stat.h.
References itpp::Vec< Num_T >::_data(), itpp::Vec< Num_T >::size(), and itpp::sum().
double itpp::energy | ( | const Vec< T > & | v | ) |
Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2)
Definition at line 253 of file misc_stat.h.
References itpp::norm(), and itpp::sqr().
Referenced by itpp::spectrum(), and itpp::xcorr_old().
|
inline |
Return true if the input value x
is within the tolerance tol
of the reference value xref
.
Definition at line 260 of file misc_stat.h.
|
inline |
Return true if the input value x
is within the tolerance tol
of the reference value xref
.
Definition at line 266 of file misc_stat.h.
References itpp::abs().
|
inline |
Return true if the input vector x
is elementwise within the tolerance tol
of the reference vector xref
.
Definition at line 272 of file misc_stat.h.
References itpp::abs(), and itpp::max().
|
inline |
Return true if the input vector x
is elementwise within the tolerance tol
of the reference vector xref
.
Definition at line 278 of file misc_stat.h.
References itpp::abs(), and itpp::max().
|
inline |
Return true if the input matrix X
is elementwise within the tolerance tol
of the reference matrix Xref
.
Definition at line 284 of file misc_stat.h.
References itpp::abs(), and itpp::max().
|
inline |
Return true if the input matrix X
is elementwise within the tolerance tol
of the reference matrix Xref
.
Definition at line 290 of file misc_stat.h.
References itpp::abs(), and itpp::max().
ITPP_EXPORT double itpp::moment | ( | const vec & | x, |
const int | r | ||
) |
Calculate the central moment of vector x.
The th sample central moment of the samples in the vector
is defined as
where is the sample mean.
Definition at line 174 of file misc_stat.cpp.
References itpp::mean(), and itpp::pow().
Referenced by itpp::kurtosisexcess(), and itpp::skewness().
ITPP_EXPORT double itpp::skewness | ( | const vec & | x | ) |
Calculate the skewness excess of the input vector x.
The skewness is a measure of the degree of asymmetry of distribution. Negative skewness means that the distribution is spread more to the left of the mean than to the right, and vice versa if the skewness is positive.
The skewness of the samples in the vector is
where is the mean and
the standard deviation.
The skewness is estimated as
where
and
Here is the sample variance and
is the 3rd sample central moment.
Definition at line 210 of file misc_stat.cpp.
References itpp::moment(), itpp::pow(), and itpp::variance().
ITPP_EXPORT double itpp::kurtosisexcess | ( | const vec & | x | ) |
Calculate the kurtosis excess of the input vector x.
The kurtosis excess is a measure of peakedness of a distribution. The kurtosis excess is defined as
where is the mean and
the standard deviation.
The kurtosis excess is estimated as
where
and
Here is the sample variance and
is the 4th sample central moment.
Definition at line 220 of file misc_stat.cpp.
References itpp::moment(), and itpp::variance().
Referenced by itpp::kurtosis().
|
inline |
Calculate the kurtosis of the input vector x.
The kurtosis is a measure of peakedness of a distribution. The kurtosis is defined as
where is the mean and
the standard deviation. For a Gaussian variable, the kurtusis is 3.
See also the definition of kurtosisexcess.
Definition at line 379 of file misc_stat.h.
References itpp::kurtosisexcess().
Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.4