Public Member Functions | Protected Attributes | List of all members
vnl_sparse_matrix_linear_system< T > Class Template Reference

vnl_sparse_matrix -> vnl_linear_system adaptor. More...

#include <vnl_sparse_matrix_linear_system.h>

Inheritance diagram for vnl_sparse_matrix_linear_system< T >:
Inheritance graph
[legend]

Public Member Functions

 vnl_sparse_matrix_linear_system (vnl_sparse_matrix< T > const &A, vnl_vector< T > const &b)
 :Constructor from vnl_sparse_matrix<double> for system Ax = b. More...
 
void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const override
 Implementations of the vnl_linear_system virtuals. More...
 
void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const override
 Implementations of the vnl_linear_system virtuals. More...
 
void get_rhs (vnl_vector< double > &b) const override
 Implementations of the vnl_linear_system virtuals. More...
 
void apply_preconditioner (vnl_vector< double > const &x, vnl_vector< double > &px) const override
 Implementations of the vnl_linear_system virtuals. More...
 
template<>
void get_rhs (vnl_vector< double > &b) const
 
template<>
void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const
 Compute A_transpose * y, putting result in x. More...
 
template<>
void get_rhs (vnl_vector< double > &b) const
 
template<>
void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const
 Compute A_transpose * y, putting result in x. More...
 
template<>
void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const
 Compute A*x, putting result in y. More...
 
template<>
void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const
 Compute A*x, putting result in y. More...
 
template<>
VNL_EXPORT void get_rhs (vnl_vector< double > &b) const
 
template<>
VNL_EXPORT void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const
 Compute A_transpose * y, putting result in x. More...
 
template<>
VNL_EXPORT void get_rhs (vnl_vector< double > &b) const
 
template<>
VNL_EXPORT void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const
 Compute A_transpose * y, putting result in x. More...
 
template<>
VNL_EXPORT void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const
 Compute A*x, putting result in y. More...
 
template<>
VNL_EXPORT void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const
 Compute A*x, putting result in y. More...
 
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

vnl_sparse_matrix< T > const & A_
 
vnl_vector< T > const & b_
 
vnl_vector< double > jacobi_precond_
 
unsigned int p_
 
unsigned int n_
 

Detailed Description

template<class T>
class vnl_sparse_matrix_linear_system< T >

vnl_sparse_matrix -> vnl_linear_system adaptor.

An adaptor that converts a vnl_sparse_matrix<T> to a vnl_linear_system

Definition at line 26 of file vnl_sparse_matrix_linear_system.h.

Constructor & Destructor Documentation

◆ vnl_sparse_matrix_linear_system()

template<class T >
vnl_sparse_matrix_linear_system< T >::vnl_sparse_matrix_linear_system ( vnl_sparse_matrix< T > const &  A,
vnl_vector< T > const &  b 
)
inline

:Constructor from vnl_sparse_matrix<double> for system Ax = b.

Keeps a reference to the original sparse matrix A and vector b so DO NOT DELETE THEM!!

Definition at line 31 of file vnl_sparse_matrix_linear_system.h.

Member Function Documentation

◆ apply_preconditioner()

template<class T >
void vnl_sparse_matrix_linear_system< T >::apply_preconditioner ( vnl_vector< double > const &  x,
vnl_vector< double > &  px 
) const
overridevirtual

Implementations of the vnl_linear_system virtuals.

Reimplemented from vnl_linear_system.

Definition at line 62 of file vnl_sparse_matrix_linear_system.cxx.

◆ get_number_of_residuals()

unsigned int vnl_linear_system::get_number_of_residuals ( ) const
inlineinherited

Return the number of residuals.

Definition at line 56 of file vnl_linear_system.h.

◆ get_number_of_unknowns()

unsigned int vnl_linear_system::get_number_of_unknowns ( ) const
inlineinherited

Return the number of unknowns.

Definition at line 53 of file vnl_linear_system.h.

◆ get_relative_residual()

double vnl_linear_system::get_relative_residual ( vnl_vector< double > const &  x) const
inherited

Compute relative residual (|Ax - b| / |b| )for parameter vector x.

Definition at line 32 of file vnl_linear_system.cxx.

◆ get_rhs() [1/5]

template<>
void vnl_sparse_matrix_linear_system< double >::get_rhs ( vnl_vector< double > &  b) const
virtual

Implements vnl_linear_system.

Definition at line 8 of file vnl_sparse_matrix_linear_system.cxx.

