Abstraction for a linear system of equations. More...
#include <vnl_linear_system.h>

Public Member Functions | |
| vnl_linear_system (unsigned int number_of_unknowns, unsigned int number_of_residuals) | |
| virtual | ~vnl_linear_system () |
| virtual void | multiply (vnl_vector< double > const &x, vnl_vector< double > &y) const =0 |
| Compute A*x, putting result in y. More... | |
| virtual void | transpose_multiply (vnl_vector< double > const &y, vnl_vector< double > &x) const =0 |
| Compute A_transpose * y, putting result in x. More... | |
| virtual void | get_rhs (vnl_vector< double > &b) const =0 |
| virtual void | apply_preconditioner (vnl_vector< double > const &x, vnl_vector< double > &px) const |
| unsigned int | get_number_of_unknowns () const |
| Return the number of unknowns. More... | |
| unsigned int | get_number_of_residuals () const |
| Return the number of residuals. More... | |
| double | get_rms_error (vnl_vector< double > const &x) const |
| Compute rms error for parameter vector x. More... | |
| double | get_relative_residual (vnl_vector< double > const &x) const |
| Compute relative residual (|Ax - b| / |b| )for parameter vector x. More... | |
Protected Attributes | |
| unsigned int | p_ |
| unsigned int | n_ |
Abstraction for a linear system of equations.
vnl_linear_system provides an abstraction for a linear system of equations, Ax = b, to be solved by one of the iterative linear solvers. Access to the systems is via the pure virtual methods multiply() and transpose_multiply(). This procedural access scheme makes it possible to solve very large, sparse systems which it would be inefficient to store in matrix form.
To solve the system, use an algorithm like vnl_lsqr.
Definition at line 27 of file vnl_linear_system.h.
|
inline |
Definition at line 31 of file vnl_linear_system.h.
|
virtualdefault |
|
virtual |
Reimplemented in vnl_sparse_matrix_linear_system< T >.
Definition at line 12 of file vnl_linear_system.cxx.
|
inline |
Return the number of residuals.
Definition at line 56 of file vnl_linear_system.h.
|
inline |
Return the number of unknowns.
Definition at line 53 of file vnl_linear_system.h.
| double vnl_linear_system::get_relative_residual | ( | vnl_vector< double > const & | x | ) | const |
Compute relative residual (|Ax - b| / |b| )for parameter vector x.
Definition at line 32 of file vnl_linear_system.cxx.
|
pure virtual |
| double vnl_linear_system::get_rms_error | ( | vnl_vector< double > const & | x | ) | const |
Compute rms error for parameter vector x.
Definition at line 19 of file vnl_linear_system.cxx.
|
pure virtual |
Compute A*x, putting result in y.
Implemented in vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, and vnl_sparse_matrix_linear_system< T >.
|
pure virtual |
Compute A_transpose * y, putting result in x.
Implemented in vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, vnl_sparse_matrix_linear_system< T >, and vnl_sparse_matrix_linear_system< T >.
|
protected |
Definition at line 66 of file vnl_linear_system.h.
|
protected |
Definition at line 65 of file vnl_linear_system.h.
1.8.15