Definition at line 42 of file cjkpitch.cpp.
◆ SimpleStats()
tesseract::SimpleStats::SimpleStats |
( |
| ) |
|
|
default |
◆ ~SimpleStats()
tesseract::SimpleStats::~SimpleStats |
( |
| ) |
|
|
default |
◆ Add()
void tesseract::SimpleStats::Add |
( |
float |
value | ) |
|
|
inline |
Definition at line 52 of file cjkpitch.cpp.
53 values_.push_back(value);
◆ Clear()
void tesseract::SimpleStats::Clear |
( |
| ) |
|
|
inline |
◆ empty()
bool tesseract::SimpleStats::empty |
( |
| ) |
const |
|
inline |
Definition at line 95 of file cjkpitch.cpp.
96 return values_.empty();
◆ Finish()
void tesseract::SimpleStats::Finish |
( |
| ) |
|
|
inline |
Definition at line 57 of file cjkpitch.cpp.
58 std::sort(values_.begin(), values_.end());
◆ ile()
float tesseract::SimpleStats::ile |
( |
double |
frac | ) |
|
|
inline |
Definition at line 62 of file cjkpitch.cpp.
66 if (values_.empty()) {
70 return values_.back();
72 if (frac <= 0.0 || values_.size() == 1) {
75 int index =
static_cast<int>((values_.size() - 1) * frac);
76 float reminder = (values_.size() - 1) * frac - index;
78 return values_[index] * (1.0f - reminder) + values_[index + 1] * reminder;
◆ median()
float tesseract::SimpleStats::median |
( |
| ) |
|
|
inline |
◆ minimum()
float tesseract::SimpleStats::minimum |
( |
| ) |
|
|
inline |
◆ size()
int tesseract::SimpleStats::size |
( |
| ) |
const |
|
inline |
Definition at line 99 of file cjkpitch.cpp.
100 return values_.size();
The documentation for this class was generated from the following file: