mt
 All Classes Files Functions Enumerations Groups Pages
Public Types | Static Public Member Functions | List of all members
mt::BasicScalarTraits< T > Class Template Reference

Traits class for BasicScalar tolerance-based floating-point class. More...

#include <basic_scalar_traits.h>

Public Types

enum  ToleranceType { ABSOLUTE, RELATIVE }
 Tolerance type values.

Static Public Member Functions

static T getTol ()
 Gets the user-defined tolerance.
static T getTestTol ()
static BasicScalarTraits< T >
::ToleranceType 
getTolType ()
 Gets the tolerance type used for comparing scalars.
static size_t getWidth ()
 Gets width (in characters) the scalar will have when output streamed.
static void setTol (const T &x)
static void setTolType (const ToleranceType &type)
 Sets the tolerance used for comparing scalars.

Detailed Description

template<class T>
class mt::BasicScalarTraits< T >

Traits class for BasicScalar tolerance-based floating-point class.

Member Function Documentation

template<class T >
T mt::BasicScalarTraits< T >::getTestTol ( )
inlinestatic

Gets the tolerance used for comparing scalars. This tolerance equals $ m\_tol + 2 \epsilon $

template<class T >
void mt::BasicScalarTraits< T >::setTol ( const T &  x)
inlinestatic

Sets the tolerance used for comparing scalars.

Since only positive tolerance values make sense, the absolute value of the input value is taken as the tolerance value.


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