negator Class Template Reference

#include <negator.h>

List of all members.


Detailed Description

template<class NUMBER>
class SimTK::negator< NUMBER >

negator<N>, where N is a number type (real, complex, conjugate), is represented in memory identically to N, but behaves as though multiplied by -1, though at zero cost.

Only negators instantiated with the nine number types (real, complex, conjugate) are allowed.


Public Types

typedef negator< N > T
typedef NUMBER TNeg
typedef NUMBER TWithoutNegator
typedef CNT< NReal >::TNeg TReal
typedef CNT< NImag >::TNeg TImag
typedef CNT< NComplex >::TNeg TComplex
typedef CNT< NHerm >::TNeg THerm
typedef negator< N > TPosTrans
typedef NTraits< N >::TSqHermT TSqHermT
typedef NTraits< N >::TSqTHerm TSqTHerm
typedef negator< N > TElement
typedef negator< N > TRow
typedef negator< N > TCol
typedef NTraits< N >::TAbs TAbs
typedef NTraits< N >::TStandard TStandard
typedef NTraits< N >::TInvert TInvert
typedef NTraits< N >::TStandard TNormalize
typedef negator< N > Scalar
typedef NUMBER Number
typedef NTraits< N >::StdNumber StdNumber
typedef NTraits< N >::Precision Precision
typedef NTraits< N >::ScalarSq ScalarSq
 NRows = 1
 NCols = 1
 RowSpacing = 1
 ColSpacing = 1
 NPackedElements = 1
 NActualElements = 1
 NActualScalars = 1
 ImagOffset = NTraits<N>::ImagOffset
 RealStrideFactor = NTraits<N>::RealStrideFactor
 ArgDepth = SCALAR_DEPTH
 IsScalar = 1
 IsNumber = 0
 IsStdNumber = 0
 IsPrecision = 0
 SignInterpretation = -1
enum  {
  NRows = 1, NCols = 1, RowSpacing = 1, ColSpacing = 1,
  NPackedElements = 1, NActualElements = 1, NActualScalars = 1, ImagOffset = NTraits<N>::ImagOffset,
  RealStrideFactor = NTraits<N>::RealStrideFactor, ArgDepth = SCALAR_DEPTH, IsScalar = 1, IsNumber = 0,
  IsStdNumber = 0, IsPrecision = 0, SignInterpretation = -1
}

Public Member Functions

const negator< N > * getData () const
negator< N > * updData ()
const TRealreal () const
TRealreal ()
const TImagimag () const
TImagimag ()
ScalarSq scalarNormSqr () const
TAbs abs () const
TStandard standardize () const
TNormalize normalize () const
TInvert invert () const
 negator ()
 negator (const negator &n)
negatoroperator= (const negator &n)
 negator (int t)
 negator (const float &t)
 negator (const double &t)
 negator (const long double &t)
 negator (const std::complex< float > &t)
 negator (const std::complex< double > &t)
 negator (const std::complex< long double > &t)
 negator (const conjugate< float > &t)
 negator (const conjugate< double > &t)
 negator (const conjugate< long double > &t)
const N & operator- () const
N & operator- ()
operator+ () const
 operator N () const
template<class P>
negatoroperator= (const P &t)
template<class P>
negatoroperator+= (const P &t)
template<class P>
negatoroperator-= (const P &t)
template<class P>
negatoroperator *= (const P &t)
template<class P>
negatoroperator/= (const P &t)
template<class NN>
negatoroperator= (const negator< NN > &t)
template<class NN>
negatoroperator+= (const negator< NN > &t)
template<class NN>
negatoroperator-= (const negator< NN > &t)

Static Public Member Functions

static negator< N > getNaN ()
static negator< N > getInfinity ()
static const negator< N > & recast (const N &val)

Classes

struct  Result
struct  Substitute


Member Typedef Documentation

typedef NUMBER Number

typedef NTraits<N>::Precision Precision

typedef negator<N> Scalar

typedef NTraits<N>::ScalarSq ScalarSq

typedef NTraits<N>::StdNumber StdNumber

typedef negator<N> T

typedef NTraits<N>::TAbs TAbs

typedef negator<N> TCol

typedef CNT<NComplex>::TNeg TComplex

typedef negator<N> TElement

typedef CNT<NHerm>::TNeg THerm

typedef CNT<NImag>::TNeg TImag

typedef NTraits<N>::TInvert TInvert

typedef NUMBER TNeg

typedef NTraits<N>::TStandard TNormalize

typedef negator<N> TPosTrans

typedef CNT<NReal>::TNeg TReal

typedef negator<N> TRow

typedef NTraits<N>::TSqHermT TSqHermT

typedef NTraits<N>::TSqTHerm TSqTHerm

typedef NTraits<N>::TStandard TStandard

typedef NUMBER TWithoutNegator


Member Enumeration Documentation

anonymous enum

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


Constructor & Destructor Documentation

negator (  )  [inline]

negator ( const negator< NUMBER > &  n  )  [inline]

negator ( int  t  )  [inline, explicit]

negator ( const float &  t  )  [inline, explicit]

negator ( const double &  t  )  [inline, explicit]

negator ( const long double &  t  )  [inline, explicit]

negator ( const std::complex< float > &  t  )  [inline, explicit]

negator ( const std::complex< double > &  t  )  [inline, explicit]

negator ( const std::complex< long double > &  t  )  [inline, explicit]

negator ( const conjugate< float > &  t  )  [inline, explicit]

negator ( const conjugate< double > &  t  )  [inline, explicit]

negator ( const conjugate< long double > &  t  )  [inline, explicit]


Member Function Documentation

TAbs abs (  )  const [inline]

const negator<N>* getData (  )  const [inline]

static negator<N> getInfinity (  )  [inline, static]

static negator<N> getNaN (  )  [inline, static]

TImag& imag (  )  [inline]

const TImag& imag (  )  const [inline]

TInvert invert (  )  const [inline]

TNormalize normalize (  )  const [inline]

negator& operator *= ( const P &  t  )  [inline]

operator N (  )  const [inline]

N operator+ (  )  const [inline]

negator& operator+= ( const negator< NN > &  t  )  [inline]

negator& operator+= ( const P &  t  )  [inline]

N& operator- (  )  [inline]

const N& operator- (  )  const [inline]

negator& operator-= ( const negator< NN > &  t  )  [inline]

negator& operator-= ( const P &  t  )  [inline]

negator& operator/= ( const P &  t  )  [inline]

negator& operator= ( const negator< NN > &  t  )  [inline]

negator& operator= ( const P &  t  )  [inline]

negator& operator= ( const negator< NUMBER > &  n  )  [inline]

TReal& real (  )  [inline]

const TReal& real (  )  const [inline]

static const negator<N>& recast ( const N &  val  )  [inline, static]

ScalarSq scalarNormSqr (  )  const [inline]

TStandard standardize (  )  const [inline]

negator<N>* updData (  )  [inline]


The documentation for this class was generated from the following file:
Generated on Thu Feb 28 01:34:36 2008 for SimTKcommon by  doxygen 1.4.7