20 #ifndef TESSERACT_CCSTRUCT_STATISTC_H_ 21 #define TESSERACT_CCSTRUCT_STATISTC_H_ 45 STATS(int32_t min_bucket_value, int32_t max_bucket_value_plus_1);
52 bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1);
56 void add(int32_t value, int32_t
count);
64 double ile(
double frac)
const;
79 if (value <= rangemin_)
81 if (value >= rangemax_ - 1)
82 return buckets_[rangemax_ - rangemin_ - 1];
83 return buckets_[value - rangemin_];
96 void smooth(int32_t factor);
106 int32_t max_clusters,
125 #ifndef GRAPHICS_DISABLED 141 #endif // GRAPHICS_DISABLED 147 int32_t total_count_;
162 int (*compar)(
const void*,
const void*));
169 #endif // TESSERACT_CCSTRUCT_STATISTC_H_ int32_t pile_count(int32_t value) const
int32_t min_bucket() const
void swap_entries(void *array, size_t size, int32_t index1, int32_t index2)
bool local_min(int32_t x) const
int32_t max_bucket() const
int32_t choose_nth_item(int32_t index, float *array, int32_t count)
void print_summary() const
double ile(double frac) const
bool set_range(int32_t min_bucket_value, int32_t max_bucket_value_plus_1)
void smooth(int32_t factor)
int top_n_modes(int max_modes, GenericVector< tesseract::KDPairInc< float, int > > *modes) const
void add(int32_t value, int32_t count)
int32_t cluster(float lower, float upper, float multiple, int32_t max_clusters, STATS *clusters)
void plot(ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const
int32_t get_total() const
void plotline(ScrollView *window, float xorigin, float yorigin, float xscale, float yscale, ScrollView::Color colour) const