UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZHistogram.H
1 /* ZHistogram.H */
2 /* $Id: ZHistogram.H,v 1.3 2003/10/22 08:21:15 vlad Exp $ */
3 #ifndef __ZHistogram_H
4 #define __ZHistogram_H
5 
6 #include <mix/DoubleAr.H>
7 
8 
15 {
16 public:
17 
19  enum ZHistMode {
22  };
23 
24 private:
25 
27  ZHistMode hmode;
28 
30  DoubleAr hits;
31 
33  float mm[2];
34 
36  double step;
37 
38 public:
39 
42  ZHistogram (ZHistMode hm, unsigned nRanges = 100);
43 
45  ZHistogram (const ZHistogram& zh);
46 
49  ZHistogram& operator= (const ZHistogram& zh);
50 
52  void reset ();
53 
55  void reset (ZHistMode hm);
56 
58  void add_vector (const float* items, unsigned n_items);
59 
61  void get_range (float mm[2]) const;
62 
65  Logic get_range (int index, float r[2]) const;
66 
68  float get_hits (float c[2]) const;
69 
72  float get_hits (int index) const;
73  float operator() (int index) const{
74  return get_hits(index);
75  }
76 
78  int get_index (float c) const;
79 
82  ZHistogram& unify (const ZHistogram& zh);
83  ZHistogram& operator+= (const ZHistogram& zh){
84  return unify(zh);
85  }
86 
91  unsigned curve_data (float*& arg, float*& val,
92  float max = 0.0) const;
93 
97  float limit_hits_coord (float part) const;
98 
99 };
100 
101 
103 #define PtrAr ZHistogramAr
104 #define PtrType ZHistogram*
105 #include <mix/PtrAr.H>
106 
107 
108 
109 #endif /* ZHistogram.H */
Definition: ZHistogram.H:20
ZHistogram & operator=(const ZHistogram &zh)
unsigned curve_data(float *&arg, float *&val, float max=0.0) const
Definition: ZHistogram.H:14
ZHistMode
Definition: ZHistogram.H:19
int get_index(float c) const
Definition: DoubleAr.H:14
void reset()
void get_range(float mm[2]) const
float limit_hits_coord(float part) const
float get_hits(float c[2]) const
void add_vector(const float *items, unsigned n_items)
Definition: ZHistogram.H:21
ZHistogram & unify(const ZHistogram &zh)
ZHistogram(ZHistMode hm, unsigned nRanges=100)