5 #ifndef GEOMODELKERNEL_CELLBINNING_H 6 #define GEOMODELKERNEL_CELLBINNING_H 27 CellBinning (
double startVal,
double endVal,
unsigned int nBins,
unsigned int firstDivisionNumber = 0);
33 double binLower (
unsigned int i)
const;
38 double binUpper (
unsigned int i)
const;
75 unsigned int m_numDivisions;
77 unsigned int m_firstDivisionNumber;
82 return m_start + (i-m_firstDivisionNumber)*m_delta;
87 return m_start + (i-m_firstDivisionNumber+1)*m_delta;
92 return m_start + (i-m_firstDivisionNumber+0.5)*m_delta;
107 return m_numDivisions;
117 return m_firstDivisionNumber;
unsigned int getFirstDivisionNumber() const
Number for the first division. Optional, default=0.
unsigned int getNumDivisions() const
Number of Bins.
CellBinning(double startVal, double endVal, unsigned int nBins, unsigned int firstDivisionNumber=0)
Constructor.
double getDelta() const
gets the bin width
double binUpper(unsigned int i) const
gets the ith bin upper edge
double getStart() const
Starting value.
A simple class to specify a range, and a number of bins. The binning is specified as one would specif...
double getEnd() const
Ending Value.
double binCenter(unsigned int i) const
gets the ith bin center
double binLower(unsigned int i) const
Gets the ith bin lower edge.