Simbody
3.6
|
Specialized information about Composite Numerical Types which allows us to define appropriate templatized classes using them. More...
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 Scalar * | getData (const T &t) |
static Scalar * | updData (T &t) |
static const TReal & | real (const T &t) |
static TReal & | real (T &t) |
static const TImag & | imag (const T &t) |
static TImag & | imag (T &t) |
static const TNeg & | negate (const T &t) |
static TNeg & | negate (T &t) |
static const THerm & | transpose (const K &t) |
static THerm & | transpose (K &t) |
static const TPosTrans & | positionalTranspose (const K &t) |
static TPosTrans & | positionalTranspose (K &t) |
static const TWithoutNegator & | castAwayNegatorIfAny (const T &t) |
static TWithoutNegator & | updCastAwayNegatorIfAny (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. More... | |
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. More... | |
static bool | isFinite (const K &t) |
This is true only if no element has any entry that it NaN or Infinity. More... | |
template<class K2 > | |
static bool | isNumericallyEqual (const K &t1, const K2 &t2) |
CNTs are expected to support an "==" operator for exact, bitwise equality. More... | |
template<class K2 > | |
static bool | isNumericallyEqual (const K &t1, const K2 &t2, double tol) |
static double | getDefaultTolerance () |
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.
typedef K SimTK::CNT< K >::T |
typedef K::TNeg SimTK::CNT< K >::TNeg |
typedef K::TWithoutNegator SimTK::CNT< K >::TWithoutNegator |
typedef K::TReal SimTK::CNT< K >::TReal |
typedef K::TImag SimTK::CNT< K >::TImag |
typedef K::TComplex SimTK::CNT< K >::TComplex |
typedef K::THerm SimTK::CNT< K >::THerm |
typedef K::TPosTrans SimTK::CNT< K >::TPosTrans |
typedef K::TSqHermT SimTK::CNT< K >::TSqHermT |
typedef K::TSqTHerm SimTK::CNT< K >::TSqTHerm |
typedef K::TElement SimTK::CNT< K >::TElement |
typedef K::TRow SimTK::CNT< K >::TRow |
typedef K::TCol SimTK::CNT< K >::TCol |
typedef K::TSqrt SimTK::CNT< K >::TSqrt |
typedef K::TAbs SimTK::CNT< K >::TAbs |
typedef K::TStandard SimTK::CNT< K >::TStandard |
typedef K::TInvert SimTK::CNT< K >::TInvert |
typedef K::TNormalize SimTK::CNT< K >::TNormalize |
typedef K::Scalar SimTK::CNT< K >::Scalar |
typedef K::ULessScalar SimTK::CNT< K >::ULessScalar |
typedef K::Number SimTK::CNT< K >::Number |
typedef K::StdNumber SimTK::CNT< K >::StdNumber |
typedef K::Precision SimTK::CNT< K >::Precision |
typedef K::ScalarNormSq SimTK::CNT< K >::ScalarNormSq |
anonymous enum |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
This is true if any element contains a NaN anywhere.
|
inlinestatic |
This is true if at least one element contains a +Infinity or -Infinity and no element contains a NaN.
|
inlinestatic |
This is true only if no element has any entry that it NaN or Infinity.
|
inlinestatic |
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.
|
inlinestatic |
|
inlinestatic |