RVL::ScalarFieldTraits< Scalar > Struct Template Reference

A traits class to extend the capabilities of numeric_limits without duplicating such capabilities. More...

#include <utility.hh>

List of all members.

Public Types

typedef Scalar ScalarType
typedef Scalar AbsType

Static Public Member Functions

static Scalar Zero ()
static Scalar One ()
static Scalar AbsZero ()
static Scalar AbsOne ()


Detailed Description

template<class Scalar>
struct RVL::ScalarFieldTraits< Scalar >

A traits class to extend the capabilities of numeric_limits without duplicating such capabilities.

This class and its specializations should have minimal methods and members

ScalarType: the redefined template type, as recommended by traits gurus AbsType: the underlying real type, as would be returned by taking the absolute value Zero(): the additive identity One(): the multiplicative identity

Note from ADP: I believe that computational methods (abs, conj, plus, minus, ect..) do not belong in this traits class. They are well defined elsewhere and redirecting all computations through this class would only add unecessary inefficiency.

I have borrowed some inspiration from the Teuchos::ScalarTraits struct, but 1. feel that struct is not the best approach 2. has a license we cannot use.

Definition at line 85 of file utility.hh.


Member Typedef Documentation

template<class Scalar>
typedef Scalar RVL::ScalarFieldTraits< Scalar >::ScalarType

Definition at line 86 of file utility.hh.

template<class Scalar>
typedef Scalar RVL::ScalarFieldTraits< Scalar >::AbsType

Definition at line 87 of file utility.hh.


Member Function Documentation

template<class Scalar>
static Scalar RVL::ScalarFieldTraits< Scalar >::Zero (  )  [static]

template<class Scalar>
static Scalar RVL::ScalarFieldTraits< Scalar >::One (  )  [static]

template<class Scalar>
static Scalar RVL::ScalarFieldTraits< Scalar >::AbsZero (  )  [static]

template<class Scalar>
static Scalar RVL::ScalarFieldTraits< Scalar >::AbsOne (  )  [static]


The documentation for this struct was generated from the following file:
Generated on 5 Jan 2017 for RVL by  doxygen 1.4.7