16 #ifndef SURGSIM_MATH_LINEARSOLVEANDINVERSE_H 17 #define SURGSIM_MATH_LINEARSOLVEANDINVERSE_H 83 template <
size_t BlockSize>
108 typedef Eigen::Matrix<Matrix::Scalar, BlockSize, BlockSize, Matrix::Options>
Block;
114 const Eigen::Block<const Matrix, BlockSize, BlockSize> minusAi(
const SurgSim::Math::Matrix& A,
size_t i)
const;
120 const Eigen::Block<const Matrix, BlockSize, BlockSize> Bi(
const SurgSim::Math::Matrix& A,
size_t i)
const;
126 const Eigen::Block<const Matrix, BlockSize, BlockSize> minusCi(
const SurgSim::Math::Matrix& A,
size_t i)
const;
130 std::vector<Block> m_Di,
m_Ei, m_Bi_AiDiminus1_inv;
136 template <
size_t BlockSize>
153 #endif // SURGSIM_MATH_LINEARSOLVEANDINVERSE_H Derivation for dense matrix type.
Definition: LinearSolveAndInverse.h:54
Definition: CompoundShapeToGraphics.cpp:29
LinearSolveAndInverse aims at performing an efficient linear system resolution and calculating its in...
Definition: LinearSolveAndInverse.h:35
virtual void setMatrix(const Matrix &matrix)=0
Set the linear solver matrix.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
virtual Vector solve(const Vector &b)=0
Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call...
virtual ~LinearSolveAndInverse()
Definition: LinearSolveAndInverse.h:38
Derivation for symmetric tri-diagonal block matrix type.
Definition: LinearSolveAndInverse.h:137
Derivation for diagonal matrix type.
Definition: LinearSolveAndInverse.h:68
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
std::vector< Block > m_Ei
Definition: LinearSolveAndInverse.h:130
Matrix m_inverse
Member variable to hold the inverse matrix in case only the solving is requested. ...
Definition: LinearSolveAndInverse.h:105
Definitions of small fixed-size square matrix types.
The header that provides the assertion API.
Definitions of small fixed-size vector types.
Vector m_inverseDiagonal
Definition: LinearSolveAndInverse.h:71
Eigen::Matrix< Matrix::Scalar, BlockSize, BlockSize, Matrix::Options > Block
Definition: LinearSolveAndInverse.h:108
virtual Matrix getInverse()=0
Eigen::PartialPivLU< typename Eigen::MatrixBase< Matrix >::PlainObject > m_luDecomposition
Definition: LinearSolveAndInverse.h:64
Derivation for tri-diagonal block matrix type.
Definition: LinearSolveAndInverse.h:84