33 #ifndef MATRIX_DIAGONAL_H_
34 #define MATRIX_DIAGONAL_H_
42 template <
typename M,
typename X,
typename Y = X>
65 virtual void init(
const X& u)
74 virtual void apply(Y& f,
const X& u)
77 for(
size_t i=0; i<A.num_rows(); i++)
85 for(
size_t i=0; i<A.num_rows(); i++)
94 template <
typename M,
typename X,
typename Y = X>
126 virtual void apply(Y& f,
const X& u)
129 for(
size_t i=0; i<A.num_rows(); i++)
138 for(
size_t i=0; i<A.num_rows(); i++)
Definition: smart_pointer.h:108
describes a linear mapping X->Y
Definition: linear_operator.h:80
Definition: matrix_diagonal.h:45
Y codomain_function_type
Definition: matrix_diagonal.h:51
virtual void init(const X &u)
init operator depending on a function u
Definition: matrix_diagonal.h:65
SmartPtr< mo_type > m_mo
Definition: matrix_diagonal.h:57
MatrixOperator< M, X, Y > mo_type
Definition: matrix_diagonal.h:55
X domain_function_type
Definition: matrix_diagonal.h:48
M matrix_type
Definition: matrix_diagonal.h:54
virtual void apply(Y &f, const X &u)
Definition: matrix_diagonal.h:74
MatrixDiagonal(SmartPtr< mo_type > mo)
Definition: matrix_diagonal.h:60
virtual void init()
init operator
Definition: matrix_diagonal.h:71
virtual void apply_sub(Y &f, const X &u)
Definition: matrix_diagonal.h:82
Definition: matrix_diagonal.h:97
Y codomain_function_type
Definition: matrix_diagonal.h:103
virtual void apply(Y &f, const X &u)
Definition: matrix_diagonal.h:126
MatrixDiagonalInverse(SmartPtr< mo_type > mo)
Definition: matrix_diagonal.h:112
virtual void apply_sub(Y &f, const X &u)
Definition: matrix_diagonal.h:134
virtual void init(const X &u)
init operator depending on a function u
Definition: matrix_diagonal.h:117
SmartPtr< mo_type > m_mo
Definition: matrix_diagonal.h:109
virtual void init()
init operator
Definition: matrix_diagonal.h:123
M matrix_type
Definition: matrix_diagonal.h:106
MatrixOperator< M, X, Y > mo_type
Definition: matrix_diagonal.h:107
X domain_function_type
Definition: matrix_diagonal.h:100
Definition: matrix_operator.h:49
bool InverseMatMult(number &dest, const double &beta, const TMat &mat, const TVec &vec)
you can implement this function with GetInverse and MatMult
T value_type
Definition: sparsematrix_interface.h:2