Open CASCADE Technology
7.3.0
|
This class implements the Crout algorithm used to solve a system A*X = B where A is a symmetric matrix. It can be used to invert a symmetric matrix. This algorithm is similar to Gauss but is faster than Gauss. Only the inferior triangle of A and the diagonal can be given. More...
#include <math_Crout.hxx>
Public Member Functions | |
math_Crout (const math_Matrix &A, const Standard_Real MinPivot=1.0e-20) | |
Given an input matrix A, this algorithm inverts A by the Crout algorithm. The user can give only the inferior triangle for the implementation. A can be decomposed like this: A = L * D * T(L) where L is triangular inferior and D is diagonal. If one element of A is less than MinPivot, A is considered as singular. Exception NotSquare is raised if A is not a square matrix. More... | |
Standard_Boolean | IsDone () const |
Returns True if all has been correctly done. More... | |
void | Solve (const math_Vector &B, math_Vector &X) const |
Given an input vector , this routine returns the solution of the set of linear equations A . X = B. Exception NotDone is raised if the decomposition was not done successfully. Exception DimensionError is raised if the range of B is not equal to the rowrange of A. More... | |
const math_Matrix & | Inverse () const |
returns the inverse matrix of A. Only the inferior triangle is returned. Exception NotDone is raised if NotDone. More... | |
void | Invert (math_Matrix &Inv) const |
returns in Inv the inverse matrix of A. Only the inferior triangle is returned. Exception NotDone is raised if NotDone. More... | |
Standard_Real | Determinant () const |
Returns the value of the determinant of the previously LU decomposed matrix A. Zero is returned if the matrix A is considered as singular. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false). More... | |
void | Dump (Standard_OStream &o) const |
Prints on the stream o information on the current state of the object. More... | |
This class implements the Crout algorithm used to solve a system A*X = B where A is a symmetric matrix. It can be used to invert a symmetric matrix. This algorithm is similar to Gauss but is faster than Gauss. Only the inferior triangle of A and the diagonal can be given.
math_Crout::math_Crout | ( | const math_Matrix & | A, |
const Standard_Real | MinPivot = 1.0e-20 |
||
) |
Given an input matrix A, this algorithm inverts A by the Crout algorithm. The user can give only the inferior triangle for the implementation. A can be decomposed like this: A = L * D * T(L) where L is triangular inferior and D is diagonal. If one element of A is less than MinPivot, A is considered as singular. Exception NotSquare is raised if A is not a square matrix.
Standard_Real math_Crout::Determinant | ( | ) | const |
Returns the value of the determinant of the previously LU decomposed matrix A. Zero is returned if the matrix A is considered as singular. Exceptions StdFail_NotDone if the algorithm fails (and IsDone returns false).
void math_Crout::Dump | ( | Standard_OStream & | o | ) | const |
Prints on the stream o information on the current state of the object.
const math_Matrix& math_Crout::Inverse | ( | ) | const |
returns the inverse matrix of A. Only the inferior triangle is returned. Exception NotDone is raised if NotDone.
void math_Crout::Invert | ( | math_Matrix & | Inv | ) | const |
returns in Inv the inverse matrix of A. Only the inferior triangle is returned. Exception NotDone is raised if NotDone.
Standard_Boolean math_Crout::IsDone | ( | ) | const |
Returns True if all has been correctly done.
void math_Crout::Solve | ( | const math_Vector & | B, |
math_Vector & | X | ||
) | const |
Given an input vector , this routine returns the solution of the set of linear equations A . X = B. Exception NotDone is raised if the decomposition was not done successfully. Exception DimensionError is raised if the range of B is not equal to the rowrange of A.