10 #ifndef __INCLUDE_LIN_OP_HPP__
11 #define __INCLUDE_LIN_OP_HPP__
17 template <
class MATRIX >
22 template <
class VEC >
24 VEC y( image_size() );
30 template <
class VEC1,
class VEC2 >
31 void mult(
const VEC1 & x, VEC2 & y)
const {
36 template <
class VEC1,
class VEC2,
class VEC3 >
37 void residuum(
const VEC1 & x,
const VEC2 & b, VEC3 & y)
const {
40 axpy_prod(A,-x,y,
false);
43 std::size_t image_size()
const {
47 std::size_t preimage_size()
const {
52 LinOp(MATRIX
const & matrix) : A(matrix) { }
void residuum(const VEC1 &x, const VEC2 &b, VEC3 &y) const
compute y <- b - Ax
Definition: lin_op.hpp:37
LinOp(MATRIX const &matrix)
constructor from a matrix
Definition: lin_op.hpp:52
VEC operator()(const VEC &x) const
general operator interface
Definition: lin_op.hpp:23
a matrix based linear operator mapping a vector x (preimage) to a vector y (image).
Definition: lin_op.hpp:18
void mult(const VEC1 &x, VEC2 &y) const
compute y <- Ax
Definition: lin_op.hpp:31