|
dune-common
2.7.1
|
A diagonal matrix of static size. More...
#include <dune/common/diagonalmatrix.hh>
Public Types | |
| enum | { blocklevel = 1 } |
| We are at the leaf of the block recursion. More... | |
| enum | { rows = n , cols = n } |
| export size More... | |
| typedef K | value_type |
| export the type representing the field More... | |
| typedef value_type | field_type |
| typedef K | block_type |
| export the type representing the components More... | |
| typedef std::size_t | size_type |
| The type used for the index access and size operations. More... | |
| typedef DiagonalRowVector< K, n > | row_type |
| Each row is implemented by a field vector. More... | |
| typedef row_type | reference |
| typedef row_type | row_reference |
| typedef DiagonalRowVectorConst< K, n > | const_row_type |
| typedef const_row_type | const_reference |
| typedef const_row_type | const_row_reference |
| typedef ContainerWrapperIterator< const WrapperType, reference, reference > | Iterator |
| Iterator class for sequential access. More... | |
| typedef Iterator | iterator |
| typedef for stl compliant access More... | |
| typedef Iterator | RowIterator |
| rename the iterators for easier access More... | |
| typedef row_type::Iterator | ColIterator |
| rename the iterators for easier access More... | |
| typedef ContainerWrapperIterator< const WrapperType, const_reference, const_reference > | ConstIterator |
| Iterator class for sequential access. More... | |
| typedef ConstIterator | const_iterator |
| typedef for stl compliant access More... | |
| typedef ConstIterator | ConstRowIterator |
| rename the iterators for easier access More... | |
| typedef const_row_type::ConstIterator | ConstColIterator |
| rename the iterators for easier access More... | |
Public Member Functions | |
| size_type | size () const |
| constexpr | DiagonalMatrix ()=default |
| Default constructor. More... | |
| DiagonalMatrix (const K &k) | |
| Constructor initializing the whole matrix with a scalar. More... | |
| DiagonalMatrix (const FieldVector< K, n > &diag) | |
| Constructor initializing the diagonal with a vector. More... | |
| DiagonalMatrix (std::initializer_list< K > const &l) | |
| Construct diagonal matrix from an initializer list. More... | |
| DiagonalMatrix & | operator= (const K &k) |
| Assignment from a scalar. More... | |
| bool | identical (const DiagonalMatrix< K, n > &other) const |
| Check if matrix is the same object as the other matrix. More... | |
| Iterator | begin () |
| begin iterator More... | |
| Iterator | end () |
| end iterator More... | |
| Iterator | beforeEnd () |
| Iterator | beforeBegin () |
| ConstIterator | begin () const |
| begin iterator More... | |
| ConstIterator | end () const |
| end iterator More... | |
| ConstIterator | beforeEnd () const |
| ConstIterator | beforeBegin () const |
| DiagonalMatrix & | operator+= (const DiagonalMatrix &y) |
| vector space addition More... | |
| DiagonalMatrix & | operator-= (const DiagonalMatrix &y) |
| vector space subtraction More... | |
| DiagonalMatrix & | operator+= (const K &k) |
| vector space multiplication with scalar More... | |
| DiagonalMatrix & | operator-= (const K &k) |
| vector space division by scalar More... | |
| DiagonalMatrix & | operator*= (const K &k) |
| vector space multiplication with scalar More... | |
| DiagonalMatrix & | operator/= (const K &k) |
| vector space division by scalar More... | |
| bool | operator== (const DiagonalMatrix &other) const |
| comparison operator More... | |
| bool | operator!= (const DiagonalMatrix &other) const |
| incomparison operator More... | |
| template<class X , class Y > | |
| void | mv (const X &x, Y &y) const |
| y = A x More... | |
| template<class X , class Y > | |
| void | mtv (const X &x, Y &y) const |
| y = A^T x More... | |
| template<class X , class Y > | |
| void | umv (const X &x, Y &y) const |
| y += A x More... | |
| template<class X , class Y > | |
| void | umtv (const X &x, Y &y) const |
| y += A^T x More... | |
| template<class X , class Y > | |
| void | umhv (const X &x, Y &y) const |
| y += A^H x More... | |
| template<class X , class Y > | |
| void | mmv (const X &x, Y &y) const |
| y -= A x More... | |
| template<class X , class Y > | |
| void | mmtv (const X &x, Y &y) const |
| y -= A^T x More... | |
| template<class X , class Y > | |
| void | mmhv (const X &x, Y &y) const |
| y -= A^H x More... | |
| template<class X , class Y > | |
| void | usmv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const |
| y += alpha A x More... | |
| template<class X , class Y > | |
| void | usmtv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const |
| y += alpha A^T x More... | |
| template<class X , class Y > | |
| void | usmhv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const |
| y += alpha A^H x More... | |
| double | frobenius_norm () const |
| frobenius norm: sqrt(sum over squared values of entries) More... | |
| double | frobenius_norm2 () const |
| square of frobenius norm, need for block recursion More... | |
| double | infinity_norm () const |
| infinity norm (row sum norm, how to generalize for blocks?) More... | |
| double | infinity_norm_real () const |
| simplified infinity norm (uses Manhattan norm for complex values) More... | |
| template<class V > | |
| void | solve (V &x, const V &b) const |
| Solve system A x = b. More... | |
| void | invert () |
| Compute inverse. More... | |
| K | determinant () const |
| calculates the determinant of this matrix More... | |
| size_type | N () const |
| number of blocks in row direction More... | |
| size_type | M () const |
| number of blocks in column direction More... | |
| bool | exists (size_type i, size_type j) const |
| return true when (i,j) is in pattern More... | |
| reference | operator[] (size_type i) |
| Return reference object as row replacement. More... | |
| const_reference | operator[] (size_type i) const |
| Return const_reference object as row replacement. More... | |
| const K & | diagonal (size_type i) const |
| Get const reference to diagonal entry. More... | |
| K & | diagonal (size_type i) |
| Get reference to diagonal entry. More... | |
| const FieldVector< K, n > & | diagonal () const |
| Get const reference to diagonal vector. More... | |
| FieldVector< K, n > & | diagonal () |
| Get reference to diagonal vector. More... | |
A diagonal matrix of static size.
This is meant to be a replacement of FieldMatrix for the case that it is a diagonal matrix.
| K | Type used for scalars |
| n | Matrix size |