hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Dense_equation Class Reference

equation in \( \mathbb{R}^n \) with a dense matrix More...

#include <Linear_equation.hpp>

Inheritance diagram for hexed::Dense_equation:
hexed::Linear_equation

Public Member Functions

 Dense_equation (Mat< dyn, dyn > matrix, Mat<> rhs, int nv)
 constructs an equation from \( A \) and \( b \) with an optional initial guess (otherwise defaults to the zero vector)
 
 Dense_equation (Mat< dyn, dyn > matrix, Mat<> rhs, int nv, Mat<> guess)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
auto vec (int i)
 gets a view of a vector as an Eigen object
 
int n_vecs () override
 number of vectors this object provides access to (including 0 and 1)
 
void scale (int output, int input, double scalar) override
 scales vector input by scalar and writes the result to vector output
 
void add (int output, double coef0, int vec0, double coef1, int vec1) override
 assigns \( z = ax + by \) where \( z, a, x, b, y \) are given by the arguments in order
 
double inner (int input0, int input1) override
 returns the inner product of the two vectors specified by the inputs
 
void matvec (int output, int input) override
 computes the product of the operator \( A \) with vector input and writes it to output.
 
- Public Member Functions inherited from hexed::Linear_equation
double norm (int input)
 norm induced by inner()
 

Detailed Description

equation in \( \mathbb{R}^n \) with a dense matrix

Member Function Documentation

◆ add()

void hexed::Dense_equation::add ( int output,
double coef0,
int vec0,
double coef1,
int vec1 )
overridevirtual

assigns \( z = ax + by \) where \( z, a, x, b, y \) are given by the arguments in order

Implements hexed::Linear_equation.

◆ inner()

double hexed::Dense_equation::inner ( int input0,
int input1 )
overridevirtual

returns the inner product of the two vectors specified by the inputs

Implements hexed::Linear_equation.

◆ matvec()

void hexed::Dense_equation::matvec ( int output,
int input )
overridevirtual

computes the product of the operator \( A \) with vector input and writes it to output.

Implements hexed::Linear_equation.

◆ n_vecs()

int hexed::Dense_equation::n_vecs ( )
overridevirtual

number of vectors this object provides access to (including 0 and 1)

Implements hexed::Linear_equation.

◆ scale()

void hexed::Dense_equation::scale ( int output,
int input,
double scalar )
overridevirtual

scales vector input by scalar and writes the result to vector output

Implements hexed::Linear_equation.


The documentation for this class was generated from the following files: