MatrixBase Class Template Reference

#include <BigMatrix.h>

Inheritance diagram for MatrixBase:

Matrix_ MatrixView_ RowVectorBase TmpMatrixView_ VectorBase RowVector_ RowVectorView_ TmpRowVectorView_ TmpVectorViewT Vector_ VectorView_

List of all members.


Detailed Description

template<class ELT>
class SimTK::MatrixBase< ELT >

Variable-size 2d matrix of Composite Numerical Type (ELT) elements.

This is a container of such elements, it is NOT a Composite Numerical Type itself. MatrixBase<ELT> uses MatrixHelper<S> for implementation, where S is ELT::Scalar, that is, the underlying float, double, long double, complex<float>, negator<conjugate<long double>>, etc. from which ELT is constructed. This is a finite set of which all members are explicitly instantiated in the implementation code, so clients don't have to know how anything is implemented.

MatrixBase is the only class in the Matrix/Vector family which has any data members (it has exactly one MatrixHelper). Thus all other objects in this family (that is, derived from MatrixBase) are exactly the same size in memory and may be "reinterpreted" as appropriate. For example, a Vector may be reinterpreted as a Matrix or vice versa, provided runtime requirements are met (e.g., exactly 1 column).

Unlike the small matrix classes, very little is encoded in the type. Only the element type, and matrix vs. vector vs. row are in the type; everything else like shape, storage layout, and writability are handled at run time.

Public Types

enum  { NScalarsPerElement = CNT<E>::NActualScalars, CppNScalarsPerElement = sizeof(E) / sizeof(Scalar) }
typedef ELT E
typedef CNT< E >::TNeg ENeg
typedef CNT< E >::TWithoutNegator EWithoutNegator
typedef CNT< E >::TReal EReal
typedef CNT< E >::TImag EImag
typedef CNT< E >::TComplex EComplex
typedef CNT< E >::THerm EHerm
typedef CNT< E >::TPosTrans EPosTrans
typedef CNT< E >::TAbs EAbs
typedef CNT< E >::TStandard EStandard
typedef CNT< E >::TInvert EInvert
typedef CNT< E >::TNormalize ENormalize
typedef CNT< E >::TSqHermT ESqHermT
typedef CNT< E >::TSqTHerm ESqTHerm
typedef CNT< E >::Scalar EScalar
typedef CNT< E >::Number ENumber
typedef CNT< E >::StdNumber EStdNumber
typedef CNT< E >::Precision EPrecision
typedef CNT< E >::ScalarSq EScalarSq
typedef EScalar Scalar
typedef ENumber Number
typedef EStdNumber StdNumber
typedef EPrecision Precision
typedef EScalarSq ScalarSq
typedef MatrixBase< ET
typedef MatrixBase< ENegTNeg
typedef MatrixBase
< EWithoutNegator
TWithoutNegator
typedef MatrixBase< ERealTReal
typedef MatrixBase< EImagTImag
typedef MatrixBase< EComplexTComplex
typedef MatrixBase< EHermTHerm
typedef MatrixBase< ETPosTrans
typedef MatrixBase< EAbsTAbs
typedef MatrixBase< EStandardTStandard
typedef MatrixBase< EInvertTInvert
typedef MatrixBase< ENormalizeTNormalize
typedef MatrixBase< ESqHermTTSqHermT
typedef MatrixBase< ESqTHermTSqTHerm

Public Member Functions

void setMatrixStructure (MatrixStructures::Structure structure)
MatrixStructures::Structure getMatrixStructure () const
void setMatrixShape (MatrixShapes::Shape shape)
MatrixShapes::Shape getMatrixShape () const
void setMatrixSparsity (MatrixSparseFormats::Sparsity sparsity)
MatrixSparseFormats::Sparsity getMatrixSparsity () const
void setMatrixStorage (MatrixStorageFormats::Storage storage)
MatrixStorageFormats::Storage getMatrixStorage () const
void setMatrixCondition (MatrixConditions::Condition condition)
MatrixConditions::Condition getMatrixCondition () const
long size () const
int nrow () const
int ncol () const
ScalarSq scalarNormSqr () const
void abs (TAbs &mabs) const
TAbs abs () const
TStandard standardize () const
 MatrixBase ()
void clear ()
 MatrixBase (const MatrixBase &b)
MatrixBasecopyAssign (const MatrixBase &b)
MatrixBaseoperator= (const MatrixBase &b)
MatrixBaseviewAssign (const MatrixBase &src)
 MatrixBase (int m, int n, bool lockNrow=false, bool lockNcol=false)
 MatrixBase (int m, int n, int leadingDim, const Scalar *s)
 MatrixBase (int m, int n, int leadingDim, Scalar *s)
 MatrixBase (int m, int n, const ELT &t)
 MatrixBase (int m, int n, bool lockNrow, bool lockNcol, const ELT &t)
 MatrixBase (int m, int n, const ELT *p)
 MatrixBase (int m, int n, bool lockNrow, bool lockNcol, const ELT *p)
 MatrixBase (MatrixHelper< Scalar > &h, const typename MatrixHelper< Scalar >::ShallowCopy &s)
 MatrixBase (const MatrixHelper< Scalar > &h, const typename MatrixHelper< Scalar >::ShallowCopy &s)
 MatrixBase (const MatrixHelper< Scalar > &h, const typename MatrixHelper< Scalar >::DeepCopy &d)
MatrixBaseoperator*= (const StdNumber &t)
MatrixBaseoperator/= (const StdNumber &t)
MatrixBaseoperator+= (const MatrixBase &r)
MatrixBaseoperator-= (const MatrixBase &r)
template<class EE>
 MatrixBase (const MatrixBase< EE > &b)
