Public Member Functions | Public Attributes

Interval< T > Class Template Reference

interval of values. More...

Inheritance diagram for Interval< T >:
StepInterval< T >

List of all members.

Public Member Functions

 Interval ()
 Interval (const T &start, const T &stop)
Interval< T > & operator= (const Interval< T > &)
virtual bool isUdf () const
virtual Interval< T > * clone () const
void set (const T &start, const T &stop)
bool isEqual (const Interval< T > &i, const T &eps) const
bool operator== (const Interval< T > &) const
bool operator!= (const Interval< T > &) const
Interval< T > operator+ (const Interval< T > &) const
Interval< T > & operator+= (const Interval< T > &)
template<class X >
const Interval< T > & setFrom (const Interval< X > &)
width (bool allowrev=true) const
virtual T center () const
void shift (const T &len)
void widen (const T &len, bool allowrev=true)
virtual void scale (const T &)
atIndex (int, const T &step) const
template<class X >
int getIndex (const X &, const T &step) const
template<class X >
float getfIndex (const X &, const T &step) const
template<class X >
int nearestIndex (const X &x, const T &step) const
template<class X >
void limitTo (const Interval< X > &i)
template<class X >
limitValue (const X &) const
template<class X >
bool overlaps (const Interval< X > &, bool allrev=true) const
template<class X >
bool includes (const X &, bool allowrev=true) const
void include (const T &, bool allowrev=true)
void include (const Interval< T > &, bool allowrev=true)
virtual void sort (bool asc=true)
bool isRev () const
virtual bool hasStep () const

Public Attributes

start
stop

Detailed Description

template<class T>
class Interval< T >

interval of values.

Note that start does not need to be lower than stop. That's why there is a sort() method.


Constructor & Destructor Documentation

template<class T >
Interval< T >::Interval (  )  [inline]
template<class T>
Interval< T >::Interval ( const T &  start,
const T &  stop 
) [inline]

Member Function Documentation

template<class T>
T Interval< T >::atIndex ( int  idx,
const T &  step 
) const [inline]
template<class T >
T Interval< T >::center (  )  const [inline, virtual]
template<class T >
Interval< T > * Interval< T >::clone (  )  const [inline, virtual]
template<class T>
template<class X >
float Interval< T >::getfIndex ( const X &  t,
const T &  step 
) const [inline]
template<class T>
template<class X >
int Interval< T >::getIndex ( const X &  t,
const T &  step 
) const [inline]
template<class T>
virtual bool Interval< T >::hasStep (  )  const [inline, virtual]
template<class T>
void Interval< T >::include ( const T &  i,
bool  allowrev = true 
) [inline]
template<class T>
void Interval< T >::include ( const Interval< T > &  i,
bool  allowrev = true 
) [inline]
template<class T >
template<class X >
bool Interval< T >::includes ( const X &  t,
bool  allowrev = true 
) const [inline]
template<class T>
bool Interval< T >::isEqual ( const Interval< T > &  i,
const T &  eps 
) const [inline]
template<class T>
bool Interval< T >::isRev (  )  const [inline]
template<class T >
bool Interval< T >::isUdf (  )  const [inline, virtual]
template<class T>
template<class X >
void Interval< T >::limitTo ( const Interval< X > &  i  )  [inline]
template<class T >
template<class X >
X Interval< T >::limitValue ( const X &  t  )  const [inline]
template<class T>
template<class X >
int Interval< T >::nearestIndex ( const X &  x,
const T &  step 
) const [inline]
template<class T>
bool Interval< T >::operator!= ( const Interval< T > &  i  )  const [inline]
template<class T>
Interval< T > Interval< T >::operator+ ( const Interval< T > &  i  )  const [inline]
template<class T>
Interval< T > & Interval< T >::operator+= ( const Interval< T > &  i  )  [inline]
template<class T>
Interval< T > & Interval< T >::operator= ( const Interval< T > &  intv  )  [inline]
template<class T>
bool Interval< T >::operator== ( const Interval< T > &  i  )  const [inline]
template<class T >
template<class X >
bool Interval< T >::overlaps ( const Interval< X > &  t,
bool  allrev = true 
) const [inline]
template<class T>
void Interval< T >::scale ( const T &  factor  )  [inline, virtual]
template<class T>
void Interval< T >::set ( const T &  start,
const T &  stop 
) [inline]
template<class T >
template<class X >
const Interval< T > & Interval< T >::setFrom ( const Interval< X > &  i  )  [inline]
template<class T>
void Interval< T >::shift ( const T &  len  )  [inline]
template<class T >
void Interval< T >::sort ( bool  asc = true  )  [virtual]
template<class T>
void Interval< T >::widen ( const T &  len,
bool  allowrev = true 
) [inline]
template<class T >
T Interval< T >::width ( bool  allowrev = true  )  const [inline]

Member Data Documentation

template<class T>
T Interval< T >::start
template<class T>
T Interval< T >::stop