00001 00005 class Histogram : public EmpiricalStatistics 00006 00007 { 00008 00009 public: 00010 00011 int nintervals; 00012 real min_value; 00013 real max_value; 00014 real dx; 00015 String sample_name; 00016 00017 private: 00018 00019 bool new_samples_collected; 00020 00021 VecSimple(real) freq_table; 00022 VecSimple(int) freq_coll; 00023 00024 void estimator (); 00025 00026 int interval (real x); 00027 00028 public: 00029 00030 Histogram (); 00031 Histogram (real min_value, real max_value, int nintervals); 00032 ~Histogram (); 00033 00034 bool redim (real min_value, real max_value, int nintervals); 00035 bool ok () const; 00036 00037 void init (); 00038 void setXaxisName (const String& name) { sample_name = name; } 00039 00040 void update (real x); 00041 00042 void intermediateResults (Os& os); 00043 00044 void makeBarPlot (CurvePlotFile& file); 00045 void makeDensityPlot (CurvePlotFile& file); 00046 void makeCumulativePlot (CurvePlotFile& file); 00047 00048 real cumulDistr (real x); 00049 }; 00050 00051