Image Component Library (ICL)
|
class representing a range defined by min and max value More...
#include <Range.h>
Public Member Functions | |
virtual | ~Range () |
Range () | |
create an empty range (min = max = 0) | |
Range (Type minVal, Type maxVal) | |
create a special Range | |
Type | getLength () const |
return max-min | |
template<class dstType > | |
const Range< dstType > | castTo () const |
casts this range into another depth | |
virtual bool | contains (Type value) const |
tests whether a given value is inside of this range | |
bool | operator== (const Range< Type > &other) const |
bool | operator!= (const Range< Type > &other) const |
void | extend (const Type &t) |
extends the range so that the given value is within this range | |
void | extend (const Range &r) |
extends the range so that the given range is within this range | |
Static Public Member Functions | |
static Range< Type > | limits () |
returns type range (using std::numeric_limits<Type>) | |
static Range< Type > | inv_limits () |
returns inverted limits range [numeric-limits.max,numeric-limits.min] | |
static Range< Type > | from (const Type *begin, const Type *end) |
estimate range of given iterator range (using std::for_each) | |
Public Attributes | |
Type | minVal |
minimum value of this range | |
Type | maxVal |
maximum value of this range |
class representing a range defined by min and max value
virtual icl::utils::Range< Type >::~Range | ( | ) | [inline, virtual] |
icl::utils::Range< Type >::Range | ( | ) | [inline] |
create an empty range (min = max = 0)
icl::utils::Range< Type >::Range | ( | Type | minVal, |
Type | maxVal | ||
) | [inline] |
create a special Range
const Range<dstType> icl::utils::Range< Type >::castTo | ( | ) | const [inline] |
casts this range into another depth
Reimplemented in icl::utils::SteppingRange< Type >.
virtual bool icl::utils::Range< Type >::contains | ( | Type | value | ) | const [inline, virtual] |
tests whether a given value is inside of this range
Reimplemented in icl::utils::SteppingRange< Type >.
void icl::utils::Range< Type >::extend | ( | const Type & | t | ) | [inline] |
extends the range so that the given value is within this range
void icl::utils::Range< Type >::extend | ( | const Range< Type > & | r | ) | [inline] |
extends the range so that the given range is within this range
static Range<Type> icl::utils::Range< Type >::from | ( | const Type * | begin, |
const Type * | end | ||
) | [inline, static] |
estimate range of given iterator range (using std::for_each)
Type icl::utils::Range< Type >::getLength | ( | ) | const [inline] |
return max-min
static Range<Type> icl::utils::Range< Type >::inv_limits | ( | ) | [inline, static] |
returns inverted limits range [numeric-limits.max,numeric-limits.min]
static Range<Type> icl::utils::Range< Type >::limits | ( | ) | [inline, static] |
returns type range (using std::numeric_limits<Type>)
bool icl::utils::Range< Type >::operator!= | ( | const Range< Type > & | other | ) | const [inline] |
bool icl::utils::Range< Type >::operator== | ( | const Range< Type > & | other | ) | const [inline] |
Type icl::utils::Range< Type >::maxVal |
maximum value of this range
Type icl::utils::Range< Type >::minVal |
minimum value of this range