Open CASCADE Technology
7.2.0
|
This class implements the least square solution of a set of linear equations of m unknowns (n >= m) using the Householder method. It solves A.X = B. This algorithm has more numerical stability than GaussLeastSquare but is longer. It must be used if the matrix is singular or nearly singular. It is about 16% longer than GaussLeastSquare if there is only one member B to solve. It is about 30% longer if there are twenty B members to solve. More...
#include <math_Householder.hxx>
Public Member Functions | |
math_Householder (const math_Matrix &A, const math_Matrix &B, const Standard_Real EPS=1.0e-20) | |
Given an input matrix A with n>= m, given an input matrix B this constructor performs the least square resolution of the set of linear equations A.X = B for each column of B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the row number of B is different from the A row number. More... | |
math_Householder (const math_Matrix &A, const math_Matrix &B, const Standard_Integer lowerArow, const Standard_Integer upperArow, const Standard_Integer lowerAcol, const Standard_Integer upperAcol, const Standard_Real EPS=1.0e-20) | |
Given an input matrix A with n>= m, given an input matrix B this constructor performs the least square resolution of the set of linear equations A.X = B for each column of B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the row number of B is different from the A row number. More... | |
math_Householder (const math_Matrix &A, const math_Vector &B, const Standard_Real EPS=1.0e-20) | |
Given an input matrix A with n>= m, given an input vector B this constructor performs the least square resolution of the set of linear equations A.X = B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the length of B is different from the A row number. More... | |
Standard_Boolean | IsDone () const |
Returns true if the computations are successful, otherwise returns false. More... | |
void | Value (math_Vector &sol, const Standard_Integer Index=1) const |
Given the integer Index, this routine returns the corresponding least square solution sol. Exception NotDone is raised if the resolution has not be done. Exception OutOfRange is raised if Index <=0 or Index is more than the number of columns of B. More... | |
const math_Matrix & | AllValues () const |
Returns the matrix sol of all the solutions of the system A.X = B. Exception NotDone is raised is the resolution has not be done. More... | |
void | Dump (Standard_OStream &o) const |
Prints informations on the current state of the object. More... | |
Protected Member Functions | |
void | Perform (const math_Matrix &A, const math_Matrix &B, const Standard_Real EPS) |
This method is used internally for each constructor above and can't be used directly. More... | |
This class implements the least square solution of a set of linear equations of m unknowns (n >= m) using the Householder method. It solves A.X = B. This algorithm has more numerical stability than GaussLeastSquare but is longer. It must be used if the matrix is singular or nearly singular. It is about 16% longer than GaussLeastSquare if there is only one member B to solve. It is about 30% longer if there are twenty B members to solve.
math_Householder::math_Householder | ( | const math_Matrix & | A, |
const math_Matrix & | B, | ||
const Standard_Real | EPS = 1.0e-20 |
||
) |
Given an input matrix A with n>= m, given an input matrix B this constructor performs the least square resolution of the set of linear equations A.X = B for each column of B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the row number of B is different from the A row number.
math_Householder::math_Householder | ( | const math_Matrix & | A, |
const math_Matrix & | B, | ||
const Standard_Integer | lowerArow, | ||
const Standard_Integer | upperArow, | ||
const Standard_Integer | lowerAcol, | ||
const Standard_Integer | upperAcol, | ||
const Standard_Real | EPS = 1.0e-20 |
||
) |
Given an input matrix A with n>= m, given an input matrix B this constructor performs the least square resolution of the set of linear equations A.X = B for each column of B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the row number of B is different from the A row number.
math_Householder::math_Householder | ( | const math_Matrix & | A, |
const math_Vector & | B, | ||
const Standard_Real | EPS = 1.0e-20 |
||
) |
Given an input matrix A with n>= m, given an input vector B this constructor performs the least square resolution of the set of linear equations A.X = B. If a column norm is less than EPS, the resolution can't be done. Exception DimensionError is raised if the length of B is different from the A row number.
const math_Matrix& math_Householder::AllValues | ( | ) | const |
Returns the matrix sol of all the solutions of the system A.X = B. Exception NotDone is raised is the resolution has not be done.
void math_Householder::Dump | ( | Standard_OStream & | o | ) | const |
Prints informations on the current state of the object.
Standard_Boolean math_Householder::IsDone | ( | ) | const |
Returns true if the computations are successful, otherwise returns false.
|
protected |
This method is used internally for each constructor above and can't be used directly.
void math_Householder::Value | ( | math_Vector & | sol, |
const Standard_Integer | Index = 1 |
||
) | const |
Given the integer Index, this routine returns the corresponding least square solution sol. Exception NotDone is raised if the resolution has not be done. Exception OutOfRange is raised if Index <=0 or Index is more than the number of columns of B.