Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Predefined typedefs

These typedefs provide convenient synonyms for common matrix and vector types. More...

Modules

 Less commonly-used typedefs
 

Typedefs

typedef Vec< 2 > SimTK::Vec2
 This is the most common 2D vector type: a column of 2 Real values stored consecutively in memory (packed). More...
 
typedef Vec< 3 > SimTK::Vec3
 This is the most common 3D vector type: a column of 3 Real values stored consecutively in memory (packed). More...
 
typedef Vec< 4 > SimTK::Vec4
 This is the most common 4D vector type: a column of 4 Real values stored consecutively in memory (packed). More...
 
typedef Mat< 2, 2 > SimTK::Mat22
 This is the most common 2x2 matrix type: two packed columns of 2 Real values each. More...
 
typedef Mat< 3, 3 > SimTK::Mat33
 This is the most common 3x3 matrix type: three packed columns of 3 Real values each. More...
 
typedef Mat< 4, 4 > SimTK::Mat44
 This is the most common 4x4 matrix type: four packed columns of 4 Real values each. More...
 
typedef SymMat< 2 > SimTK::SymMat22
 A compact, 2x2 Real symmetric matrix; only 3 elements are stored. More...
 
typedef SymMat< 3 > SimTK::SymMat33
 A compact, 3x3 Real symmetric matrix; only 6 elements are stored. More...
 
typedef SymMat< 4 > SimTK::SymMat44
 A compact, 2x2 Real symmetric matrix; only 10 elements are stored. More...
 
typedef Row< 2 > SimTK::Row2
 Packed, 2-element row of Real values. More...
 
typedef Row< 3 > SimTK::Row3
 Packed, 3-element row of Real values. More...
 
typedef Row< 4 > SimTK::Row4
 Packed, 4-element row of Real values. More...
 
typedef Vector_< Real > SimTK::Vector
 Variable-size column vector of Real elements; abbreviation for Vector_<Real>. More...
 
typedef Matrix_< Real > SimTK::Matrix
 Variable-size 2D matrix of Real elements; abbreviation for Matrix_<Real>. More...
 
typedef RowVector_< Real > SimTK::RowVector
 Variable-size row vector of Real elements; abbreviation for RowVector_<Real>. More...
 

Detailed Description

These typedefs provide convenient synonyms for common matrix and vector types.

Note that the typedef name may be used interchangeably with the fully templatized names; they represent exactly the same type.

The simplest names are for types whose elements are of the compile-time default precision type Real which is typically double but can be changed to float at compile time. There are also names prefixed with a lowercase "f" that always use float regardless of the default precision.

Note that there are more template parameters than are specified here; these typedefs are using default values for them. The missing parameters specify the spacing between elements; these typedefs always refer to types for which the elements are packed in memory. See Vec, Row, Mat, SymMat for more information.

For fixed size vectors and matrices, only the 2-, 3-, and 4-element sizes are commonly used. However we provide typedefs for sizes up to 9 in case they are needed. For larger sizes, just use the explicit templatized forms.

Typedef Documentation

typedef Vector_<Real> SimTK::Vector

Variable-size column vector of Real elements; abbreviation for Vector_<Real>.

This is the most common large-vector type in the Simbody API and in Simbody user programs.

typedef Vec<2> SimTK::Vec2

This is the most common 2D vector type: a column of 2 Real values stored consecutively in memory (packed).

typedef Vec<3> SimTK::Vec3

This is the most common 3D vector type: a column of 3 Real values stored consecutively in memory (packed).

typedef Vec<4> SimTK::Vec4

This is the most common 4D vector type: a column of 4 Real values stored consecutively in memory (packed).

typedef Mat<2, 2> SimTK::Mat22

This is the most common 2x2 matrix type: two packed columns of 2 Real values each.

The columns have type Vec2 but rows have a stride of 2 so the row type is Row<2,Real,2>, not Row2.

typedef Mat<3, 3> SimTK::Mat33

This is the most common 3x3 matrix type: three packed columns of 3 Real values each.

The columns have type Vec3 but rows have a stride of 3 so the row type is Row<3,Real,3>, not Row3.

typedef Mat<4, 4> SimTK::Mat44

This is the most common 4x4 matrix type: four packed columns of 4 Real values each.

The columns have type Vec4 but rows have a stride of 4 so the row type is Row<4,Real,4>, not Row4.

typedef SymMat<2> SimTK::SymMat22

A compact, 2x2 Real symmetric matrix; only 3 elements are stored.

typedef SymMat<3> SimTK::SymMat33

A compact, 3x3 Real symmetric matrix; only 6 elements are stored.

typedef SymMat<4> SimTK::SymMat44

A compact, 2x2 Real symmetric matrix; only 10 elements are stored.

typedef Row<2> SimTK::Row2

Packed, 2-element row of Real values.

This is the type of a transposed Vec2 and usually does not appear explicitly in user programs.

typedef Row<3> SimTK::Row3

Packed, 3-element row of Real values.

This is the type of a transposed Vec3 and usually does not appear explicitly in user programs.

typedef Row<4> SimTK::Row4

Packed, 4-element row of Real values.

This is the type of a transposed Vec4 and usually does not appear explicitly in user programs.

typedef Matrix_<Real> SimTK::Matrix

Variable-size 2D matrix of Real elements; abbreviation for Matrix_<Real>.

This is the most common large-matrix type in the Simbody API and in Simbody user programs.

typedef RowVector_<Real> SimTK::RowVector

Variable-size row vector of Real elements; abbreviation for RowVector_<Real>.

This is the type of a transposed Vector and does not usually appear explicitly in the Simbody API or user programs.