Jpp
|
N x N symmetric matrix. More...
#include <JMatrixNS.hh>
Public Types | |
typedef std::vector < std::vector< double > > | matrix_type |
typedef matrix_type::const_iterator | const_row_type |
typedef std::vector< double > ::const_iterator | const_col_type |
typedef matrix_type::iterator | row_type |
typedef std::vector< double > ::iterator | col_type |
Public Member Functions | |
JMatrixNS () | |
Default constructor. More... | |
JMatrixNS (const unsigned int size) | |
Constructor (identity matrix). More... | |
JMatrixNS (const JMatrixND &A) | |
Contructor. More... | |
void | invert () |
Invert matrix. More... | |
void | update (const unsigned int k, const double extra) |
Update inverted matrix at given diagonal element. More... | |
void | resize (const size_t size) |
Resize matrix. 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... | |
double | operator() (size_t row, size_t col) const |
Get matrix element. More... | |
double & | operator() (size_t row, size_t col) |
Get matrix element. More... | |
JMatrixND & | reset () |
Set matrix to the null matrix. More... | |
JMatrixND & | setIdentity () |
Set to identity matrix. More... | |
JMatrixND & | transpose () |
Transpose. 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 & | mul (const JMatrixND &A, const JMatrixND &B) |
Matrix multiplication. More... | |
JMatrixND & | mul (const JNullType &object) |
Multiply with object. More... | |
JMatrixND & | div (const double factor) |
Scale matrix. 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... | |
double | getDeterminant () const |
Get determinant of matrix. More... | |
bool | isPositiveDefinite () const |
Test positive definiteness. More... | |
const bool | isPositiveSemiDefinite () const |
Test positive semi-definiteness. More... | |
N x N symmetric matrix.
Definition at line 26 of file JMatrixNS.hh.
|
inherited |
Definition at line 44 of file JMatrixND.hh.
|
inherited |
Definition at line 46 of file JMatrixND.hh.
|
inherited |
Definition at line 47 of file JMatrixND.hh.
|
inherited |
Definition at line 49 of file JMatrixND.hh.
|
inherited |
Definition at line 50 of file JMatrixND.hh.
|
inline |
|
inline |
|
inline |
|
inline |
Invert matrix.
Definition at line 61 of file JMatrixNS.hh.
|
inline |
Update inverted matrix at given diagonal element.
If A is the original matrix and A' is such that for each (i,j) != (k,k):
A'[i][j] = A[i][j] A'[k][k] = A[k][k] + extra
then JMatrixNS::update(k, extra) will modify the already inverted matrix of A such that it will be the inverse of A'.
k | index of diagonal element |
extra | value to add |
Definition at line 208 of file JMatrixNS.hh.
|
inlineinherited |
Resize matrix.
Note that this method resets the matrix.
size | dimension |
Definition at line 98 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 120 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 133 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 146 of file JMatrixND.hh.
|
inlineinherited |
Get matrix element.
row | row number |
col | column number |
Definition at line 159 of file JMatrixND.hh.
|
inlineinherited |
|
inlineinherited |
Set to identity matrix.
Definition at line 187 of file JMatrixND.hh.
|
inlineinherited |
Transpose.
Definition at line 207 of file JMatrixND.hh.
|
inlineinherited |
Matrix addition.
A | matrix |
Definition at line 242 of file JMatrixND.hh.
Matrix subtraction.
A | matrix |
Definition at line 266 of file JMatrixND.hh.
|
inlineinherited |
Scale matrix.
factor | factor |
Definition at line 290 of file JMatrixND.hh.
Matrix multiplication.
A | matrix |
B | matrix |
Definition at line 327 of file JMatrixND.hh.
|
inlineinherited |
Multiply with object.
object | object |
Definition at line 273 of file JMath.hh.
|
inlineinherited |
Scale matrix.
factor | factor |
Definition at line 308 of file JMatrixND.hh.
|
inlineinherited |
Equality.
A | matrix |
eps | numerical precision |
Definition at line 361 of file JMatrixND.hh.
|
inlineinherited |
Test identity.
eps | numerical precision |
Definition at line 388 of file JMatrixND.hh.
|
inlineinherited |
Get determinant of matrix.
Definition at line 412 of file JMatrixND.hh.
|
inlineinherited |
Test positive definiteness.
Definition at line 433 of file JMatrixND.hh.
|
inlineinherited |
Test positive semi-definiteness.
Definition at line 454 of file JMatrixND.hh.