Simbody
3.6
|
This is the matrix class intended to appear in user code for large, variable size matrices. More...
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_. More... | |
Matrix_ & | operator= (const ELT &v) |
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- () |
std::string | toString () const |
toString() returns a string representation of the Matrix_. More... | |
const ELT & | get (int i, int j) const |
Variant of indexing operator that's scripting friendly to get entry (i, j) More... | |
void | set (int i, int j, const ELT &value) |
Variant of indexing operator that's scripting friendly to set entry (i, j) More... | |
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 E > | |
void | writeUnformatted (std::ostream &o, const Matrix_< E > &v) |
Raw serialization of Vector_<E>; same as VectorBase<E>. More... | |
template<class E > | |
bool | fillUnformatted (std::istream &in, Matrix_< E > &v) |
Read in new values for a Matrix without changing its size, from a stream of whitespace-separated tokens with no other formatting recognized. More... | |
template<class E > | |
bool | readUnformatted (std::istream &in, Matrix_< E > &v) |
NOT IMPLEMENTED: read variable-size Matrix recognizing newlines as end of row; use fillUnformatted() instead. More... | |
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). More... | |
This is the matrix class intended to appear in user code for large, variable size matrices.
More commonly, the typedef Matrix is used instead; that is just an abbreviation for Matrix_<Real>
.
A Matrix_ can be a fixed-size view of someone else's data, or can be a resizable data owner itself.
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
toString() returns a string representation of the Matrix_.
Please refer to operator<< for details.
|
inline |
Variant of indexing operator that's scripting friendly to get entry (i, j)
|
inline |
Variant of indexing operator that's scripting friendly to set entry (i, j)
Raw serialization of Vector_<E>; same as VectorBase<E>.
Read in new values for a Matrix without changing its size, from a stream of whitespace-separated tokens with no other formatting recognized.
Newlines in the input have no special meaning – we'll read them as whitespace. It is an error if there aren't enough elements.
NOT IMPLEMENTED: read variable-size Matrix recognizing newlines as end of row; use fillUnformatted() instead.
|
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.