Public Member Functions | Public Attributes

StepInterval< T > Class Template Reference

Interval with step. More...

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

List of all members.

Public Member Functions

 StepInterval ()
 StepInterval (const T &start, const T &stop, const T &step)
 StepInterval (const Interval< T > &)
 StepInterval (const StepInterval< T > &si)
StepInterval< T > & operator= (const Interval< T > &)
virtual bool isUdf () const
virtual bool hasStep () const
virtual StepInterval< T > * clone () const
void set (const T &start, const T &stop, const T &step)
template<class X >
const StepInterval< T > & setFrom (const Interval< X > &)
bool isEqual (const StepInterval< T > &i, const T &eps) const
bool operator== (const StepInterval< T > &) const
bool operator!= (const StepInterval< T > &) const
atIndex (int) const
template<class X >
int getIndex (const X &) const
template<class X >
float getfIndex (const X &) const
template<class X >
int nearestIndex (const X &) const
template<class X >
snap (const X &) const
int nrSteps () const
virtual void sort (bool asc=true)
void scale (const T &)
snappedCenter () const
bool isCompatible (const StepInterval< T > &, float eps=(1e-10)) const
snapStep (const T &inpstep) const
template<>
int nrSteps () const
template<>
bool isCompatible (const StepInterval< double > &b, float eps) const

Public Attributes

step

Detailed Description

template<class T>
class StepInterval< T >

Interval with step.


Constructor & Destructor Documentation

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

Member Function Documentation

template<class T >
T StepInterval< T >::atIndex ( int  idx  )  const [inline]
template<class T >
StepInterval< T > * StepInterval< T >::clone (  )  const [inline, virtual]

Reimplemented from Interval< T >.

template<class T >
template<class X >
float StepInterval< T >::getfIndex ( const X &  t  )  const [inline]
template<class T >
template<class X >
int StepInterval< T >::getIndex ( const X &  t  )  const [inline]
template<class T>
virtual bool StepInterval< T >::hasStep (  )  const [inline, virtual]

Reimplemented from Interval< T >.

template<class T>
bool StepInterval< T >::isCompatible ( const StepInterval< T > &  b,
float  eps = (1e-10) 
) const [inline]

epsilon refers to the steps, i.e eps=0.1 allows b to be 0.1 steps apart.

template<>
bool StepInterval< double >::isCompatible ( const StepInterval< double > &  b,
float  eps 
) const [inline]
template<class T>
bool StepInterval< T >::isEqual ( const StepInterval< T > &  i,
const T &  eps 
) const [inline]
template<class T >
bool StepInterval< T >::isUdf (  )  const [inline, virtual]

Reimplemented from Interval< T >.

template<class T >
template<class X >
int StepInterval< T >::nearestIndex ( const X &  x  )  const [inline]
template<>
int StepInterval< double >::nrSteps (  )  const [inline]
template<class T >
int StepInterval< T >::nrSteps (  )  const [inline]
template<class T>
bool StepInterval< T >::operator!= ( const StepInterval< T > &  i  )  const [inline]
template<class T>
StepInterval< T > & StepInterval< T >::operator= ( const Interval< T > &  intv  )  [inline]

Reimplemented from Interval< T >.

template<class T>
bool StepInterval< T >::operator== ( const StepInterval< T > &  i  )  const [inline]
template<class T>
void StepInterval< T >::scale ( const T &  factor  )  [inline, virtual]

Reimplemented from Interval< T >.

template<class T>
void StepInterval< T >::set ( const T &  start,
const T &  stop,
const T &  step 
) [inline]
template<class T >
template<class X >
const StepInterval< T > & StepInterval< T >::setFrom ( const Interval< X > &  i  )  [inline]

Reimplemented from Interval< T >.

template<class T >
template<class X >
T StepInterval< T >::snap ( const X &  t  )  const [inline]
template<class T >
T StepInterval< T >::snappedCenter (  )  const [inline]
template<class T>
T StepInterval< T >::snapStep ( const T &  inpstep  )  const [inline]

Snaps inpstep to a positive multiple of step.

template<class T >
void StepInterval< T >::sort ( bool  asc = true  )  [inline, virtual]

Reimplemented from Interval< T >.


Member Data Documentation

template<class T>
T StepInterval< T >::step