Matrix_< ELT > Class Template Reference

This is the Matrix class intended to appear in user code. More...

#include <BigMatrix.h>

Inheritance diagram for Matrix_< ELT >:
MatrixBase< ELT >

List of all members.

Public Member Functions

 Matrix_ ()
 Matrix_ (const MatrixCommitment &mc)
 Matrix_ (const Matrix_ &src)
Matrix_operator= (const Matrix_ &src)
 Matrix_ (const Base &v)
 Matrix_ (const BaseNeg &v)
 Matrix_ (int m, int n)
 Matrix_ (int m, int n, const ELT *cppInitialValuesByRow)
 Matrix_ (int m, int n, const ELT &initialValue)
 Matrix_ (int m, int n, int leadingDim, const S *data)
 Matrix_ (int m, int n, int leadingDim, S *data)
template<int M, int N, int CS, int RS>
 Matrix_ (const Mat< M, N, ELT, CS, RS > &mat)
 Convert a Mat to a Matrix_.
Matrix_operator= (const ELT &v)
 Matrix assignment to an element sets only the *diagonal* elements to the indicated value; everything else is set to zero.
template<class EE >
Matrix_operator= (const MatrixBase< EE > &m)
template<class EE >
Matrix_operator+= (const MatrixBase< EE > &m)
template<class EE >
Matrix_operator-= (const MatrixBase< EE > &m)
Matrix_operator*= (const StdNumber &t)
Matrix_operator/= (const StdNumber &t)
Matrix_operator+= (const ELT &r)
Matrix_operator-= (const ELT &r)
const TNegnegate () const
TNegupdNegate ()
const TNegoperator- () const
TNegoperator- ()

Related Functions

(Note that these are not member functions.)



Matrix_<T> serialization and I/O

These methods are at namespace scope but are logically part of the Vector classes.

These deal with reading and writing Vectors from and to streams, which places an additional requirement on the element type T: the element must support the same operation you are trying to do on the Vector as a whole.



template<class T >
std::ostream & operator<< (std::ostream &o, const MatrixBase< T > &m)
 Output a human readable representation of a Matrix to an std::ostream (like std::cout).

Detailed Description

template<class ELT>
class SimTK::Matrix_< ELT >

This is the Matrix class intended to appear in user code.

It can be a fixed-size view of someone else's data, or can be a resizable data owner itself.


Constructor & Destructor Documentation

Matrix_ (  )  [inline]
Matrix_ ( const MatrixCommitment mc  )  [inline]
Matrix_ ( const Matrix_< ELT > &  src  )  [inline]
Matrix_ ( const Base v  )  [inline]
Matrix_ ( const BaseNeg v  )  [inline]
Matrix_ ( int  m,
int  n 
) [inline]
Matrix_ ( int  m,
int  n,
const ELT *  cppInitialValuesByRow 
) [inline]
Matrix_ ( int  m,
int  n,
const ELT &  initialValue 
) [inline]
Matrix_ ( int  m,
int  n,
int  leadingDim,
const S *  data 
) [inline]
Matrix_ ( int  m,
int  n,
int  leadingDim,
S *  data 
) [inline]
Matrix_ ( const Mat< M, N, ELT, CS, RS > &  mat  )  [inline, explicit]

Convert a Mat to a Matrix_.

References MatrixBase< ELT >::updElt().


Member Function Documentation

const TNeg& negate (  )  const [inline]

Reimplemented from MatrixBase< ELT >.

Referenced by Matrix_< ELT >::operator-().

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

Reimplemented from MatrixBase< ELT >.

References MatrixBase< ELT >::operator*=().

Matrix_& operator+= ( const ELT &  r  )  [inline]
Matrix_& operator+= ( const MatrixBase< EE > &  m  )  [inline]
TNeg& operator- (  )  [inline]

Reimplemented from MatrixBase< ELT >.

References Matrix_< ELT >::updNegate().

const TNeg& operator- (  )  const [inline]

Reimplemented from MatrixBase< ELT >.

References Matrix_< ELT >::negate().

Matrix_& operator-= ( const ELT &  r  )  [inline]
Matrix_& operator-= ( const MatrixBase< EE > &  m  )  [inline]
Matrix_& operator/= ( const StdNumber &  t  )  [inline]

Reimplemented from MatrixBase< ELT >.

References MatrixBase< ELT >::operator/=().

Matrix_& operator= ( const MatrixBase< EE > &  m  )  [inline]
Matrix_& operator= ( const ELT &  t  )  [inline]

Matrix assignment to an element sets only the *diagonal* elements to the indicated value; everything else is set to zero.

This is particularly useful for setting a Matrix to zero or to the identity; for other values it creates a Matrix which acts like the scalar. That is, if the scalar is s and we do M=s, then multiplying another Matrix B by the resulting diagonal matrix M gives the same result as multiplying B by s. That is (M=s)*B == s*B.

NOTE: this must be overridden for Vector and RowVector since then scalar assignment is defined to copy the scalar to every element.

Reimplemented from MatrixBase< ELT >.

References MatrixBase< ELT >::operator=().

Matrix_& operator= ( const Matrix_< ELT > &  src  )  [inline]

Reimplemented from MatrixBase< ELT >.

References MatrixBase< ELT >::operator=().

TNeg& updNegate (  )  [inline]

Reimplemented from MatrixBase< ELT >.

Referenced by Matrix_< ELT >::operator-().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  o,
const MatrixBase< T > &  m 
) [related]

Output a human readable representation of a Matrix to an std::ostream (like std::cout).

The format is one row per line, with each row output as [ elements ] where elements is a space-separated list of the row's contents output by invoking the "<<" operator on the elements. This function will not compile if the element type does not support the "<<" operator. A newline is issued before each row and at the end.


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

Generated on Thu Aug 12 16:38:14 2010 for SimTKcore by  doxygen 1.6.1