dlr::numeric::NumericTraits< Type > Class Template Reference

This class is used to customize the behavior of dlr_libs classes & functions for specific numeric types. More...

#include <numericTraits.h>

List of all members.

Public Types

typedef Type ProductType
 This typedef is used to control the type of the result when values of Type are multiplied.
typedef Type SumType
 This typedef is used to control the type of the result when values of Type are added.
typedef Type TextOutputType
 This typedef is used to control the way arrays of Type are printed by operator<<().

Public Member Functions

bool isIntegral ()
 This member function indicates whether the specified type is an integer type or not.


Detailed Description

template<class Type>
class dlr::numeric::NumericTraits< Type >

This class is used to customize the behavior of dlr_libs classes & functions for specific numeric types.

Ultimately we'll use it to control the precision of computations, numeric limits, etc.

Definition at line 33 of file numericTraits.h.


Member Typedef Documentation

template<class Type>
typedef Type dlr::numeric::NumericTraits< Type >::ProductType

This typedef is used to control the type of the result when values of Type are multiplied.

productType should have enough precision that several instances of Type can be multiplied without overflow or loss of information.

Definition at line 43 of file numericTraits.h.

template<class Type>
typedef Type dlr::numeric::NumericTraits< Type >::SumType

This typedef is used to control the type of the result when values of Type are added.

sumType should have enough precision that several instances of Type can be added without overflow or loss of information.

Definition at line 51 of file numericTraits.h.

template<class Type>
typedef Type dlr::numeric::NumericTraits< Type >::TextOutputType

This typedef is used to control the way arrays of Type are printed by operator<<().

Each element of the array will be formatted as TextOutputType when it is written.

Definition at line 58 of file numericTraits.h.


Member Function Documentation

template<class Type>
bool dlr::numeric::NumericTraits< Type >::isIntegral (  )  [inline]

This member function indicates whether the specified type is an integer type or not.

It is not implemented for the general case, so NumericTraits must be specialized for every class which requires this functionality.

Returns:
The return value should true if this type is an integer type, false other wise. The general version of this function just throws and exception.

Definition at line 73 of file numericTraits.h.


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

Generated on Wed Nov 25 00:42:49 2009 for dlrUtilities Utility Library by  doxygen 1.5.8