The interval is represented by 2 doubles, the lower and the upper limit.
Definition at line 21 of file qwt_double_interval.h.
QwtDoubleInterval::QwtDoubleInterval | ( | ) | [inline] |
Default Constructor.
Creates an invalid interval [0.0, -1.0]
Definition at line 77 of file qwt_double_interval.h.
Referenced by extend(), intersect(), inverted(), limited(), normalized(), symmetrize(), and unite().
QwtDoubleInterval::QwtDoubleInterval | ( | double | minValue, | |
double | maxValue | |||
) | [inline] |
Constructor
minValue | Minimum value | |
maxValue | Maximum value |
Definition at line 89 of file qwt_double_interval.h.
void QwtDoubleInterval::setInterval | ( | double | minValue, | |
double | maxValue | |||
) | [inline] |
Assign the limits of the interval
minValue | Minimum value | |
maxValue | Maximum value |
Definition at line 101 of file qwt_double_interval.h.
Referenced by QwtLog10ScaleEngine::autoScale().
QwtDoubleInterval QwtDoubleInterval::normalized | ( | ) | const |
Normalize the limits of the interval.
If maxValue() < minValue() the limits will be inverted.
Definition at line 28 of file qwt_double_interval.cpp.
References isValid(), and QwtDoubleInterval().
Referenced by QwtLinearScaleEngine::autoScale(), and QwtLog10ScaleEngine::divideScale().
QwtDoubleInterval QwtDoubleInterval::inverted | ( | ) | const |
Invert the limits of the interval
Definition at line 43 of file qwt_double_interval.cpp.
References QwtDoubleInterval().
QwtDoubleInterval QwtDoubleInterval::limited | ( | double | lBound, | |
double | hBound | |||
) | const |
Limit the interval
lBound | Lower limit | |
hBound | Upper limit |
Definition at line 159 of file qwt_double_interval.cpp.
References isValid(), maxValue(), minValue(), and QwtDoubleInterval().
Referenced by QwtLog10ScaleEngine::autoScale(), and QwtLog10ScaleEngine::divideScale().
int QwtDoubleInterval::operator== | ( | const QwtDoubleInterval & | ) | const [inline] |
Compare two intervals.
Definition at line 172 of file qwt_double_interval.h.
References d_maxValue, and d_minValue.
int QwtDoubleInterval::operator!= | ( | const QwtDoubleInterval & | ) | const [inline] |
double QwtDoubleInterval::minValue | ( | ) | const [inline] |
Definition at line 128 of file qwt_double_interval.h.
Referenced by QwtLinearScaleEngine::align(), QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), QwtLinearColorMap::colorIndex(), QwtColorMap::colorTable(), QwtScaleEngine::contains(), QwtLog10ScaleEngine::divideScale(), intersect(), intersects(), limited(), QwtLog10ScaleEngine::log10(), QwtLog10ScaleEngine::pow10(), QwtAlphaColorMap::rgb(), QwtLinearColorMap::rgb(), QwtScaleDiv::setInterval(), QwtAbstractScale::setScale(), unite(), and QwtPlot::updateAxes().
double QwtDoubleInterval::maxValue | ( | ) | const [inline] |
Definition at line 134 of file qwt_double_interval.h.
Referenced by QwtLinearScaleEngine::align(), QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), QwtLinearColorMap::colorIndex(), QwtScaleEngine::contains(), QwtLog10ScaleEngine::divideScale(), intersect(), intersects(), limited(), QwtLog10ScaleEngine::log10(), QwtLog10ScaleEngine::pow10(), QwtScaleDiv::setInterval(), QwtAbstractScale::setScale(), unite(), and QwtPlot::updateAxes().
double QwtDoubleInterval::width | ( | ) | const [inline] |
Return the width of an interval The width of invalid intervals is 0.0, otherwise the result is maxValue() - minValue().
Definition at line 146 of file qwt_double_interval.h.
References isValid().
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), QwtLinearColorMap::colorIndex(), QwtColorMap::colorTable(), QwtScaleEngine::contains(), QwtLog10ScaleEngine::divideScale(), QwtLinearScaleEngine::divideScale(), QwtAlphaColorMap::rgb(), and QwtLinearColorMap::rgb().
void QwtDoubleInterval::setMinValue | ( | double | minValue | ) | [inline] |
Assign the lower limit of the interval
minValue | Minimum value |
Definition at line 112 of file qwt_double_interval.h.
Referenced by QwtLinearScaleEngine::autoScale().
void QwtDoubleInterval::setMaxValue | ( | double | maxValue | ) | [inline] |
Assign the upper limit of the interval
maxValue | Maximum value |
Definition at line 122 of file qwt_double_interval.h.
Referenced by QwtLinearScaleEngine::autoScale().
bool QwtDoubleInterval::contains | ( | double | value | ) | const |
Test if a value is inside an interval
value | Value |
Definition at line 54 of file qwt_double_interval.cpp.
References isValid().
Referenced by QwtRasterData::contourLines().
bool QwtDoubleInterval::intersects | ( | const QwtDoubleInterval & | interval | ) | const |
Test if two intervals overlap
Definition at line 119 of file qwt_double_interval.cpp.
References isValid(), maxValue(), and minValue().
QwtDoubleInterval QwtDoubleInterval::intersect | ( | const QwtDoubleInterval & | ) | const |
Intersect 2 intervals.
Definition at line 83 of file qwt_double_interval.cpp.
References isValid(), maxValue(), minValue(), and QwtDoubleInterval().
Referenced by operator &().
QwtDoubleInterval QwtDoubleInterval::unite | ( | const QwtDoubleInterval & | ) | const |
Unite 2 intervals.
Definition at line 63 of file qwt_double_interval.cpp.
References isValid(), maxValue(), minValue(), and QwtDoubleInterval().
Referenced by operator|().
QwtDoubleInterval QwtDoubleInterval::operator| | ( | const QwtDoubleInterval & | interval | ) | const [inline] |
Union of two intervals
Definition at line 165 of file qwt_double_interval.h.
References unite().
QwtDoubleInterval QwtDoubleInterval::operator & | ( | const QwtDoubleInterval & | interval | ) | const [inline] |
Intersection of two intervals
Definition at line 155 of file qwt_double_interval.h.
References intersect().
QwtDoubleInterval QwtDoubleInterval::extend | ( | double | value | ) | const |
Extend the interval
If value is below minValue, value becomes the lower limit. If value is above maxValue, value becomes the upper limit.
extend has no effect for invalid intervals
value | Value |
Definition at line 185 of file qwt_double_interval.cpp.
References isValid(), and QwtDoubleInterval().
Referenced by QwtLog10ScaleEngine::autoScale(), QwtLinearScaleEngine::autoScale(), and operator|().
QwtDoubleInterval QwtDoubleInterval::operator| | ( | double | value | ) | const [inline] |
Extend an interval
Definition at line 188 of file qwt_double_interval.h.
References extend().
bool QwtDoubleInterval::isValid | ( | ) | const [inline] |
Definition at line 200 of file qwt_double_interval.h.
Referenced by QwtColorMap::colorTable(), QwtScaleEngine::contains(), contains(), QwtRasterData::contourLines(), extend(), intersect(), intersects(), limited(), normalized(), QwtScaleEngine::strip(), symmetrize(), unite(), QwtPlot::updateAxes(), and width().
bool QwtDoubleInterval::isNull | ( | ) | const [inline] |
void QwtDoubleInterval::invalidate | ( | ) | [inline] |
Invalidate the interval
The limits are set to interval [0.0, -1.0]
Definition at line 211 of file qwt_double_interval.h.
QwtDoubleInterval QwtDoubleInterval::symmetrize | ( | double | value | ) | const |
Adjust the limit that is closer to value, so that value becomes the center of the interval.
value | Center |
Definition at line 140 of file qwt_double_interval.cpp.
References isValid(), and QwtDoubleInterval().
Referenced by QwtLinearScaleEngine::autoScale().