14 #include "msdevstudio/MSconfig.h"
35 using namespace hippodraw;
81 Range (
const std::vector < double > & array )
83 setRange ( array.begin(), array.end () );
155 return value < m_min || value >
m_max;
205 return static_cast <
int > ( number+0.5 );
207 return static_cast <
int > ( rint( number ) );
bool m_empty
A flag indicating that the range is empty.
double high() const
Returns the maximum of the range object.
Range()
The following constructors sets the range to {0.0, 0.0} but sets m_empty to true. ...
double m_max
The maximum in the range.
double fraction(double value) const
Returns the fraction of the range that value represents.
double m_pos
The minimum positive value in the range, for log scale.
void setLow(double x)
Sets the minimum of the range object.
bool includes(double value) const
Returns true if the argument value is inside the range.
void setHigh(double x)
Sets the maximum of the range object.
void setLength(double val, bool high_hold=false)
Sets the length of the range.
void setRange(double low, double high, double pos)
Changes the current Range.
bool excludes(double value) const
Returns true if the argument value is outside the range.
void setPos(double x)
Sets the first positive element in range.
void setIntersect(const Range &range)
Forms the intersect with the range in the argument.
void setEmpty(bool yes=true)
Sets the range to empty.
hippodraw::Range class interface
double low() const
Returns the minimum of the range object.
void setUnion(const Range &range)
Forms the union with the range range.
Expresses a range of values.
int numberOfBins(double width) const
Returns the number of bins of width width required to fill the range.
double m_min
The minimum in the range.
double pos() const
Returns the first positive element in range.