◆ get_rhs() [2/5]

template<>
void vnl_sparse_matrix_linear_system< float >::get_rhs ( vnl_vector< double > &  b) const
virtual

Implements vnl_linear_system.

Definition at line 20 of file vnl_sparse_matrix_linear_system.cxx.

◆ get_rhs() [3/5]

template<class T >
void vnl_sparse_matrix_linear_system< T >::get_rhs ( vnl_vector< double > &  b) const
overridevirtual

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

◆ get_rhs() [4/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< double >::get_rhs ( vnl_vector< double > &  b) const
virtual

Implements vnl_linear_system.

◆ get_rhs() [5/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< float >::get_rhs ( vnl_vector< double > &  b) const
virtual

Implements vnl_linear_system.

◆ get_rms_error()

double vnl_linear_system::get_rms_error ( vnl_vector< double > const &  x) const
inherited

Compute rms error for parameter vector x.

Definition at line 19 of file vnl_linear_system.cxx.

◆ multiply() [1/5]

template<class T >
void vnl_sparse_matrix_linear_system< T >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  b 
) const
overridevirtual

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

◆ multiply() [2/5]

template<>
void vnl_sparse_matrix_linear_system< double >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  y 
) const
virtual

Compute A*x, putting result in y.

Implements vnl_linear_system.

Definition at line 40 of file vnl_sparse_matrix_linear_system.cxx.

◆ multiply() [3/5]

template<>
void vnl_sparse_matrix_linear_system< float >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  y 
) const
virtual

Compute A*x, putting result in y.

Implements vnl_linear_system.

Definition at line 47 of file vnl_sparse_matrix_linear_system.cxx.

◆ multiply() [4/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< double >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  y 
) const
virtual

Compute A*x, putting result in y.

Implements vnl_linear_system.

◆ multiply() [5/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< float >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  y 
) const
virtual

Compute A*x, putting result in y.

Implements vnl_linear_system.

◆ transpose_multiply() [1/5]

template<>
void vnl_sparse_matrix_linear_system< double >::transpose_multiply ( vnl_vector< double > const &  y,
vnl_vector< double > &  x 
) const
virtual

Compute A_transpose * y, putting result in x.

Implements vnl_linear_system.

Definition at line 14 of file vnl_sparse_matrix_linear_system.cxx.

◆ transpose_multiply() [2/5]

template<>
void vnl_sparse_matrix_linear_system< float >::transpose_multiply ( vnl_vector< double > const &  y,
vnl_vector< double > &  x 
) const
virtual

Compute A_transpose * y, putting result in x.

Implements vnl_linear_system.

Definition at line 26 of file vnl_sparse_matrix_linear_system.cxx.

◆ transpose_multiply() [3/5]

template<class T >
void vnl_sparse_matrix_linear_system< T >::transpose_multiply ( vnl_vector< double > const &  b,
vnl_vector< double > &  x 
) const
overridevirtual

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

◆ transpose_multiply() [4/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< double >::transpose_multiply ( vnl_vector< double > const &  y,
vnl_vector< double > &  x 
) const
virtual

Compute A_transpose * y, putting result in x.

Implements vnl_linear_system.

◆ transpose_multiply() [5/5]

template<>
VNL_EXPORT void vnl_sparse_matrix_linear_system< float >::transpose_multiply ( vnl_vector< double > const &  y,
vnl_vector< double > &  x 
) const
virtual

Compute A_transpose * y, putting result in x.

Implements vnl_linear_system.

Member Data Documentation

◆ A_

template<class T >
vnl_sparse_matrix<T> const& vnl_sparse_matrix_linear_system< T >::A_
protected

Definition at line 44 of file vnl_sparse_matrix_linear_system.h.

◆ b_

template<class T >
vnl_vector<T> const& vnl_sparse_matrix_linear_system< T >::b_
protected

Definition at line 45 of file vnl_sparse_matrix_linear_system.h.

◆ jacobi_precond_

template<class T >
vnl_vector<double> vnl_sparse_matrix_linear_system< T >::jacobi_precond_
protected

Definition at line 46 of file vnl_sparse_matrix_linear_system.h.

◆ n_

unsigned int vnl_linear_system::n_
protectedinherited

Definition at line 66 of file vnl_linear_system.h.

◆ p_

unsigned int vnl_linear_system::p_
protectedinherited

Definition at line 65 of file vnl_linear_system.h.


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