Jpp test-rotations-new
the software that should make you happy
|
NxN matrix. More...
#include <JMatrixND.hh>
Public Member Functions | |
JMatrixND () | |
Default constructor. | |
JMatrixND (const size_t size) | |
Constructor. | |
JMatrixND (const JMatrixND &A) | |
Copy constructor. | |
JMatrixND (JMatrixND &&A) | |
Move constructor. | |
JMatrixND & | operator= (const JMatrixND &A) |
Assignment operator. | |
JMatrixND & | operator= (JMatrixND &&A) |
Move assignment operator. | |
void | resize (const size_t size) |
Resize matrix. | |
JMatrixND & | reset () |
Set matrix to the null matrix. | |
JMatrixND & | setIdentity () |
Set to identity matrix. | |
JMatrixND & | negate () |
Negate matrix. | |
JMatrixND & | add (const JMatrixND &A) |
Matrix addition. | |
JMatrixND & | sub (const JMatrixND &A) |
Matrix subtraction. | |
JMatrixND & | mul (const double factor) |
Scale matrix. | |
JMatrixND & | div (const double factor) |
Scale matrix. | |
JMatrixND & | mul (const JMatrixND &A, const JMatrixND &B) |
Matrix multiplication. | |
bool | equals (const JMatrixND &A, const double eps=std::numeric_limits< double >::min()) const |
Equality. | |
bool | isIdentity (const double eps=std::numeric_limits< double >::min()) const |
Test identity. | |
bool | isSymmetric (const double eps=std::numeric_limits< double >::min()) const |
Test symmetry. | |
double | getDot (const JVectorND &v) const |
Get dot product. | |
void | clear () |
Clear memory. | |
void | set (const JMatrixND_t &A) |
Set matrix. | |
void | swap (JMatrixND_t &A) |
Swap matrices. | |
JMatrixND_t & | transpose () |
Transpose. | |
size_t | size () const |
Get dimension of matrix. | |
size_t | capacity () const |
Get capacity of dimension. | |
bool | empty () const |
Check emptyness. | |
const double * | data () const |
Get pointer to data. | |
double * | data () |
Get pointer to data. | |
const double * | operator[] (size_t row) const |
Get row data. | |
double * | operator[] (size_t row) |
Get row data. | |
double | operator() (const size_t row, const size_t col) const |
Get matrix element. | |
double & | operator() (const size_t row, const size_t col) |
Get matrix element. | |
double | at (size_t row, size_t col) const |
Get matrix element. | |
double & | at (size_t row, size_t col) |
Get matrix element. | |
JMatrixND & | mul (const JSecond_t &object) |
Multiply with object. | |
Protected Member Functions | |
JMatrixND_t & | getInstance () |
Get work space. | |
void | rswap (size_t r1, size_t r2) |
void | cswap (size_t c1, size_t c2) |
Swap columns. | |
Protected Attributes | |
JMatrixND_t | ws |
double * | __p |
pointer to data | |
size_t | __n |
dimension of matrix | |
size_t | __m |
capacity of matrix | |
Friends | |
JReader & | operator>> (JReader &in, JMatrixND &A) |
Read matrix from input. | |
JWriter & | operator<< (JWriter &out, const JMatrixND &A) |
Write matrix to output. | |
std::ostream & | operator<< (std::ostream &out, const JMatrixND &A) |
Print ASCII formatted output. | |
NxN matrix.
Definition at line 348 of file JMatrixND.hh.
|
inline |
|
inline |
Constructor.
The matrix is set to zero.
size | dimension |
Definition at line 384 of file JMatrixND.hh.
|
inline |
Copy constructor.
A | matrix |
Definition at line 396 of file JMatrixND.hh.
|
inline |
Move constructor.
A | matrix |
Definition at line 407 of file JMatrixND.hh.
|
inlineprotected |
|
inline |
Resize matrix.
Note that this method does not maintain data in the matrix.
size | dimension |
Definition at line 446 of file JMatrixND.hh.
|
inline |
Set matrix to the null matrix.
Definition at line 459 of file JMatrixND.hh.
|
inline |
|
inline |
Negate matrix.
Definition at line 493 of file JMatrixND.hh.
Matrix addition.
A | matrix |
Definition at line 511 of file JMatrixND.hh.
Matrix subtraction.
A | matrix |
Definition at line 536 of file JMatrixND.hh.
|
inline |
Scale matrix.
factor | factor |
Definition at line 561 of file JMatrixND.hh.
|
inline |
Scale matrix.
factor | factor |
Definition at line 579 of file JMatrixND.hh.
Matrix multiplication.
A | matrix |
B | matrix |
Definition at line 598 of file JMatrixND.hh.
|
inline |
Equality.
A | matrix |
eps | numerical precision |
Definition at line 695 of file JMatrixND.hh.
|
inline |
Test identity.
eps | numerical precision |
Definition at line 726 of file JMatrixND.hh.
|
inline |
Test symmetry.
eps | numerical precision |
Definition at line 751 of file JMatrixND.hh.
|
inline |
Get dot product.
The dot product corresponds to
.
v | vector |
Definition at line 773 of file JMatrixND.hh.
|
inlineprotected |
Definition at line 873 of file JMatrixND.hh.
|
inlineprotected |
Swap columns.
c1 | column |
c2 | column |
Definition at line 891 of file JMatrixND.hh.
|
inlineinherited |
Clear memory.
Definition at line 83 of file JMatrixND.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get row data.
row | row number |
Definition at line 258 of file JMatrixND.hh.
|
inlineinherited |
Get row data.
row | row number |
Definition at line 270 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 283 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 296 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 309 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 327 of file JMatrixND.hh.
|
inlineinherited |
Read matrix from input.
in | reader |
A | matrix |
Definition at line 801 of file JMatrixND.hh.
Write matrix to output.
out | writer |
A | matrix |
Definition at line 826 of file JMatrixND.hh.
|
friend |
Print ASCII formatted output.
out | output stream |
A | matrix |
Definition at line 847 of file JMatrixND.hh.
|
protected |
Definition at line 354 of file JMatrixND.hh.
|
protectedinherited |
pointer to data
Definition at line 339 of file JMatrixND.hh.
|
protectedinherited |
dimension of matrix
Definition at line 340 of file JMatrixND.hh.
|
protectedinherited |
capacity of matrix
Definition at line 341 of file JMatrixND.hh.