#include <tridiagonal_matrix.h>
Public Types | |
| typedef Vector< C >::size_type | size_type |
Public Member Functions | |
| TridiagonalMatrix (const size_type n=1) | |
| TridiagonalMatrix (const TridiagonalMatrix< C > &M) | |
| const size_type | row_dimension () const |
| const size_type | column_dimension () const |
| const size_type | size () const |
| void | resize (const size_type rows) |
| const size_type | memory_consumption () const |
| bool | empty () const |
| const C | operator() (const size_type row, const size_type column) const |
| const C | get_entry (const size_type row, const size_type column) const |
| C & | operator() (const size_type row, const size_type column) |
| void | set_entry (const size_type row, const size_type column, const C value) |
| template<class C2 > | |
| bool | operator== (const TridiagonalMatrix< C2 > &M) const |
| template<class C2 > | |
| bool | operator!= (const TridiagonalMatrix< C2 > &M) const |
| TridiagonalMatrix< C > & | operator= (const TridiagonalMatrix< C > &M) |
| template<class VECTOR > | |
| void | apply (const VECTOR &x, VECTOR &Mx) const |
| template<class VECTOR > | |
| void | apply_transposed (const VECTOR &x, VECTOR &Mtx) const |
| void | print (std::ostream &os, const unsigned int tabwidth=5, const unsigned int precision=2) const |
Protected Attributes | |
| Vector< C > | a_ |
| Vector< C > | b_ |
| Vector< C > | c_ |
| size_type | rowdim_ |
This class models tridiagonal matrices M = (m_{i,j})_{0<=i,j<n} with entries from an arbitrary (scalar) class C, designed for numerical computations.
Internally, the entries are stored as three vectors.
| typedef Vector<C>::size_type MathTL::TridiagonalMatrix< C >::size_type |
type of indexes and size type (cf. STL containers)
| MathTL::TridiagonalMatrix< C >::TridiagonalMatrix | ( | const size_type | n = 1 | ) | [explicit] |
default constructor, yields zero tridiagonal matrix which is 1x1 by default
| MathTL::TridiagonalMatrix< C >::TridiagonalMatrix | ( | const TridiagonalMatrix< C > & | M | ) |
copy constructor
| void MathTL::TridiagonalMatrix< C >::apply | ( | const VECTOR & | x, |
| VECTOR & | Mx | ||
| ) | const |
matrix-vector multiplication Mx = (*this) * x; we assume that the vector Mx has the correct size and is not identical to x
| void MathTL::TridiagonalMatrix< C >::apply_transposed | ( | const VECTOR & | x, |
| VECTOR & | Mtx | ||
| ) | const |
transposed matrix-vector multiplication Mtx = (*this)^T * x; we assume that the vector Mtx has the correct size and is not identical to x
| const TridiagonalMatrix< C >::size_type MathTL::TridiagonalMatrix< C >::column_dimension | ( | ) | const [inline] |
column dimension
| bool MathTL::TridiagonalMatrix< C >::empty | ( | ) | const [inline] |
return true if matrix is empty (cf. STL containers)
| const C MathTL::TridiagonalMatrix< C >::get_entry | ( | const size_type | row, |
| const size_type | column | ||
| ) | const [inline] |
read-only access to a matrix entry
| const TridiagonalMatrix< C >::size_type MathTL::TridiagonalMatrix< C >::memory_consumption | ( | ) | const [inline] |
(estimate for the) memory consumption in bytes
| bool MathTL::TridiagonalMatrix< C >::operator!= | ( | const TridiagonalMatrix< C2 > & | M | ) | const [inline] |
non-equality test
| const C MathTL::TridiagonalMatrix< C >::operator() | ( | const size_type | row, |
| const size_type | column | ||
| ) | const [inline] |
read-only access to a matrix entry
| C & MathTL::TridiagonalMatrix< C >::operator() | ( | const size_type | row, |
| const size_type | column | ||
| ) | [inline] |
read-write access to a matrix entry
| TridiagonalMatrix< C > & MathTL::TridiagonalMatrix< C >::operator= | ( | const TridiagonalMatrix< C > & | M | ) |
assignment from another tridiagonal matrix
| bool MathTL::TridiagonalMatrix< C >::operator== | ( | const TridiagonalMatrix< C2 > & | M | ) | const |
equality test with another matrix
| void MathTL::TridiagonalMatrix< C >::print | ( | std::ostream & | os, |
| const unsigned int | tabwidth = 5, |
||
| const unsigned int | precision = 2 |
||
| ) | const |
stream output with user-defined tabwidth and precision (cf. deal.II)
| void MathTL::TridiagonalMatrix< C >::resize | ( | const size_type | rows | ) |
resize matrix and initialize with zero
| const TridiagonalMatrix< C >::size_type MathTL::TridiagonalMatrix< C >::row_dimension | ( | ) | const [inline] |
row dimension
| void MathTL::TridiagonalMatrix< C >::set_entry | ( | const size_type | row, |
| const size_type | column, | ||
| const C | value | ||
| ) | [inline] |
write access to a matrix entry
| const TridiagonalMatrix< C >::size_type MathTL::TridiagonalMatrix< C >::size | ( | ) | const [inline] |
size as an STL-compatible container for matrix entries
Vector<C> MathTL::TridiagonalMatrix< C >::a_ [protected] |
a: lower diagonal b: main diagonal c. upper diagonal
size_type MathTL::TridiagonalMatrix< C >::rowdim_ [protected] |
row dimension == column dimension
1.7.6.1