1 #ifndef SimTK_SIMMATRIX_MATRIX_H_ 2 #define SimTK_SIMMATRIX_MATRIX_H_ 51 template <
class ELT>
class Matrix_ :
public MatrixBase<ELT> {
59 typedef MatrixBase<ELT> Base;
60 typedef MatrixBase<ENeg> BaseNeg;
61 typedef MatrixBase<EHerm> BaseHerm;
63 typedef MatrixView_<ELT> TView;
64 typedef Matrix_<ENeg> TNeg;
93 Matrix_(
int m,
int n,
const ELT* cppInitialValuesByRow)
95 Matrix_(
int m,
int n,
const ELT& initialValue)
98 Matrix_(
int m,
int n,
int leadingDim,
const S* data)
101 Matrix_(
int m,
int n,
int leadingDim, S* data)
106 template <
int M,
int N,
int CS,
int RS>
109 {
for (
int i = 0; i < M; ++i)
110 for (
int j = 0; j < N; ++j)
111 this->
updElt(i, j) = mat(i, j); }
136 std::stringstream stream;
141 const ELT&
get(
int i,
int j)
const {
return this->
getElt(i,j); }
143 void set(
int i,
int j,
const ELT& value) { this->
updElt(i,j)=value; }
151 #endif // SimTK_SIMMATRIX_MATRIX_H_ Matrix_(const MatrixCommitment &mc)
Definition: Matrix_.h:68
Matrix_(int m, int n, int leadingDim, S *data)
Definition: Matrix_.h:101
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
Matrix_ & operator=(const ELT &v)
Definition: Matrix_.h:113
Matrix_ & operator/=(const StdNumber &t)
Definition: Matrix_.h:123
K::Scalar Scalar
Definition: CompositeNumericalTypes.h:160
A MatrixCharacter is a set containing a value for each of the matrix characteristics except element t...
Definition: MatrixCharacteristics.h:597
TNeg & operator-()
Definition: Matrix_.h:131
std::string toString() const
toString() returns a string representation of the Matrix_.
Definition: Matrix_.h:135
MatrixBase & operator/=(const StdNumber &t)
Definition: MatrixBase.h:290
ELT & updElt(int i, int j)
Definition: MatrixBase.h:656
Matrix_ & operator-=(const MatrixBase< EE > &m)
Definition: Matrix_.h:119
Matrix_ & operator+=(const MatrixBase< EE > &m)
Definition: Matrix_.h:117
Matrix_(int m, int n)
Definition: Matrix_.h:91
MatrixBase & operator-=(const MatrixBase &r)
Definition: MatrixBase.h:292
MatrixBase & operator*=(const StdNumber &t)
Definition: MatrixBase.h:289
Matrix_(const BaseNeg &v)
Definition: Matrix_.h:85
Matrix_ & operator=(const MatrixBase< EE > &m)
Definition: Matrix_.h:115
Matrix_ & operator*=(const StdNumber &t)
Definition: Matrix_.h:122
Matrix_(int m, int n, int leadingDim, const S *data)
Definition: Matrix_.h:98
Matrix_ & operator=(const Matrix_ &src)
Definition: Matrix_.h:75
VectorView_< ELT > updDiag()
Select main diagonal (of largest leading square if rectangular) and return it as a writable view of t...
Definition: BigMatrix.h:245
Matrix_(const Mat< M, N, ELT, CS, RS > &mat)
Convert a Mat to a Matrix_.
Definition: Matrix_.h:107
EStdNumber StdNumber
Definition: MatrixBase.h:99
Matrix_()
Definition: Matrix_.h:67
This is the matrix class intended to appear in user code for large, variable size matrices...
Definition: BigMatrix.h:168
Matrix_(const Base &v)
Definition: Matrix_.h:81
MatrixBase & operator+=(const MatrixBase &r)
Definition: MatrixBase.h:291
K::StdNumber StdNumber
Definition: CompositeNumericalTypes.h:163
const TNeg & operator-() const
Definition: Matrix_.h:130
const ELT & getElt(int i, int j) const
Element selection for stored elements.
Definition: MatrixBase.h:655
Matrix_ & operator-=(const ELT &r)
Definition: Matrix_.h:125
Matrix_(int m, int n, const ELT &initialValue)
Definition: Matrix_.h:95
MatrixBase & operator=(const MatrixBase &b)
Definition: MatrixBase.h:200
K::TNeg TNeg
Definition: CompositeNumericalTypes.h:139
Matrix_ & operator+=(const ELT &r)
Definition: Matrix_.h:124
Matrix_(int m, int n, const ELT *cppInitialValuesByRow)
Definition: Matrix_.h:93
A MatrixCommitment provides a set of acceptable matrix characteristics.
Definition: MatrixCharacteristics.h:832
TNeg & updNegate()
Definition: Matrix_.h:128
This class represents a small matrix whose size is known at compile time, containing elements of any ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:620
const TNeg & negate() const
Definition: Matrix_.h:127
K::Number Number
Definition: CompositeNumericalTypes.h:162
K::THerm THerm
Definition: CompositeNumericalTypes.h:144
Matrix_(const Matrix_ &src)
Definition: Matrix_.h:71