Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

rw_numeric_traits<T>



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

Synopsis

template <class T>
class rw_numeric_traits

Specializations

rw_numeric_traits<int>
rw_numeric_traits<float>
rw_numeric_traits<double>
rw_numeric_traits<DComplex>
rw_numeric_traits<UChar>
rw_numeric_traits<SChar>

Description

The rw_numeric_traits class is a helper class that contains only typedef information. The generic rw_numeric_traits<T> assumes that all the typedefs are set to T. Since this is not desirable for many types, we specialize for each numeric type that is used in the library.

The specializations used in the library are contained in the file
rw/math/numtrait.h. For an overview of how to add a new numeric type, see Section 2.2.2 of the Math.h++ User's Guide.

There are seven public typedefs in each specialized rw_numeric_traits class. Each typedef must be defined in a given specialization for proper results. The generic class is:

template< class T >
class rw_numeric_traits
{
public:
   typedef T norm_type;
   typedef T calc_type;
   typedef T numeric_type;
   typedef T c_type;
   typedef T promote_type;

   typedef T (* mathFunType)(T);
   typedef norm_type (*mathFunType2)(T);
};

Typedefs

rw_numeric_traits<T>::norm_type
rw_numeric_traits<T>::calc_type
rw_numeric_traits<T>::numeric_type
rw_numeric_traits<T>::c_type
rw_numeric_traits<T>::promote_type
rw_numeric_traits<T>::mathFunType
rw_numeric_traits<T>::mathFunType2


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.