Basic Image AlgorithmS Library
2.8.0
|
Computes the median and p-quantile of a vector. More...
#include <MathAlgo/Median1D.hh>
Public Member Functions | |
void | Compute (const std::vector< DataType > &vec) |
Compute median and store sorted vector internally. More... | |
DataType | GetMedian () const |
Return computed median. More... | |
DataType | GetQuantile (double p) const |
Compute and return p-quantile of vector. More... | |
DataType | GetX84 () const |
Return median of absolute differences to median (X84 rule). More... | |
DataType | GetX84 (const std::vector< DataType > &vec, DataType median) const |
Return median of absolute differences to median (X84 rule) for given vector without storing it internally. More... | |
Median1D () | |
Median1D (const std::vector< DataType > &vec) | |
Compute median and store sorted vector internally. More... | |
~Median1D () | |
Protected Attributes | |
DataType | Median_ |
std::vector< DataType > | Values_ |
Computes the median and p-quantile of a vector.
The vectors is stored internally and sorted using std::sort. Hence this class should be used only with basic data types.
Definition at line 41 of file Median1D.hh.
|
inline |
Definition at line 45 of file Median1D.hh.
|
inline |
Definition at line 47 of file Median1D.hh.
|
inline |
Compute median and store sorted vector internally.
Definition at line 50 of file Median1D.hh.
void Median1D::Compute | ( | const std::vector< DataType > & | vec | ) |
Compute median and store sorted vector internally.
Definition at line 32 of file Median1D.cpp.
Referenced by BIAS::Median< InputStorageType, OutputStorageType >::FilterRemoveSaltAndPepper(), BIAS::Label::Process(), BIAS::PreemptiveRANSAC< SolutionType >::RejectSolutions_(), and BIAS::TrackerBaseInterface< StorageType >::RejectX84_().
|
inline |
Return computed median.
Definition at line 56 of file Median1D.hh.
Referenced by BIAS::Median< InputStorageType, OutputStorageType >::FilterRemoveSaltAndPepper(), BIAS::Label::Process(), BIAS::PreemptiveRANSAC< SolutionType >::RejectSolutions_(), and BIAS::TrackerBaseInterface< StorageType >::RejectX84_().
DataType Median1D::GetQuantile | ( | double | p | ) | const |
Compute and return p-quantile of vector.
Definition at line 46 of file Median1D.cpp.
|
inline |
Return median of absolute differences to median (X84 rule).
Definition at line 62 of file Median1D.hh.
References BIAS::Median1D< DataType >::GetX84().
Referenced by BIAS::Median< InputStorageType, OutputStorageType >::FilterRemoveSaltAndPepper(), and BIAS::Median1D< DataType >::GetX84().
DataType Median1D::GetX84 | ( | const std::vector< DataType > & | vec, |
DataType | median | ||
) | const |
Return median of absolute differences to median (X84 rule) for given vector without storing it internally.
Definition at line 58 of file Median1D.cpp.
|
protected |
Definition at line 70 of file Median1D.hh.
|
protected |
Definition at line 71 of file Median1D.hh.