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

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< EWithoutNegatorTWithoutNegator
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
 NScalarsPerElement = CNT<E>::NActualScalars
 CppNScalarsPerElement = sizeof(E) / sizeof(Scalar)
enum  { NScalarsPerElement = CNT<E>::NActualScalars, CppNScalarsPerElement = sizeof(E) / sizeof(Scalar) }

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>::TAbs EAbs

typedef CNT<E>::TComplex EComplex

typedef CNT<E>::THerm EHerm

typedef CNT<E>::TImag EImag

typedef CNT<E>::TInvert EInvert

typedef CNT<E>::TNeg ENeg

typedef CNT<E>::TNormalize ENormalize

typedef CNT<E>::Number ENumber

typedef CNT<E>::TPosTrans EPosTrans

typedef CNT<E>::Precision EPrecision

typedef CNT<E>::TReal EReal

typedef CNT<E>::Scalar EScalar

typedef CNT<E>::ScalarSq EScalarSq

typedef CNT<E>::TSqHermT ESqHermT

typedef CNT<E>::TSqTHerm ESqTHerm

typedef CNT<E>::TStandard EStandard

typedef CNT<E>::StdNumber EStdNumber

typedef CNT<E>::TWithoutNegator EWithoutNegator

typedef ENumber Number

typedef EPrecision Precision

typedef EScalar Scalar

typedef EScalarSq ScalarSq

typedef EStdNumber StdNumber

typedef MatrixBase<E> T

typedef MatrixBase<EAbs> TAbs

typedef MatrixBase<EComplex> TComplex

typedef MatrixBase<EHerm> THerm

typedef MatrixBase<EImag> TImag

typedef MatrixBase<EInvert> TInvert

typedef MatrixBase<ENeg> TNeg

typedef MatrixBase<ENormalize> TNormalize

typedef MatrixBase<E> TPosTrans

typedef MatrixBase<EReal> TReal

typedef MatrixBase<ESqHermT> TSqHermT

typedef MatrixBase<ESqTHerm> TSqTHerm

typedef MatrixBase<EStandard> TStandard

typedef MatrixBase<EWithoutNegator> TWithoutNegator


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

TAbs abs (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

void abs ( TAbs mabs  )  const [inline]

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

void clear (  )  [inline]

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

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

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

Reimplemented in RowVectorBase.

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

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

Reimplemented in RowVectorBase.

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

VectorView_< E > diag (  )  const [inline]

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

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

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

void elementwiseAddScalar ( const S &  s,
typename EltResult< S >::Add &   
) 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.

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.

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

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

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

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

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

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

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

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

Reimplemented in VectorBase.

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

MatrixBase< ELT > & elementwiseInvertInPlace (  )  [inline]

Set M(i,j) = M(i,j)^-1.

Reimplemented in VectorBase.

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

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

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

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

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

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

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

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

void elementwiseSubtractFromScalar ( const S &  ,
typename MatrixBase< S >::template EltResult< E >::Sub &   
) 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.

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

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

void elementwiseSubtractScalar ( const S &  s,
typename EltResult< S >::Sub &   
) 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.

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

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

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

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

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

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

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

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

const Scalar* getContiguousScalarData (  )  const [inline]

long getContiguousScalarDataLength (  )  const [inline]

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

MatrixConditions::Condition getMatrixCondition (  )  const [inline]

MatrixShapes::Shape getMatrixShape (  )  const [inline]

MatrixSparseFormats::Sparsity getMatrixSparsity (  )  const [inline]

MatrixStorageFormats::Storage getMatrixStorage (  )  const [inline]

MatrixStructures::Structure getMatrixStructure (  )  const [inline]

int getNScalarsPerElement (  )  const [inline]

int getPackedSizeofElement (  )  const [inline]

bool hasContiguousData (  )  const [inline]

TInvert invert (  )  const [inline]

void lockNCols (  )  [inline]

void lockNRows (  )  [inline]

void lockShape (  )  [inline]

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

int ncol (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

const TNeg& negate (  )  const [inline]

Reimplemented in VectorBase, RowVectorBase, and Matrix_.

MatrixBase& negateInPlace (  )  [inline]

ScalarSq norm (  )  const [inline]

ScalarSq normRMS (  )  const [inline]

ScalarSq normSqr (  )  const [inline]

int nrow (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

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

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

Reimplemented in VectorBase, and RowVectorBase.

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

Reimplemented in VectorBase, and RowVectorBase.

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

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

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

Reimplemented in VectorBase, and RowVectorBase.

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

Reimplemented in VectorBase, and RowVectorBase.

const MatrixBase& operator+ (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

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

Reimplemented in MatrixView_, and Matrix_.

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

TNeg& operator- (  )  [inline]

Reimplemented in VectorBase, RowVectorBase, and Matrix_.

const TNeg& operator- (  )  const [inline]

Reimplemented in VectorBase, RowVectorBase, and Matrix_.

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

Reimplemented in MatrixView_, and Matrix_.

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

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

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

Reimplemented in VectorBase, RowVectorBase, MatrixView_, Matrix_, VectorView_, Vector_, RowVectorView_, and RowVector_.

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

Reimplemented in MatrixView_, and Matrix_.

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

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

Reimplemented in VectorBase, and RowVectorBase.

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

Reimplemented in VectorBase, and RowVectorBase.

MatrixView_<EHerm> operator~ (  )  [inline]

Reimplemented in VectorBase, and RowVectorBase.

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

Reimplemented in VectorBase, and RowVectorBase.

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

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

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

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

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

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

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

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

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

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

Reimplemented in VectorBase.

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

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

Reimplemented in VectorBase.

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& 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& 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& 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& 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& 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.

ScalarSq scalarNormSqr (  )  const [inline]

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& 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.

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

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

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

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

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

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

MatrixBase& setToNaN (  )  [inline]

MatrixBase& setToZero (  )  [inline]

long size (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

TStandard standardize (  )  const [inline]

RowVectorBase<ELT> sum (  )  const [inline]

Reimplemented in VectorBase, and RowVectorBase.

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

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

Reimplemented in VectorBase, and RowVectorBase.

void unlockNCols (  )  [inline]

void unlockNRows (  )  [inline]

void unlockShape (  )  [inline]

Matrix_<ELT>& updAsMatrix (  )  [inline]

MatrixView_<ELT>& updAsMatrixView (  )  [inline]

RowVector_<ELT>& updAsRowVector (  )  [inline]

RowVectorBase<ELT>& updAsRowVectorBase (  )  [inline]

RowVectorView_<ELT>& updAsRowVectorView (  )  [inline]

Vector_<ELT>& updAsVector (  )  [inline]

VectorBase<ELT>& updAsVectorBase (  )  [inline]

VectorView_<ELT>& updAsVectorView (  )  [inline]

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

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

Scalar* updContiguousScalarData (  )  [inline]

VectorView_< E > updDiag (  )  [inline]

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

TNeg& updNegate (  )  [inline]

Reimplemented in VectorBase, RowVectorBase, and Matrix_.

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

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

Reimplemented in VectorBase, and RowVectorBase.

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


Friends And Related Function Documentation

friend class MatrixBase [friend]


Member Data Documentation

MatrixHelper<Scalar> helper [protected]


The documentation for this class was generated from the following file:
Generated on Thu Feb 28 01:34:35 2008 for SimTKcommon by  doxygen 1.4.7