Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
The NumericRange class describes a range of numbers between a minimum and maximum combined with a resolution. More...
#include <numericrange.h>
Public Member Functions | |
NumericRange (double mi, double ma, double resolution=0) | |
NumericRange basic constructor for the range with a minimum and a maximum and a resolution. More... | |
NumericRange (const NumericRange &vr) | |
NumericRange copy constructor. More... | |
bool | isValid () const |
Range * | clone () const |
bool | contains (double v, bool inclusive=true) const |
bool | contains (const QVariant &value, bool inclusive=true) const |
bool | contains (SPRange rng, bool inclusive=true) const |
bool | contains (NumericRange *rng, bool inclusive=true) const |
double | max () const |
void | max (double v) |
double | min () const |
void | min (double v) |
double | distance () const |
void | resolution (double resolution) |
double | resolution () const |
NumericRange & | operator+= (double v) |
bool | operator== (const NumericRange &vr) |
bool | operator< (const NumericRange &vr) |
bool | operator> (const NumericRange &vr) |
QString | toString () const |
QVariant | impliedValue (const QVariant &v) const |
void | set (const NumericRange &vr) |
QVariant | ensure (const QVariant &v, bool inclusive=true) const |
IlwisTypes | determineType () const |
determineType determines the minimal range needed type for this range. More... | |
void | clear () |
![]() | |
virtual IlwisTypes | valueType () const |
valueType returns the type of values contained in the range More... | |
template<typename T > | |
T * | merge (const QSharedPointer< T > &range1, const QSharedPointer< T > &range2, RenumberMap *rnm=0) |
virtual bool | isContinuous () const |
void | interpolation (const QString &ip) |
virtual QString | interpolation () const |
Static Public Member Functions | |
static NumericRange * | merge (const QSharedPointer< NumericRange > &nr1, const QSharedPointer< NumericRange > &nr2, RenumberMap *rnm=0) |
Additional Inherited Members | |
![]() | |
IlwisTypes | _vt |
QString | _interpolation |
The NumericRange class describes a range of numbers between a minimum and maximum combined with a resolution.
NumericRange::NumericRange | ( | double | mi, |
double | ma, | ||
double | resolution = 0 |
||
) |
NumericRange basic constructor for the range with a minimum and a maximum and a resolution.
*If the resolution is 0, the range has same resolution a double. A step size of 0 will make the range iterator invalid. This prefectly legal, it only makes the iterator not usable. *A resolution of an integer will make the range an integer range
mi | minimum of the range |
ma | maximum of the range |
step | resolution of the range. |
NumericRange::NumericRange | ( | const NumericRange & | vr | ) |
NumericRange copy constructor.
vr | other value range |
|
virtual |
copies the range to a new instance. This pointer has to be deleted by the caller
Implements Ilwis::Range.
Reimplemented in Ilwis::TimeInterval.
|
virtual |
determineType determines the minimal range needed type for this range.
*For example a range of numbers can be in the 32 bits range while the range contains only the numbers between 0-255, so the minimal range would be itUINT8
Reimplemented from Ilwis::Range.
|
virtual |
determines the validity of a range. This method must be implemented by each deravative
Implements Ilwis::Range.
Reimplemented in Ilwis::TimeInterval.
|
virtual |
translates the string into a string representation. As each type of range has a different string representation this method has to be reimplemented by each derivative
Implements Ilwis::Range.