18 #ifndef __VNLSparseLUSolverTraits_h
19 #define __VNLSparseLUSolverTraits_h
21 #include "vnl/vnl_vector.h"
22 #include "vnl/vnl_sparse_matrix.h"
23 #include "vnl/algo/vnl_sparse_lu.h"
41 template<
typename T =
double >
90 Solve( solver, iB, oX );
101 Solve( solver, iBx, iBy, iBz, oX, oY, oZ );
112 Solve( solver, iBx, iBy, oX, oY );
120 oX = solver.solve( iB );
128 oX = solver.solve( iBx );
129 oY = solver.solve( iBy );
130 oZ = solver.solve( iBz );
138 oX = solver.solve( iBx );
139 oY = solver.solve( iBy );
static MatrixType InitializeSparseMatrix(const unsigned int &iRow, const unsigned int &iCol)
initialize a sparse matrix of size iRow x iCol
static void Solve(SolverType &solver, const VectorType &iBx, const VectorType &iBy, const VectorType &iBz, VectorType &oX, VectorType &oY, VectorType &oZ)
Solve the linear systems: , , factoring the internal matrix if needed.
static MatrixType InitializeSparseMatrix(const unsigned int &iN)
initialize a square sparse matrix of size iN x iN
static bool Solve(const MatrixType &iA, const VectorType &iB, VectorType &oX)
Solve the linear system .
vnl_sparse_matrix< ValueType > MatrixType
vnl_vector< ValueType > VectorType
static bool IsDirectSolver()
static bool Solve(const MatrixType &iA, const VectorType &iBx, const VectorType &iBy, VectorType &oX, VectorType &oY)
Solve the linear systems: , .
static bool Solve(const MatrixType &iA, const VectorType &iBx, const VectorType &iBy, const VectorType &iBz, VectorType &oX, VectorType &oY, VectorType &oZ)
Solve the linear systems: , , .
static VectorType InitializeVector(const unsigned int &iN)
initialize a vector of size iN
Generic interface for sparse LU solver.
static void FillMatrix(MatrixType &iA, const unsigned int &iR, const unsigned int &iC, const ValueType &iV)
iA[iR][iC] = iV
static void AddToMatrix(MatrixType &iA, const unsigned int &iR, const unsigned int &iC, const ValueType &iV)
iA[iR][iC] += iV
static void Solve(SolverType &solver, const VectorType &iBx, const VectorType &iBy, VectorType &oX, VectorType &oY)
Solve the linear systems: , factoring the internal matrix if needed.
static void Solve(SolverType &solver, const VectorType &iB, VectorType &oX)
Solve the linear system factoring the internal matrix if needed.