|
finitediff
|
Represent a square numerical matrix. More...
#include <SNline.h>


Public Member Functions | |
| SNmatrix () | |
| SNmatrix (const SNmatrix< T, tp_size > &) | |
| SNmatrix (const SNgeneric< T, tp_size > &) | |
| SNmatrix (const T &x) | |
| T | max_norm () const |
| SNelement< T, tp_size > | getElement (m_num line, m_num col) const |
| void | swapLines (m_num l1, m_num l2) |
swap the lines l1 and l2. More... | |
| SNplu< T, tp_size > | getPLU () const |
Public Member Functions inherited from SNgeneric< T, tp_size > | |
| virtual unsigned int | getSize () const final |
| virtual T & | at (const m_num, const m_num) final |
| virtual T | get (const m_num, const m_num) const final |
| virtual SNline< T, tp_size > | getSNline (m_num l) const |
| template<class V , unsigned int s> | |
| void | subtract (const SNgeneric< V, s > &) |
| template<class V , unsigned int s> | |
| void | subtract (const SNgaussian< V, s > &) |
| SNgaussian< T, tp_size > | getGaussian (const m_num c) const |
| template<class V , unsigned int s> | |
| bool | isNumericallyEqual (const SNgeneric< V, s > &A, const double &epsilon) const |
Private Member Functions | |
| SNelement< T, tp_size > | getLargerUnder (m_num f_line, m_num col) const |
| void | lineMinusLine (m_num line, SNline< T, tp_size > v) |
| SNelement< T, tp_size > | getLargerOnColumn (m_num col) const |
| SNelement< T, tp_size > | getLargerUnderDiagonal (m_num col) const |
| SNline< T, tp_size > | gaussEliminationLine (m_num line) |
| T & | _at (const m_num, const m_num) override |
| T | _get (const m_num, const m_num) const override |
| void | _set_from (const SNgeneric< T, tp_size > &) |
| void | set_identity () |
Private Attributes | |
| std::array< T, tp_size *tp_size > | data |
| unsigned int | size =tp_size |
Friends | |
| template<class U , unsigned int s, class V , unsigned int t> | |
| bool | operator== (const SNmatrix< U, s > &, const SNmatrix< V, t > &) |
| template<class U , unsigned int s, class V , unsigned int t> | |
| SNmatrix< U, s > | operator+ (const SNmatrix< U, s > &A, const SNmatrix< V, t > &B) |
| std::array< T, tp_size *tp_size > | SNupperTriangular (const SNmatrix< T, tp_size > &) const |
| std::array< T, tp_size *tp_size > | SNlowerTriangular (const SNmatrix< T, tp_size > &) const |
Represent a square numerical matrix.
This is a template class that represents a fixed size square numerical matrix (SN=Square Numerical).
T is the type of values contained in the matrix. This is expected to be a numeric type in the sense that it has to accept comparison, absolute value (from cmath) and other operations like that.tp_size is the size of the matrix.NOTE : if you want the identity matrix, there is the SNidentity class.
For creating a matrix knowing its elements, be best way is to do something like
Notice that the elements are numbered from 0 to tp_size-1. Not from 1.
| SNmatrix< T, tp_size >::SNmatrix | ( | const SNmatrix< T, tp_size > & | snm | ) |
| SNmatrix< T, tp_size >::SNmatrix | ( | const SNgeneric< T, tp_size > & | A | ) |
Construct a SNmatrix as copy of a generic matrix. Here we copy every elements.
Creates a matrix full of x
|
overrideprivatevirtual |
Return by reference the requested element of the matrix
Implements SNgeneric< T, tp_size >.
|
overrideprivatevirtual |
Return by value the requested element of the matrix
Implements SNgeneric< T, tp_size >.
|
private |
Set the matrix from another one
|
private |
| SNelement< T, tp_size > SNmatrix< T, tp_size >::getElement | ( | m_num | line, |
| m_num | col | ||
| ) | const |
|
private |
|
private |
the larger element on column 'col' under (or on) the line 'f_line'.
|
private |
| SNplu< T, tp_size > SNmatrix< T, tp_size >::getPLU | ( | ) | const |
return the PLU decomposition as a SNplu object.
|
private |
| T SNmatrix< T, tp_size >::max_norm | ( | ) | const |
|
private |
| void SNmatrix< T, tp_size >::swapLines | ( | m_num | l1, |
| m_num | l2 | ||
| ) |
swap the lines l1 and l2.
|
friend |
Sum of two SNmatrix.
The return type is the one of the left argument. THUS : this is not totally commutative. You may have
|
friend |
|
friend |
|
friend |
|
private |
|
private |
1.8.11