template<class EE>
MatrixBaseoperator= (const MatrixBase< EE > &b)
template<class EE>
MatrixBaseoperator+= (const MatrixBase< EE > &b)
template<class EE>
MatrixBaseoperator-= (const MatrixBase< EE > &b)
MatrixBaseoperator= (const ELT &t)
template<class S>
MatrixBasescalarAssign (const S &s)
 Set M's diagonal elements to a "scalar" value S, and all off-diagonal elements to zero.
template<class S>
MatrixBasescalarAddInPlace (const S &s)
 Add a scalar to M's diagonal.
template<class S>
MatrixBasescalarSubtractInPlace (const S &s)
 Subtract a scalar from M's diagonal.
template<class S>
MatrixBasescalarSubtractFromLeftInPlace (const S &s)
 Set M(i,i) = S - M(i,i), M(i,j) = -M(i,j) for i!=j.
template<class S>
MatrixBasescalarMultiplyInPlace (const S &)
 Set M(i,j) = M(i,j)*S for some "scalar" S.
template<class S>
MatrixBasescalarMultiplyFromLeftInPlace (const S &)
 Set M(i,j) = S * M(i,j) for some "scalar" S.
template<class S>
MatrixBasescalarDivideInPlace (const S &)
 Set M(i,j) = M(i,j)/S for some "scalar" S.
template<class S>
MatrixBasescalarDivideFromLeftInPlace (const S &)
 Set M(i,j) = S/M(i,j) for some "scalar" S.
template<class EE>
MatrixBaserowScaleInPlace (const VectorBase< EE > &)
template<class EE>
void rowScale (const VectorBase< EE > &r, typename EltResult< EE >::Mul &out) const
template<class EE>
EltResult< EE >::Mul rowScale (const VectorBase< EE > &r) const
template<class EE>
MatrixBasecolScaleInPlace (const VectorBase< EE > &)
template<class EE>
void colScale (const VectorBase< EE > &c, typename EltResult< EE >::Mul &out) const
template<class EE>
EltResult< EE >::Mul colScale (const VectorBase< EE > &c) const
template<class ER, class EC>
MatrixBaserowAndColScaleInPlace (const VectorBase< ER > &r, const VectorBase< EC > &c)
template<class ER, class EC>
void rowAndColScale (const VectorBase< ER > &r, const VectorBase< EC > &c, typename EltResult< typename VectorBase< ER >::template EltResult< EC >::Mul >::Mul &out) const
template<class ER, class EC>
EltResult< typename VectorBase
< ER >::template EltResult< EC >
::Mul >::Mul 
rowAndColScale (const VectorBase< ER > &r, const VectorBase< EC > &c) const
template<class S>
MatrixBaseelementwiseAssign (const S &s)
 Set M(i,j)=s for every element of M and some value s.
MatrixBaseelementwiseInvertInPlace ()
 Set M(i,j) = M(i,j)^-1.
void elementwiseInvert (MatrixBase< typename CNT< E >::TInvert > &out) const
MatrixBase< typename CNT< E >
::TInvert
elementwiseInvert () const
template<class S>
MatrixBaseelementwiseAddScalarInPlace (const S &s)
 Set M(i,j)+=s for every element of M and some value s.
template<class S>
void elementwiseAddScalar (const S &s, typename EltResult< S >::Add &) const
template<class S>
EltResult< S >::Add elementwiseAddScalar (const S &s) const
template<class S>
MatrixBaseelementwiseSubtractScalarInPlace (const S &s)
 Set M(i,j)-=s for every element of M and some value s.
template<class S>
void elementwiseSubtractScalar (const S &s, typename EltResult< S >::Sub &) const
template<class S>
EltResult< S >::Sub elementwiseSubtractScalar (const S &s) const
template<class S>
MatrixBaseelementwiseSubtractFromScalarInPlace (const S &s)
 Set M(i,j) = s - M(i,j) for every element of M and some value s.
