MINT2
BinningBase.h
Go to the documentation of this file.
1 
11 #ifndef BINNINGBASE_HH
12 #define BINNINGBASE_HH
13 
14 // HyperPlot includes
15 #include "Mint/MessageService.h"
16 #include "Mint/HyperPoint.h"
17 #include "Mint/HyperVolume.h"
18 #include "Mint/HyperName.h"
19 
20 
21 // Root includes
22 
23 
24 // std includes
25 
26 
27 class BinningBase {
28 
29  private:
30 
41  TString _binningType;
46  protected:
47 
48  virtual void setDimension (int dimension);
49  void setBinningType(TString binningType);
50 
51  public:
52 
53  BinningBase();
54 
55  void setNames( HyperName names );
56  HyperName getNames() const;
57  const int& getDimension () const;
59  double getMin(int dimension) const;
60  double getMax(int dimension) const;
61 
62  TString getBinningType() const;
63  bool isSameBinningType(const BinningBase& other) const;
64 
65  virtual bool isDiskResident() const;
66  virtual TString filename() const;
67 
68  virtual ~BinningBase();
69 
70  //Purely virtual functions
71 
72  virtual void load(TString filename, TString option = "READ") = 0;
73 
74  virtual void save(TString filename) const = 0;
75  virtual void save() const = 0;
76 
77  virtual BinningBase* clone() const = 0;
78 
79  virtual int getNumBins() const = 0;
80  virtual int getBinNum(const HyperPoint& coords) const = 0;
81 
82  virtual HyperVolume getBinHyperVolume(int binNumber) const = 0;
83 
84  virtual void mergeBinnings( const BinningBase& other ) = 0;
85 
86  virtual HyperPoint getAverageBinWidth() const = 0;
87  virtual HyperCuboid getLimits() const = 0;
88 
89  virtual void reserveCapacity(int nElements);
90 
91  virtual std::vector<int> getBinNum(const HyperPointSet& coords) const;
92 
93 
94 };
95 
96 
97 
98 #endif
99 
virtual bool isDiskResident() const
Definition: BinningBase.cpp:54
double getMax(int dimension) const
Definition: BinningBase.cpp:46
virtual TString filename() const
Definition: BinningBase.cpp:57
bool isSameBinningType(const BinningBase &other) const
Definition: BinningBase.cpp:12
void setNames(HyperName names)
Definition: BinningBase.cpp:21
HyperName getNames() const
Definition: BinningBase.cpp:25
virtual void mergeBinnings(const BinningBase &other)=0
double getMin(int dimension) const
Definition: BinningBase.cpp:42
virtual BinningBase * clone() const =0
virtual void load(TString filename, TString option="READ")=0
TString getBinningType() const
Definition: BinningBase.cpp:50
virtual void setDimension(int dimension)
Definition: BinningBase.cpp:34
virtual int getNumBins() const =0
int _dimension
Definition: BinningBase.h:31
virtual int getBinNum(const HyperPoint &coords) const =0
void setBinningType(TString binningType)
Definition: BinningBase.cpp:16
virtual ~BinningBase()
Definition: BinningBase.cpp:76
TString _binningType
Definition: BinningBase.h:41
const int & getDimension() const
Definition: BinningBase.cpp:30
HyperName _axisNames
Definition: BinningBase.h:36
virtual void reserveCapacity(int nElements)
Definition: BinningBase.cpp:61
virtual HyperPoint getAverageBinWidth() const =0
virtual HyperCuboid getLimits() const =0
virtual void save() const =0
virtual HyperVolume getBinHyperVolume(int binNumber) const =0