opensurgsim
Public Member Functions | Protected Attributes | List of all members
SurgSim::Math::LinearSparseSolveAndInverse Class Referenceabstract

LinearSparseSolveAndInverse aims at performing an efficient linear system resolution and calculating its inverse matrix at the same time. More...

#include <LinearSparseSolveAndInverse.h>

Inheritance diagram for SurgSim::Math::LinearSparseSolveAndInverse:
SurgSim::Math::LinearSparseSolveAndInverseCG SurgSim::Math::LinearSparseSolveAndInverseLU

Public Member Functions

virtual void setMatrix (const SparseMatrix &matrix)=0
 Set the linear solver matrix. More...
 
virtual Matrix solve (const Matrix &b) const =0
 Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call for all columns of the rhs matrix b. More...
 
virtual Matrix getInverse () const
 

Protected Attributes

SparseMatrix m_matrix
 A copy of the system matrix for use when an inverse is necessary.
 

Detailed Description

LinearSparseSolveAndInverse aims at performing an efficient linear system resolution and calculating its inverse matrix at the same time.

This class is very useful in the OdeSolver resolution to improve performance.

See also
SurgSim::Math::OdeSolver

Member Function Documentation

§ getInverse()

Matrix SurgSim::Math::LinearSparseSolveAndInverse::getInverse ( ) const
virtual
Returns
The linear system's inverse matrix, i.e. the inverse of the matrix provided on the last setMatrix call

Reimplemented in SurgSim::Math::LinearSparseSolveAndInverseLU.

§ setMatrix()

virtual void SurgSim::Math::LinearSparseSolveAndInverse::setMatrix ( const SparseMatrix matrix)
pure virtual

Set the linear solver matrix.

Parameters
matrixthe new matrix to solve/inverse for

Implemented in SurgSim::Math::LinearSparseSolveAndInverseCG, and SurgSim::Math::LinearSparseSolveAndInverseLU.

§ solve()

virtual Matrix SurgSim::Math::LinearSparseSolveAndInverse::solve ( const Matrix b) const
pure virtual

Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call for all columns of the rhs matrix b.

Parameters
bThe rhs matrix
Returns
The solution matrix

Implemented in SurgSim::Math::LinearSparseSolveAndInverseCG, and SurgSim::Math::LinearSparseSolveAndInverseLU.


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