represents a linear equation in an arbitrary vector space with a black-box operator More...
#include <Linear_equation.hpp>
Public Member Functions | |
virtual int | n_vecs ()=0 |
number of vectors this object provides access to (including 0 and 1) | |
virtual void | scale (int output, int input, double scalar)=0 |
scales vector input by scalar and writes the result to vector output | |
virtual void | add (int output, double coef0, int vec0, double coef1, int vec1)=0 |
assigns \( z = ax + by \) where \( z, a, x, b, y \) are given by the arguments in order | |
virtual double | inner (int input0, int input1)=0 |
returns the inner product of the two vectors specified by the inputs | |
double | norm (int input) |
norm induced by inner() | |
virtual void | matvec (int output, int input)=0 |
computes the product of the operator \( A \) with vector input and writes it to output . | |
represents a linear equation in an arbitrary vector space with a black-box operator
represents an equation of the form \( Ax = b \). This object manages (or has access to) storage for some number of vectors indexed 0 to n_vecs()
. The member functions of this class provide basic vector operations including addition, scalar multiplication, and inner products as well as matvec()
to compute matrix-vector products. Derived classes may also implement other ways to access the vector values. Vector 0 is the current best estimate for the solution \( x \) and vector 1 is the right hand side \( b \). All other vectors are available for solver algorithms to use.
|
pure virtual |
assigns \( z = ax + by \) where \( z, a, x, b, y \) are given by the arguments in order
Implemented in hexed::Dense_equation.
|
pure virtual |
returns the inner product of the two vectors specified by the inputs
Implemented in hexed::Dense_equation.
|
pure virtual |
computes the product of the operator \( A \) with vector input
and writes it to output
.
Implemented in hexed::Dense_equation.
|
pure virtual |
number of vectors this object provides access to (including 0 and 1)
Implemented in hexed::Dense_equation.
|
pure virtual |
scales vector input
by scalar
and writes the result to vector output
Implemented in hexed::Dense_equation.