Image Component Library (ICL)
Public Member Functions | Public Attributes | List of all members
icl::utils::SteppingRange< Type > Struct Template Reference

class representing a range with defined stepping More...

#include <SteppingRange.h>

Inheritance diagram for icl::utils::SteppingRange< Type >:
icl::utils::Range< Type >

Public Member Functions

 SteppingRange ()
 create an empty range (min = max = 0) More...
 
 SteppingRange (Type minVal, Type maxVal, Type stepping)
 create a special Rage More...
 
template<class dstType >
const SteppingRange< dstType > castTo () const
 casts this range into another depth More...
 
virtual bool contains (Type value) const
 tests whether a given value is inside of this range More...
 
Type nearest (Type value)
 returns the nearest value to the given one More...
 
- Public Member Functions inherited from icl::utils::Range< Type >
virtual ~Range ()
 
 Range ()
 create an empty range (min = max = 0) More...
 
 Range (Type minVal, Type maxVal)
 create a special Range More...
 
Type getLength () const
 return max-min More...
 
template<class dstType >
const Range< dstType > castTo () const
 casts this range into another depth More...
 
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 More...
 
void extend (const Range &r)
 extends the range so that the given range is within this range More...
 

Public Attributes

Type stepping
 internal stepping parameter More...
 
- Public Attributes inherited from icl::utils::Range< Type >
Type minVal
 minimum value of this range More...
 
Type maxVal
 maximum value of this range More...
 

Additional Inherited Members

- Static Public Member Functions inherited from icl::utils::Range< Type >
static Range< Type > limits ()
 returns type range (using std::numeric_limits<Type>) More...
 
static Range< Type > inv_limits ()
 returns inverted limits range [numeric-limits.max,numeric-limits.min] More...
 
static Range< Type > from (const Type *begin, const Type *end)
 estimate range of given iterator range (using std::for_each) More...
 

Detailed Description

template<class Type>
struct icl::utils::SteppingRange< Type >

class representing a range with defined stepping

A Stepping range is a well defined interval I = [minVal,maxVal] with an also well defined stepping e.g. S. the SteppingRange contains all values {minVal, minVal+S, minVal+2*S,...} that are less then or equal to the maxVal

Constructor & Destructor Documentation

◆ SteppingRange() [1/2]

template<class Type>
icl::utils::SteppingRange< Type >::SteppingRange ( )
inline

create an empty range (min = max = 0)

◆ SteppingRange() [2/2]

template<class Type>
icl::utils::SteppingRange< Type >::SteppingRange ( Type  minVal,
Type  maxVal,
Type  stepping 
)
inline

create a special Rage

Member Function Documentation

◆ castTo()

template<class Type>
template<class dstType >
const SteppingRange<dstType> icl::utils::SteppingRange< Type >::castTo ( ) const
inline

casts this range into another depth

◆ contains()

template<class Type>
virtual bool icl::utils::SteppingRange< Type >::contains ( Type  value) const
inlinevirtual

tests whether a given value is inside of this range

Reimplemented from icl::utils::Range< Type >.

◆ nearest()

template<class Type>
Type icl::utils::SteppingRange< Type >::nearest ( Type  value)
inline

returns the nearest value to the given one

-1st: value is clipped to the underlying range -2nd: if value is inside the range, the nearest implicit step is returned

Member Data Documentation

◆ stepping

template<class Type>
Type icl::utils::SteppingRange< Type >::stepping

internal stepping parameter


The documentation for this struct was generated from the following file: