Simbody
3.5
|
Simbody contains an extensive library for manipulating Matrix and Vector objects, modeled after Matlab's similar features. More...
Modules | |
Predefined typedefs | |
These typedefs provide convenient synonyms for common matrix and vector types. | |
Classes | |
class | SimTK::Matrix_< ELT > |
This is the matrix class intended to appear in user code for large, variable size matrices. More... | |
class | SimTK::RowVector_< ELT > |
Represents a variable size row vector; much less common than the column vector type Vector_. More... | |
class | SimTK::Vector_< ELT > |
This is the vector class intended to appear in user code for large, variable size column vectors. More... | |
class | SimTK::Mat< M, N, ELT, CS, RS > |
This class represents a small matrix whose size is known at compile time, containing elements of any Composite Numerical Type (CNT) and engineered to have no runtime overhead whatsoever. More... | |
struct | SimTK::Mat< M, N, ELT, CS, RS >::EltResult< P > |
struct | SimTK::Mat< M, N, ELT, CS, RS >::Result< P > |
struct | SimTK::Mat< M, N, ELT, CS, RS >::Substitute< P > |
struct | SimTK::Mat< M, N, ELT, CS, RS >::SubMat< MM, NN > |
class | SimTK::Row< N, ELT, STRIDE > |
This is a fixed-length row vector designed for no-overhead inline computation. More... | |
class | SimTK::SymMat< M, ELT, RS > |
This is a small, fixed-size symmetric or Hermitian matrix designed for no-overhead inline computation. More... | |
class | SimTK::Vec< M, ELT, STRIDE > |
This is a fixed-length column vector designed for no-overhead inline computation. More... | |
Advanced | |
These are obscure members of Vec that are used for template metaprogramming and can be ignored by most users. | |
enum | { SimTK::Vec< M, ELT, STRIDE >::NRows = M, SimTK::Vec< M, ELT, STRIDE >::NCols = 1, SimTK::Vec< M, ELT, STRIDE >::NPackedElements = M, SimTK::Vec< M, ELT, STRIDE >::NActualElements = M * STRIDE, SimTK::Vec< M, ELT, STRIDE >::NActualScalars = CNT<E>::NActualScalars * NActualElements, SimTK::Vec< M, ELT, STRIDE >::RowSpacing = STRIDE, SimTK::Vec< M, ELT, STRIDE >::ColSpacing = NActualElements, SimTK::Vec< M, ELT, STRIDE >::ImagOffset = NTraits<ENumber>::ImagOffset, SimTK::Vec< M, ELT, STRIDE >::RealStrideFactor = 1, SimTK::Vec< M, ELT, STRIDE >::ArgDepth, SimTK::Vec< M, ELT, STRIDE >::IsScalar = 0, SimTK::Vec< M, ELT, STRIDE >::IsULessScalar = 0, SimTK::Vec< M, ELT, STRIDE >::IsNumber = 0, SimTK::Vec< M, ELT, STRIDE >::IsStdNumber = 0, SimTK::Vec< M, ELT, STRIDE >::IsPrecision = 0, SimTK::Vec< M, ELT, STRIDE >::SignInterpretation = CNT<E>::SignInterpretation } |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef ELT | SimTK::Vec< M, ELT, STRIDE >::E |
Element type of this Vec. More... | |
typedef CNT< E >::TNeg | SimTK::Vec< M, ELT, STRIDE >::ENeg |
Negated version of this Vec's element type; ENeg==negator< E >. More... | |
typedef CNT< E >::TWithoutNegator | SimTK::Vec< M, ELT, STRIDE >::EWithoutNegator |
Element type, stripped of negator<> if it has one. More... | |
typedef CNT< E >::TReal | SimTK::Vec< M, ELT, STRIDE >::EReal |
Type showing just the real part of an element of this Vec if elements are complex; otherwise just the element type. More... | |
typedef CNT< E >::TImag | SimTK::Vec< M, ELT, STRIDE >::EImag |
Type showing the imaginary part of an element of this Vec as real, if elements are complex; otherwise a type that can hold a zero of the element type. More... | |
typedef CNT< E >::TComplex | SimTK::Vec< M, ELT, STRIDE >::EComplex |
Type that elements would have if complex, if E is currently real; otherwise just the element type E. More... | |
typedef CNT< E >::THerm | SimTK::Vec< M, ELT, STRIDE >::EHerm |
Type of the Hermitian transpose of an element of this Vec. More... | |
typedef CNT< E >::TPosTrans | SimTK::Vec< M, ELT, STRIDE >::EPosTrans |
Type of a positional transpose of an element of this Vec. More... | |
typedef CNT< E >::TSqHermT | SimTK::Vec< M, ELT, STRIDE >::ESqHermT |
Type of the expression ~E*E (default vector and matrix square; symmetric). More... | |
typedef CNT< E >::TSqTHerm | SimTK::Vec< M, ELT, STRIDE >::ESqTHerm |
Type of the expression E*~E ("row square"; symmetric). More... | |
typedef CNT< E >::TSqrt | SimTK::Vec< M, ELT, STRIDE >::ESqrt |
Type required to hold the result of sqrt(E). More... | |
typedef CNT< E >::TAbs | SimTK::Vec< M, ELT, STRIDE >::EAbs |
Type required to hold the result of abs(E). More... | |
typedef CNT< E >::TStandard | SimTK::Vec< M, ELT, STRIDE >::EStandard |
Return type of standardize(E) method; a packed type that can hold the value of an element after eliminating negator and conjugate types. More... | |
typedef CNT< E >::TInvert | SimTK::Vec< M, ELT, STRIDE >::EInvert |
Packed type that can hold the value returned from invert(E), the inverse type of an element. More... | |
typedef CNT< E >::TNormalize | SimTK::Vec< M, ELT, STRIDE >::ENormalize |
Packed type that can hold the value returned from normalize(E). More... | |
typedef CNT< E >::Scalar | SimTK::Vec< M, ELT, STRIDE >::EScalar |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef CNT< E >::ULessScalar | SimTK::Vec< M, ELT, STRIDE >::EULessScalar |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef CNT< E >::Number | SimTK::Vec< M, ELT, STRIDE >::ENumber |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef CNT< E >::StdNumber | SimTK::Vec< M, ELT, STRIDE >::EStdNumber |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef CNT< E >::Precision | SimTK::Vec< M, ELT, STRIDE >::EPrecision |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef CNT< E >::ScalarNormSq | SimTK::Vec< M, ELT, STRIDE >::EScalarNormSq |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Vec< M, E, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::T |
The type of this Vec. More... | |
typedef Vec< M, ENeg, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::TNeg |
Type this Vec would have if its elements were interpreted as negated. More... | |
typedef Vec< M, EWithoutNegator, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::TWithoutNegator |
Type of this Vec with negator removed from its element type, if the element is negated. More... | |
typedef Vec< M, EReal, STRIDE *CNT< E >::RealStrideFactor > | SimTK::Vec< M, ELT, STRIDE >::TReal |
Type of this Vec cast to show only the real part of its element; this might affect the stride. More... | |
typedef Vec< M, EImag, STRIDE *CNT< E >::RealStrideFactor > | SimTK::Vec< M, ELT, STRIDE >::TImag |
Type of this Vec cast to show only the imaginary part of its element; this might affect the stride. More... | |
typedef Vec< M, EComplex, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::TComplex |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Row< M, EHerm, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::THerm |
Type of this Vec after casting to its Hermitian transpose; that is, the Vec turns into a Row and each element turns into its Hermitian transpose. More... | |
typedef Row< M, E, STRIDE > | SimTK::Vec< M, ELT, STRIDE >::TPosTrans |
Type of this Vec after casting to its positional transpose; that is, the Vec turns into a Row but the element type remains unchanged. More... | |
typedef E | SimTK::Vec< M, ELT, STRIDE >::TElement |
Element type of this Vec. More... | |
typedef E | SimTK::Vec< M, ELT, STRIDE >::TRow |
Type of a row of this CNT object (for a Vec, just its element type). More... | |
typedef Vec | SimTK::Vec< M, ELT, STRIDE >::TCol |
Type of a column of this CNT object (for a Vec, the whole thing). More... | |
typedef Vec< M, ESqrt, 1 > | SimTK::Vec< M, ELT, STRIDE >::TSqrt |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Vec< M, EAbs, 1 > | SimTK::Vec< M, ELT, STRIDE >::TAbs |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Vec< M, EStandard, 1 > | SimTK::Vec< M, ELT, STRIDE >::TStandard |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Row< M, EInvert, 1 > | SimTK::Vec< M, ELT, STRIDE >::TInvert |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef Vec< M, ENormalize, 1 > | SimTK::Vec< M, ELT, STRIDE >::TNormalize |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef ESqHermT | SimTK::Vec< M, ELT, STRIDE >::TSqHermT |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef SymMat< M, ESqTHerm > | SimTK::Vec< M, ELT, STRIDE >::TSqTHerm |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef EScalar | SimTK::Vec< M, ELT, STRIDE >::Scalar |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef EULessScalar | SimTK::Vec< M, ELT, STRIDE >::ULessScalar |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef ENumber | SimTK::Vec< M, ELT, STRIDE >::Number |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef EStdNumber | SimTK::Vec< M, ELT, STRIDE >::StdNumber |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef EPrecision | SimTK::Vec< M, ELT, STRIDE >::Precision |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
typedef EScalarNormSq | SimTK::Vec< M, ELT, STRIDE >::ScalarNormSq |
These compile-time constants are required of every Composite Numerical Type (CNT). More... | |
Simbody contains an extensive library for manipulating Matrix and Vector objects, modeled after Matlab's similar features.
Simbody's matrix library contains two separate but related sets of classes for vector and matrix objects, one set for small, fixed-size objects and the other for larger, run-time allocated objects.
First, there are classes to represent small, fixed size vectors and matrices with zero runtime overhead: Vec for column vectors, and Mat for matrices. There is also a Row type that does not normally appear in user programs. These classes are templatized based on size and element type. Synonyms (typedefs) are defined for common combinations; for example, Vec3 is a synonym for Vec<3,Real>
, while Mat22 is a synonym for Mat<2,2,Real>
. (Typedef Real is synonymous with C++ double
unless Simbody was compiled with float
as the default precision.) You can also create other combinations, such as Mat<2,10,Real>
or Vec<4
,std::complex<Real>>. However, the size must always be determinable at compile time. The in-memory representation of these small objects is minimal: only the data elements are stored.
Second, there are classes to represent large vectors and matrices whose sizes are determined at runtime: Vector_ for column vectors and Matrix_ for matrices. There is also a RowVector_ type that rarely appears in user programs. These classes are templatized based on element type. In user code, it is most common to see typedefs Vector and Matrix which are synonyms for Vector_<Real>
and Matrix_<Real>
. As for small matrices, you can use other element types. In fact, the element type can even be one of the fixed-size vector or matrix objects. For example, Vector_<Vec3>
is a variable-length vector, where each element is itself a fixed-size, 3-component vector. The type Vec<2,Vec3>
, called a spatial vector (SpatialVec), is useful for combining rotational and translational quantities into a single object representing a spatial velocity or spatial force, for example. However, it is not permissible to use the variable-size Vector_ or Matrix_ objects as element types. The in-memory representation of these objects includes, in addition to the data, an opaque descriptor containing the length and information on how the data is laid out; the declared objects actually consist only of a pointer (essentially a void*
) to the descriptors. This has many advantages for implementation and binary compatibility, but makes it difficult to look through these objects in a debugger as you can with the small Vec and Mat classes.
The intent of Simbody's matrix library, which we call Simmatrix, is similar to that of the Eigen library (http://eigen.tuxfamily.org). If you want to know more about the design goals and implementation of Simmatrix, see the design document here: https://simtk.org/home/simbody, Documents tab.
typedef ELT SimTK::Vec< M, ELT, STRIDE >::E |
Element type of this Vec.
typedef CNT<E>::TNeg SimTK::Vec< M, ELT, STRIDE >::ENeg |
Negated version of this Vec's element type; ENeg==negator< E >.
typedef CNT<E>::TWithoutNegator SimTK::Vec< M, ELT, STRIDE >::EWithoutNegator |
Element type, stripped of negator<> if it has one.
typedef CNT<E>::TReal SimTK::Vec< M, ELT, STRIDE >::EReal |
Type showing just the real part of an element of this Vec if elements are complex; otherwise just the element type.
typedef CNT<E>::TImag SimTK::Vec< M, ELT, STRIDE >::EImag |
Type showing the imaginary part of an element of this Vec as real, if elements are complex; otherwise a type that can hold a zero of the element type.
typedef CNT<E>::TComplex SimTK::Vec< M, ELT, STRIDE >::EComplex |
Type that elements would have if complex, if E is currently real; otherwise just the element type E.
typedef CNT<E>::THerm SimTK::Vec< M, ELT, STRIDE >::EHerm |
Type of the Hermitian transpose of an element of this Vec.
typedef CNT<E>::TPosTrans SimTK::Vec< M, ELT, STRIDE >::EPosTrans |
Type of a positional transpose of an element of this Vec.
typedef CNT<E>::TSqHermT SimTK::Vec< M, ELT, STRIDE >::ESqHermT |
Type of the expression ~E*E (default vector and matrix square; symmetric).
typedef CNT<E>::TSqTHerm SimTK::Vec< M, ELT, STRIDE >::ESqTHerm |
Type of the expression E*~E ("row square"; symmetric).
typedef CNT<E>::TSqrt SimTK::Vec< M, ELT, STRIDE >::ESqrt |
Type required to hold the result of sqrt(E).
typedef CNT<E>::TAbs SimTK::Vec< M, ELT, STRIDE >::EAbs |
Type required to hold the result of abs(E).
typedef CNT<E>::TStandard SimTK::Vec< M, ELT, STRIDE >::EStandard |
Return type of standardize(E) method; a packed type that can hold the value of an element after eliminating negator and conjugate types.
typedef CNT<E>::TInvert SimTK::Vec< M, ELT, STRIDE >::EInvert |
Packed type that can hold the value returned from invert(E), the inverse type of an element.
typedef CNT<E>::TNormalize SimTK::Vec< M, ELT, STRIDE >::ENormalize |
Packed type that can hold the value returned from normalize(E).
typedef CNT<E>::Scalar SimTK::Vec< M, ELT, STRIDE >::EScalar |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef CNT<E>::ULessScalar SimTK::Vec< M, ELT, STRIDE >::EULessScalar |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef CNT<E>::Number SimTK::Vec< M, ELT, STRIDE >::ENumber |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef CNT<E>::StdNumber SimTK::Vec< M, ELT, STRIDE >::EStdNumber |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef CNT<E>::Precision SimTK::Vec< M, ELT, STRIDE >::EPrecision |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef CNT<E>::ScalarNormSq SimTK::Vec< M, ELT, STRIDE >::EScalarNormSq |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Vec<M,E,STRIDE> SimTK::Vec< M, ELT, STRIDE >::T |
The type of this Vec.
typedef Vec<M,ENeg,STRIDE> SimTK::Vec< M, ELT, STRIDE >::TNeg |
Type this Vec would have if its elements were interpreted as negated.
typedef Vec<M,EWithoutNegator,STRIDE> SimTK::Vec< M, ELT, STRIDE >::TWithoutNegator |
Type of this Vec with negator removed from its element type, if the element is negated.
typedef Vec<M,EReal,STRIDE*CNT<E>::RealStrideFactor> SimTK::Vec< M, ELT, STRIDE >::TReal |
Type of this Vec cast to show only the real part of its element; this might affect the stride.
typedef Vec<M,EImag,STRIDE*CNT<E>::RealStrideFactor> SimTK::Vec< M, ELT, STRIDE >::TImag |
Type of this Vec cast to show only the imaginary part of its element; this might affect the stride.
typedef Vec<M,EComplex,STRIDE> SimTK::Vec< M, ELT, STRIDE >::TComplex |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Row<M,EHerm,STRIDE> SimTK::Vec< M, ELT, STRIDE >::THerm |
typedef Row<M,E,STRIDE> SimTK::Vec< M, ELT, STRIDE >::TPosTrans |
typedef E SimTK::Vec< M, ELT, STRIDE >::TElement |
Element type of this Vec.
typedef E SimTK::Vec< M, ELT, STRIDE >::TRow |
typedef Vec SimTK::Vec< M, ELT, STRIDE >::TCol |
typedef Vec<M,ESqrt,1> SimTK::Vec< M, ELT, STRIDE >::TSqrt |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Vec<M,EAbs,1> SimTK::Vec< M, ELT, STRIDE >::TAbs |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Vec<M,EStandard,1> SimTK::Vec< M, ELT, STRIDE >::TStandard |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Row<M,EInvert,1> SimTK::Vec< M, ELT, STRIDE >::TInvert |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef Vec<M,ENormalize,1> SimTK::Vec< M, ELT, STRIDE >::TNormalize |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef ESqHermT SimTK::Vec< M, ELT, STRIDE >::TSqHermT |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef SymMat<M,ESqTHerm> SimTK::Vec< M, ELT, STRIDE >::TSqTHerm |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef EScalar SimTK::Vec< M, ELT, STRIDE >::Scalar |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef EULessScalar SimTK::Vec< M, ELT, STRIDE >::ULessScalar |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef ENumber SimTK::Vec< M, ELT, STRIDE >::Number |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef EStdNumber SimTK::Vec< M, ELT, STRIDE >::StdNumber |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef EPrecision SimTK::Vec< M, ELT, STRIDE >::Precision |
These compile-time constants are required of every Composite Numerical Type (CNT).
typedef EScalarNormSq SimTK::Vec< M, ELT, STRIDE >::ScalarNormSq |
These compile-time constants are required of every Composite Numerical Type (CNT).
anonymous enum |
Every Composite Numerical Type (CNT) must define these values.
anonymous enum |
anonymous enum |
anonymous enum |
These compile-time constants are required of every Composite Numerical Type (CNT).