opensurgsim
Public Member Functions | List of all members
SurgSim::Math::LinearSparseSolveAndInverseCG Class Reference

Derivation for sparse CG solver. More...

#include <LinearSparseSolveAndInverse.h>

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

Public Member Functions

void setTolerance (double tolerance)
 Set the conjugate gradient convergence tolerance. More...
 
double getTolerance ()
 Get the conjugate gradient convergence tolerance. More...
 
void setMaxIterations (Eigen::Index iterations)
 Set the maximum number of iterations for conjugate gradient. More...
 
Eigen::Index getMaxIterations ()
 Get the conjugate gradient maximum iterations. More...
 
void setMatrix (const SparseMatrix &matrix) override
 Set the linear solver matrix. More...
 
Matrix solve (const Matrix &b) const override
 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...
 
- Public Member Functions inherited from SurgSim::Math::LinearSparseSolveAndInverse
virtual Matrix getInverse () const
 

Additional Inherited Members

- Protected Attributes inherited from SurgSim::Math::LinearSparseSolveAndInverse
SparseMatrix m_matrix
 A copy of the system matrix for use when an inverse is necessary.
 

Detailed Description

Derivation for sparse CG solver.

Member Function Documentation

§ getMaxIterations()

Eigen::Index SurgSim::Math::LinearSparseSolveAndInverseCG::getMaxIterations ( )

Get the conjugate gradient maximum iterations.

Returns
the maximum number of iterations allowed

§ getTolerance()

double SurgSim::Math::LinearSparseSolveAndInverseCG::getTolerance ( )

Get the conjugate gradient convergence tolerance.

Returns
the convergence tolerance

§ setMatrix()

void SurgSim::Math::LinearSparseSolveAndInverseCG::setMatrix ( const SparseMatrix matrix)
overridevirtual

Set the linear solver matrix.

Parameters
matrixthe new matrix to solve/inverse for

Implements SurgSim::Math::LinearSparseSolveAndInverse.

§ setMaxIterations()

void SurgSim::Math::LinearSparseSolveAndInverseCG::setMaxIterations ( Eigen::Index  iterations)

Set the maximum number of iterations for conjugate gradient.

Parameters
iterationsthe new maximum number of iterations

§ setTolerance()

void SurgSim::Math::LinearSparseSolveAndInverseCG::setTolerance ( double  tolerance)

Set the conjugate gradient convergence tolerance.

Parameters
tolerancethe new convergence tolerance

§ solve()

Matrix SurgSim::Math::LinearSparseSolveAndInverseCG::solve ( const Matrix b) const
overridevirtual

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

Implements SurgSim::Math::LinearSparseSolveAndInverse.


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