SurgSim::Math::LinearSolveAndInverse Class Referenceabstract

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

`#include <SurgSim/Math/LinearSolveAndInverse.h>`

Inheritance diagram for SurgSim::Math::LinearSolveAndInverse:

## Public Member Functions

virtual | ~LinearSolveAndInverse ()
virtual void | setMatrix (const Matrix &matrix)=0
| Set the linear solver matrix. More...
virtual Vector | solve (const Vector &b)=0
| Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call. More...
virtual Matrix | getInverse ()=0

## Detailed Description

LinearSolveAndInverse 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

## Constructor & Destructor Documentation

## ~LinearSolveAndInverse()

virtual SurgSim::Math::LinearSolveAndInverse::~LinearSolveAndInverse | ( |  | ) |

inline virtual

## Member Function Documentation

## getInverse()

virtual Matrix SurgSim::Math::LinearSolveAndInverse::getInverse | ( |  | ) |

pure virtual

Returns
  The linear system's inverse matrix, i.e. the inverse of the matrix provided on the last setMatrix call

Implemented in SurgSim::Math::LinearSolveAndInverseTriDiagonalBlockMatrix< BlockSize >, SurgSim::Math::LinearSolveAndInverseDiagonalMatrix, and SurgSim::Math::LinearSolveAndInverseDenseMatrix.

## setMatrix()

virtual void SurgSim::Math::LinearSolveAndInverse::setMatrix | ( | const Matrix & | matrix | ) |

pure virtual

Set the linear solver matrix.

Parameters

  matrix | the new matrix to solve/inverse for

Implemented in SurgSim::Math::LinearSolveAndInverseSymmetricTriDiagonalBlockMatrix< BlockSize >, SurgSim::Math::LinearSolveAndInverseTriDiagonalBlockMatrix< BlockSize >, SurgSim::Math::LinearSolveAndInverseDiagonalMatrix, and SurgSim::Math::LinearSolveAndInverseDenseMatrix.

## solve()

virtual Vector SurgSim::Math::LinearSolveAndInverse::solve | ( | const Vector & | b | ) |

pure virtual

Solve the linear system (matrix.x=b) using the matrix provided by the latest setMatrix call.

Parameters

  b | The rhs vector

Returns
  The solution vector

Implemented in SurgSim::Math::LinearSolveAndInverseTriDiagonalBlockMatrix< BlockSize >, SurgSim::Math::LinearSolveAndInverseDiagonalMatrix, and SurgSim::Math::LinearSolveAndInverseDenseMatrix.

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

- SurgSim/Math/LinearSolveAndInverse.h