71 Range (
const std::vector < double > & array );
79 void setLow(
double x);
87 void setHigh(
double x);
95 void setPos(
double x);
99 void setRange (
double low,
double high,
double pos );
103 template <
class Iterator >
104 void setRange ( Iterator first, Iterator end );
108 inline double length()
const;
113 void setLength (
double val,
bool high_hold =
false );
119 bool includes (
double value )
const;
125 bool excludes (
double value )
const;
129 double fraction (
double value )
const;
133 void setIntersect (
const Range & range );
140 void setUnion (
const Range & range );
144 void setEmpty (
bool yes =
true );
149 int numberOfBins (
double width )
const;
158 return (m_max - m_min);
161 template <
class Iterator >
170 while ( first != end ) {
171 double test = *first;
172 m_min = std::min ( m_min, test );
173 m_max = std::max ( m_max, test );
174 if ( test > 0.0 ) m_pos = std::min ( m_pos, test );
bool m_empty
A flag indicating that the range is empty.
double length() const
Returns the length of the range object.
double m_pos
The minimum positive value in the range, for log scale.
#define MDL_HIPPOPLOT_API
void setRange(double low, double high, double pos)
Changes the current Range.
Expresses a range of values.
double m_max
The maximum in the range.
double m_min
The minimum in the range.