libcrn
3.9.5
A document image processing library
|
Classes | |
class | crn::Histogram |
Mother class for integer histograms. More... | |
class | crn::PCA |
Class to perform Principal Componant Analysis. More... | |
Functions | |
template<typename T > | |
T | crn::Max (const std::vector< T > &v) |
Data analysis. More... | |
template<typename T > | |
T | crn::Max (const std::vector< std::vector< T >> &m) |
Returns max. More... | |
template<typename T > | |
T | crn::Min (const std::vector< T > &v) |
Returns min. More... | |
template<typename T > | |
T | crn::Min (const std::vector< std::vector< T >> &m) |
Returns min. More... | |
template<typename T > | |
std::tuple< T, T > | crn::MinMax (const std::vector< T > &v) |
Returns min and max. More... | |
template<typename T > | |
std::tuple< T, T > | crn::MinMax (const std::vector< std::vector< T >> &m) |
Returns min and max. More... | |
template<typename T > | |
size_t | crn::Argmax (const std::vector< T > &v) |
Return index of a maximal. More... | |
template<typename T > | |
size_t | crn::Argmin (const std::vector< T > &v) |
Return index of a minimal. More... | |
template<typename T > | |
size_t | crn::ColumnArgmax (const std::vector< std::vector< T >> &m, size_t col) |
Return index of a maximal on a column. More... | |
template<typename T > | |
size_t | crn::ColumnArgmin (const std::vector< std::vector< T >> &m, size_t col) |
Return index of a minimal on a column. More... | |
double | crn::Mean (const std::vector< double > &v) |
Return mean value of sample. More... | |
template<typename ITER > | |
std::iterator_traits< ITER > ::value_type | crn::Mean (ITER be, ITER en) |
Return mean value of sample. More... | |
template<typename ITER > | |
double | crn::MeanAsDouble (ITER be, ITER en) |
Return mean value of sample as a double value. More... | |
std::vector< double > | crn::MeanPattern (const std::vector< std::vector< double >> &m) |
Return mean pattern of sample. More... | |
template<typename ITER > | |
std::vector< double > | crn::MeanPattern (ITER it_begin, ITER it_end) |
double | crn::StdDeviation (const std::vector< double > &v) |
Return deviation of sample. More... | |
double | crn::Variance (const std::vector< double > &v) |
Return variance of sample. More... | |
std::vector< std::vector < double > > | crn::MakeCovariance (const std::vector< std::vector< double >> &m) |
Return covariance for sample. More... | |
template<typename ITER > | |
std::vector< std::vector < double > > | crn::MakeCovariance (ITER it_begin, ITER it_end) |
std::tuple< double, double, double > | crn::MeanVarDev (const std::vector< double > &v) |
Return mean, variance and standard deviation of sample. More... | |
template<typename ITER > | |
std::tuple< double, double, double > | crn::MeanVarDev (ITER it_begin, ITER it_end) |
std::vector< double > | crn::Quantiles (const std::vector< double > &v, size_t q, bool sort_flag=true) |
Return quantile values of sample. More... | |
template<typename T > | |
T | crn::MedianValue (const std::vector< T > &v) |
Median value. More... | |
template<typename T > | |
bool | crn::AllEqual (const std::vector< T > &v) |
Test if all data values are equal. More... | |
template<typename T > | |
bool | crn::AllEqual (const std::vector< std::vector< T >> &m) |
Test if all data values are equal. More... | |
Histogram | crn::MakeHistogram (const std::vector< double > &v, size_t nb_bins) |
Returns count histogram. More... | |
Histogram | crn::MakeHistogramSquareRoot (const std::vector< double > &v) |
Returns count histogram (#bins = sqrt(pop) ) More... | |
Histogram | crn::MakeHistogramSturges (const std::vector< double > &v) |
Returns count histogram (#bins = 1+log_2(pop) ) More... | |
Histogram | crn::MakeHistogramRice (const std::vector< double > &v) |
Returns count histogram (#bins = 2n^(1/3) ) More... | |
Histogram | crn::MakeHistogramScott (const std::vector< double > &v) |
Returns count histogram (bin width = 3.5 * stddev / pop^(1/3)) More... | |
Histogram | crn::MakeHistogramFreedmanDiaconis (const std::vector< double > &v, bool sort_flag=true) |
Returns count histogram (bin width = 2 * IQR(v) / pop^(1/3)) More... | |
UnivariateGaussianMixture | crn::MakeGaussianMixtureModel (const std::vector< double > &v, size_t nb_seeds=2) |
Return Gaussian mixture model modeling current (univariate) sample. More... | |
MultivariateGaussianMixture | crn::MakeGaussianMixtureModel (const std::vector< std::vector< double >> &patterns, size_t nb_seeds=2) |
Return Gaussian mixture model modeling current (multivariate) sample. More... | |
|
inline |
Test if all data values are equal.
Definition at line 348 of file CRNStatisticSample.h.
|
inline |
Test if all data values are equal.
Definition at line 350 of file CRNStatisticSample.h.
|
inline |
Return index of a maximal.
Definition at line 102 of file CRNStatisticSample.h.
|
inline |
Return index of a minimal.
Definition at line 104 of file CRNStatisticSample.h.
size_t crn::ColumnArgmax | ( | const std::vector< std::vector< T >> & | m, |
size_t | col | ||
) |
Return index of a maximal on a column.
Definition at line 106 of file CRNStatisticSample.h.
size_t crn::ColumnArgmin | ( | const std::vector< std::vector< T >> & | m, |
size_t | col | ||
) |
Return index of a minimal on a column.
Definition at line 119 of file CRNStatisticSample.h.
std::vector< std::vector< double > > crn::MakeCovariance | ( | const std::vector< std::vector< double >> & | m | ) |
Return covariance for sample.
[in] | m | a matrix of doubles |
Definition at line 129 of file CRNStatisticSample.cpp.
std::vector<std::vector<double> > crn::MakeCovariance | ( | ITER | it_begin, |
ITER | it_end | ||
) |
Definition at line 240 of file CRNStatisticSample.h.
UnivariateGaussianMixture crn::MakeGaussianMixtureModel | ( | const std::vector< double > & | v, |
size_t | nb_seeds = 2 |
||
) |
Return Gaussian mixture model modeling current (univariate) sample.
[in] | v | a vector of doubles |
[in] | nb_seeds | the number of desired Gaussians |
Definition at line 326 of file CRNStatisticSample.cpp.
MultivariateGaussianMixture crn::MakeGaussianMixtureModel | ( | const std::vector< std::vector< double >> & | patterns, |
size_t | nb_seeds = 2 |
||
) |
Return Gaussian mixture model modeling current (multivariate) sample.
Create a gaussian mixture to model a given set of data
[in] | patterns | a matrix of doubles |
[in] | nb_seeds | the number of desired Gaussians |
Definition at line 348 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogram | ( | const std::vector< double > & | v, |
size_t | nb_bins | ||
) |
Returns count histogram.
[in] | v | a vector of doubles |
[in] | nb_bins | the desired size of the histogram |
Definition at line 250 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogramFreedmanDiaconis | ( | const std::vector< double > & | v, |
bool | sort_flag = true |
||
) |
Returns count histogram (bin width = 2 * IQR(v) / pop^(1/3))
[in] | v | a vector of doubles |
Definition at line 313 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogramRice | ( | const std::vector< double > & | v | ) |
Returns count histogram (#bins = 2n^(1/3) )
[in] | v | a vector of doubles |
Definition at line 293 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogramScott | ( | const std::vector< double > & | v | ) |
Returns count histogram (bin width = 3.5 * stddev / pop^(1/3))
[in] | v | a vector of doubles |
Definition at line 302 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogramSquareRoot | ( | const std::vector< double > & | v | ) |
Returns count histogram (#bins = sqrt(pop) )
[in] | v | a vector of doubles |
Definition at line 275 of file CRNStatisticSample.cpp.
Histogram crn::MakeHistogramSturges | ( | const std::vector< double > & | v | ) |
Returns count histogram (#bins = 1+log_2(pop) )
[in] | v | a vector of doubles |
Definition at line 284 of file CRNStatisticSample.cpp.
|
inline |
Data analysis.
Data analysis
Returns max
Definition at line 57 of file CRNStatisticSample.h.
|
inline |
Returns max.
Definition at line 59 of file CRNStatisticSample.h.
double crn::Mean | ( | const std::vector< double > & | v | ) |
Return mean value of sample.
[in] | v | a vector of doubles |
Definition at line 40 of file CRNStatisticSample.cpp.
std::iterator_traits<ITER>::value_type crn::Mean | ( | ITER | be, |
ITER | en | ||
) |
Return mean value of sample.
[in] | be | begin iterator |
[in] | en | end iterator |
Definition at line 142 of file CRNStatisticSample.h.
double crn::MeanAsDouble | ( | ITER | be, |
ITER | en | ||
) |
Return mean value of sample as a double value.
[in] | be | begin iterator |
[in] | en | end iterator |
Definition at line 155 of file CRNStatisticSample.h.
std::vector< double > crn::MeanPattern | ( | const std::vector< std::vector< double >> & | m | ) |
Return mean pattern of sample.
[in] | m | a vector of vector doubles |
Definition at line 60 of file CRNStatisticSample.cpp.
std::vector<double> crn::MeanPattern | ( | ITER | it_begin, |
ITER | it_end | ||
) |
Average pattern
[in] | it_begin | iterator pointing to first double-size_t pair of input data |
[in] | it_end | ending iterator |
Definition at line 181 of file CRNStatisticSample.h.
std::tuple< double, double, double > crn::MeanVarDev | ( | const std::vector< double > & | v | ) |
Return mean, variance and standard deviation of sample.
[in] | v | a vector of doubles |
Definition at line 152 of file CRNStatisticSample.cpp.
std::tuple<double, double, double> crn::MeanVarDev | ( | ITER | it_begin, |
ITER | it_end | ||
) |
Mean, variance and deviation for a sample
[in] | it_begin | iterator pointing to first pair of input data |
[in] | it_end | ending iterator |
Definition at line 273 of file CRNStatisticSample.h.
T crn::MedianValue | ( | const std::vector< T > & | v | ) |
Median value.
Definition at line 340 of file CRNStatisticSample.h.
|
inline |
Returns min.
Definition at line 70 of file CRNStatisticSample.h.
|
inline |
Returns min.
Definition at line 72 of file CRNStatisticSample.h.
|
inline |
Returns min and max.
Definition at line 83 of file CRNStatisticSample.h.
|
inline |
Returns min and max.
Definition at line 89 of file CRNStatisticSample.h.
std::vector< double > crn::Quantiles | ( | const std::vector< double > & | v, |
size_t | q, | ||
bool | sort_flag = true |
||
) |
Return quantile values of sample.
Get quantile values
ExceptionDomain | illegal range |
[in] | v | statistic sample |
[in] | q | number of bins required |
[in] | sort_flag | shall the statistic sample be sorted? |
Definition at line 216 of file CRNStatisticSample.cpp.
double crn::StdDeviation | ( | const std::vector< double > & | v | ) |
Return deviation of sample.
[in] | v | a vector of doubles |
Definition at line 95 of file CRNStatisticSample.cpp.
double crn::Variance | ( | const std::vector< double > & | v | ) |
Return variance of sample.
[in] | v | a vector of doubles |
Definition at line 104 of file CRNStatisticSample.cpp.