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