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 ) );
void setRange(double low, double high, double pos)
Changes the current Range.
void setPos(double x)
Sets the first positive element in 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 setEmpty(bool yes=true)
Sets the range to empty.
bool excludes(double value) const
Returns true if the argument value is outside the range.
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.
double low() const
Returns the minimum of the range object.
hippodraw::Range class interface
void setUnion(const Range &range)
Forms the union with the range range.
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.
double m_max
The maximum in the range.
void setLow(double x)
Sets the minimum of the range object.
double high() const
Returns the maximum of the range object.
bool includes(double value) const
Returns true if the argument value is inside the range.
Range()
The following constructors sets the range to {0.0, 0.0} but sets m_empty to true. ...
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.
Expresses a range of values.