Simbody
3.6
|
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. More...
Classes | |
struct | Result |
struct | Substitute |
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, IsULessScalar = 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 >::TSqrt | TSqrt |
typedef NTraits< N >::TAbs | TAbs |
typedef NTraits< N >::TStandard | TStandard |
typedef CNT< NInvert >::TNeg | TInvert |
typedef NTraits< N >::TStandard | TNormalize |
typedef negator< N > | Scalar |
typedef negator< N > | ULessScalar |
typedef NUMBER | Number |
typedef NTraits< N >::StdNumber | StdNumber |
typedef NTraits< N >::Precision | Precision |
typedef NTraits< N >::ScalarNormSq | ScalarNormSq |
Public Member Functions | |
const negator< N > * | getData () const |
negator< N > * | updData () |
const TReal & | real () const |
TReal & | real () |
const TImag & | imag () const |
TImag & | imag () |
ScalarNormSq | scalarNormSqr () const |
TSqrt | sqrt () const |
TAbs | abs () const |
TStandard | standardize () const |
TNormalize | normalize () const |
TInvert | invert () const |
bool | isFinite () const |
Returns true if the negated value is finite (i.e., not NaN or Inf). More... | |
bool | isNaN () const |
Returns true if the negated value contains a NaN. More... | |
bool | isInf () const |
Returns true if the negated value contains an Inf or -Inf and does not contain a NaN. More... | |
template<class T2 > | |
bool | isNumericallyEqual (const T2 &t2) const |
In the generic case we'll perform the negation here to get a number, and then delegate to the other type which can be any CNT. More... | |
template<class N2 > | |
bool | isNumericallyEqual (const negator< N2 > &t2) const |
In this partial specialization we know that both types have negators so we can just compare the underlying numbers, each of which has the reversed sign, using the global SimTK method available for comparing numbers. More... | |
template<class T2 > | |
bool | isNumericallyEqual (const T2 &t2, double tol) const |
This is the generic case (see above) but with an explicitly-provided tolerance. More... | |
template<class N2 > | |
bool | isNumericallyEqual (const negator< N2 > &t2, double tol) const |
This is the partially specialized case again (see above) but with an explicitly-provided tolerance. More... | |
negator () | |
negator (const negator &n) | |
negator & | operator= (const negator &n) |
negator (int t) | |
negator (const float &t) | |
negator (const double &t) | |
template<class P > | |
negator (const std::complex< P > &t) | |
template<class P > | |
negator (const conjugate< P > &t) | |
const N & | operator- () const |
N & | operator- () |
N | operator+ () const |
operator N () const | |
template<class P > | |
negator & | operator= (const P &t) |
template<class P > | |
negator & | operator+= (const P &t) |
template<class P > | |
negator & | operator-= (const P &t) |
template<class P > | |
negator & | operator*= (const P &t) |
template<class P > | |
negator & | operator/= (const P &t) |
template<class NN > | |
negator & | operator= (const negator< NN > &t) |
template<class NN > | |
negator & | operator+= (const negator< NN > &t) |
template<class NN > | |
negator & | operator-= (const negator< NN > &t) |
Static Public Member Functions | |
static negator< N > | getNaN () |
static negator< N > | getInfinity () |
static double | getDefaultTolerance () |
static const negator< N > & | recast (const N &val) |
Friends | |
template<class N2 > | |
class | negator |
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.
typedef negator<N> SimTK::negator< NUMBER >::T |
typedef NUMBER SimTK::negator< NUMBER >::TNeg |
typedef NUMBER SimTK::negator< NUMBER >::TWithoutNegator |
typedef CNT<NReal>::TNeg SimTK::negator< NUMBER >::TReal |
typedef CNT<NImag>::TNeg SimTK::negator< NUMBER >::TImag |
typedef CNT<NComplex>::TNeg SimTK::negator< NUMBER >::TComplex |
typedef CNT<NHerm>::TNeg SimTK::negator< NUMBER >::THerm |
typedef negator<N> SimTK::negator< NUMBER >::TPosTrans |
typedef NTraits<N>::TSqHermT SimTK::negator< NUMBER >::TSqHermT |
typedef NTraits<N>::TSqTHerm SimTK::negator< NUMBER >::TSqTHerm |
typedef negator<N> SimTK::negator< NUMBER >::TElement |
typedef negator<N> SimTK::negator< NUMBER >::TRow |
typedef negator<N> SimTK::negator< NUMBER >::TCol |
typedef NTraits<N>::TSqrt SimTK::negator< NUMBER >::TSqrt |
typedef NTraits<N>::TAbs SimTK::negator< NUMBER >::TAbs |
typedef NTraits<N>::TStandard SimTK::negator< NUMBER >::TStandard |
typedef CNT<NInvert>::TNeg SimTK::negator< NUMBER >::TInvert |
typedef NTraits<N>::TStandard SimTK::negator< NUMBER >::TNormalize |
typedef negator<N> SimTK::negator< NUMBER >::Scalar |
typedef negator<N> SimTK::negator< NUMBER >::ULessScalar |
typedef NUMBER SimTK::negator< NUMBER >::Number |
typedef NTraits<N>::StdNumber SimTK::negator< NUMBER >::StdNumber |
typedef NTraits<N>::Precision SimTK::negator< NUMBER >::Precision |
typedef NTraits<N>::ScalarNormSq SimTK::negator< NUMBER >::ScalarNormSq |
anonymous enum |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
Returns true if the negated value is finite (i.e., not NaN or Inf).
|
inline |
Returns true if the negated value contains a NaN.
|
inline |
Returns true if the negated value contains an Inf or -Inf and does not contain a NaN.
|
inlinestatic |
|
inline |
In the generic case we'll perform the negation here to get a number, and then delegate to the other type which can be any CNT.
|
inline |
In this partial specialization we know that both types have negators so we can just compare the underlying numbers, each of which has the reversed sign, using the global SimTK method available for comparing numbers.
|
inline |
This is the generic case (see above) but with an explicitly-provided tolerance.
|
inline |
This is the partially specialized case again (see above) but with an explicitly-provided tolerance.
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |