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

#include <VNLSparseLUSolverTraits.h>

Detailed Description

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

Generic interface for sparse LU solver.

This generic interface (common to several sparse solvers), allow to interchange solver solutions when dealing with sparse linear systems. 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 made of a sparse LU decomposition followed by solving upper triangular system. see vnl_sparse_lu for more details on the method used.

See Also
VNLIterativeSparseSolverTraits:w

Definition at line 42 of file VNLSparseLUSolverTraits.h.

Public Types

typedef vnl_sparse_matrix
< ValueType
MatrixType
 
typedef vnl_sparse_lu 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 void Solve (SolverType &solver, const VectorType &iB, VectorType &oX)
 
static void Solve (SolverType &solver, const VectorType &iBx, const VectorType &iBy, const VectorType &iBz, VectorType &oX, VectorType &oY, VectorType &oZ)
 
static void Solve (SolverType &solver, const VectorType &iBx, const VectorType &iBy, VectorType &oX, VectorType &oY)
 

Member Typedef Documentation

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

Definition at line 46 of file VNLSparseLUSolverTraits.h.

template<typename T = double>
typedef vnl_sparse_lu VNLSparseLUSolverTraits< T >::SolverType

Definition at line 48 of file VNLSparseLUSolverTraits.h.

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

Definition at line 45 of file VNLSparseLUSolverTraits.h.

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

Definition at line 47 of file VNLSparseLUSolverTraits.h.

Member Function Documentation

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

iA[iR][iC] += iV

Definition at line 81 of file VNLSparseLUSolverTraits.h.

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

iA[iR][iC] = iV

Definition at line 75 of file VNLSparseLUSolverTraits.h.

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

initialize a square sparse matrix of size iN x iN

Definition at line 57 of file VNLSparseLUSolverTraits.h.

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

initialize a sparse matrix of size iRow x iCol

Definition at line 63 of file VNLSparseLUSolverTraits.h.

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

initialize a vector of size iN

Definition at line 69 of file VNLSparseLUSolverTraits.h.

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

Definition at line 51 of file VNLSparseLUSolverTraits.h.

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

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

Definition at line 87 of file VNLSparseLUSolverTraits.h.

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

template<typename T = double>
static bool VNLSparseLUSolverTraits< 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 96 of file VNLSparseLUSolverTraits.h.

References VNLSparseLUSolverTraits< T >::Solve().

template<typename T = double>
static bool VNLSparseLUSolverTraits< 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 107 of file VNLSparseLUSolverTraits.h.

References VNLSparseLUSolverTraits< T >::Solve().

template<typename T = double>
static void VNLSparseLUSolverTraits< T >::Solve ( SolverType solver,
const VectorType iB,
VectorType oX 
)
inlinestatic

Solve the linear system $ iA \cdot oX = iB $ factoring the internal matrix if needed.

Definition at line 118 of file VNLSparseLUSolverTraits.h.

template<typename T = double>
static void VNLSparseLUSolverTraits< T >::Solve ( SolverType solver,
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 $ factoring the internal matrix if needed.

Definition at line 124 of file VNLSparseLUSolverTraits.h.

template<typename T = double>
static void VNLSparseLUSolverTraits< T >::Solve ( SolverType solver,
const VectorType iBx,
const VectorType iBy,
VectorType oX,
VectorType oY 
)
inlinestatic

Solve the linear systems: $ iA \cdot oX = iBx $, $ iA \cdot oY = iBy $ factoring the internal matrix if needed.

Definition at line 134 of file VNLSparseLUSolverTraits.h.


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