Simbody
3.4 (development)
|
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...
#include <Mat.h>
Classes | |
struct | EltResult |
struct | Result |
struct | SubMat |
struct | Substitute |
Public Types | |
enum | { NRows = M, NCols = N, MinDim, RowSpacing = RS, ColSpacing = CS, NPackedElements = M * N, NActualElements = (N-1)*CS + (M-1)*RS + 1, NActualScalars = CNT<E>::NActualScalars * NActualElements, ImagOffset = NTraits<ENumber>::ImagOffset, RealStrideFactor = 1, ArgDepth, IsScalar = 0, IsULessScalar = 0, IsNumber = 0, IsStdNumber = 0, IsPrecision = 0, SignInterpretation = CNT<E>::SignInterpretation } |
Every Composite Numerical Type (CNT) must define these values. More... | |
typedef Mat< M, N, E, CS, RS > | T |
typedef Mat< M, N, ENeg, CS, RS > | TNeg |
typedef Mat< M, N, EWithoutNegator, CS, RS > | TWithoutNegator |
typedef Mat< M, N, EReal, CS *CNT< E >::RealStrideFactor, RS *CNT< E >::RealStrideFactor > | TReal |
typedef Mat< M, N, EImag, CS *CNT< E >::RealStrideFactor, RS *CNT< E >::RealStrideFactor > | TImag |
typedef Mat< M, N, EComplex, CS, RS > | TComplex |
typedef Mat< N, M, EHerm, RS, CS > | THerm |
typedef Mat< N, M, E, RS, CS > | TPosTrans |
typedef E | TElement |
typedef Row< N, E, CS > | TRow |
typedef Vec< M, E, RS > | TCol |
typedef Vec< MinDim, E, RS+CS > | TDiag |
typedef Mat< M, N, ESqrt, M, 1 > | TSqrt |
typedef Mat< M, N, EAbs, M, 1 > | TAbs |
typedef Mat< M, N, EStandard, M, 1 > | TStandard |
typedef Mat< N, M, EInvert, N, 1 > | TInvert |
typedef Mat< M, N, ENormalize, M, 1 > | TNormalize |
typedef SymMat< N, ESqHermT > | TSqHermT |
typedef SymMat< M, ESqTHerm > | TSqTHerm |
typedef Mat< M, N, E, M, 1 > | TPacked |
typedef Mat< M-1, N, E, M-1, 1 > | TDropRow |
typedef Mat< M, N-1, E, M, 1 > | TDropCol |
typedef Mat< M-1, N-1, E, M-1, 1 > | TDropRowCol |
typedef Mat< M+1, N, E, M+1, 1 > | TAppendRow |
typedef Mat< M, N+1, E, M, 1 > | TAppendCol |
typedef Mat< M+1, N+1, E, M+1, 1 > | TAppendRowCol |
typedef EScalar | Scalar |
typedef EULessScalar | ULessScalar |
typedef ENumber | Number |
typedef EStdNumber | StdNumber |
typedef EPrecision | Precision |
typedef EScalarNormSq | ScalarNormSq |
typedef THerm | TransposeType |
Public Member Functions | |
ScalarNormSq | scalarNormSqr () const |
Scalar norm square is the sum of squares of all the scalars that comprise the value of this Mat. | |
TSqrt | sqrt () const |
Elementwise square root; that is, the return value has the same dimensions as this Mat but with each element replaced by whatever it thinks its square root is. | |
TAbs | abs () const |
Elementwise absolute value; that is, the return value has the same dimensions as this Mat but with each element replaced by whatever it thinks its absolute value is. | |
TStandard | standardize () const |
Mat () | |
Default construction initializes to NaN when debugging but is left uninitialized otherwise to ensure that there is no overhead. | |
Mat (const Mat &src) | |
Copy constructor copies only the elements that are present and does not touch any unused memory space between them if they are not packed. | |
Mat & | operator= (const Mat &src) |
Copy assignment copies only the elements that are present and does not touch any unused memory space between them if they are not packed. | |
Mat (const SymMat< M, ELT > &src) | |
Explicit construction of a Mat from a SymMat (symmetric/Hermitian matrix). | |
template<int CSS, int RSS> | |
Mat (const Mat< M, N, E, CSS, RSS > &src) | |
This provides an implicit conversion from a Mat of the same dimensions and element type but with different element spacing. | |
template<int CSS, int RSS> | |
Mat (const Mat< M, N, ENeg, CSS, RSS > &src) | |
This provides an implicit conversion from a Mat of the same dimensions and negated element type, possibly with different element spacing. | |
template<class EE , int CSS, int RSS> | |
Mat (const Mat< M, N, EE, CSS, RSS > &mm) | |
Explicit construction of a Mat from a source Mat of the same dimensions and an assignment-compatible element type, with any element spacing allowed. | |
Mat (const E &e) | |
Explicit construction from a single element e of this Mat's element type E sets all the main diagonal elements to e but sets the rest of the elements to zero. | |
Mat (const ENeg &e) | |
Explicit construction from a single element e whose type is negator<E> (abbreviated ENeg here) where E is this Mat's element type sets all the main diagonal elements to e but sets the rest of the elements to zero. | |
Mat (int i) | |
Explicit construction from an int value means we convert the int into an object of this Mat's element type E, and then apply the single-element constructor above which sets the Mat to zero except for its main diagonal elements which will all be set to the given value. | |
Mat (const E &e0, const E &e1) | |
Mat (const E &e0, const E &e1, const E &e2) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10, const E &e11) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10, const E &e11, const E &e12) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10, const E &e11, const E &e12, const E &e13) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10, const E &e11, const E &e12, const E &e13, const E &e14) | |
Mat (const E &e0, const E &e1, const E &e2, const E &e3, const E &e4, const E &e5, const E &e6, const E &e7, const E &e8, const E &e9, const E &e10, const E &e11, const E &e12, const E &e13, const E &e14, const E &e15) | |
Mat (const TRow &r0) | |
Mat (const TRow &r0, const TRow &r1) | |
Mat (const TRow &r0, const TRow &r1, const TRow &r2) | |
Mat (const TRow &r0, const TRow &r1, const TRow &r2, const TRow &r3) | |
Mat (const TRow &r0, const TRow &r1, const TRow &r2, const TRow &r3, const TRow &r4) | |
Mat (const TRow &r0, const TRow &r1, const TRow &r2, const TRow &r3, const TRow &r4, const TRow &r5) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0, const Row< N, EE, SS > &r1) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0, const Row< N, EE, SS > &r1, const Row< N, EE, SS > &r2) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0, const Row< N, EE, SS > &r1, const Row< N, EE, SS > &r2, const Row< N, EE, SS > &r3) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0, const Row< N, EE, SS > &r1, const Row< N, EE, SS > &r2, const Row< N, EE, SS > &r3, const Row< N, EE, SS > &r4) | |
template<class EE , int SS> | |
Mat (const Row< N, EE, SS > &r0, const Row< N, EE, SS > &r1, const Row< N, EE, SS > &r2, const Row< N, EE, SS > &r3, const Row< N, EE, SS > &r4, const Row< N, EE, SS > &r5) | |
Mat (const TCol &r0) | |
Mat (const TCol &r0, const TCol &r1) | |
Mat (const TCol &r0, const TCol &r1, const TCol &r2) | |
Mat (const TCol &r0, const TCol &r1, const TCol &r2, const TCol &r3) | |
Mat (const TCol &r0, const TCol &r1, const TCol &r2, const TCol &r3, const TCol &r4) | |
Mat (const TCol &r0, const TCol &r1, const TCol &r2, const TCol &r3, const TCol &r4, const TCol &r5) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0, const Vec< M, EE, SS > &r1) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0, const Vec< M, EE, SS > &r1, const Vec< M, EE, SS > &r2) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0, const Vec< M, EE, SS > &r1, const Vec< M, EE, SS > &r2, const Vec< M, EE, SS > &r3) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0, const Vec< M, EE, SS > &r1, const Vec< M, EE, SS > &r2, const Vec< M, EE, SS > &r3, const Vec< M, EE, SS > &r4) | |
template<class EE , int SS> | |
Mat (const Vec< M, EE, SS > &r0, const Vec< M, EE, SS > &r1, const Vec< M, EE, SS > &r2, const Vec< M, EE, SS > &r3, const Vec< M, EE, SS > &r4, const Vec< M, EE, SS > &r5) | |
template<class EE > | |
Mat (const EE *p) | |
template<class EE , int CSS, int RSS> | |
Mat & | operator= (const Mat< M, N, EE, CSS, RSS > &mm) |
template<class EE > | |
Mat & | operator= (const EE *p) |
template<class EE , int CSS, int RSS> | |
Mat & | operator+= (const Mat< M, N, EE, CSS, RSS > &mm) |
template<class EE , int CSS, int RSS> | |
Mat & | operator+= (const Mat< M, N, negator< EE >, CSS, RSS > &mm) |
template<class EE , int CSS, int RSS> | |
Mat & | operator-= (const Mat< M, N, EE, CSS, RSS > &mm) |
template<class EE , int CSS, int RSS> | |
Mat & | operator-= (const Mat< M, N, negator< EE >, CSS, RSS > &mm) |
template<class EE , int CSS, int RSS> | |
Mat & | operator*= (const Mat< N, N, EE, CSS, RSS > &mm) |
template<class E2 , int CS2, int RS2> | |
Result< Mat< M, N, E2, CS2, RS2 > >::Add | conformingAdd (const Mat< M, N, E2, CS2, RS2 > &r) const |
template<class E2 , int CS2, int RS2> | |
Result< Mat< M, N, E2, CS2, RS2 > >::Sub | conformingSubtract (const Mat< M, N, E2, CS2, RS2 > &r) const |
template<class E2 , int CS2, int RS2> | |
Mat< M, N, E2, CS2, RS2 > ::template Result< Mat >::Sub | conformingSubtractFromLeft (const Mat< M, N, E2, CS2, RS2 > &l) const |
template<class E2 , int CS2, int RS2> | |
EltResult< E2 >::Mul | elementwiseMultiply (const Mat< M, N, E2, CS2, RS2 > &r) const |
template<class E2 , int CS2, int RS2> | |
EltResult< E2 >::Dvd | elementwiseDivide (const Mat< M, N, E2, CS2, RS2 > &r) const |
template<class E2 , int RS2> | |
Result< SymMat< M, E2, RS2 > >::Add | conformingAdd (const SymMat< M, E2, RS2 > &sy) const |
template<class E2 , int RS2> | |
Result< SymMat< M, E2, RS2 > >::Sub | conformingSubtract (const SymMat< M, E2, RS2 > &sy) const |
template<class E2 , int RS2> | |
SymMat< M, E2, RS2 >::template Result< Mat >::Sub | conformingSubtractFromLeft (const SymMat< M, E2, RS2 > &sy) const |
template<int N2, class E2 , int CS2, int RS2> | |
Result< Mat< N, N2, E2, CS2, RS2 > >::Mul | conformingMultiply (const Mat< N, N2, E2, CS2, RS2 > &m) const |
template<int M2, class E2 , int CS2, int RS2> | |
Mat< M2, M, E2, CS2, RS2 > ::template Result< Mat >::Mul | conformingMultiplyFromLeft (const Mat< M2, M, E2, CS2, RS2 > &m) const |
template<int M2, class E2 , int CS2, int RS2> | |
Result< Mat< M2, N, E2, CS2, RS2 > >::Dvd | conformingDivide (const Mat< M2, N, E2, CS2, RS2 > &m) const |
template<int M2, class E2 , int CS2, int RS2> | |
Mat< M2, N, E2, CS2, RS2 > ::template Result< Mat >::Dvd | conformingDivideFromLeft (const Mat< M2, N, E2, CS2, RS2 > &m) const |
const TRow & | operator[] (int i) const |
TRow & | operator[] (int i) |
const TCol & | operator() (int j) const |
TCol & | operator() (int j) |
const E & | operator() (int i, int j) const |
E & | operator() (int i, int j) |
ScalarNormSq | normSqr () const |
CNT< ScalarNormSq >::TSqrt | norm () const |
TNormalize | normalize () const |
TInvert | invert () const |
const Mat & | operator+ () const |
const TNeg & | operator- () const |
TNeg & | operator- () |
const THerm & | operator~ () const |
THerm & | operator~ () |
const TNeg & | negate () const |
TNeg & | updNegate () |
const THerm & | transpose () const |
THerm & | updTranspose () |
const TPosTrans & | positionalTranspose () const |
TPosTrans & | updPositionalTranspose () |
const TReal & | real () const |
TReal & | real () |
const TImag & | imag () const |
TImag & | imag () |
const TWithoutNegator & | castAwayNegatorIfAny () const |
TWithoutNegator & | updCastAwayNegatorIfAny () |
const TRow & | row (int i) const |
TRow & | row (int i) |
const TCol & | col (int j) const |
TCol & | col (int j) |
const E & | elt (int i, int j) const |
E & | elt (int i, int j) |
const TDiag & | diag () const |
Select main diagonal (of largest leading square if rectangular) and return it as a read-only view (as a Vec) of the diagonal elements of this Mat. | |
TDiag & | updDiag () |
Select main diagonal (of largest leading square if rectangular) and return it as a writable view (as a Vec) of the diagonal elements of this Mat. | |
TDiag & | diag () |
This non-const version of diag() is an alternate name for updDiag() available for historical reasons. | |
EStandard | trace () const |
template<class EE > | |
Mat< M, N, typename CNT< E > ::template Result< EE >::Mul > | scalarMultiply (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< EE > ::template Result< E >::Mul > | scalarMultiplyFromLeft (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< E > ::template Result< EE >::Dvd > | scalarDivide (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< EE > ::template Result< E >::Dvd > | scalarDivideFromLeft (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< E > ::template Result< EE >::Add > | scalarAdd (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< E > ::template Result< EE >::Sub > | scalarSubtract (const EE &e) const |
template<class EE > | |
Mat< M, N, typename CNT< EE > ::template Result< E >::Sub > | scalarSubtractFromLeft (const EE &e) const |
template<class EE > | |
Mat & | operator= (const EE &e) |
template<class EE > | |
Mat & | operator+= (const EE &e) |
template<class EE > | |
Mat & | operator-= (const EE &e) |
template<class EE > | |
Mat & | operator*= (const EE &e) |
template<class EE > | |
Mat & | operator/= (const EE &e) |
template<class EE > | |
Mat & | scalarEq (const EE &ee) |
template<class EE > | |
Mat & | scalarPlusEq (const EE &ee) |
template<class EE > | |
Mat & | scalarMinusEq (const EE &ee) |
template<class EE > | |
Mat & | scalarMinusEqFromLeft (const EE &ee) |
template<class EE > | |
Mat & | scalarTimesEq (const EE &ee) |
template<class EE > | |
Mat & | scalarTimesEqFromLeft (const EE &ee) |
template<class EE > | |
Mat & | scalarDivideEq (const EE &ee) |
template<class EE > | |
Mat & | scalarDivideEqFromLeft (const EE &ee) |
void | setToNaN () |
void | setToZero () |
template<int MM, int NN> | |
const SubMat< MM, NN >::Type & | getSubMat (int i, int j) const |
template<int MM, int NN> | |
SubMat< MM, NN >::Type & | updSubMat (int i, int j) |
template<int MM, int NN> | |
void | setSubMat (int i, int j, const typename SubMat< MM, NN >::Type &value) |
TDropRow | dropRow (int i) const |
Return a matrix one row smaller than this one by dropping row i. | |
TDropCol | dropCol (int j) const |
Return a matrix one column smaller than this one by dropping column j. | |
TDropRowCol | dropRowCol (int i, int j) const |
Return a matrix one row and one column smaller than this one by dropping row i and column j. | |
template<class EE , int SS> | |
TAppendRow | appendRow (const Row< N, EE, SS > &row) const |
Return a matrix one row larger than this one by adding a row to the end. | |
template<class EE , int SS> | |
TAppendCol | appendCol (const Vec< M, EE, SS > &col) const |
Return a matrix one column larger than this one by adding a column to the end. | |
template<class ER , int SR, class EC , int SC> | |
TAppendRowCol | appendRowCol (const Row< N+1, ER, SR > &row, const Vec< M+1, EC, SC > &col) const |
Return a matrix one row and one column larger than this one by adding a row to the bottom and a column to the right. | |
template<class EE , int SS> | |
TAppendRow | insertRow (int i, const Row< N, EE, SS > &row) const |
Return a matrix one row larger than this one by inserting a row before* row i. | |
template<class EE , int SS> | |
TAppendCol | insertCol (int j, const Vec< M, EE, SS > &col) const |
Return a matrix one column larger than this one by inserting a column before* column j. | |
template<class ER , int SR, class EC , int SC> | |
TAppendRowCol | insertRowCol (int i, int j, const Row< N+1, ER, SR > &row, const Vec< M+1, EC, SC > &col) const |
Return a matrix one row and one column larger than this one by inserting a row *before* row i and a column *before* column j. | |
bool | isNaN () const |
Return true if any element of this Mat contains a NaN anywhere. | |
bool | isInf () const |
Return true if any element of this Mat contains a +Inf or -Inf somewhere but no element contains a NaN anywhere. | |
bool | isFinite () const |
Return true if no element contains an Infinity or a NaN. | |
template<class E2 , int CS2, int RS2> | |
bool | isNumericallyEqual (const Mat< M, N, E2, CS2, RS2 > &m, double tol) const |
Test whether this matrix is numerically equal to some other matrix with the same shape, using a specified tolerance. | |
template<class E2 , int CS2, int RS2> | |
bool | isNumericallyEqual (const Mat< M, N, E2, CS2, RS2 > &m) const |
Test whether this matrix is numerically equal to some other matrix with the same shape, using a default tolerance which is the looser of the default tolerances of the two objects being compared. | |
bool | isNumericallyEqual (const ELT &e, double tol=getDefaultTolerance()) const |
Test whether this is numerically a "scalar" matrix, meaning that it is a diagonal matrix in which each diagonal element is numerically equal to the same scalar, using either a specified tolerance or the matrix's default tolerance (which is always the same or looser than the default tolerance for one of its elements). | |
bool | isNumericallySymmetric (double tol=getDefaultTolerance()) const |
A Matrix is symmetric (actually Hermitian) if it is square and each element (i,j) is the Hermitian transpose of element (j,i). | |
bool | isExactlySymmetric () const |
A Matrix is symmetric (actually Hermitian) if it is square and each element (i,j) is the Hermitian (conjugate) transpose of element (j,i). | |
TRow | colSum () const |
Returns a row vector (Row) containing the column sums of this matrix. | |
TRow | sum () const |
This is an alternate name for colSum(); behaves like the Matlab function of the same name. | |
TCol | rowSum () const |
Returns a column vector (Vec) containing the row sums of this matrix. | |
std::string | toString () const |
toString() returns a string representation of the Mat. | |
const ELT & | get (int i, int j) const |
Variant of indexing operator that's scripting friendly to get entry (i, j) | |
void | set (int i, int j, const ELT &value) |
Variant of indexing operator that's scripting friendly to set entry (i, j) | |
Static Public Member Functions | |
static int | size () |
Return the total number of elements M*N contained in this Mat. | |
static int | nrow () |
Return the number of rows in this Mat, echoing the value supplied for the template paramter M. | |
static int | ncol () |
Return the number of columns in this Mat, echoing the value supplied for the template paramter N. | |
static const Mat & | getAs (const ELT *p) |
static Mat & | updAs (ELT *p) |
static Mat< M, N, ELT, M, 1 > | getNaN () |
static double | getDefaultTolerance () |
For approximate comparisions, the default tolerance to use for a matrix is its shortest dimension times its elements' default tolerance. | |
Related Functions | |
(Note that these are not member functions.) | |
template<int M, int N, class E , int CS, int RS> | |
void | writeUnformatted (std::ostream &o, const Mat< M, N, E, CS, RS > &v) |
Specialize for Mat<M,N,E,CS,RS> delegating to Row<N,E,RS> with newlines separating the rows, but no final newline. | |
template<int M, int N, class E , int CS, int RS> | |
bool | readUnformatted (std::istream &in, Mat< M, N, E, CS, RS > &v) |
Specialize for Mat<M,N,E,CS,RS> delegating to Row<N,E,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.
Memory layout defaults to packed, column ordered storage but can be specified to have any regular row and column spacing. A Mat object is itself a Composite Numerical Type and can thus be the element type for other matrix and vector types.
M | The number of rows in this matrix (no default). |
N | The number of columns in this matrix (no default). |
ELT | The element type; default is Real. |
CS | Column spacing in memory as a multiple of element size (default M). |
RS | Row spacing in memory as a multiple of element size (default 1). |
typedef Mat<M,N,E,CS,RS> SimTK::Mat< M, N, ELT, CS, RS >::T |
typedef Mat<M,N,ENeg,CS,RS> SimTK::Mat< M, N, ELT, CS, RS >::TNeg |
typedef Mat<M,N,EWithoutNegator,CS,RS> SimTK::Mat< M, N, ELT, CS, RS >::TWithoutNegator |
typedef Mat<M,N,EReal,CS*CNT<E>::RealStrideFactor,RS*CNT<E>::RealStrideFactor> SimTK::Mat< M, N, ELT, CS, RS >::TReal |
typedef Mat<M,N,EImag,CS*CNT<E>::RealStrideFactor,RS*CNT<E>::RealStrideFactor> SimTK::Mat< M, N, ELT, CS, RS >::TImag |
typedef Mat<M,N,EComplex,CS,RS> SimTK::Mat< M, N, ELT, CS, RS >::TComplex |
typedef Mat<N,M,EHerm,RS,CS> SimTK::Mat< M, N, ELT, CS, RS >::THerm |
typedef Mat<N,M,E,RS,CS> SimTK::Mat< M, N, ELT, CS, RS >::TPosTrans |
typedef E SimTK::Mat< M, N, ELT, CS, RS >::TElement |
typedef Row<N,E,CS> SimTK::Mat< M, N, ELT, CS, RS >::TRow |
typedef Vec<M,E,RS> SimTK::Mat< M, N, ELT, CS, RS >::TCol |
typedef Vec<MinDim,E,RS+CS> SimTK::Mat< M, N, ELT, CS, RS >::TDiag |
typedef Mat<M,N,ESqrt,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TSqrt |
typedef Mat<M,N,EAbs,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TAbs |
typedef Mat<M,N,EStandard,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TStandard |
typedef Mat<N,M,EInvert,N,1> SimTK::Mat< M, N, ELT, CS, RS >::TInvert |
typedef Mat<M,N,ENormalize,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TNormalize |
typedef SymMat<N,ESqHermT> SimTK::Mat< M, N, ELT, CS, RS >::TSqHermT |
typedef SymMat<M,ESqTHerm> SimTK::Mat< M, N, ELT, CS, RS >::TSqTHerm |
typedef Mat<M,N,E,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TPacked |
typedef Mat<M-1,N,E,M-1,1> SimTK::Mat< M, N, ELT, CS, RS >::TDropRow |
typedef Mat<M,N-1,E,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TDropCol |
typedef Mat<M-1,N-1,E,M-1,1> SimTK::Mat< M, N, ELT, CS, RS >::TDropRowCol |
typedef Mat<M+1,N,E,M+1,1> SimTK::Mat< M, N, ELT, CS, RS >::TAppendRow |
typedef Mat<M,N+1,E,M,1> SimTK::Mat< M, N, ELT, CS, RS >::TAppendCol |
typedef Mat<M+1,N+1,E,M+1,1> SimTK::Mat< M, N, ELT, CS, RS >::TAppendRowCol |
typedef EScalar SimTK::Mat< M, N, ELT, CS, RS >::Scalar |
typedef EULessScalar SimTK::Mat< M, N, ELT, CS, RS >::ULessScalar |
typedef ENumber SimTK::Mat< M, N, ELT, CS, RS >::Number |
typedef EStdNumber SimTK::Mat< M, N, ELT, CS, RS >::StdNumber |
typedef EPrecision SimTK::Mat< M, N, ELT, CS, RS >::Precision |
typedef EScalarNormSq SimTK::Mat< M, N, ELT, CS, RS >::ScalarNormSq |
typedef THerm SimTK::Mat< M, N, ELT, CS, RS >::TransposeType |
anonymous enum |
Every Composite Numerical Type (CNT) must define these values.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | ) | [inline] |
Default construction initializes to NaN when debugging but is left uninitialized otherwise to ensure that there is no overhead.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Mat< M, N, ELT, CS, RS > & | src | ) | [inline] |
Copy constructor copies only the elements that are present and does not touch any unused memory space between them if they are not packed.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const SymMat< M, ELT > & | src | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Mat< M, N, E, CSS, RSS > & | src | ) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Mat< M, N, ENeg, CSS, RSS > & | src | ) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Mat< M, N, EE, CSS, RSS > & | mm | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e | ) | [inline, explicit] |
Explicit construction from a single element e of this Mat's element type E sets all the main diagonal elements to e but sets the rest of the elements to zero.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const ENeg & | e | ) | [inline, explicit] |
Explicit construction from a single element e whose type is negator<E> (abbreviated ENeg here) where E is this Mat's element type sets all the main diagonal elements to e but sets the rest of the elements to zero.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | int | i | ) | [inline, explicit] |
Explicit construction from an int value means we convert the int into an object of this Mat's element type E, and then apply the single-element constructor above which sets the Mat to zero except for its main diagonal elements which will all be set to the given value.
To convert an int to an element, we first turn it into the appropriate-precision floating point number, and then call E's constructor that takes a single scalar.
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10, | ||
const E & | e11 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10, | ||
const E & | e11, | ||
const E & | e12 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10, | ||
const E & | e11, | ||
const E & | e12, | ||
const E & | e13 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10, | ||
const E & | e11, | ||
const E & | e12, | ||
const E & | e13, | ||
const E & | e14 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const E & | e0, |
const E & | e1, | ||
const E & | e2, | ||
const E & | e3, | ||
const E & | e4, | ||
const E & | e5, | ||
const E & | e6, | ||
const E & | e7, | ||
const E & | e8, | ||
const E & | e9, | ||
const E & | e10, | ||
const E & | e11, | ||
const E & | e12, | ||
const E & | e13, | ||
const E & | e14, | ||
const E & | e15 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0 | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0, |
const TRow & | r1 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0, |
const TRow & | r1, | ||
const TRow & | r2 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0, |
const TRow & | r1, | ||
const TRow & | r2, | ||
const TRow & | r3 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0, |
const TRow & | r1, | ||
const TRow & | r2, | ||
const TRow & | r3, | ||
const TRow & | r4 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TRow & | r0, |
const TRow & | r1, | ||
const TRow & | r2, | ||
const TRow & | r3, | ||
const TRow & | r4, | ||
const TRow & | r5 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0 | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0, |
const Row< N, EE, SS > & | r1 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0, |
const Row< N, EE, SS > & | r1, | ||
const Row< N, EE, SS > & | r2 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0, |
const Row< N, EE, SS > & | r1, | ||
const Row< N, EE, SS > & | r2, | ||
const Row< N, EE, SS > & | r3 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0, |
const Row< N, EE, SS > & | r1, | ||
const Row< N, EE, SS > & | r2, | ||
const Row< N, EE, SS > & | r3, | ||
const Row< N, EE, SS > & | r4 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Row< N, EE, SS > & | r0, |
const Row< N, EE, SS > & | r1, | ||
const Row< N, EE, SS > & | r2, | ||
const Row< N, EE, SS > & | r3, | ||
const Row< N, EE, SS > & | r4, | ||
const Row< N, EE, SS > & | r5 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0 | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0, |
const TCol & | r1 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0, |
const TCol & | r1, | ||
const TCol & | r2 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0, |
const TCol & | r1, | ||
const TCol & | r2, | ||
const TCol & | r3 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0, |
const TCol & | r1, | ||
const TCol & | r2, | ||
const TCol & | r3, | ||
const TCol & | r4 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const TCol & | r0, |
const TCol & | r1, | ||
const TCol & | r2, | ||
const TCol & | r3, | ||
const TCol & | r4, | ||
const TCol & | r5 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0 | ) | [inline, explicit] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0, |
const Vec< M, EE, SS > & | r1 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0, |
const Vec< M, EE, SS > & | r1, | ||
const Vec< M, EE, SS > & | r2 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0, |
const Vec< M, EE, SS > & | r1, | ||
const Vec< M, EE, SS > & | r2, | ||
const Vec< M, EE, SS > & | r3 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0, |
const Vec< M, EE, SS > & | r1, | ||
const Vec< M, EE, SS > & | r2, | ||
const Vec< M, EE, SS > & | r3, | ||
const Vec< M, EE, SS > & | r4 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const Vec< M, EE, SS > & | r0, |
const Vec< M, EE, SS > & | r1, | ||
const Vec< M, EE, SS > & | r2, | ||
const Vec< M, EE, SS > & | r3, | ||
const Vec< M, EE, SS > & | r4, | ||
const Vec< M, EE, SS > & | r5 | ||
) | [inline] |
SimTK::Mat< M, N, ELT, CS, RS >::Mat | ( | const EE * | p | ) | [inline, explicit] |
static int SimTK::Mat< M, N, ELT, CS, RS >::size | ( | ) | [inline, static] |
Return the total number of elements M*N contained in this Mat.
static int SimTK::Mat< M, N, ELT, CS, RS >::nrow | ( | ) | [inline, static] |
Return the number of rows in this Mat, echoing the value supplied for the template paramter M.
static int SimTK::Mat< M, N, ELT, CS, RS >::ncol | ( | ) | [inline, static] |
Return the number of columns in this Mat, echoing the value supplied for the template paramter N.
ScalarNormSq SimTK::Mat< M, N, ELT, CS, RS >::scalarNormSqr | ( | ) | const [inline] |
TSqrt SimTK::Mat< M, N, ELT, CS, RS >::sqrt | ( | ) | const [inline] |
Elementwise square root; that is, the return value has the same dimensions as this Mat but with each element replaced by whatever it thinks its square root is.
TAbs SimTK::Mat< M, N, ELT, CS, RS >::abs | ( | ) | const [inline] |
Elementwise absolute value; that is, the return value has the same dimensions as this Mat but with each element replaced by whatever it thinks its absolute value is.
TStandard SimTK::Mat< M, N, ELT, CS, RS >::standardize | ( | ) | const [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator= | ( | const Mat< M, N, ELT, CS, RS > & | src | ) | [inline] |
Copy assignment copies only the elements that are present and does not touch any unused memory space between them if they are not packed.
Works correctly even if source and destination are the same object.
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator= | ( | const Mat< M, N, EE, CSS, RSS > & | mm | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator= | ( | const EE * | p | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator+= | ( | const Mat< M, N, EE, CSS, RSS > & | mm | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator+= | ( | const Mat< M, N, negator< EE >, CSS, RSS > & | mm | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator-= | ( | const Mat< M, N, EE, CSS, RSS > & | mm | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator-= | ( | const Mat< M, N, negator< EE >, CSS, RSS > & | mm | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator*= | ( | const Mat< N, N, EE, CSS, RSS > & | mm | ) | [inline] |
Result<Mat<M,N,E2,CS2,RS2> >::Add SimTK::Mat< M, N, ELT, CS, RS >::conformingAdd | ( | const Mat< M, N, E2, CS2, RS2 > & | r | ) | const [inline] |
Result<Mat<M,N,E2,CS2,RS2> >::Sub SimTK::Mat< M, N, ELT, CS, RS >::conformingSubtract | ( | const Mat< M, N, E2, CS2, RS2 > & | r | ) | const [inline] |
Mat<M,N,E2,CS2,RS2>::template Result<Mat>::Sub SimTK::Mat< M, N, ELT, CS, RS >::conformingSubtractFromLeft | ( | const Mat< M, N, E2, CS2, RS2 > & | l | ) | const [inline] |
EltResult<E2>::Mul SimTK::Mat< M, N, ELT, CS, RS >::elementwiseMultiply | ( | const Mat< M, N, E2, CS2, RS2 > & | r | ) | const [inline] |
EltResult<E2>::Dvd SimTK::Mat< M, N, ELT, CS, RS >::elementwiseDivide | ( | const Mat< M, N, E2, CS2, RS2 > & | r | ) | const [inline] |
Result<SymMat<M,E2,RS2> >::Add SimTK::Mat< M, N, ELT, CS, RS >::conformingAdd | ( | const SymMat< M, E2, RS2 > & | sy | ) | const [inline] |
Result<SymMat<M,E2,RS2> >::Sub SimTK::Mat< M, N, ELT, CS, RS >::conformingSubtract | ( | const SymMat< M, E2, RS2 > & | sy | ) | const [inline] |
SymMat<M,E2,RS2>::template Result<Mat>::Sub SimTK::Mat< M, N, ELT, CS, RS >::conformingSubtractFromLeft | ( | const SymMat< M, E2, RS2 > & | sy | ) | const [inline] |
Result<Mat<N,N2,E2,CS2,RS2> >::Mul SimTK::Mat< M, N, ELT, CS, RS >::conformingMultiply | ( | const Mat< N, N2, E2, CS2, RS2 > & | m | ) | const [inline] |
Mat<M2,M,E2,CS2,RS2>::template Result<Mat>::Mul SimTK::Mat< M, N, ELT, CS, RS >::conformingMultiplyFromLeft | ( | const Mat< M2, M, E2, CS2, RS2 > & | m | ) | const [inline] |
Result<Mat<M2,N,E2,CS2,RS2> >::Dvd SimTK::Mat< M, N, ELT, CS, RS >::conformingDivide | ( | const Mat< M2, N, E2, CS2, RS2 > & | m | ) | const [inline] |
Mat<M2,N,E2,CS2,RS2>::template Result<Mat>::Dvd SimTK::Mat< M, N, ELT, CS, RS >::conformingDivideFromLeft | ( | const Mat< M2, N, E2, CS2, RS2 > & | m | ) | const [inline] |
const TRow& SimTK::Mat< M, N, ELT, CS, RS >::operator[] | ( | int | i | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
TRow& SimTK::Mat< M, N, ELT, CS, RS >::operator[] | ( | int | i | ) | [inline] |
const TCol& SimTK::Mat< M, N, ELT, CS, RS >::operator() | ( | int | j | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
TCol& SimTK::Mat< M, N, ELT, CS, RS >::operator() | ( | int | j | ) | [inline] |
const E& SimTK::Mat< M, N, ELT, CS, RS >::operator() | ( | int | i, |
int | j | ||
) | const [inline] |
E& SimTK::Mat< M, N, ELT, CS, RS >::operator() | ( | int | i, |
int | j | ||
) | [inline] |
ScalarNormSq SimTK::Mat< M, N, ELT, CS, RS >::normSqr | ( | ) | const [inline] |
CNT<ScalarNormSq>::TSqrt SimTK::Mat< M, N, ELT, CS, RS >::norm | ( | ) | const [inline] |
TNormalize SimTK::Mat< M, N, ELT, CS, RS >::normalize | ( | ) | const [inline] |
Mat< M, N, ELT, CS, RS >::TInvert SimTK::Mat< M, N, ELT, CS, RS >::invert | ( | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
const Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator+ | ( | ) | const [inline] |
const TNeg& SimTK::Mat< M, N, ELT, CS, RS >::operator- | ( | ) | const [inline] |
TNeg& SimTK::Mat< M, N, ELT, CS, RS >::operator- | ( | ) | [inline] |
const THerm& SimTK::Mat< M, N, ELT, CS, RS >::operator~ | ( | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
THerm& SimTK::Mat< M, N, ELT, CS, RS >::operator~ | ( | ) | [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
const TNeg& SimTK::Mat< M, N, ELT, CS, RS >::negate | ( | ) | const [inline] |
TNeg& SimTK::Mat< M, N, ELT, CS, RS >::updNegate | ( | ) | [inline] |
const THerm& SimTK::Mat< M, N, ELT, CS, RS >::transpose | ( | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
THerm& SimTK::Mat< M, N, ELT, CS, RS >::updTranspose | ( | ) | [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
const TPosTrans& SimTK::Mat< M, N, ELT, CS, RS >::positionalTranspose | ( | ) | const [inline] |
TPosTrans& SimTK::Mat< M, N, ELT, CS, RS >::updPositionalTranspose | ( | ) | [inline] |
const TReal& SimTK::Mat< M, N, ELT, CS, RS >::real | ( | ) | const [inline] |
TReal& SimTK::Mat< M, N, ELT, CS, RS >::real | ( | ) | [inline] |
const TImag& SimTK::Mat< M, N, ELT, CS, RS >::imag | ( | ) | const [inline] |
TImag& SimTK::Mat< M, N, ELT, CS, RS >::imag | ( | ) | [inline] |
const TWithoutNegator& SimTK::Mat< M, N, ELT, CS, RS >::castAwayNegatorIfAny | ( | ) | const [inline] |
TWithoutNegator& SimTK::Mat< M, N, ELT, CS, RS >::updCastAwayNegatorIfAny | ( | ) | [inline] |
const TRow& SimTK::Mat< M, N, ELT, CS, RS >::row | ( | int | i | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
TRow& SimTK::Mat< M, N, ELT, CS, RS >::row | ( | int | i | ) | [inline] |
const TCol& SimTK::Mat< M, N, ELT, CS, RS >::col | ( | int | j | ) | const [inline] |
Reimplemented in SimTK::InverseRotation_< P >, SimTK::Rotation_< P >, and SimTK::Rotation_< Real >.
TCol& SimTK::Mat< M, N, ELT, CS, RS >::col | ( | int | j | ) | [inline] |
const E& SimTK::Mat< M, N, ELT, CS, RS >::elt | ( | int | i, |
int | j | ||
) | const [inline] |
E& SimTK::Mat< M, N, ELT, CS, RS >::elt | ( | int | i, |
int | j | ||
) | [inline] |
const TDiag& SimTK::Mat< M, N, ELT, CS, RS >::diag | ( | ) | const [inline] |
TDiag& SimTK::Mat< M, N, ELT, CS, RS >::updDiag | ( | ) | [inline] |
TDiag& SimTK::Mat< M, N, ELT, CS, RS >::diag | ( | ) | [inline] |
EStandard SimTK::Mat< M, N, ELT, CS, RS >::trace | ( | ) | const [inline] |
Mat<M,N, typename CNT<E>::template Result<EE>::Mul> SimTK::Mat< M, N, ELT, CS, RS >::scalarMultiply | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<EE>::template Result<E>::Mul> SimTK::Mat< M, N, ELT, CS, RS >::scalarMultiplyFromLeft | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<E>::template Result<EE>::Dvd> SimTK::Mat< M, N, ELT, CS, RS >::scalarDivide | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<EE>::template Result<E>::Dvd> SimTK::Mat< M, N, ELT, CS, RS >::scalarDivideFromLeft | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<E>::template Result<EE>::Add> SimTK::Mat< M, N, ELT, CS, RS >::scalarAdd | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<E>::template Result<EE>::Sub> SimTK::Mat< M, N, ELT, CS, RS >::scalarSubtract | ( | const EE & | e | ) | const [inline] |
Mat<M,N, typename CNT<EE>::template Result<E>::Sub> SimTK::Mat< M, N, ELT, CS, RS >::scalarSubtractFromLeft | ( | const EE & | e | ) | const [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator= | ( | const EE & | e | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator+= | ( | const EE & | e | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator-= | ( | const EE & | e | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator*= | ( | const EE & | e | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::operator/= | ( | const EE & | e | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarEq | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarPlusEq | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarMinusEq | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarMinusEqFromLeft | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarTimesEq | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarTimesEqFromLeft | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarDivideEq | ( | const EE & | ee | ) | [inline] |
Mat& SimTK::Mat< M, N, ELT, CS, RS >::scalarDivideEqFromLeft | ( | const EE & | ee | ) | [inline] |
void SimTK::Mat< M, N, ELT, CS, RS >::setToNaN | ( | ) | [inline] |
void SimTK::Mat< M, N, ELT, CS, RS >::setToZero | ( | ) | [inline] |
const SubMat<MM,NN>::Type& SimTK::Mat< M, N, ELT, CS, RS >::getSubMat | ( | int | i, |
int | j | ||
) | const [inline] |
SubMat<MM,NN>::Type& SimTK::Mat< M, N, ELT, CS, RS >::updSubMat | ( | int | i, |
int | j | ||
) | [inline] |
void SimTK::Mat< M, N, ELT, CS, RS >::setSubMat | ( | int | i, |
int | j, | ||
const typename SubMat< MM, NN >::Type & | value | ||
) | [inline] |
TDropRow SimTK::Mat< M, N, ELT, CS, RS >::dropRow | ( | int | i | ) | const [inline] |
Return a matrix one row smaller than this one by dropping row i.
The result is packed but has same element type as this one.
TDropCol SimTK::Mat< M, N, ELT, CS, RS >::dropCol | ( | int | j | ) | const [inline] |
Return a matrix one column smaller than this one by dropping column j.
The result is packed but has same element type as this one.
TDropRowCol SimTK::Mat< M, N, ELT, CS, RS >::dropRowCol | ( | int | i, |
int | j | ||
) | const [inline] |
Return a matrix one row and one column smaller than this one by dropping row i and column j.
The result is packed but has same element type as this one.
TAppendRow SimTK::Mat< M, N, ELT, CS, RS >::appendRow | ( | const Row< N, EE, SS > & | row | ) | const [inline] |
Return a matrix one row larger than this one by adding a row to the end.
The result is packed but has same element type as this one. Works for any assignment compatible row.
TAppendCol SimTK::Mat< M, N, ELT, CS, RS >::appendCol | ( | const Vec< M, EE, SS > & | col | ) | const [inline] |
Return a matrix one column larger than this one by adding a column to the end.
The result is packed but has same element type as this one. Works for any assignment compatible column.
TAppendRowCol SimTK::Mat< M, N, ELT, CS, RS >::appendRowCol | ( | const Row< N+1, ER, SR > & | row, |
const Vec< M+1, EC, SC > & | col | ||
) | const [inline] |
Return a matrix one row and one column larger than this one by adding a row to the bottom and a column to the right.
The final element of the row is ignored; that value is taken from the final element of the column instead. The result is packed but has same element type as this one. Works for any assignment compatible row and column.
TAppendRow SimTK::Mat< M, N, ELT, CS, RS >::insertRow | ( | int | i, |
const Row< N, EE, SS > & | row | ||
) | const [inline] |
Return a matrix one row larger than this one by inserting a row before* row i.
The result is packed but has same element type as this one. Works for any assignment compatible row. The index can be one greater than normally allowed in which case the row is appended.
TAppendCol SimTK::Mat< M, N, ELT, CS, RS >::insertCol | ( | int | j, |
const Vec< M, EE, SS > & | col | ||
) | const [inline] |
Return a matrix one column larger than this one by inserting a column before* column j.
The result is packed but has same element type as this one. Works for any assignment compatible column. The index can be one greater than normally allowed in which case the column is appended.
TAppendRowCol SimTK::Mat< M, N, ELT, CS, RS >::insertRowCol | ( | int | i, |
int | j, | ||
const Row< N+1, ER, SR > & | row, | ||
const Vec< M+1, EC, SC > & | col | ||
) | const [inline] |
Return a matrix one row and one column larger than this one by inserting a row *before* row i and a column *before* column j.
The intersecting element of the row is ignored; that element is taken from the column. The result is packed but has same element type as this one. Works for any assignment compatible row and column. The indices can be one greater than normally allowed in which case the row or column is appended.
static const Mat& SimTK::Mat< M, N, ELT, CS, RS >::getAs | ( | const ELT * | p | ) | [inline, static] |
static Mat& SimTK::Mat< M, N, ELT, CS, RS >::updAs | ( | ELT * | p | ) | [inline, static] |
static Mat<M,N,ELT,M,1> SimTK::Mat< M, N, ELT, CS, RS >::getNaN | ( | ) | [inline, static] |
bool SimTK::Mat< M, N, ELT, CS, RS >::isNaN | ( | ) | const [inline] |
Return true if any element of this Mat contains a NaN anywhere.
bool SimTK::Mat< M, N, ELT, CS, RS >::isInf | ( | ) | const [inline] |
Return true if any element of this Mat contains a +Inf or -Inf somewhere but no element contains a NaN anywhere.
bool SimTK::Mat< M, N, ELT, CS, RS >::isFinite | ( | ) | const [inline] |
Return true if no element contains an Infinity or a NaN.
static double SimTK::Mat< M, N, ELT, CS, RS >::getDefaultTolerance | ( | ) | [inline, static] |
For approximate comparisions, the default tolerance to use for a matrix is its shortest dimension times its elements' default tolerance.
bool SimTK::Mat< M, N, ELT, CS, RS >::isNumericallyEqual | ( | const Mat< M, N, E2, CS2, RS2 > & | m, |
double | tol | ||
) | const [inline] |
Test whether this matrix is numerically equal to some other matrix with the same shape, using a specified tolerance.
bool SimTK::Mat< M, N, ELT, CS, RS >::isNumericallyEqual | ( | const Mat< M, N, E2, CS2, RS2 > & | m | ) | const [inline] |
Test whether this matrix is numerically equal to some other matrix with the same shape, using a default tolerance which is the looser of the default tolerances of the two objects being compared.
bool SimTK::Mat< M, N, ELT, CS, RS >::isNumericallyEqual | ( | const ELT & | e, |
double | tol = getDefaultTolerance() |
||
) | const [inline] |
Test whether this is numerically a "scalar" matrix, meaning that it is a diagonal matrix in which each diagonal element is numerically equal to the same scalar, using either a specified tolerance or the matrix's default tolerance (which is always the same or looser than the default tolerance for one of its elements).
bool SimTK::Mat< M, N, ELT, CS, RS >::isNumericallySymmetric | ( | double | tol = getDefaultTolerance() | ) | const [inline] |
A Matrix is symmetric (actually Hermitian) if it is square and each element (i,j) is the Hermitian transpose of element (j,i).
Here we are testing for numerical symmetry, meaning that the symmetry condition is satisified to within a tolerance (supplied or default). This is a relatively expensive test since all elements must be examined but can be very useful in Debug mode to check assumptions.
bool SimTK::Mat< M, N, ELT, CS, RS >::isExactlySymmetric | ( | ) | const [inline] |
A Matrix is symmetric (actually Hermitian) if it is square and each element (i,j) is the Hermitian (conjugate) transpose of element (j,i).
This method tests for exact (bitwise) equality and is too stringent for most purposes; don't use it unless you know that the corresponding elements should be bitwise conjugates, typically because you put them there directly.
TRow SimTK::Mat< M, N, ELT, CS, RS >::colSum | ( | ) | const [inline] |
Returns a row vector (Row) containing the column sums of this matrix.
TRow SimTK::Mat< M, N, ELT, CS, RS >::sum | ( | ) | const [inline] |
This is an alternate name for colSum(); behaves like the Matlab function of the same name.
TCol SimTK::Mat< M, N, ELT, CS, RS >::rowSum | ( | ) | const [inline] |
Returns a column vector (Vec) containing the row sums of this matrix.
std::string SimTK::Mat< M, N, ELT, CS, RS >::toString | ( | ) | const [inline] |
toString() returns a string representation of the Mat.
Please refer to operator<< for details.
const ELT& SimTK::Mat< M, N, ELT, CS, RS >::get | ( | int | i, |
int | j | ||
) | const [inline] |
Variant of indexing operator that's scripting friendly to get entry (i, j)
void SimTK::Mat< M, N, ELT, CS, RS >::set | ( | int | i, |
int | j, | ||
const ELT & | value | ||
) | [inline] |
Variant of indexing operator that's scripting friendly to set entry (i, j)