reference/ocr-simple/histogram.h
author viric@llimona
Thu, 18 May 2006 23:12:51 +0200
changeset 0 6b8091ca909a
permissions -rw-r--r--
Init from working directory of svn repository.

#ifndef HISTOGRAM
#define HISTOGRAM 1

class Histogram
{
/* just an array of integers with some statistical information */
/* consider implementing with an intarray (from hw1) instead */
 private:
  double mean;
  double variance;
  double standard_dev;

  int num_rows;
  int* row_weights;
  double cut_angle;/* this doesn't really belong here, but who cares */
  void initialize_mean();
  void initialize_variance();
  void initialize_standard_dev(); 
 public:
  display();
  Histogram(int n_rows, int* r_weights, double c_angle);
  inline int get_row_weight(int row)
      {
	return row_weights[row];
      }
  inline int get_num_rows()
      {
	return num_rows;
      }
  inline double get_mean()
      {
	return mean;
      }
  inline double get_standard_dev()
      {
	return standard_dev;
      }
  inline double get_variance()
      {
	return variance;
      }
  inline double get_cut_angle()
      {
	return cut_angle;
      }
};

#endif