Public Member Functions | Protected Attributes
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]

List of all members.

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.
void multiply (vnl_vector< double > const &x, vnl_vector< double > &b) const
 Implementations of the vnl_linear_system virtuals.
void transpose_multiply (vnl_vector< double > const &b, vnl_vector< double > &x) const
 Implementations of the vnl_linear_system virtuals.
void get_rhs (vnl_vector< double > &b) const
 Implementations of the vnl_linear_system virtuals.
void apply_preconditioner (vnl_vector< double > const &x, vnl_vector< double > &px) const
 Implementations of the vnl_linear_system virtuals.
unsigned int get_number_of_unknowns () const
 Return the number of unknowns.
unsigned int get_number_of_residuals () const
 Return the number of residuals.
double get_rms_error (vnl_vector< double > const &x) const
 Compute rms error for parameter vector x.
double get_relative_residual (vnl_vector< double > const &x) const
 Compute relative residual (|Ax - b| / |b| )for parameter vector x.

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 28 of file vnl_sparse_matrix_linear_system.h.


Constructor & Destructor Documentation

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 33 of file vnl_sparse_matrix_linear_system.h.


Member Function Documentation

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

Implementations of the vnl_linear_system virtuals.

Reimplemented from vnl_linear_system.

Definition at line 65 of file vnl_sparse_matrix_linear_system.cxx.

unsigned int vnl_linear_system::get_number_of_residuals ( ) const [inline, inherited]

Return the number of residuals.

Definition at line 58 of file vnl_linear_system.h.

unsigned int vnl_linear_system::get_number_of_unknowns ( ) const [inline, inherited]

Return the number of unknowns.

Definition at line 55 of file vnl_linear_system.h.

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 37 of file vnl_linear_system.cxx.

template<class T >
VCL_DEFINE_SPECIALIZATION void vnl_sparse_matrix_linear_system< T >::get_rhs ( vnl_vector< double > &  b) const [virtual]

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

Definition at line 11 of file vnl_sparse_matrix_linear_system.cxx.

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

Compute rms error for parameter vector x.

Definition at line 24 of file vnl_linear_system.cxx.

template<class T >
VCL_DEFINE_SPECIALIZATION void vnl_sparse_matrix_linear_system< T >::multiply ( vnl_vector< double > const &  x,
vnl_vector< double > &  b 
) const [virtual]

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

Definition at line 43 of file vnl_sparse_matrix_linear_system.cxx.

template<class T >
VCL_DEFINE_SPECIALIZATION void vnl_sparse_matrix_linear_system< T >::transpose_multiply ( vnl_vector< double > const &  b,
vnl_vector< double > &  x 
) const [virtual]

Implementations of the vnl_linear_system virtuals.

Implements vnl_linear_system.

Definition at line 17 of file vnl_sparse_matrix_linear_system.cxx.


Member Data Documentation

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

Definition at line 46 of file vnl_sparse_matrix_linear_system.h.

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

Definition at line 47 of file vnl_sparse_matrix_linear_system.h.

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

Definition at line 48 of file vnl_sparse_matrix_linear_system.h.

unsigned int vnl_linear_system::n_ [protected, inherited]

Definition at line 68 of file vnl_linear_system.h.

unsigned int vnl_linear_system::p_ [protected, inherited]

Definition at line 67 of file vnl_linear_system.h.


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