CNT< K > Class Template Reference

Specialized information about Composite Numerical Types which allows us to define appropriate templatized classes using them. More...

#include <CompositeNumericalTypes.h>

List of all members.

Classes

struct  Result
struct  Substitute

Public Types

enum  {
  NRows = K::NRows, NCols = K::NCols, RowSpacing = K::RowSpacing, ColSpacing = K::ColSpacing,
  NPackedElements = K::NPackedElements, NActualElements = K::NActualElements, NActualScalars = K::NActualScalars, ImagOffset = K::ImagOffset,
  RealStrideFactor = K::RealStrideFactor, ArgDepth = K::ArgDepth, IsScalar = K::IsScalar, IsULessScalar = K::IsULessScalar,
  IsNumber = K::IsNumber, IsStdNumber = K::IsStdNumber, IsPrecision = K::IsPrecision, SignInterpretation = K::SignInterpretation
}
typedef K T
typedef K::TNeg TNeg
typedef K::TWithoutNegator TWithoutNegator
typedef K::TReal TReal
typedef K::TImag TImag
typedef K::TComplex TComplex
typedef K::THerm THerm
typedef K::TPosTrans TPosTrans
typedef K::TSqHermT TSqHermT
typedef K::TSqTHerm TSqTHerm
typedef K::TElement TElement
typedef K::TRow TRow
typedef K::TCol TCol
typedef K::TSqrt TSqrt
typedef K::TAbs TAbs
typedef K::TStandard TStandard
typedef K::TInvert TInvert
typedef K::TNormalize TNormalize
typedef K::Scalar Scalar
typedef K::ULessScalar ULessScalar
typedef K::Number Number
typedef K::StdNumber StdNumber
typedef K::Precision Precision
typedef K::ScalarNormSq ScalarNormSq

Static Public Member Functions

static const ScalargetData (const T &t)
static ScalarupdData (T &t)
static const TRealreal (const T &t)
static TRealreal (T &t)
static const TImagimag (const T &t)
static TImagimag (T &t)
static const TNegnegate (const T &t)
static TNegnegate (T &t)
static const THermtranspose (const K &t)
static THermtranspose (K &t)
static const TPosTranspositionalTranspose (const K &t)
static TPosTranspositionalTranspose (K &t)
static const TWithoutNegatorcastAwayNegatorIfAny (const T &t)
static TWithoutNegatorupdCastAwayNegatorIfAny (T &t)
static ScalarNormSq scalarNormSqr (const K &t)
static TSqrt sqrt (const K &t)
static TAbs abs (const K &t)
static TStandard standardize (const K &t)
static TNormalize normalize (const K &t)
static TInvert invert (const K &t)
static K getInfinity ()
static K getNaN ()
static bool isNaN (const K &t)
 This is true if any element contains a NaN anywhere.
static bool isInf (const K &t)
 This is true if at least one element contains a +Infinity or -Infinity and no element contains a NaN.
static bool isFinite (const K &t)
 This is true only if no element has any entry that it NaN or Infinity.
template<class K2 >
static bool isNumericallyEqual (const K &t1, const K2 &t2)
 CNTs are expected to support an "==" operator for exact, bitwise equality.
template<class K2 >
static bool isNumericallyEqual (const K &t1, const K2 &t2, double tol)
static double getDefaultTolerance ()

Detailed Description

template<class K>
class SimTK::CNT< K >

Specialized information about Composite Numerical Types which allows us to define appropriate templatized classes using them.

Transpose is particularly tricky -- we insist on Hermitian transpose meaning the elements must also be transposed and complex subelements must be conjugated.

This class exists because the built-in scalar types don't have the members we need. CNT<> is specialized for those types only; it is just a pass-through for the rest. The idea is to capture everything that has to be specialized here rather than in the template classes which use these types.


Member Typedef Documentation

typedef K::Number Number
typedef K::Precision Precision
typedef K::Scalar Scalar
typedef K::ScalarNormSq ScalarNormSq
typedef K::StdNumber StdNumber
typedef K T
typedef K::TAbs TAbs
typedef K::TCol TCol
typedef K::TComplex TComplex
typedef K::TElement TElement
typedef K::THerm THerm
typedef K::TImag TImag
typedef K::TInvert TInvert
typedef K::TNeg TNeg
typedef K::TNormalize TNormalize
typedef K::TPosTrans TPosTrans
typedef K::TReal TReal
typedef K::TRow TRow
typedef K::TSqHermT TSqHermT
typedef K::TSqrt TSqrt
typedef K::TSqTHerm TSqTHerm
typedef K::TStandard TStandard
typedef K::TWithoutNegator TWithoutNegator
typedef K::ULessScalar ULessScalar

Member Enumeration Documentation

anonymous enum
Enumerator:
NRows 
NCols 
RowSpacing 
ColSpacing 
NPackedElements 
NActualElements 
NActualScalars 
ImagOffset 
RealStrideFactor 
ArgDepth 
IsScalar 
IsULessScalar 
IsNumber 
IsStdNumber 
IsPrecision 
SignInterpretation 

Member Function Documentation

static TAbs abs ( const K &  t  )  [inline, static]
static const TWithoutNegator& castAwayNegatorIfAny ( const T t  )  [inline, static]
static const Scalar* getData ( const T t  )  [inline, static]
static double getDefaultTolerance (  )  [inline, static]
static K getInfinity (  )  [inline, static]
static K getNaN (  )  [inline, static]
static TImag& imag ( T t  )  [inline, static]
static const TImag& imag ( const T t  )  [inline, static]
static TInvert invert ( const K &  t  )  [inline, static]
static bool isFinite ( const K &  t  )  [inline, static]

This is true only if no element has any entry that it NaN or Infinity.

static bool isInf ( const K &  t  )  [inline, static]

This is true if at least one element contains a +Infinity or -Infinity and no element contains a NaN.

static bool isNaN ( const K &  t  )  [inline, static]

This is true if any element contains a NaN anywhere.

static bool isNumericallyEqual ( const K &  t1,
const K2 &  t2,
double  tol 
) [inline, static]
static bool isNumericallyEqual ( const K &  t1,
const K2 &  t2 
) [inline, static]

CNTs are expected to support an "==" operator for exact, bitwise equality.

This method implements approximate, numerical equality. For scalar types, this should boil down to the isNumericallyEqual() scalar method. For 2D composite types, the default tolerance should be loosened from the element's default tolerance by the shorter of the two dimensions. For example, if element E's default numerical tolerance is tol, then a Mat<3,5,E>'s default tolerance should be 3*tol.

static TNeg& negate ( T t  )  [inline, static]
static const TNeg& negate ( const T t  )  [inline, static]
static TNormalize normalize ( const K &  t  )  [inline, static]
static TPosTrans& positionalTranspose ( K &  t  )  [inline, static]
static const TPosTrans& positionalTranspose ( const K &  t  )  [inline, static]
static TReal& real ( T t  )  [inline, static]
static const TReal& real ( const T t  )  [inline, static]
static ScalarNormSq scalarNormSqr ( const K &  t  )  [inline, static]
static TSqrt sqrt ( const K &  t  )  [inline, static]
static TStandard standardize ( const K &  t  )  [inline, static]
static THerm& transpose ( K &  t  )  [inline, static]
static const THerm& transpose ( const K &  t  )  [inline, static]
static TWithoutNegator& updCastAwayNegatorIfAny ( T t  )  [inline, static]
static Scalar* updData ( T t  )  [inline, static]

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

Generated on Thu Aug 12 16:38:16 2010 for SimTKcore by  doxygen 1.6.1