Simbody
|
This is the Matrix class intended to appear in user code. More...
#include <BigMatrix.h>
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 TNeg & | negate () const |
TNeg & | updNegate () |
const TNeg & | operator- () const |
TNeg & | operator- () |
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). |
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.
SimTK::Matrix_< ELT >::Matrix_ | ( | ) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | const MatrixCommitment & | mc | ) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | const Matrix_< ELT > & | src | ) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | const Base & | v | ) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | const BaseNeg & | v | ) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | int | m, |
int | n | ||
) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | int | m, |
int | n, | ||
const ELT * | cppInitialValuesByRow | ||
) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | int | m, |
int | n, | ||
const ELT & | initialValue | ||
) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | int | m, |
int | n, | ||
int | leadingDim, | ||
const S * | data | ||
) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | int | m, |
int | n, | ||
int | leadingDim, | ||
S * | data | ||
) | [inline] |
SimTK::Matrix_< ELT >::Matrix_ | ( | const Mat< M, N, ELT, CS, RS > & | mat | ) | [inline, explicit] |
Matrix_& SimTK::Matrix_< ELT >::operator= | ( | const Matrix_< ELT > & | src | ) | [inline] |
Matrix_& SimTK::Matrix_< ELT >::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 SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator= | ( | const MatrixBase< EE > & | m | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator+= | ( | const MatrixBase< EE > & | m | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator-= | ( | const MatrixBase< EE > & | m | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator*= | ( | const StdNumber & | t | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator/= | ( | const StdNumber & | t | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
Matrix_& SimTK::Matrix_< ELT >::operator+= | ( | const ELT & | r | ) | [inline] |
Matrix_& SimTK::Matrix_< ELT >::operator-= | ( | const ELT & | r | ) | [inline] |
const TNeg& SimTK::Matrix_< ELT >::negate | ( | ) | const [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
TNeg& SimTK::Matrix_< ELT >::updNegate | ( | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
const TNeg& SimTK::Matrix_< ELT >::operator- | ( | ) | const [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
TNeg& SimTK::Matrix_< ELT >::operator- | ( | ) | [inline] |
Reimplemented from SimTK::MatrixBase< ELT >.
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.