|
dune-istl 2.11
|
A generic dynamic dense matrix. More...
#include <dune/istl/matrix.hh>
Public Types | |
| using | field_type = typename Imp::BlockTraits< T >::field_type |
| Export the type representing the underlying field. | |
| typedef T | block_type |
| Export the type representing the components. | |
| typedef A | allocator_type |
| Export the allocator. | |
| typedef MatrixImp::DenseMatrixBase< T, A >::window_type | row_type |
| The type implementing a matrix row. | |
| typedef A::size_type | size_type |
| Type for indices and sizes. | |
| typedef MatrixImp::DenseMatrixBase< T, A >::Iterator | RowIterator |
| Iterator over the matrix rows. | |
| typedef row_type::iterator | ColIterator |
| Iterator for the entries of each row. | |
| typedef MatrixImp::DenseMatrixBase< T, A >::ConstIterator | ConstRowIterator |
| Const iterator over the matrix rows. | |
| typedef row_type::const_iterator | ConstColIterator |
| Const iterator for the entries of each row. | |
Public Member Functions | |
| Matrix () | |
| Create empty matrix. | |
| Matrix (size_type rows, size_type cols) | |
| Create uninitialized matrix of size rows x cols. | |
| void | setSize (size_type rows, size_type cols) |
| Change the matrix size. | |
| RowIterator | begin () |
| Get iterator to first row. | |
| RowIterator | end () |
| Get iterator to one beyond last row. | |
| RowIterator | beforeEnd () |
| RowIterator | beforeBegin () |
| ConstRowIterator | begin () const |
| Get const iterator to first row. | |
| ConstRowIterator | end () const |
| Get const iterator to one beyond last row. | |
| ConstRowIterator | beforeEnd () const |
| ConstRowIterator | beforeBegin () const |
| Matrix & | operator= (const field_type &t) |
| Assignment from scalar. | |
| row_type | operator[] (size_type row) |
| The index operator. | |
| const row_type | operator[] (size_type row) const |
| The const index operator. | |
| size_type | N () const |
| Return the number of rows. | |
| size_type | M () const |
| Return the number of columns. | |
| Matrix< T > & | operator*= (const field_type &scalar) |
| Multiplication with a scalar. | |
| Matrix< T > & | operator/= (const field_type &scalar) |
| Division by a scalar. | |
| Matrix & | operator+= (const Matrix &b) |
| Add the entries of another matrix to this one. | |
| Matrix & | operator-= (const Matrix &b) |
| Subtract the entries of another matrix from this one. | |
| Matrix | transpose () const |
| Return the transpose of the matrix. | |
| template<class X , class Y > | |
| void | mv (const X &x, Y &y) const |
| y = A x | |
| template<class X , class Y > | |
| void | mtv (const X &x, Y &y) const |
| y = A^T x | |
| template<class X , class Y > | |
| void | umv (const X &x, Y &y) const |
| y += A x | |
| template<class X , class Y > | |
| void | mmv (const X &x, Y &y) const |
| y -= A x | |
| template<class X , class Y > | |
| void | usmv (const field_type &alpha, const X &x, Y &y) const |
| \( y += \alpha A x \) | |
| template<class X , class Y > | |
| void | umtv (const X &x, Y &y) const |
| y += A^T x | |
| template<class X , class Y > | |
| void | mmtv (const X &x, Y &y) const |
| y -= A^T x | |
| template<class X , class Y > | |
| void | usmtv (const field_type &alpha, const X &x, Y &y) const |
| y += alpha A^T x | |
| template<class X , class Y > | |
| void | umhv (const X &x, Y &y) const |
| y += A^H x | |
| template<class X , class Y > | |
| void | mmhv (const X &x, Y &y) const |
| y -= A^H x | |
| template<class X , class Y > | |
| void | usmhv (const field_type &alpha, const X &x, Y &y) const |
| y += alpha A^H x | |
| FieldTraits< field_type >::real_type | frobenius_norm () const |
| frobenius norm: sqrt(sum over squared values of entries) | |
| FieldTraits< field_type >::real_type | frobenius_norm2 () const |
| square of frobenius norm, need for block recursion | |
| template<typename ft = field_type, typename std::enable_if<!HasNaN< ft >::value, int >::type = 0> | |
| FieldTraits< ft >::real_type | infinity_norm () const |
| infinity norm (row sum norm, how to generalize for blocks?) | |
| template<typename ft = field_type, typename std::enable_if<!HasNaN< ft >::value, int >::type = 0> | |
| FieldTraits< ft >::real_type | infinity_norm_real () const |
| simplified infinity norm (uses Manhattan norm for complex values) | |
| template<typename ft = field_type, typename std::enable_if< HasNaN< ft >::value, int >::type = 0> | |
| FieldTraits< ft >::real_type | infinity_norm () const |
| infinity norm (row sum norm, how to generalize for blocks?) | |
| template<typename ft = field_type, typename std::enable_if< HasNaN< ft >::value, int >::type = 0> | |
| FieldTraits< ft >::real_type | infinity_norm_real () const |
| simplified infinity norm (uses Manhattan norm for complex values) | |
| bool | exists (size_type i, size_type j) const |
| return true if (i,j) is in pattern | |
Protected Attributes | |
| MatrixImp::DenseMatrixBase< T, A > | data_ |
| Abuse DenseMatrixBase as an engine for a 2d array ISTL-style. | |
| size_type | cols_ |
| Number of columns of the matrix. | |
Friends | |
| Matrix< T > | operator* (const Matrix< T > &m1, const Matrix< T > &m2) |
| Generic matrix multiplication. | |
| template<class X , class Y > | |
| Y | operator* (const Matrix< T > &m, const X &vec) |
| Generic matrix-vector multiplication. | |
Detailed Description
class Dune::Matrix< T, A >
A generic dynamic dense matrix.
Member Typedef Documentation
◆ allocator_type
| typedef A Dune::Matrix< T, A >::allocator_type |
Export the allocator.
◆ block_type
| typedef T Dune::Matrix< T, A >::block_type |
Export the type representing the components.
◆ ColIterator
| typedef row_type::iterator Dune::Matrix< T, A >::ColIterator |
Iterator for the entries of each row.
◆ ConstColIterator
| typedef row_type::const_iterator Dune::Matrix< T, A >::ConstColIterator |
Const iterator for the entries of each row.
◆ ConstRowIterator
| typedef MatrixImp::DenseMatrixBase<T,A>::ConstIterator Dune::Matrix< T, A >::ConstRowIterator |
Const iterator over the matrix rows.
◆ field_type
| using Dune::Matrix< T, A >::field_type = typename Imp::BlockTraits<T>::field_type |
Export the type representing the underlying field.
◆ row_type
| typedef MatrixImp::DenseMatrixBase<T,A>::window_type Dune::Matrix< T, A >::row_type |
The type implementing a matrix row.
◆ RowIterator
| typedef MatrixImp::DenseMatrixBase<T,A>::Iterator Dune::Matrix< T, A >::RowIterator |
Iterator over the matrix rows.
◆ size_type
| typedef A::size_type Dune::Matrix< T, A >::size_type |
Type for indices and sizes.
Constructor & Destructor Documentation
◆ Matrix() [1/2]
|
inline |
Create empty matrix.
◆ Matrix() [2/2]
|
inline |
Create uninitialized matrix of size rows x cols.
Member Function Documentation
◆ beforeBegin() [1/2]
|
inline |
- Returns
- an iterator that is positioned before the first row of the matrix.
◆ beforeBegin() [2/2]
|
inline |
- Returns
- an iterator that is positioned before the first row if the matrix.
◆ beforeEnd() [1/2]
|
inline |
- Returns
- an iterator that is positioned before the end iterator of the rows, i.e. at the last row.
◆ beforeEnd() [2/2]
|
inline |
- Returns
- an iterator that is positioned before the end iterator of the rows. i.e. at the last row.
◆ begin() [1/2]
|
inline |
Get iterator to first row.
◆ begin() [2/2]
|
inline |
Get const iterator to first row.
◆ end() [1/2]
|
inline |
Get iterator to one beyond last row.
◆ end() [2/2]
|
inline |
Get const iterator to one beyond last row.
◆ exists()
|
inline |
return true if (i,j) is in pattern
◆ frobenius_norm()
|
inline |
frobenius norm: sqrt(sum over squared values of entries)
◆ frobenius_norm2()
|
inline |
square of frobenius norm, need for block recursion
◆ infinity_norm() [1/2]
|
inline |
infinity norm (row sum norm, how to generalize for blocks?)
◆ infinity_norm() [2/2]
|
inline |
infinity norm (row sum norm, how to generalize for blocks?)
◆ infinity_norm_real() [1/2]
|
inline |
simplified infinity norm (uses Manhattan norm for complex values)
◆ infinity_norm_real() [2/2]
|
inline |
simplified infinity norm (uses Manhattan norm for complex values)
◆ M()
|
inline |
Return the number of columns.
◆ mmhv()
|
inline |
y -= A^H x
◆ mmtv()
|
inline |
y -= A^T x
◆ mmv()
|
inline |
y -= A x
◆ mtv()
|
inline |
y = A^T x
◆ mv()
|
inline |
y = A x
◆ N()
|
inline |
Return the number of rows.
◆ operator*=()
|
inline |
Multiplication with a scalar.
◆ operator+=()
|
inline |
Add the entries of another matrix to this one.
- Parameters
-
b The matrix to add to this one. Its size has to be the same as the size of this matrix.
◆ operator-=()
|
inline |
Subtract the entries of another matrix from this one.
- Parameters
-
b The matrix to subtract from this one. Its size has to be the same as the size of this matrix.
◆ operator/=()
|
inline |
Division by a scalar.
◆ operator=()
|
inline |
Assignment from scalar.
◆ operator[]() [1/2]
|
inline |
The index operator.
◆ operator[]() [2/2]
|
inline |
The const index operator.
◆ setSize()
|
inline |
Change the matrix size.
The way the data is handled is unpredictable.
◆ transpose()
|
inline |
Return the transpose of the matrix.
◆ umhv()
|
inline |
y += A^H x
◆ umtv()
|
inline |
y += A^T x
◆ umv()
|
inline |
y += A x
◆ usmhv()
|
inline |
y += alpha A^H x
◆ usmtv()
|
inline |
y += alpha A^T x
◆ usmv()
|
inline |
\( y += \alpha A x \)
Friends And Related Symbol Documentation
◆ operator* [1/2]
|
friend |
Generic matrix-vector multiplication.
◆ operator* [2/2]
|
friend |
Generic matrix multiplication.
Member Data Documentation
◆ cols_
|
protected |
Number of columns of the matrix.
In general you can extract the same information from the data_ member. However if you want to be able to properly handle 0xn matrices then you need a separate member.
◆ data_
|
protected |
Abuse DenseMatrixBase as an engine for a 2d array ISTL-style.
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8