19#ifndef TESSERACT_CCSTRUCT_STATISTC_H_
20#define TESSERACT_CCSTRUCT_STATISTC_H_
39 STATS(int32_t min_bucket_value, int32_t max_bucket_value);
46 bool set_range(int32_t min_bucket_value, int32_t max_bucket_value);
58 double ile(
double frac)
const;
62 int32_t min_bucket()
const;
65 int32_t max_bucket()
const;
70 double median()
const;
73 if (buckets_ ==
nullptr) {
76 if (
value <= rangemin_) {
79 if (
value >= rangemax_) {
80 return buckets_[rangemax_ - rangemin_];
82 return buckets_[
value - rangemin_];
89 bool local_min(int32_t
x)
const;
95 void smooth(int32_t factor);
102 int32_t cluster(
float lower,
105 int32_t max_clusters,
120 void print_summary()
const;
122#ifndef GRAPHICS_DISABLED
141 int32_t rangemin_ = 0;
142 int32_t rangemax_ = 0;
143 int32_t total_count_ = 0;
144 int32_t *buckets_ =
nullptr;
int32_t pile_count(int32_t value) const
int32_t get_total() const