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 Matrix_<ELT> T;
64 typedef MatrixView_<ELT> TView;
65 typedef Matrix_<ENeg> TNeg;
94 Matrix_(
int m,
int n,
const ELT* cppInitialValuesByRow)
99 Matrix_(
int m,
int n,
int leadingDim,
const S* data)
107 template <
int M,
int N,
int CS,
int RS>
110 {
for (
int i = 0; i < M; ++i)
111 for (
int j = 0; j < N; ++j)
112 this->
updElt(i, j) = mat(i, j); }
128 const TNeg&
negate()
const {
return *
reinterpret_cast<const TNeg*
>(
this); }
129 TNeg&
updNegate() {
return *
reinterpret_cast<TNeg*
>(
this); }
137 std::stringstream stream;
142 const ELT&
get(
int i,
int j)
const {
return this->
getElt(i,j); }
144 void set(
int i,
int j,
const ELT& value) { this->
updElt(i,j)=value; }
152 #endif // SimTK_SIMMATRIX_MATRIX_H_ Matrix_(const MatrixCommitment &mc)
Definition: Matrix_.h:69
Matrix_(int m, int n, int leadingDim, S *data)
Definition: Matrix_.h:102
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:114
Matrix_ & operator/=(const StdNumber &t)
Definition: Matrix_.h:124
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:132
MatrixBase & operator/=(const StdNumber &t)
Definition: MatrixBase.h:291
ELT & updElt(int i, int j)
Definition: MatrixBase.h:657
Matrix_ & operator-=(const MatrixBase< EE > &m)
Definition: Matrix_.h:120
Matrix_ & operator+=(const MatrixBase< EE > &m)
Definition: Matrix_.h:118
Matrix_(int m, int n)
Definition: Matrix_.h:92
std::string toString() const
toString() returns a string representation of the Matrix_.
Definition: Matrix_.h:136
MatrixBase & operator-=(const MatrixBase &r)
Definition: MatrixBase.h:293
MatrixBase & operator*=(const StdNumber &t)
Definition: MatrixBase.h:290
Matrix_(const BaseNeg &v)
Definition: Matrix_.h:86
m
Definition: CMakeCache.txt:469
Matrix_ & operator=(const MatrixBase< EE > &m)
Definition: Matrix_.h:116
Matrix_ & operator*=(const StdNumber &t)
Definition: Matrix_.h:123
Matrix_(int m, int n, int leadingDim, const S *data)
Definition: Matrix_.h:99
Matrix_ & operator=(const Matrix_ &src)
Definition: Matrix_.h:76
аЯ рЁБ с ўџ З Й ўџџџ Г Д Е Ж џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџьЅС ј П ч bjbjcTcT кй Г У Л t џџ џџ џџ З С K K K D џџџџ 2 ZЦ j J a n u a r A b s t r a c t W e d e s c r i b e t h e g o a l s a n d d e s i g n d e c i s i o n b e h i n d S i m m a t r i t h e S i m T K m a t r i x a n d l i n e a r a l g e b r a l i b r a r a n d p r o v i d e r e f e r e n c e i n f o r m a t i o n f o r u s i n g i t T h e i d e a i s t o p r o v i d e t h e p o w e r
Definition: Simmatrix.doc:7
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:108
const ELT & getElt(int i, int j) const
Element selection for stored elements.
Definition: MatrixBase.h:656
Matrix_()
Definition: Matrix_.h:68
const TNeg & negate() const
Definition: Matrix_.h:128
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:82
MatrixBase & operator+=(const MatrixBase &r)
Definition: MatrixBase.h:292
K::StdNumber StdNumber
Definition: CompositeNumericalTypes.h:163
gјiЌтkDdёMV wfлaIJуtюц ЩAАйЉtџ1Л JљcA nrш S qо isІ3 уЏ ЇжЇ Ы ТгVфЦKф C д9Z У ЉD Ўq FxnЙцТ n єT ЉY Н< щ['ЖjdЛ< K JvTMЯH"ЋяОsђЫw>}љіo_Йљ
ЗoЖЃ?Ї zџШЎ'z:mЄІуЧV$ќКРyЁnаgЭџiлИJ{и хЩїTaК*АдdКВE|lєzbXс@!^РклѕгOЌoi_г=ўінOП}&кХВQUV
ЅWTshЃ!ГљPЌ_ЊЕС7ЅDRAVъfЎвЪПЈЛЅbOждЙЩЋtЎ0оY!О|л'ђЉx'ўУГ§нЅК:/ўќПќ V[ц,тЇо}-Bж§Ъ/ПјиџіЌм;у:х;яОй;IюЫПЇой[nK4Ћ#ІЁ-Б='ЈGf\lЙчѕb41лЉ> ѓйOчsчЂ7x f p§ъZzB рI рЮ gЊБЁ Њ n
Definition: SimmathUserGuide.doc:2262
const TNeg & operator-() const
Definition: Matrix_.h:131
Matrix_ & operator-=(const ELT &r)
Definition: Matrix_.h:126
Matrix_(int m, int n, const ELT &initialValue)
Definition: Matrix_.h:96
MatrixBase & operator=(const MatrixBase &b)
Definition: MatrixBase.h:201
K::TNeg TNeg
Definition: CompositeNumericalTypes.h:139
Matrix_ & operator+=(const ELT &r)
Definition: Matrix_.h:125
Matrix_(int m, int n, const ELT *cppInitialValuesByRow)
Definition: Matrix_.h:94
A MatrixCommitment provides a set of acceptable matrix characteristics.
Definition: MatrixCharacteristics.h:832
TNeg & updNegate()
Definition: Matrix_.h:129
This class represents a small matrix whose size is known at compile time, containing elements of any ...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:607
This is the common base class for Simbody's Vector_ and Matrix_ classes for handling large...
Definition: BigMatrix.h:163
K::Number Number
Definition: CompositeNumericalTypes.h:162
K::THerm THerm
Definition: CompositeNumericalTypes.h:144
Matrix_(const Matrix_ &src)
Definition: Matrix_.h:72