template<class S>
void elementwiseSubtractFromScalar (const S &, typename MatrixBase< S >::template EltResult< E >::Sub &) const
template<class S>
MatrixBase< S >::template
EltResult< E >::Sub 
elementwiseSubtractFromScalar (const S &s) const
template<class EE>
MatrixBaseelementwiseMultiplyInPlace (const MatrixBase< EE > &)
template<class EE>
void elementwiseMultiply (const MatrixBase< EE > &, typename EltResult< EE >::Mul &) const
template<class EE>
EltResult< EE >::Mul elementwiseMultiply (const MatrixBase< EE > &m) const
template<class EE>
MatrixBaseelementwiseMultiplyFromLeftInPlace (const MatrixBase< EE > &)
template<class EE>
void elementwiseMultiplyFromLeft (const MatrixBase< EE > &, typename MatrixBase< EE >::template EltResult< E >::Mul &) const
template<class EE>
MatrixBase< EE >::template
EltResult< E >::Mul 
elementwiseMultiplyFromLeft (const MatrixBase< EE > &m) const
template<class EE>
MatrixBaseelementwiseDivideInPlace (const MatrixBase< EE > &)
template<class EE>
void elementwiseDivide (const MatrixBase< EE > &, typename EltResult< EE >::Dvd &) const
template<class EE>
EltResult< EE >::Dvd elementwiseDivide (const MatrixBase< EE > &m) const
template<class EE>
MatrixBaseelementwiseDivideFromLeftInPlace (const MatrixBase< EE > &)
template<class EE>
void elementwiseDivideFromLeft (const MatrixBase< EE > &, typename MatrixBase< EE >::template EltResult< E >::Dvd &) const
template<class EE>
MatrixBase< EE >::template
EltResult< EE >::Dvd 
elementwiseDivideFromLeft (const MatrixBase< EE > &m) const
MatrixBasesetTo (const ELT &t)
MatrixBasesetToNaN ()
MatrixBasesetToZero ()
RowVectorView_< ELT > row (int i) const
RowVectorView_< ELT > updRow (int i)
VectorView_< ELT > col (int j) const
VectorView_< ELT > updCol (int j)
RowVectorView_< ELT > operator[] (int i) const
RowVectorView_< ELT > operator[] (int i)
VectorView_< ELT > operator() (int j) const
VectorView_< ELT > operator() (int j)
MatrixView_< ELT > block (int i, int j, int m, int n) const
MatrixView_< ELT > updBlock (int i, int j, int m, int n)
MatrixView_< ELT > operator() (int i, int j, int m, int n) const
MatrixView_< ELT > operator() (int i, int j, int m, int n)
MatrixView_< EHermtranspose () const
MatrixView_< EHermupdTranspose ()
MatrixView_< EHermoperator~ () const
MatrixView_< EHermoperator~ ()
VectorView_< ELT > diag () const
VectorView_< ELT > updDiag ()
TInvert invert () const
void dump (const char *msg=0) const
template<class ELT_A, class ELT_B>
MatrixBasematmul (const StdNumber &beta, const StdNumber &alpha, const MatrixBase< ELT_A > &A, const MatrixBase< ELT_B > &B)
const ELT & getElt (int i, int j) const
ELT & updElt (int i, int j)
const ELT & operator() (int i, int j) const
ELT & operator() (int i, int j)
ScalarSq normSqr () const
ScalarSq norm () const
ScalarSq normRMS () const
RowVectorBase< ELT > sum () const
const MatrixBaseoperator+ () const
const TNegnegate () const
TNegupdNegate ()
const TNegoperator- () const
TNegoperator- ()
MatrixBasenegateInPlace ()
MatrixBaseresize (int m, int n)
MatrixBaseresizeKeep (int m, int n)
void lockNRows ()
void lockNCols ()
void lockShape ()
void unlockNRows ()
void unlockNCols ()
void unlockShape ()
const MatrixView_< ELT > & getAsMatrixView () const
MatrixView_< ELT > & updAsMatrixView ()
const Matrix_< ELT > & getAsMatrix () const
Matrix_< ELT > & updAsMatrix ()
const VectorView_< ELT > & getAsVectorView () const
VectorView_< ELT > & updAsVectorView ()
const Vector_< ELT > & getAsVector () const
Vector_< ELT > & updAsVector ()
const VectorBase< ELT > & getAsVectorBase () const
VectorBase< ELT > & updAsVectorBase ()
const RowVectorView_< ELT > & getAsRowVectorView () const
RowVectorView_< ELT > & updAsRowVectorView ()
const RowVector_< ELT > & getAsRowVector () const
RowVector_< ELT > & updAsRowVector ()
const RowVectorBase< ELT > & getAsRowVectorBase () const
RowVectorBase< ELT > & updAsRowVectorBase ()
int getNScalarsPerElement () const
int getPackedSizeofElement () const
bool hasContiguousData () const
long getContiguousScalarDataLength () const
const ScalargetContiguousScalarData () const
ScalarupdContiguousScalarData ()
void replaceContiguousScalarData (Scalar *newData, long length, bool takeOwnership)
void replaceContiguousScalarData (const Scalar *newData, long length)
void swapOwnedContiguousScalarData (Scalar *newData, int length, Scalar *&oldData)
template<class EE>
void rowScale (const VectorBase< EE > &v, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const
template<class EE>
void colScale (const VectorBase< EE > &v, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const
template<class S>
void elementwiseAddScalar (const S &s, typename MatrixBase< ELT >::template EltResult< S >::Add &out) const
template<class S>
void elementwiseSubtractScalar (const S &s, typename MatrixBase< ELT >::template EltResult< S >::Sub &out) const
template<class EE>
void elementwiseMultiply (const MatrixBase< EE > &r, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const
template<class EE>
void elementwiseDivide (const MatrixBase< EE > &r, typename MatrixBase< ELT >::template EltResult< EE >::Dvd &out) const

Protected Attributes

MatrixHelper< Scalarhelper

Friends

class MatrixBase

Classes

struct  EltResult


Member Typedef Documentation

typedef ELT E

typedef CNT<E>::TNeg ENeg

typedef CNT<E>::TReal EReal

typedef CNT<E>::TImag EImag

typedef CNT<E>::TComplex EComplex

typedef CNT<E>::THerm EHerm

typedef CNT<E>::TPosTrans EPosTrans

typedef CNT<E>::TAbs EAbs

typedef CNT<E>::TStandard EStandard

typedef CNT<E>::TInvert EInvert

typedef CNT<E>::TSqHermT ESqHermT

typedef CNT<E>::TSqTHerm ESqTHerm

typedef CNT<E>::Scalar EScalar

typedef CNT<E>::Number ENumber

typedef CNT<E>::ScalarSq EScalarSq

typedef EScalar Scalar

typedef ENumber Number

typedef MatrixBase<E> T

typedef MatrixBase<ENeg> TNeg

typedef MatrixBase<EAbs> TAbs


Member Enumeration Documentation

anonymous enum

Enumerator:
NScalarsPerElement 
CppNScalarsPerElement 


Constructor & Destructor Documentation

MatrixBase (  )  [inline]

MatrixBase ( const MatrixBase< ELT > &  b  )  [inline]

MatrixBase ( int  m,
int  n,
bool  lockNrow = false,
bool  lockNcol = false 
) [inline]

MatrixBase ( int  m,
int  n,
int  leadingDim,
const Scalar s 
) [inline]

MatrixBase ( int  m,
int  n,
int  leadingDim,
Scalar s 
) [inline]

MatrixBase ( int  m,
int  n,
const ELT &  t 
) [inline]

MatrixBase ( int  m,
int  n,
bool  lockNrow,
bool  lockNcol,
const ELT &  t 
) [inline]

MatrixBase ( int  m,
int  n,
const ELT *  p 
) [inline]

MatrixBase ( int  m,
int  n,
bool  lockNrow,
bool  lockNcol,
const ELT *  p 
) [inline]

MatrixBase ( MatrixHelper< Scalar > &  h,
const typename MatrixHelper< Scalar >::ShallowCopy &  s 
) [inline]

MatrixBase ( const MatrixHelper< Scalar > &  h,
const typename MatrixHelper< Scalar >::ShallowCopy &  s 
) [inline]

MatrixBase ( const MatrixHelper< Scalar > &  h,
const typename MatrixHelper< Scalar >::DeepCopy &  d 
) [inline]

MatrixBase ( const MatrixBase< EE > &  b  )  [inline]


Member Function Documentation

void setMatrixStructure ( MatrixStructures::Structure  structure  )  [inline]

MatrixStructures::Structure getMatrixStructure (  )  const [inline]

void setMatrixShape ( MatrixShapes::Shape  shape  )  [inline]

MatrixShapes::Shape getMatrixShape (  )  const [inline]

void setMatrixSparsity ( MatrixSparseFormats::Sparsity  sparsity  )  [inline]

MatrixSparseFormats::Sparsity getMatrixSparsity (  )  const [inline]

void setMatrixStorage ( MatrixStorageFormats::Storage  storage  )  [inline]

MatrixStorageFormats::Storage getMatrixStorage (  )  const [inline]

void setMatrixCondition ( MatrixConditions::Condition  condition  )  [inline]

MatrixConditions::Condition getMatrixCondition (  )  const [inline]

long size (  )  const [inline]

int nrow (  )  const [inline]

Reimplemented in VectorBase, RowVectorBase, VectorBase< Real >, and VectorBase< SimTK::Vec< N > >.

Referenced by MatrixBase< SimTK::Vec< N > >::abs(), MatrixBase::block(), MatrixBase::col(), MatrixBase::colScale(), MatrixBase< SimTK::Vec< N > >::colScale(), MatrixBase::elementwiseAddScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseAddScalar(), MatrixBase::elementwiseAddScalarInPlace(), MatrixBase::elementwiseDivide(), MatrixBase< SimTK::Vec< N > >::elementwiseDivide(), MatrixBase::elementwiseDivideFromLeft(), MatrixBase< SimTK::Vec< N > >::elementwiseDivideFromLeft(), MatrixBase::elementwiseDivideFromLeftInPlace(), MatrixBase::elementwiseDivideInPlace(), MatrixBase::elementwiseInvert(), MatrixBase< SimTK::Vec< N > >::elementwiseInvert(), MatrixBase::elementwiseInvertInPlace(), MatrixBase::elementwiseMultiply(), MatrixBase< SimTK::Vec< N > >::elementwiseMultiply(), MatrixBase::elementwiseMultiplyFromLeft(), MatrixBase< SimTK::Vec< N > >::elementwiseMultiplyFromLeft(), MatrixBase::elementwiseMultiplyFromLeftInPlace(), MatrixBase::elementwiseMultiplyInPlace(), MatrixBase::elementwiseSubtractFromScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseSubtractFromScalar(), MatrixBase::elementwiseSubtractFromScalarInPlace(), MatrixBase::elementwiseSubtractScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseSubtractScalar(), MatrixBase::elementwiseSubtractScalarInPlace(), MatrixBase< SimTK::Vec< N > >::getAsRowVector(), MatrixBase< SimTK::Vec< N > >::getAsRowVectorBase(), MatrixBase< SimTK::Vec< N > >::getAsRowVectorView(), SimTK::mean(), SimTK::median(), RowVectorBase::ncol(), MatrixBase< SimTK::Vec< N > >::normRMS(), RowVectorBase::nrow(), VectorBase< SimTK::Vec< N > >::nrow(), SimTK::operator*(), SimTK::operator-(), MatrixBase::row(), MatrixBase::rowAndColScale(), MatrixBase< SimTK::Vec< N > >::rowAndColScale(), MatrixBase::rowAndColScaleInPlace(), MatrixBase::rowScale(), MatrixBase< SimTK::Vec< N > >::rowScale(), MatrixBase::rowScaleInPlace(), MatrixBase< SimTK::Vec< N > >::scalarNormSqr(), RowVectorBase::size(), SimTK::sort(), MatrixBase< SimTK::Vec< N > >::standardize(), MatrixBase< SimTK::Vec< N > >::updAsRowVector(), MatrixBase< SimTK::Vec< N > >::updAsRowVectorBase(), MatrixBase< SimTK::Vec< N > >::updAsRowVectorView(), MatrixBase::updBlock(), MatrixBase::updCol(), and MatrixBase::updRow().

int ncol (  )  const [inline]

Reimplemented in VectorBase, RowVectorBase, VectorBase< Real >, and VectorBase< SimTK::Vec< N > >.

Referenced by MatrixBase< SimTK::Vec< N > >::abs(), MatrixBase::block(), MatrixBase::col(), MatrixBase::colScale(), MatrixBase< SimTK::Vec< N > >::colScale(), MatrixBase::colScaleInPlace(), MatrixBase::elementwiseAddScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseAddScalar(), MatrixBase::elementwiseAddScalarInPlace(), MatrixBase::elementwiseDivide(), MatrixBase< SimTK::Vec< N > >::elementwiseDivide(), MatrixBase::elementwiseDivideFromLeft(), MatrixBase< SimTK::Vec< N > >::elementwiseDivideFromLeft(), MatrixBase::elementwiseDivideFromLeftInPlace(), MatrixBase::elementwiseDivideInPlace(), MatrixBase::elementwiseInvert(), MatrixBase< SimTK::Vec< N > >::elementwiseInvert(), MatrixBase::elementwiseInvertInPlace(), MatrixBase::elementwiseMultiply(), MatrixBase< SimTK::Vec< N > >::elementwiseMultiply(), MatrixBase::elementwiseMultiplyFromLeft(), MatrixBase< SimTK::Vec< N > >::elementwiseMultiplyFromLeft(), MatrixBase::elementwiseMultiplyFromLeftInPlace(), MatrixBase::elementwiseMultiplyInPlace(), MatrixBase::elementwiseSubtractFromScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseSubtractFromScalar(), MatrixBase::elementwiseSubtractFromScalarInPlace(), MatrixBase::elementwiseSubtractScalar(), MatrixBase< SimTK::Vec< N > >::elementwiseSubtractScalar(), MatrixBase::elementwiseSubtractScalarInPlace(), MatrixBase< SimTK::Vec< N > >::getAsVector(), MatrixBase< SimTK::Vec< N > >::getAsVectorBase(), MatrixBase< SimTK::Vec< N > >::getAsVectorView(), SimTK::max(), SimTK::median(), SimTK::min(), RowVectorBase::ncol(), VectorBase< SimTK::Vec< N > >::ncol(), MatrixBase< SimTK::Vec< N > >::normRMS(), VectorBase< SimTK::Vec< N > >::nrow(), SimTK::operator*(), SimTK::operator-(), MatrixBase::row(), MatrixBase::rowAndColScale(), MatrixBase< SimTK::Vec< N > >::rowAndColScale(), MatrixBase::rowAndColScaleInPlace(), MatrixBase::rowScale(), MatrixBase< SimTK::Vec< N > >::rowScale(), MatrixBase< SimTK::Vec< N > >::scalarNormSqr(), VectorBase< SimTK::Vec< N > >::size(), SimTK::sort(), MatrixBase< SimTK::Vec< N > >::standardize(), MatrixBase< SimTK::Vec< N > >::sum(), MatrixBase< SimTK::Vec< N > >::updAsVector(), MatrixBase< SimTK::Vec< N > >::updAsVectorBase(), MatrixBase< SimTK::Vec< N > >::updAsVectorView(), MatrixBase::updBlock(), MatrixBase::updCol(), and MatrixBase::updRow().

ScalarSq scalarNormSqr (  )  const [inline]

void abs ( TAbs mabs  )  const [inline]

Referenced by SimTK::abs().

TAbs abs (  )  const [inline]

TStandard standardize (  )  const [inline]

void clear (  )  [inline]

MatrixBase& copyAssign ( const MatrixBase< ELT > &  b  )  [inline]

MatrixBase& operator= ( const MatrixBase< ELT > &  b  )  [inline]

MatrixBase& viewAssign ( const MatrixBase< ELT > &  src  )  [inline]

MatrixBase& operator*= ( const StdNumber t  )  [inline]

MatrixBase& operator/= ( const StdNumber t  )  [inline]

MatrixBase& operator+= ( const MatrixBase< ELT > &  r  )  [inline]

MatrixBase& operator-= ( const MatrixBase< ELT > &  r  )  [inline]

MatrixBase& operator= ( const MatrixBase< EE > &  b  )  [inline]

Reimplemented in MatrixView_, and Matrix_.

MatrixBase& operator+= ( const MatrixBase< EE > &  b  )  [inline]

Reimplemented in MatrixView_, and Matrix_.

MatrixBase& operator-= ( const MatrixBase< EE > &  b  )  [inline]

Reimplemented in MatrixView_, and Matrix_.

MatrixBase& operator= ( const ELT &  t  )  [inline]

MatrixBase& scalarAssign ( const S &  s  )  [inline]

Set M's diagonal elements to a "scalar" value S, and all off-diagonal elements to zero.

S can be any type which is assignable to an element of type E. This is the same as the Matrix assignment operator M=S for a scalar type S. It is overriden for Vector and Row types to behave as elementwiseScalarAssign.

MatrixBase& scalarAddInPlace ( const S &  s  )  [inline]

Add a scalar to M's diagonal.

This is the same as the Matrix += operator. This is overridden for Vector and Row types to behave as elementwiseAddScalarInPlace.

MatrixBase& scalarSubtractInPlace ( const S &  s  )  [inline]

Subtract a scalar from M's diagonal.

This is the same as the Matrix -= operator. This is overridden for Vector and Row types to behave as elementwiseSubtractScalarInPlace.

MatrixBase& scalarSubtractFromLeftInPlace ( const S &  s  )  [inline]

Set M(i,i) = S - M(i,i), M(i,j) = -M(i,j) for i!=j.

This is overridden for Vector and Row types to behave as elementwiseSubtractFromScalarInPlace.

MatrixBase& scalarMultiplyInPlace ( const S &   )  [inline]

Set M(i,j) = M(i,j)*S for some "scalar" S.

Actually S can be any type for which E = E*S makes sense. That is, S must be conformant with E and it must be possible to store the result back in an E. This is the *= operator for M *= S and behaves the same way for Matrix, Vector, and RowVector: every element gets multiplied in place on the right by S.

MatrixBase& scalarMultiplyFromLeftInPlace ( const S &   )  [inline]

Set M(i,j) = S * M(i,j) for some "scalar" S.

This is the same as the above routine if S really is a scalar, but for S a more complicated CNT it will be different.

MatrixBase& scalarDivideInPlace ( const S &   )  [inline]

Set M(i,j) = M(i,j)/S for some "scalar" S.

Actually S can be any type for which E = E/S makes sense. That is, S^-1 must be conformant with E and it must be possible to store the result back in an E. This is the /= operator for M /= S and behaves the same way for Matrix, Vector, and RowVector: every element gets divided in place on the right by S.

MatrixBase& scalarDivideFromLeftInPlace ( const S &   )  [inline]

Set M(i,j) = S/M(i,j) for some "scalar" S.

Actually S can be any type for which E = S/E makes sense. That is, S must be conformant with E^-1 and it must be possible to store the result back in an E.

MatrixBase< ELT > & rowScaleInPlace ( const VectorBase< EE > &  v  )  [inline]

void rowScale ( const VectorBase< EE > &  r,
typename EltResult< EE >::Mul &  out 
) const [inline]

EltResult<EE>::Mul rowScale ( const VectorBase< EE > &  r  )  const [inline]

MatrixBase< ELT > & colScaleInPlace ( const VectorBase< EE > &  v  )  [inline]

Reimplemented in RowVectorBase.

References MatrixBase::ncol(), and VectorBase::nrow().

void colScale ( const VectorBase< EE > &  c,
typename EltResult< EE >::Mul &  out 
) const [inline]

EltResult<EE>::Mul colScale ( const VectorBase< EE > &  c  )  const [inline]

Reimplemented in RowVectorBase.

MatrixBase< ELT > & rowAndColScaleInPlace ( const VectorBase< ER > &  r,
const VectorBase< EC > &  c 
) [inline]

void rowAndColScale ( const VectorBase< ER > &  r,
const VectorBase< EC > &  c,
typename EltResult< typename VectorBase< ER >::template EltResult< EC >::Mul >::Mul &  out 
) const [inline]

EltResult<typename VectorBase<ER>::template EltResult<EC>::Mul>::Mul rowAndColScale ( const VectorBase< ER > &  r,
const VectorBase< EC > &  c 
) const [inline]

MatrixBase& elementwiseAssign ( const S &  s  )  [inline]

Set M(i,j)=s for every element of M and some value s.

This requires only that s be assignment compatible with M's elements; s doesn't actually have to be a scalar. Note that for Matrix types this behavior is different than scalar assignment, which puts the scalar only on M's diagonal and sets the rest of M to zero. For Vector and RowVector types, this operator is identical to the normal assignment operator and scalarAssignInPlace() method which also assign the scalar to every element.

MatrixBase< ELT > & elementwiseInvertInPlace (  )  [inline]

void elementwiseInvert ( MatrixBase< typename CNT< E >::TInvert > &  out  )  const [inline]

MatrixBase<typename CNT<E>::TInvert> elementwiseInvert (  )  const [inline]

MatrixBase< ELT > & elementwiseAddScalarInPlace ( const S &  s  )  [inline]

Set M(i,j)+=s for every element of M and some value s.

This requires that s be conformant with M's elements (of type E) and that the result can be stored in an E. For Matrix types this behavior is different than the normal += or scalarAddInPlace() operators, which add the scalar only to the Matrix diagonal. For Vector and RowVector, this operator is identical to += and scalarAddInPlace() which also add the scalar to every element.

References fkinkryx::i, MatrixBase::ncol(), and MatrixBase::nrow().

Referenced by RowVector_::operator+=(), RowVectorView_::operator+=(), Vector_< SimTK::Vec< N > >::operator+=(), and VectorView_::operator+=().

void elementwiseAddScalar ( const S &  s,
typename EltResult< S >::Add &   
) const [inline]

EltResult<S>::Add elementwiseAddScalar ( const S &  s  )  const [inline]

MatrixBase< ELT > & elementwiseSubtractScalarInPlace ( const S &  s  )  [inline]

Set M(i,j)-=s for every element of M and some value s.

This requires that s be conformant with M's elements (of type E) and that the result can be stored in an E. For Matrix types this behavior is different than the normal -= or scalarSubtractInPlace() operators, which subtract the scalar only from the Matrix diagonal. For Vector and RowVector, this operator is identical to -= and scalarSubtractInPlace() which also subtract the scalar from every element.

References fkinkryx::i, MatrixBase::ncol(), and MatrixBase::nrow().

Referenced by RowVector_::operator-=(), RowVectorView_::operator-=(), Vector_< SimTK::Vec< N > >::operator-=(), and VectorView_::operator-=().

void elementwiseSubtractScalar ( const S &  s,
typename EltResult< S >::Sub &   
) const [inline]

EltResult<S>::Sub elementwiseSubtractScalar ( const S &  s  )  const [inline]

MatrixBase< ELT > & elementwiseSubtractFromScalarInPlace ( const S &  s  )  [inline]

Set M(i,j) = s - M(i,j) for every element of M and some value s.

This requires that s be conformant with M's elements (of type E) and that the result can be stored in an E. For Matrix types this behavior is different than the scalarSubtractFromLeftInPlace() operator, which subtracts only the diagonal elements of M from s, while simply negating the off diagonal elements. For Vector and RowVector, this operator is identical to scalarSubtractFromLeftInPlace() which also subtracts every element of M from the scalar.

References fkinkryx::i, MatrixBase::ncol(), MatrixBase::nrow(), and MatrixBase::updElt().

void elementwiseSubtractFromScalar ( const S &  s,
typename MatrixBase< S >::template EltResult< E >::Sub &  out 
) const [inline]

MatrixBase<S>::template EltResult<E>::Sub elementwiseSubtractFromScalar ( const S &  s  )  const [inline]

MatrixBase< ELT > & elementwiseMultiplyInPlace ( const MatrixBase< EE > &  r  )  [inline]

void elementwiseMultiply ( const MatrixBase< EE > &  ,
typename EltResult< EE >::Mul &   
) const [inline]

EltResult<EE>::Mul elementwiseMultiply ( const MatrixBase< EE > &  m  )  const [inline]

MatrixBase< ELT > & elementwiseMultiplyFromLeftInPlace ( const MatrixBase< EE > &  r  )  [inline]

void elementwiseMultiplyFromLeft ( const MatrixBase< EE > &  r,
typename MatrixBase< EE >::template EltResult< E >::Mul &  out 
) const [inline]

MatrixBase<EE>::template EltResult<E>::Mul elementwiseMultiplyFromLeft ( const MatrixBase< EE > &  m  )  const [inline]

MatrixBase< ELT > & elementwiseDivideInPlace ( const MatrixBase< EE > &  r  )  [inline]

void elementwiseDivide ( const MatrixBase< EE > &  ,
typename EltResult< EE >::Dvd &   
) const [inline]

EltResult<EE>::Dvd elementwiseDivide ( const MatrixBase< EE > &  m  )  const [inline]

MatrixBase< ELT > & elementwiseDivideFromLeftInPlace ( const MatrixBase< EE > &  r  )  [inline]

void elementwiseDivideFromLeft ( const MatrixBase< EE > &  r,
typename MatrixBase< EE >::template EltResult< E >::Dvd &  out 
) const [inline]

MatrixBase<EE>::template EltResult<EE>::Dvd elementwiseDivideFromLeft ( const MatrixBase< EE > &  m  )  const [inline]

MatrixBase& setTo ( const ELT &  t  )  [inline]

MatrixBase& setToNaN (  )  [inline]

MatrixBase& setToZero (  )  [inline]

RowVectorView_< ELT > row ( int  i  )  const [inline]

RowVectorView_< ELT > updRow ( int  i  )  [inline]

VectorView_< ELT > col ( int  j  )  const [inline]

VectorView_< ELT > updCol ( int  j  )  [inline]

RowVectorView_<ELT> operator[] ( int  i  )  const [inline]

RowVectorView_<ELT> operator[] ( int  i  )  [inline]

VectorView_<ELT> operator() ( int  j  )  const [inline]

VectorView_<ELT> operator() ( int  j  )  [inline]

MatrixView_< ELT > block ( int  i,
int  j,
int  m,
int  n 
) const [inline]

MatrixView_< ELT > updBlock ( int  i,
int  j,
int  m,
int  n 
) [inline]

MatrixView_<ELT> operator() ( int  i,
int  j,
int  m,
int  n 
) const [inline]

MatrixView_<ELT> operator() ( int  i,
int  j,
int  m,
int  n 
) [inline]

MatrixView_< typename CNT< E >::THerm > transpose (  )  const [inline]

MatrixView_< typename CNT< E >::THerm > updTranspose (  )  [inline]

MatrixView_<EHerm> operator~ (  )  const [inline]

MatrixView_<EHerm> operator~ (  )  [inline]

VectorView_< E > diag (  )  const [inline]

References MatrixBase::helper.

VectorView_< E > updDiag (  )  [inline]

TInvert invert (  )  const [inline]

void dump ( const char *  msg = 0  )  const [inline]

MatrixBase& matmul ( const StdNumber beta,
const StdNumber alpha,
const MatrixBase< ELT_A > &  A,
const MatrixBase< ELT_B > &  B 
) [inline]

const ELT& getElt ( int  i,
int  j 
) const [inline]

ELT& updElt ( int  i,
int  j 
) [inline]

const ELT& operator() ( int  i,
int  j 
) const [inline]

ELT& operator() ( int  i,
int  j 
) [inline]

ScalarSq normSqr (  )  const [inline]

ScalarSq norm (  )  const [inline]

ScalarSq normRMS (  )  const [inline]

RowVectorBase<ELT> sum (  )  const [inline]

const MatrixBase& operator+ (  )  const [inline]

const TNeg& negate (  )  const [inline]

TNeg& updNegate (  )  [inline]

const TNeg& operator- (  )  const [inline]

TNeg& operator- (  )  [inline]

MatrixBase& negateInPlace (  )  [inline]

MatrixBase& resize ( int  m,
int  n 
) [inline]

MatrixBase& resizeKeep ( int  m,
int  n 
) [inline]

void lockNRows (  )  [inline]

void lockNCols (  )  [inline]

void lockShape (  )  [inline]

void unlockNRows (  )  [inline]

void unlockNCols (  )  [inline]

void unlockShape (  )  [inline]

const MatrixView_<ELT>& getAsMatrixView (  )  const [inline]

MatrixView_<ELT>& updAsMatrixView (  )  [inline]

const Matrix_<ELT>& getAsMatrix (  )  const [inline]

Matrix_<ELT>& updAsMatrix (  )  [inline]

const VectorView_<ELT>& getAsVectorView (  )  const [inline]

VectorView_<ELT>& updAsVectorView (  )  [inline]

const Vector_<ELT>& getAsVector (  )  const [inline]

Vector_<ELT>& updAsVector (  )  [inline]

const VectorBase<ELT>& getAsVectorBase (  )  const [inline]

VectorBase<ELT>& updAsVectorBase (  )  [inline]

const RowVectorView_<ELT>& getAsRowVectorView (  )  const [inline]

RowVectorView_<ELT>& updAsRowVectorView (  )  [inline]

const RowVector_<ELT>& getAsRowVector (  )  const [inline]

RowVector_<ELT>& updAsRowVector (  )  [inline]

const RowVectorBase<ELT>& getAsRowVectorBase (  )  const [inline]

RowVectorBase<ELT>& updAsRowVectorBase (  )  [inline]

int getNScalarsPerElement (  )  const [inline]

int getPackedSizeofElement (  )  const [inline]

bool hasContiguousData (  )  const [inline]

long getContiguousScalarDataLength (  )  const [inline]

const Scalar* getContiguousScalarData (  )  const [inline]

Scalar* updContiguousScalarData (  )  [inline]

void replaceContiguousScalarData ( Scalar newData,
long  length,
bool  takeOwnership 
) [inline]

void replaceContiguousScalarData ( const Scalar newData,
long  length 
) [inline]

void swapOwnedContiguousScalarData ( Scalar newData,
int  length,
Scalar *&  oldData 
) [inline]

void rowScale ( const VectorBase< EE > &  v,
typename MatrixBase< ELT >::template EltResult< EE >::Mul &  out 
) const [inline]

void colScale ( const VectorBase< EE > &  v,
typename MatrixBase< ELT >::template EltResult< EE >::Mul &  out 
) const [inline]

void elementwiseAddScalar ( const S &  s,
typename MatrixBase< ELT >::template EltResult< S >::Add &  out 
) const [inline]

void elementwiseSubtractScalar ( const S &  s,
typename MatrixBase< ELT >::template EltResult< S >::Sub &  out 
) const [inline]

void elementwiseMultiply ( const MatrixBase< EE > &  r,
typename MatrixBase< ELT >::template EltResult< EE >::Mul &  out 
) const [inline]

void elementwiseDivide ( const MatrixBase< EE > &  r,
typename MatrixBase< ELT >::template EltResult< EE >::Dvd &  out 
) const [inline]


Friends And Related Function Documentation

friend class MatrixBase [friend]


Member Data Documentation

MatrixHelper<Scalar> helper [protected]

Referenced by MatrixBase::block(), MatrixBase< SimTK::Vec< N > >::clear(), MatrixBase::col(), MatrixBase< SimTK::Vec< N > >::copyAssign(), MatrixBase::diag(), MatrixBase< SimTK::Vec< N > >::dump(), MatrixBase< SimTK::Vec< N > >::getContiguousScalarData(), MatrixBase< SimTK::Vec< N > >::getContiguousScalarDataLength(), MatrixBase< SimTK::Vec< N > >::getElt(), MatrixBase< SimTK::Vec< N > >::getMatrixCondition(), MatrixBase< SimTK::Vec< N > >::getMatrixShape(), MatrixBase< SimTK::Vec< N > >::getMatrixSparsity(), MatrixBase< SimTK::Vec< N > >::getMatrixStorage(), MatrixBase< SimTK::Vec< N > >::getMatrixStructure(), MatrixBase< SimTK::Vec< N > >::hasContiguousData(), MatrixBase< SimTK::Vec< N > >::invert(), MatrixBase< SimTK::Vec< N > >::lockNCols(), MatrixBase< SimTK::Vec< N > >::lockNRows(), MatrixBase< SimTK::Vec< N > >::lockShape(), MatrixBase< SimTK::Vec< N > >::matmul(), MatrixBase< SimTK::Vec< N > >::MatrixBase(), MatrixBase< SimTK::Vec< N > >::ncol(), MatrixBase< SimTK::Vec< N > >::nrow(), MatrixBase< SimTK::Vec< N > >::operator*=(), MatrixBase< SimTK::Vec< N > >::operator+=(), MatrixBase< SimTK::Vec< N > >::operator-=(), MatrixBase< SimTK::Vec< N > >::operator/=(), MatrixBase< SimTK::Vec< N > >::operator=(), MatrixBase< SimTK::Vec< N > >::replaceContiguousScalarData(), MatrixBase< SimTK::Vec< N > >::resize(), MatrixBase< SimTK::Vec< N > >::resizeKeep(), MatrixBase::row(), MatrixBase< SimTK::Vec< N > >::setMatrixCondition(), MatrixBase< SimTK::Vec< N > >::setMatrixShape(), MatrixBase< SimTK::Vec< N > >::setMatrixSparsity(), MatrixBase< SimTK::Vec< N > >::setMatrixStorage(), MatrixBase< SimTK::Vec< N > >::setMatrixStructure(), MatrixBase< SimTK::Vec< N > >::setTo(), MatrixBase< SimTK::Vec< N > >::setToNaN(), MatrixBase< SimTK::Vec< N > >::setToZero(), MatrixBase< SimTK::Vec< N > >::size(), RowVectorBase::sum(), VectorBase< SimTK::Vec< N > >::sum(), MatrixBase< SimTK::Vec< N > >::sum(), MatrixBase< SimTK::Vec< N > >::swapOwnedContiguousScalarData(), MatrixBase::transpose(), MatrixBase< SimTK::Vec< N > >::unlockNCols(), MatrixBase< SimTK::Vec< N > >::unlockNRows(), MatrixBase< SimTK::Vec< N > >::unlockShape(), MatrixBase::updBlock(), MatrixBase::updCol(), MatrixBase< SimTK::Vec< N > >::updContiguousScalarData(), MatrixBase::updDiag(), MatrixBase< SimTK::Vec< N > >::updElt(), MatrixBase::updRow(), MatrixBase::updTranspose(), and MatrixBase< SimTK::Vec< N > >::viewAssign().


The documentation for this class was generated from the following file:

Generated on Fri Sep 26 07:44:28 2008 for SimTKcore by  doxygen 1.5.6