Library of Assembled Shared Sources
lass::num::interval< C > Class Template Reference

Interval class. More...

#include <interval.h>

Public Member Functions

void set (typename util::CallTraits< C >::TParam iInf, typename util::CallTraits< C >::TParam iSup)
 direct set of both infinum and supinum
 
bool isEmpty () const
 returns true for the empty interval
 
bool isSingleton () const
 return true for degenerated intervals
 
bool contains (typename util::CallTraits< baseType >::TParam ix) const
 returns true when ix is in the interval
 
baseType & operator[] (int i)
 indexed access, 0 = infinum, 1 = supinum
 
baseType operator[] (int i) const
 indexed access, 0 = infinum, 1 = supinum
 
baseType inf () const
 the infinum of the interval
 
baseType sup () const
 the supinum of the interval
 
baseType & inf ()
 the infinum of the interval
 
baseType & sup ()
 the supinum of the interval
 
baseType mid () const
 the middle of the interval
 
baseType diam () const
 the difference between supinum and infinum
 
baseType ratio () const
 the ratio of the supinum over the infinum
 
bool operator> (const interval< C > &i) const
 certainly greater than
 
bool operator< (const interval< C > &i) const
 certainly less than
 
bool operator== (const interval< C > &i) const
 certainly equal
 
bool operator!= (const interval< C > &i) const
 certainly not equal
 
bool operator>= (const interval< C > &i) const
 certainly greater or equal than
 
bool operator<= (const interval< C > &i) const
 certainly less or equal than
 
bool pe (const interval< C > &i) const
 possibly equal
 
bool pne (const interval< C > &i) const
 possibly not equal
 
bool pg (const interval< C > &i) const
 possibly greater than
 
bool pge (const interval< C > &i) const
 possibly greater or equal than
 
bool pl (const interval< C > &i) const
 possibly less than
 
bool ple (const interval< C > &i) const
 possibly less or equal than
 
baseType fe (const interval< C > &i) const
 fuzzy equal
 
fne (const interval< C > &i) const
 fuzzy not equal
 
baseType fg (const interval< C > &i) const
 fuzzy greater than
 
baseType fge (const interval< C > &i) const
 fuzzy greater or equal than
 
baseType fl (const interval< C > &i) const
 fuzzy less than
 
baseType fle (const interval< C > &i) const
 fuzzy less or equal than
 

Detailed Description

template<typename C>
class lass::num::interval< C >

Interval class.

Class for interval arithmetic. The arithmetic is weak interval arithmetic: there is no rounding code, to speed up things. It should however be useful except for numerical stability studies on the bitlevel. If you wont strong interval arithmetic, look for the boost library.

Warning
DO NOT derive a class from this one which uses dynamic memory management! destructor is not virtual. This is to avoid the functionptrtable to be stored in the objects. Therefor none of the methods are virtual
Author
Tom De Muer
Date
2003

Definition at line 77 of file num/interval.h.


The documentation for this class was generated from the following files: