qwtdoubleinterval(3)

NAME

QwtDoubleInterval

SYNOPSIS

Detailed Description

A class representing an interval.

The interval is represented by 2 doubles, the lower and the upper
limit.

Definition at line 21 of file qwt_double_interval.h.
Public Member Functions
QwtDoubleInterval ()
QwtDoubleInterval (double minValue, double maxValue) void setInterval (double minValue, double maxValue) QwtDoubleInterval normalized () const QwtDoubleInterval inverted () const QwtDoubleInterval limited (double minValue, double maxValue) const int operator== (const QwtDoubleInterval &) const int operator!= (const QwtDoubleInterval &) const double minValue () const
double maxValue () const
double width () const
void setMinValue (double)
void setMaxValue (double)
bool contains (double value) const
bool intersects (const QwtDoubleInterval &) const QwtDoubleInterval intersect (const QwtDoubleInterval &) const QwtDoubleInterval unite (const QwtDoubleInterval &) const QwtDoubleInterval operator| (const QwtDoubleInterval &) const QwtDoubleInterval operator & (const QwtDoubleInterval &) const QwtDoubleInterval & operator|= (const QwtDoubleInterval &) QwtDoubleInterval & operator &= (const QwtDoubleInterval &) QwtDoubleInterval extend (double value) const QwtDoubleInterval operator| (double) const QwtDoubleInterval & operator|= (double) bool isValid () const
bool isNull () const
void invalidate ()
QwtDoubleInterval symmetrize (double value) const

Constructor & Destructor Documentation

QwtDoubleInterval::QwtDoubleInterval () [inline]
Default Constructor.
Creates an invalid interval [0.0, -1.0]
See also:
setInterval, isValid
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
Parameters:
minValue Minimum value
maxValue Maximum value
Definition at line 89 of file qwt_double_interval.h.

Member Function Documentation

void QwtDoubleInterval::setInterval (double minValue, double maxValue)
[inline]
Assign the limits of the interval
Parameters:
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.
Returns:
Normalized interval
See also:
isValid, 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
Returns:
Inverted interval
See also:
normalized
Definition at line 43 of file qwt_double_interval.cpp.
References QwtDoubleInterval().
QwtDoubleInterval QwtDoubleInterval::limited (double lBound, double hBound)
const
Limit the interval
Parameters:
lBound Lower limit
hBound Upper limit
Returns:
Limited interval
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]
Compare two intervals.
Definition at line 179 of file qwt_double_interval.h.
double QwtDoubleInterval::minValue () const [inline]
Returns:
Lower limit of the interval
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]
Returns:
Upper limit of the interval
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().
See also:
isValid
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
Parameters:
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
Parameters:
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
Parameters:
value Value
Returns:
true, if value >= minValue() && value <= maxValue()
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
See also:
unite
Definition at line 165 of file qwt_double_interval.h.
References unite().
QwtDoubleInterval QwtDoubleInterval::operator & (const QwtDoubleInterval &
interval) const [inline]
Intersection of two intervals
See also:
intersect
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
Parameters:
value Value
See also:
isValid
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
See also:
extend
Definition at line 188 of file qwt_double_interval.h.
References extend().
bool QwtDoubleInterval::isValid () const [inline]
Returns:
true, if minValue() <= maxValue()
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]
Returns:
true, if minValue() >= maxValue()
Definition at line 194 of file qwt_double_interval.h.
void QwtDoubleInterval::invalidate () [inline]
Invalidate the interval
The limits are set to interval [0.0, -1.0]
See also:
isValid
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.
Parameters:
value Center
Returns:
Interval with value as center
Definition at line 140 of file qwt_double_interval.cpp.
References isValid(), and QwtDoubleInterval().
Referenced by QwtLinearScaleEngine::autoScale().

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout