#include <qs_matrix.h>
Public Types | |
typedef Vector< C >::size_type | size_type |
Public Member Functions | |
PeriodicQuasiStationaryMatrix (const int j0, const int offset, const Array1D< C > &band, const double factor=1.0) | |
PeriodicQuasiStationaryMatrix < C > & | operator= (const PeriodicQuasiStationaryMatrix< C > &M) |
assignment | |
const size_type | row_dimension () const |
const size_type | column_dimension () const |
void | set_level (const int j) const |
const C | get_entry (const size_type row, const size_type column) const |
void | to_sparse (SparseMatrix< C > &S) const |
template<class VECTOR > | |
void | apply (const VECTOR &x, VECTOR &Mx, const size_type x_offset=0, const size_type Mx_offset=0, const bool add_to=false) const |
template<class VECTOR > | |
void | apply_transposed (const VECTOR &x, VECTOR &Mtx, const size_type x_offset=0, const size_type Mtx_offset=0, const bool add_to=false) const |
void | print (std::ostream &os, const unsigned int tabwidth=8, const unsigned int precision=3) const |
Protected Attributes | |
int | j0_ |
int | offset_ |
int | j_ |
Array1D< C > | band_ |
double | factor_ |
This class models quasi-stationary matrices like M_{j,0}, M_{j,1} or their dual counterparts for periodic bases. The dimensions are hence always 2^{j+1} times 2^j. Internally, we assume at the moment that the corresponding non-periodic filter (a_k) has a nonpositive offset (starting index) and a length < 2^(j0+1), which is the case for the primal and dual CDF generator and wavelet filters.
typedef Vector<C>::size_type MathTL::PeriodicQuasiStationaryMatrix< C >::size_type |
type of indexes and size type (cf. STL containers)
MathTL::PeriodicQuasiStationaryMatrix< C >::PeriodicQuasiStationaryMatrix | ( | const int | j0, |
const int | offset, | ||
const Array1D< C > & | band, | ||
const double | factor = 1.0 |
||
) |
constructor from the matrix ingredients j0 : coarsest level offset : offset for the band, i.e., band[i] corresponds to a(i+offset) band : band (will be (2^j)-periodized internally factor : constant pre-factor
void MathTL::PeriodicQuasiStationaryMatrix< C >::apply | ( | const VECTOR & | x, |
VECTOR & | Mx, | ||
const size_type | x_offset = 0 , |
||
const size_type | Mx_offset = 0 , |
||
const bool | add_to = false |
||
) | const |
matrix-vector multiplication Mx = (*this) * x; it is possible to specify an offset which parts of the vectors shall be used, thus enabling in-place algorithms, the flag "add_to" toggles whether the result is added to Mx (true) or Mx is overwritten (false)
void MathTL::PeriodicQuasiStationaryMatrix< C >::apply_transposed | ( | const VECTOR & | x, |
VECTOR & | Mtx, | ||
const size_type | x_offset = 0 , |
||
const size_type | Mtx_offset = 0 , |
||
const bool | add_to = false |
||
) | const |
transposed matrix-vector multiplication Mtx = (*this)^T * x; again potentially with offsets for both input and output vector and with an "add_to" flag
const size_type MathTL::PeriodicQuasiStationaryMatrix< C >::column_dimension | ( | ) | const [inline] |
column dimension
const C MathTL::PeriodicQuasiStationaryMatrix< C >::get_entry | ( | const size_type | row, |
const size_type | column | ||
) | const |
read-only access to a single matrix entry
void MathTL::PeriodicQuasiStationaryMatrix< C >::print | ( | std::ostream & | os, |
const unsigned int | tabwidth = 8 , |
||
const unsigned int | precision = 3 |
||
) | const |
stream output with user-defined tabwidth and precision (cf. deal.II)
const size_type MathTL::PeriodicQuasiStationaryMatrix< C >::row_dimension | ( | ) | const [inline] |
row dimension
void MathTL::PeriodicQuasiStationaryMatrix< C >::set_level | ( | const int | j | ) | const |
set level j
void MathTL::PeriodicQuasiStationaryMatrix< C >::to_sparse | ( | SparseMatrix< C > & | S | ) | const |
construct a sparse matrix