19 #ifndef __itkFEMLinearSystemWrapperDenseVNL_h
20 #define __itkFEMLinearSystemWrapperDenseVNL_h
22 #include "vnl/vnl_matrix.h"
23 #include "vnl/vnl_vector.h"
24 #include "vnl/algo/vnl_svd.h"
65 virtual void DestroyMatrix(
unsigned int matrixIndex) ITK_OVERRIDE;
71 virtual void DestroyVector(
unsigned int vectorIndex) ITK_OVERRIDE;
85 unsigned int matrixIndex)
const ITK_OVERRIDE
87 return ( *( ( *
m_Matrices )[matrixIndex] ) )(i, j);
90 unsigned int matrixIndex) ITK_OVERRIDE
92 ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) = value;
95 unsigned int matrixIndex) ITK_OVERRIDE
97 ( *( ( *m_Matrices )[matrixIndex] ) )(i, j) += value;
100 unsigned int vectorIndex)
const ITK_OVERRIDE
102 return ( *( ( *
m_Vectors )[vectorIndex] ) )[i];
105 unsigned int vectorIndex) ITK_OVERRIDE
107 ( *( ( *m_Vectors )[vectorIndex] ) )(i) = value;
110 unsigned int vectorIndex) ITK_OVERRIDE
112 ( *( ( *m_Vectors )[vectorIndex] ) )(i) += value;
117 unsigned int solutionIndex) ITK_OVERRIDE
119 ( *( ( *m_Solutions )[solutionIndex] ) )(i) = value;
122 unsigned int solutionIndex) ITK_OVERRIDE
124 ( *( ( *m_Solutions )[solutionIndex] ) )(i) += value;
126 virtual void Solve(
void) ITK_OVERRIDE;
129 virtual
void ScaleMatrix(
Float scale,
unsigned int matrixIndex) ITK_OVERRIDE;
135 virtual
void SwapMatrices(
unsigned int matrixIndex1,
unsigned int matrixIndex2) ITK_OVERRIDE;
137 virtual
void SwapVectors(
unsigned int vectorIndex1,
unsigned int vectorIndex2) ITK_OVERRIDE;
139 virtual
void SwapSolutions(
unsigned int solutionIndex1,
unsigned int solutionIndex2) ITK_OVERRIDE;
141 virtual
void CopySolution2Vector(
unsigned solutionIndex,
unsigned int vectorIndex) ITK_OVERRIDE;
143 virtual
void CopyVector2Solution(
unsigned int vectorIndex,
unsigned int solutionIndex) ITK_OVERRIDE;
146 unsigned int rightMatrixIndex) ITK_OVERRIDE;
148 virtual
void MultiplyMatrixVector(
unsigned int resultVectorIndex,
unsigned int matrixIndex,
unsigned int vectorIndex) ITK_OVERRIDE;
virtual void AddSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) ITK_OVERRIDE
LinearSystemWrapperDenseVNL()
virtual void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2) ITK_OVERRIDE
virtual void AddVectorValue(unsigned int i, Float value, unsigned int vectorIndex) ITK_OVERRIDE
vnl_matrix< Float > MatrixRepresentation
virtual void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) ITK_OVERRIDE
LinearSystemWrapper SuperClass
LinearSystemWrapper class that uses VNL numeric library functions to define a sparse linear system of...
virtual void InitializeMatrix(unsigned int matrixIndex) ITK_OVERRIDE
virtual void ScaleVector(Float scale, unsigned int vectorIndex)
virtual void SetMaximumNonZeroValuesInMatrix(unsigned int, unsigned int)
virtual void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2) ITK_OVERRIDE
virtual void SetVectorValue(unsigned int i, Float value, unsigned int vectorIndex) ITK_OVERRIDE
virtual void ScaleMatrix(Float scale, unsigned int matrixIndex) ITK_OVERRIDE
virtual Float GetMatrixValue(unsigned int i, unsigned int j, unsigned int matrixIndex) const ITK_OVERRIDE
virtual void InitializeVector(unsigned int vectorIndex) ITK_OVERRIDE
LinearSystemWrapper::Float Float
virtual void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2) ITK_OVERRIDE
virtual void DestroyMatrix(unsigned int matrixIndex) ITK_OVERRIDE
virtual void SetSolutionValue(unsigned int i, Float value, unsigned int solutionIndex) ITK_OVERRIDE
virtual void AddMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) ITK_OVERRIDE
std::vector< MatrixRepresentation * > MatrixHolder
virtual Float GetVectorValue(unsigned int i, unsigned int vectorIndex) const ITK_OVERRIDE
virtual void SetMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex) ITK_OVERRIDE
Defines all functions required by Solver class to allocate, assemble and solve a linear system of equ...
virtual void InitializeSolution(unsigned int solutionIndex) ITK_OVERRIDE
virtual bool IsVectorInitialized(unsigned int vectorIndex) ITK_OVERRIDE
virtual void DestroySolution(unsigned int solutionIndex) ITK_OVERRIDE
virtual void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, unsigned int rightMatrixIndex) ITK_OVERRIDE
virtual void CopySolution2Vector(unsigned solutionIndex, unsigned int vectorIndex) ITK_OVERRIDE
std::vector< vnl_vector< Float > * > * m_Vectors
MatrixHolder * m_Matrices
virtual void ScaleSolution(Float scale, unsigned int solutionIndex)
virtual void DestroyVector(unsigned int vectorIndex) ITK_OVERRIDE
virtual ~LinearSystemWrapperDenseVNL()
virtual bool IsMatrixInitialized(unsigned int matrixIndex) ITK_OVERRIDE
virtual bool IsSolutionInitialized(unsigned int solutionIndex) ITK_OVERRIDE
virtual Float GetSolutionValue(unsigned int i, unsigned int solutionIndex) const ITK_OVERRIDE
std::vector< vnl_vector< Float > * > * m_Solutions
virtual void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex) ITK_OVERRIDE
virtual void Solve(void) ITK_OVERRIDE