|
finitediff
|
#include <SNgaussian.h>


Public Member Functions | |
| SNgaussian () | |
| template<class U , unsigned int s> | |
| SNgaussian (const SNgeneric< U, s > &A, const m_num &c=0) | |
| SNgaussian< T, tp_size > | inverse () const |
| void | setColumn (const m_num &col) |
| m_num | getColumn () 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 | |
| SpecialValue< T > | checkForSpecialElements (const m_num &i, const m_num &j) const |
| template<class U , unsigned int s> | |
| void | populate_from (const SNgeneric< U, s > &) |
| SNgaussian (const std::array< T, tp_size > &d, const m_num &c) | |
| T | _get (m_num, m_num) const override |
| T & | _at (m_num, m_num) override |
Private Attributes | |
| std::array< T, tp_size > | data |
| m_num | data_column |
This represents a gaussian matrix.
A gaussian matrix is the multiplicative matrix which serves to eliminate a column under the diagonal.
Let
be a matrix and
be an index. Let
. The gaussian matrix for
on the index
is full of zeros except for
on the diagonal
on position
when
.That is there is something non trivial only on the column
, under the diagonal.
TODO : giving 'c' as a template argument, one can in average spare half of the memory by allowing 'c' as size in 'data' instead of 'tp_size'.
|
private |
Construct a matrix from its data. See the implementation of '_at'
| SNgaussian< T, tp_size >::SNgaussian | ( | ) |
The non-parameter constructor initializes the member data_column to tp_size+1 (which is impossible). This is checked by the function _at so that you cannot populate the matrix before to initialize.
use setColumn()
| SNgaussian< T, tp_size >::SNgaussian | ( | const SNgeneric< U, s > & | A, |
| const m_num & | c = 0 |
||
| ) |
Construct a gaussian matrix from a generic one by
Default column is zero. So
will produce the gaussian matrix of E for its first column (first=number zero) provided the type and size of E are compatible with "double" and zero.
|
overrideprivatevirtual |
The elements are stored in std::array<T,tp_size> data while the matrix only contains non fixed values on one column, under the diagonal.
First element of data stores the first non fixed value. Example for a gaussian matrix on column 1 :

Only the first (tp_size-c-1) elements of 'data' are used.
Implements SNgeneric< T, tp_size >.
|
overrideprivatevirtual |
Return by value the requested element of the matrix
Implements SNgeneric< T, tp_size >.
|
private |
checkForSpecialElements(i,j) checks for element (i,j). If this is a special element (a one whose value is fixed by the fact that we are a gaussian matrix) then it returns a 'SpecialValue<T>' with its boolean part set to true, meaning that this is a special value. In that case :
If this is not a special value, it returns a 'SpecialValue<T>' with boolean part set to false. In that case :
| m_num SNgaussian< T, tp_size >::getColumn | ( | ) | const |
| SNgaussian< T, tp_size > SNgaussian< T, tp_size >::inverse | ( | ) | const |
|
private |
| void SNgaussian< T, tp_size >::setColumn | ( | const m_num & | col | ) |
Set the number of the line on which one has non trivial elements.
|
private |
|
private |
1.8.11