library of assembled shared sources

http://lass.cocamware.com

lass::num::FilteredFloat< T > Class Template Reference

a float with error analysis on it's basic operations. More...

#include <filtered_float.h>


Public Types

typedef FilteredFloat< T > TSelf
typedef util::CallTraits< T >
::TValue 
TValue
typedef util::CallTraits< T >
::TParam 
TParam
typedef util::CallTraits< T >
::TReference 
TReference
typedef util::CallTraits< T >
::TConstReference 
TConstReference
typedef num::NumTraits< T > TNumTraits

Public Member Functions

 FilteredFloat ()
 FilteredFloat (TParam t)
 FilteredFloat (TParam t, TParam e)
 FilteredFloat (const TSelf &other)
TParam value () const
TParam error () const
TSelf operator- () const
TSelf operator+ () const
TSelfoperator+= (const TSelf &other)
TSelfoperator-= (const TSelf &other)
TSelfoperator*= (const TSelf &other)
TSelfoperator/= (const TSelf &other)
void swap (TSelf &other)

Private Member Functions

TSelf split (TParam a, int s)

Private Attributes

volatile TValue t_
 the value
volatile TValue e_
 the expected precision, based on forward error analysis


Detailed Description

template<typename T>
class lass::num::FilteredFloat< T >

a float with error analysis on it's basic operations.

Author:
Tom De Muer [TDM]
For more information we refer to the work of Shewchuck, Fortune, Van Wijck on forward error analysis.

The filtered float here represents X with x+e, x and e non-overlapping and e the error on the previous operation. If X+Y=Z with X=x+e and Y=y+f then error of Z is g with Z=(x+y)+g. Thus not the error on (x+e)+(y+f) but only on (x+y)!

Definition at line 72 of file filtered_float.h.


Member Typedef Documentation

template<typename T >
typedef FilteredFloat< T > lass::num::FilteredFloat< T >::TSelf

Definition at line 75 of file filtered_float.h.

template<typename T >
typedef util::CallTraits<T>::TValue lass::num::FilteredFloat< T >::TValue

Definition at line 76 of file filtered_float.h.

template<typename T >
typedef util::CallTraits<T>::TParam lass::num::FilteredFloat< T >::TParam

Definition at line 77 of file filtered_float.h.

template<typename T >
typedef util::CallTraits<T>::TReference lass::num::FilteredFloat< T >::TReference

Definition at line 78 of file filtered_float.h.

Definition at line 79 of file filtered_float.h.

template<typename T >
typedef num::NumTraits< T > lass::num::FilteredFloat< T >::TNumTraits

Definition at line 80 of file filtered_float.h.


Constructor & Destructor Documentation

template<typename T >
lass::num::FilteredFloat< T >::FilteredFloat (  )  [inline]

Definition at line 82 of file filtered_float.h.

template<typename T >
lass::num::FilteredFloat< T >::FilteredFloat ( TParam  t  )  [inline]

Definition at line 86 of file filtered_float.h.

template<typename T >
lass::num::FilteredFloat< T >::FilteredFloat ( TParam  t,
TParam  e 
) [inline, explicit]

Definition at line 91 of file filtered_float.h.

template<typename T >
lass::num::FilteredFloat< T >::FilteredFloat ( const TSelf other  )  [inline]

Definition at line 97 of file filtered_float.h.


Member Function Documentation

template<typename T >
TParam lass::num::FilteredFloat< T >::value (  )  const [inline]

template<typename T >
TParam lass::num::FilteredFloat< T >::error (  )  const [inline]

Definition at line 107 of file filtered_float.h.

References lass::num::FilteredFloat< T >::e_.

Referenced by lass::num::operator==().

template<typename T >
TSelf lass::num::FilteredFloat< T >::operator- (  )  const [inline]

template<typename T >
TSelf lass::num::FilteredFloat< T >::operator+ (  )  const [inline]

Definition at line 117 of file filtered_float.h.

template<typename T >
TSelf& lass::num::FilteredFloat< T >::operator+= ( const TSelf other  )  [inline]

template<typename T >
TSelf& lass::num::FilteredFloat< T >::operator-= ( const TSelf other  )  [inline]

template<typename T >
TSelf& lass::num::FilteredFloat< T >::operator*= ( const TSelf other  )  [inline]

template<typename T >
TSelf& lass::num::FilteredFloat< T >::operator/= ( const TSelf other  )  [inline]

template<typename T >
void lass::num::FilteredFloat< T >::swap ( TSelf other  )  [inline]

Definition at line 169 of file filtered_float.h.

References lass::num::FilteredFloat< T >::e_, and lass::num::FilteredFloat< T >::t_.

Referenced by std::swap().

template<typename T >
TSelf lass::num::FilteredFloat< T >::split ( TParam  a,
int  s 
) [inline, private]

Definition at line 179 of file filtered_float.h.

References lass::stde::T.

Referenced by lass::num::FilteredFloat< T >::operator*=().


Field Documentation

template<typename T >
volatile TValue lass::num::FilteredFloat< T >::t_ [private]

template<typename T >
volatile TValue lass::num::FilteredFloat< T >::e_ [private]


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

Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo