#include <kronecker_matrix.h>
Public Types | |
typedef Vector< C >::size_type | size_type |
type of indexes and size type (cf. STL containers) | |
Public Member Functions | |
KroneckerMatrix (const MATRIX1 &A, const MATRIX2 &B, const double factor=1.0) | |
default constructor from A and B | |
KroneckerMatrix (const KroneckerMatrix< C, MATRIX1, MATRIX2 > &M) | |
copy constructor | |
MatrixBlock< C > * | clone () const |
clone the Kronecker matrix (requirement from MatrixBlock) | |
MatrixBlock< C > * | clone_transposed () const |
transpose the Kronecker matrix (requirement from MatrixBlock) | |
const size_type | row_dimension () const |
row dimension | |
const size_type | column_dimension () const |
column dimension | |
bool | empty () const |
return true if matrix is empty (cf. STL containers) | |
const C | operator() (const size_type row, const size_type column) const |
read-only access to a matrix entry | |
const C | get_entry (const size_type row, const size_type column) const |
read-only access to a matrix entry | |
template<class VECTOR > | |
void | apply (const VECTOR &x, VECTOR &Mx) const |
void | apply (const Vector< C > &x, Vector< C > &Mx) const |
special version for Vector<C> (requirement from MatrixBlock) | |
template<class VECTOR > | |
void | apply_transposed (const VECTOR &x, VECTOR &Mtx) const |
void | apply_transposed (const Vector< C > &x, Vector< C > &Mtx) const |
special version for Vector<C> (requirement from MatrixBlock) | |
void | print (std::ostream &os, const unsigned int tabwidth=10, const unsigned int precision=3) const |
Protected Attributes | |
MATRIX1 | A |
MATRIX2 | B |
C | factor_ |
This class models finite matrices stemming from a Kronecker product kron(A,B) = (a_{1,1}B ... a_{1,n}B) (. ) (a_{m,1}B ... a_{m,n}B) of two (arbitrary) matrices A and B. The entries of M stem from an arbitrary (scalar) class C.
void MathTL::KroneckerMatrix< C, MATRIX1, MATRIX2 >::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::KroneckerMatrix< C, MATRIX1, MATRIX2 >::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
void MathTL::KroneckerMatrix< C, MATRIX1, MATRIX2 >::print | ( | std::ostream & | os, |
const unsigned int | tabwidth = 10 , |
||
const unsigned int | precision = 3 |
||
) | const [virtual] |
stream output with user-defined tabwidth and precision (cf. deal.II)
Implements MathTL::MatrixBlock< C >.