|
Jpp
17.1.1
the software that should make you happy
|
NxN matrix. More...
#include <JMatrixND.hh>
Public Types | |
| typedef T | data_type |
Public Member Functions | |
| JMatrixND () | |
| Default constructor. More... | |
| JMatrixND (const size_t size) | |
| Constructor. More... | |
| JMatrixND (const JMatrixND &A) | |
| Copy constructor. More... | |
| JMatrixND (JMatrixND &&A) | |
| Move constructor. More... | |
| JMatrixND & | operator= (const JMatrixND &A) |
| Assignment operator. More... | |
| JMatrixND & | operator= (JMatrixND &&A) |
| Move assignment operator. More... | |
| void | resize (const size_t size) |
| Resize matrix. More... | |
| JMatrixND & | reset () |
| Set matrix to the null matrix. More... | |
| JMatrixND & | setIdentity () |
| Set to identity matrix. More... | |
| JMatrixND & | negate () |
| Negate matrix. More... | |
| JMatrixND & | add (const JMatrixND &A) |
| Matrix addition. More... | |
| JMatrixND & | sub (const JMatrixND &A) |
| Matrix subtraction. More... | |
| JMatrixND & | mul (const double factor) |
| Scale matrix. More... | |
| JMatrixND & | div (const double factor) |
| Scale matrix. More... | |
| JMatrixND & | mul (const JMatrixND &A, const JMatrixND &B) |
| Matrix multiplication. More... | |
| bool | equals (const JMatrixND &A, const double eps=std::numeric_limits< double >::min()) const |
| Equality. More... | |
| bool | isIdentity (const double eps=std::numeric_limits< double >::min()) const |
| Test identity. More... | |
| bool | isSymmetric (const double eps=std::numeric_limits< double >::min()) const |
| Test symmetry. More... | |
| double | getDot (const JVectorND &v) const |
| Get dot product. More... | |
| void | clear () |
| Clear memory. More... | |
| void | set (const JMatrixND_t &A) |
| Set matrix. More... | |
| void | swap (JMatrixND_t &A) |
| Swap matrices. More... | |
| JMatrixND_t & | transpose () |
| Transpose. More... | |
| size_t | size () const |
| Get dimension of matrix. More... | |
| size_t | capacity () const |
| Get capacity of dimension. More... | |
| bool | empty () const |
| Check emptyness. More... | |
| const double * | data () const |
| Get pointer to data. More... | |
| double * | data () |
| Get pointer to data. More... | |
| const double * | operator[] (size_t row) const |
| Get row data. More... | |
| double * | operator[] (size_t row) |
| Get row data. More... | |
| double | operator() (const size_t row, const size_t col) const |
| Get matrix element. More... | |
| double & | operator() (const size_t row, const size_t col) |
| Get matrix element. More... | |
| double | at (size_t row, size_t col) const |
| Get matrix element. More... | |
| double & | at (size_t row, size_t col) |
| Get matrix element. More... | |
| JMatrixND & | mul (const JNullType &object) |
| Multiply with object. More... | |
Static Public Member Functions | |
| static data_type & | getInstance () |
| Get unique instance of template class. More... | |
Protected Member Functions | |
| void | rswap (size_t r1, size_t r2) |
| void | cswap (size_t c1, size_t c2) |
| Swap columns. More... | |
Protected Attributes | |
| double * | __p |
| pointer to data More... | |
| size_t | __n |
| dimension of matrix More... | |
| size_t | __m |
| capacity of matrix More... | |
Friends | |
| JReader & | operator>> (JReader &in, JMatrixND &A) |
| Read matrix from input. More... | |
| JWriter & | operator<< (JWriter &out, const JMatrixND &A) |
| Write matrix to output. More... | |
| std::ostream & | operator<< (std::ostream &out, const JMatrixND &A) |
| Print ASCII formatted output. More... | |
NxN matrix.
Definition at line 327 of file JMatrixND.hh.
|
inherited |
Definition at line 20 of file JSingleton.hh.
|
inline |
|
inline |
Constructor.
The matrix is set to zero.
| size | dimension |
Definition at line 348 of file JMatrixND.hh.
|
inline |
|
inline |
|
inline |
Resize matrix.
Note that this method does not maintain data in the matrix.
| size | dimension |
Definition at line 410 of file JMatrixND.hh.
|
inline |
Set matrix to the null matrix.
Definition at line 423 of file JMatrixND.hh.
|
inline |
Set to identity matrix.
Definition at line 448 of file JMatrixND.hh.
|
inline |
Negate matrix.
Definition at line 465 of file JMatrixND.hh.
Matrix addition.
| A | matrix |
Definition at line 483 of file JMatrixND.hh.
Matrix subtraction.
| A | matrix |
Definition at line 506 of file JMatrixND.hh.
|
inline |
Scale matrix.
| factor | factor |
Definition at line 531 of file JMatrixND.hh.
|
inline |
Scale matrix.
| factor | factor |
Definition at line 549 of file JMatrixND.hh.
Matrix multiplication.
| A | matrix |
| B | matrix |
Definition at line 568 of file JMatrixND.hh.
|
inline |
Equality.
| A | matrix |
| eps | numerical precision |
Definition at line 665 of file JMatrixND.hh.
|
inline |
Test identity.
| eps | numerical precision |
Definition at line 696 of file JMatrixND.hh.
|
inline |
Test symmetry.
| eps | numerical precision |
Definition at line 721 of file JMatrixND.hh.
|
inline |
Get dot product.
The dot product corresponds to
.
| v | vector |
Definition at line 743 of file JMatrixND.hh.
|
inlineprotected |
Definition at line 843 of file JMatrixND.hh.
|
inlineprotected |
Swap columns.
| c1 | column |
| c2 | column |
Definition at line 859 of file JMatrixND.hh.
|
inlineinherited |
|
inlineinherited |
Set matrix.
| A | matrix |
Definition at line 134 of file JMatrixND.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get row data.
| row | row number |
Definition at line 237 of file JMatrixND.hh.
|
inlineinherited |
Get row data.
| row | row number |
Definition at line 249 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
| row | row number |
| col | column number |
Definition at line 262 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
| row | row number |
| col | column number |
Definition at line 275 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
| row | row number |
| col | column number |
Definition at line 288 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
| row | row number |
| col | column number |
Definition at line 306 of file JMatrixND.hh.
|
inlinestaticinherited |
|
inlineinherited |
Multiply with object.
| object | object |
Definition at line 357 of file JMath.hh.
Read matrix from input.
| in | reader |
| A | matrix |
Definition at line 771 of file JMatrixND.hh.
Write matrix to output.
| out | writer |
| A | matrix |
Definition at line 796 of file JMatrixND.hh.
|
friend |
Print ASCII formatted output.
| out | output stream |
| A | matrix |
Definition at line 817 of file JMatrixND.hh.
|
protectedinherited |
pointer to data
Definition at line 318 of file JMatrixND.hh.
|
protectedinherited |
dimension of matrix
Definition at line 319 of file JMatrixND.hh.
|
protectedinherited |
capacity of matrix
Definition at line 320 of file JMatrixND.hh.
1.8.5