ITK  4.3.0
Insight Segmentation and Registration Toolkit
Public Types | Static Public Member Functions | List of all members
VNLIterativeSparseSolverTraits< T > Class Template Reference

#include <VNLIterativeSparseSolverTraits.h>

Detailed Description

template<typename T = double>
class VNLIterativeSparseSolverTraits< T >

Generic interface for iterative sparse linear solver.

This generic interface (common to several sparse solvers), allow to interchange solver solutions when dealing with sparse linear system. See itk::ParameterizationQuadEdgeMeshFilter for reference.

It internally uses the VNL library to represent and deal with vectors (vnl_vector) and sparse matrices (vnl_sparse_matrix). The solver by itself is an iterative one see vnl_sparse_matrix_linear_system for more details on the method used.

See Also
VNLSparseLUSolverTraits

Definition at line 43 of file VNLIterativeSparseSolverTraits.h.

Public Types

typedef vnl_sparse_matrix
< ValueType
MatrixType
 
typedef vnl_lsqr SolverType
 
typedef T ValueType
 
typedef vnl_vector< ValueTypeVectorType
 

Static Public Member Functions

static void AddToMatrix (MatrixType &iA, const unsigned int &iR, const unsigned int &iC, const ValueType &iV)
 
static void FillMatrix (MatrixType &iA, const unsigned int &iR, const unsigned int &iC, const ValueType &iV)
 
static MatrixType InitializeSparseMatrix (const unsigned int &iN)
 
static MatrixType InitializeSparseMatrix (const unsigned int &iRow, const unsigned int &iCol)
 
static VectorType InitializeVector (const unsigned int &iN)
 
static bool IsDirectSolver ()
 
static bool Solve (const MatrixType &iA, const VectorType &iB, VectorType &oX)
 
static bool Solve (const MatrixType &iA, const VectorType &iBx, const VectorType &iBy, const VectorType &iBz, VectorType &oX, VectorType &oY, VectorType &oZ)
 
static bool Solve (const MatrixType &iA, const VectorType &iBx, const VectorType &iBy, VectorType &oX, VectorType &oY)
 
static bool Solve (const MatrixType &iA, const VectorType &iB, const long &iNbIter, VectorType &oX)
 

Member Typedef Documentation

template<typename T = double>
typedef vnl_sparse_matrix< ValueType > VNLIterativeSparseSolverTraits< T >::MatrixType

Definition at line 47 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
typedef vnl_lsqr VNLIterativeSparseSolverTraits< T >::SolverType

Definition at line 49 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
typedef T VNLIterativeSparseSolverTraits< T >::ValueType

Definition at line 46 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
typedef vnl_vector< ValueType > VNLIterativeSparseSolverTraits< T >::VectorType

Definition at line 48 of file VNLIterativeSparseSolverTraits.h.

Member Function Documentation

template<typename T = double>
static void VNLIterativeSparseSolverTraits< T >::AddToMatrix ( MatrixType iA,
const unsigned int &  iR,
const unsigned int &  iC,
const ValueType iV 
)
inlinestatic

iA[iR][iC] += iV

Definition at line 82 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static void VNLIterativeSparseSolverTraits< T >::FillMatrix ( MatrixType iA,
const unsigned int &  iR,
const unsigned int &  iC,
const ValueType iV 
)
inlinestatic

iA[iR][iC] = iV

Definition at line 76 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static MatrixType VNLIterativeSparseSolverTraits< T >::InitializeSparseMatrix ( const unsigned int &  iN)
inlinestatic

initialize a square sparse matrix of size iN x iN

Definition at line 58 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static MatrixType VNLIterativeSparseSolverTraits< T >::InitializeSparseMatrix ( const unsigned int &  iRow,
const unsigned int &  iCol 
)
inlinestatic

initialize a sparse matrix of size iRow x iCol

Definition at line 64 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static VectorType VNLIterativeSparseSolverTraits< T >::InitializeVector ( const unsigned int &  iN)
inlinestatic

initialize a vector of size iN

Definition at line 70 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static bool VNLIterativeSparseSolverTraits< T >::IsDirectSolver ( )
inlinestatic
Returns
false (it is not a direct solver, it is an iterative solver)

Definition at line 52 of file VNLIterativeSparseSolverTraits.h.

template<typename T = double>
static bool VNLIterativeSparseSolverTraits< T >::Solve ( const MatrixType iA,
const VectorType iB,
VectorType oX 
)
inlinestatic

Solve the linear system $ iA \cdot oX = iB $.

Definition at line 88 of file VNLIterativeSparseSolverTraits.h.

Referenced by VNLIterativeSparseSolverTraits< T >::Solve().

template<typename T = double>
static bool VNLIterativeSparseSolverTraits< T >::Solve ( const MatrixType iA,
const VectorType iBx,
const VectorType iBy,
const VectorType iBz,
VectorType oX,
VectorType oY,
VectorType oZ 
)
inlinestatic

Solve the linear systems: $ iA \cdot oX = iBx $, $ iA \cdot oY = iBy $, $ iA \cdot oZ = iBz $.

Definition at line 98 of file VNLIterativeSparseSolverTraits.h.

References VNLIterativeSparseSolverTraits< T >::Solve().

template<typename T = double>
static bool VNLIterativeSparseSolverTraits< T >::Solve ( const MatrixType iA,
const VectorType iBx,
const VectorType iBy,
VectorType oX,
VectorType oY 
)
inlinestatic

Solve the linear systems: $ iA \cdot oX = iBx $, $ iA \cdot oY = iBy $.

Definition at line 110 of file VNLIterativeSparseSolverTraits.h.

References VNLIterativeSparseSolverTraits< T >::Solve().

template<typename T = double>
static bool VNLIterativeSparseSolverTraits< T >::Solve ( const MatrixType iA,
const VectorType iB,
const long &  iNbIter,
VectorType oX 
)
inlinestatic

Solve the linear systems: $ iA \cdot oX = iBx $ in N iterations.

Definition at line 121 of file VNLIterativeSparseSolverTraits.h.


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