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

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
}
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

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 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>::TInvert TInvert

typedef negator<N> Scalar

typedef NUMBER Number

typedef NTraits<N>::ScalarSq ScalarSq


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

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

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

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

negator<N>* updData (  )  [inline]

const TReal& real (  )  const [inline]

References SimTK::real().

TReal& real (  )  [inline]

References SimTK::real().

const TImag& imag (  )  const [inline]

References SimTK::imag().

TImag& imag (  )  [inline]

References SimTK::imag().

ScalarSq scalarNormSqr (  )  const [inline]

TAbs abs (  )  const [inline]

References SimTK::abs().

TStandard standardize (  )  const [inline]

TNormalize normalize (  )  const [inline]

TInvert invert (  )  const [inline]

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

References negator::v.

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

const N& operator- (  )  const [inline]

N& operator- (  )  [inline]

N operator+ (  )  const [inline]

operator N (  )  const [inline]

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

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

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

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

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

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

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

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


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

Generated on Fri Sep 26 07:44:30 2008 for SimTKcore by  doxygen 1.5.6