Basic NxN matrix.
More...
#include <JMatrixND.hh>
Basic NxN matrix.
Definition at line 35 of file JMatrixND.hh.
◆ data_type
◆ JMatrixND_t()
JMATH::JMatrixND_t::JMatrixND_t |
( |
| ) |
|
|
inline |
◆ ~JMatrixND_t()
JMATH::JMatrixND_t::~JMatrixND_t |
( |
| ) |
|
|
inline |
◆ clear()
void JMATH::JMatrixND_t::clear |
( |
| ) |
|
|
inline |
◆ resize()
void JMATH::JMatrixND_t::resize |
( |
const size_t |
size | ) |
|
|
inline |
Resize matrix.
Note that this method does not maintain data in the matrix.
- Parameters
-
Definition at line 79 of file JMatrixND.hh.
93 THROW(JNewException,
"JMatrixND::resize(" <<
size <<
"): Memory allocation failure.");
◆ set()
◆ swap()
◆ transpose()
Transpose.
- Returns
- this matrix
Definition at line 135 of file JMatrixND.hh.
139 for (
size_t row = 0; row != this->
size(); ++row) {
140 for (
size_t col = 0; col != row; ++col) {
141 swap((*
this)(row,col), (*
this)(col,row));
◆ size()
size_t JMATH::JMatrixND_t::size |
( |
| ) |
const |
|
inline |
Get dimension of matrix.
- Returns
- dimension
Definition at line 154 of file JMatrixND.hh.
◆ capacity()
size_t JMATH::JMatrixND_t::capacity |
( |
| ) |
const |
|
inline |
Get capacity of dimension.
- Returns
- capacity
Definition at line 165 of file JMatrixND.hh.
◆ empty()
bool JMATH::JMatrixND_t::empty |
( |
| ) |
const |
|
inline |
Check emptyness.
- Returns
- true if empty; else false
Definition at line 176 of file JMatrixND.hh.
◆ data() [1/2]
const double* JMATH::JMatrixND_t::data |
( |
| ) |
const |
|
inline |
Get pointer to data.
- Returns
- pointer to data.
Definition at line 187 of file JMatrixND.hh.
◆ data() [2/2]
double* JMATH::JMatrixND_t::data |
( |
| ) |
|
|
inline |
Get pointer to data.
- Returns
- pointer to data.
Definition at line 198 of file JMatrixND.hh.
◆ operator[]() [1/2]
const double* JMATH::JMatrixND_t::operator[] |
( |
size_t |
row | ) |
const |
|
inline |
Get row data.
- Parameters
-
- Returns
- pointer to row data
Definition at line 210 of file JMatrixND.hh.
◆ operator[]() [2/2]
double* JMATH::JMatrixND_t::operator[] |
( |
size_t |
row | ) |
|
|
inline |
Get row data.
- Parameters
-
- Returns
- pointer to row data
Definition at line 222 of file JMatrixND.hh.
◆ operator()() [1/2]
double JMATH::JMatrixND_t::operator() |
( |
const size_t |
row, |
|
|
const size_t |
col |
|
) |
| const |
|
inline |
Get matrix element.
- Parameters
-
row | row number |
col | column number |
- Returns
- matrix element at (row,col)
Definition at line 235 of file JMatrixND.hh.
237 return *(
__p + row*
__n + col);
◆ operator()() [2/2]
double& JMATH::JMatrixND_t::operator() |
( |
const size_t |
row, |
|
|
const size_t |
col |
|
) |
| |
|
inline |
Get matrix element.
- Parameters
-
row | row number |
col | column number |
- Returns
- matrix element at (row,col)
Definition at line 248 of file JMatrixND.hh.
250 return *(
__p + row*
__n + col);
◆ at() [1/2]
double JMATH::JMatrixND_t::at |
( |
size_t |
row, |
|
|
size_t |
col |
|
) |
| const |
|
inline |
Get matrix element.
- Parameters
-
row | row number |
col | column number |
- Returns
- matrix element at (row,col)
Definition at line 261 of file JMatrixND.hh.
263 if (row >= this->
size() ||
264 col >= this->
size()) {
265 THROW(JIndexOutOfRange,
"JMatrixND::at(" << row <<
"," << col <<
"): index out of range.");
268 return (*
this)(row, col);
◆ at() [2/2]
double& JMATH::JMatrixND_t::at |
( |
size_t |
row, |
|
|
size_t |
col |
|
) |
| |
|
inline |
Get matrix element.
- Parameters
-
row | row number |
col | column number |
- Returns
- matrix element at (row,col)
Definition at line 279 of file JMatrixND.hh.
281 if (row >= this->
size() ||
282 col >= this->
size()) {
283 THROW(JIndexOutOfRange,
"JMatrixND::at(" << row <<
"," << col <<
"): index out of range.");
286 return (*
this)(row, col);
◆ getInstance()
Get unique instance of template class.
- Returns
- object
Definition at line 27 of file JSingleton.hh.
◆ __p
double* JMATH::JMatrixND_t::__p |
|
protected |
◆ __n
size_t JMATH::JMatrixND_t::__n |
|
protected |
◆ __m
size_t JMATH::JMatrixND_t::__m |
|
protected |
The documentation for this struct was generated from the following file: