MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
mds::math::CLogNum< T > Class Template Reference

Class representing a number in logarithmic space. More...

#include <mdsLogNum.h>

List of all members.

Public Types

typedef T tNumber
 Type of the number.

Public Member Functions

 CLogNum ()
 Default constructor.
 CLogNum (const T &v)
 Constructor.
 CLogNum (const T &v, LogNum::ELogValue)
 Constructor.
template<typename U >
 CLogNum (const CLogNum< U > &n)
 Copy constructor.
get () const
 Returns current value in original space.
get (LogNum::ELogValue) const
 Returns current value in logarithmic space.
CLogNumoperator*= (const CLogNum &n)
CLogNumoperator*= (const T &c)
CLogNumoperator+= (const CLogNum &n)
 Combined assignment operators.
CLogNumoperator+= (const T &c)
 Others combined assignment operators.
CLogNumoperator-= (const CLogNum &n)
CLogNumoperator-= (const T &c)
CLogNumoperator/= (const CLogNum &n)
CLogNumoperator/= (const T &c)
template<typename U >
CLogNumoperator= (const CLogNum< U > &n)
 Assignment operator.
CLogNumoperator= (const T &v)
 Assignment operator.
void set (const T &v)
 Sets the current value in original space.
void set (const T &v, LogNum::ELogValue)
 Sets the current value in logarithmic space.
 ~CLogNum ()
 Destructor.

Static Public Member Functions

static T getSafeExp (T x)
 Safe computation of the exp(x) function.
static T getSafeLog (T x)
 Safe computation of the log(x) function.
static T logAdd (T x, T y)
 Returns x + y in the logarithmic space.
static T logSub (T x, T y)
 Returns x - y in the logarithmic space.

Public Attributes

value
 Value stored in the logarithmic space.

Detailed Description

template<typename T>
class mds::math::CLogNum< T >

Class representing a number in logarithmic space.


Member Typedef Documentation

template<typename T >
typedef T mds::math::CLogNum< T >::tNumber

Type of the number.


Constructor & Destructor Documentation

template<typename T >
mds::math::CLogNum< T >::CLogNum ( )

Default constructor.

template<typename T >
mds::math::CLogNum< T >::CLogNum ( const T &  v)

Constructor.

  • Creates number in the logarithmic space.
template<typename T >
mds::math::CLogNum< T >::CLogNum ( const T &  v,
LogNum::ELogValue   
)

Constructor.

  • Initializes number in the logarithmic space.
template<typename T >
template<typename U >
mds::math::CLogNum< T >::CLogNum ( const CLogNum< U > &  n)

Copy constructor.

template<typename T >
mds::math::CLogNum< T >::~CLogNum ( )

Destructor.


Member Function Documentation

template<typename T >
T mds::math::CLogNum< T >::get ( ) const

Returns current value in original space.

template<typename T >
T mds::math::CLogNum< T >::get ( LogNum::ELogValue  ) const

Returns current value in logarithmic space.

template<typename T >
T mds::math::CLogNum< T >::getSafeExp ( x) [static]

Safe computation of the exp(x) function.

template<typename T >
T mds::math::CLogNum< T >::getSafeLog ( x) [static]

Safe computation of the log(x) function.

template<typename T >
T mds::math::CLogNum< T >::logAdd ( x,
y 
) [static]

Returns x + y in the logarithmic space.

template<typename T >
T mds::math::CLogNum< T >::logSub ( x,
y 
) [static]

Returns x - y in the logarithmic space.

  • Throws LogNum::CNegativeResult exception on failure.
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator*= ( const CLogNum< T > &  n)
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator*= ( const T &  c)
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator+= ( const CLogNum< T > &  n)

Combined assignment operators.

template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator+= ( const T &  c)

Others combined assignment operators.

template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator-= ( const CLogNum< T > &  n)
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator-= ( const T &  c)
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator/= ( const CLogNum< T > &  n)
template<typename T >
CLogNum< T > & mds::math::CLogNum< T >::operator/= ( const T &  c)
template<typename T >
template<typename U >
CLogNum& mds::math::CLogNum< T >::operator= ( const CLogNum< U > &  n)

Assignment operator.

template<typename T >
CLogNum& mds::math::CLogNum< T >::operator= ( const T &  v)

Assignment operator.

template<typename T >
void mds::math::CLogNum< T >::set ( const T &  v)

Sets the current value in original space.

  • Safe computation of the log(x) function.
template<typename T >
void mds::math::CLogNum< T >::set ( const T &  v,
LogNum::ELogValue   
)

Sets the current value in logarithmic space.


Member Data Documentation

template<typename T >
T mds::math::CLogNum< T >::value

Value stored in the logarithmic space.


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