The classes RWPDFact, RWPDBandFact, and RWPDTriDiagFact encapsulate factorizations of positive definite symmetric matrices, which are Hermitians in the complex case. These classes produce a valid factorization only if the matrix being factored is positive definite. If the matrix is not positive definite, attempting to use the factorization to solve a system of equations results in an exception being thrown. To test if the factorization is valid, use the good() or fail() member functions.
Synopsis
#include <rw/lapack/pdbdfct.h>
#include <rw/lapack/pdfct.h>
#include <rw/lapack/pdtdfct.h>
#include <rw/math/genmat.h>// RWGenMat<T>, class T general
Constructs a factorization of the matrix A. This factorization can be used to solve systems of equations, and to calculate inverses and determinants. If the parameter ec is true, you can use the function condition() to obtain an estimate of the condition number of the matrix. Setting ec to false can save some computation if the condition number is not needed.
Calculates the reciprocal condition number of the matrix represented by this factorization. If this number is near 0, the matrix is ill-conditioned and solutions to systems of equations computed using this factorization may not be accurate. If the number is near 1, the matrix is well-conditioned. For the condition number to be computed, the norm of the matrix must be computed at the time the factorization is constructed. If you set the optional boolean parameter in RWPDFact() or factor() to false, calling condition() generates an exception.
Factors a matrix. Calling factor() replaces the current factorization with the factorization of the matrix A. This is commonly used to initialize a factorization constructed with the default (no arguments) constructor.
Checks whether the factorization is successfully constructed. If fail() returns true, attempting to use the factorization to solve a system of equations results in an exception being thrown.
Checks whether the factorization is successfully constructed. If good() returns false, attempting to use the factorization to solve a system of equations results in an exception being thrown.
Computes the inverse of the matrix represented by this factorization. Although matrix inverses are very useful in theoretical analysis, they are rarely necessary in implementation. A factorization is nearly always as useful as the actual inverse, and can be constructed at far less cost.
Tests if the matrix is positive definite. If the matrix is not positive definite, the factorization is not complete and you cannot use the factorization to solve systems of equations.
Tests if the matrix is singular to within machine precision. If the factorization is a positive definite type and the matrix that was factored is not actually positive definite, then isSingular() may return true regardless of whether or not the matrix is actually singular.
Solves a system of equations. Returns the matrix x, which satisfies , where A is the matrix represented by this factorization. It is wise to call one of the member functions good() or fail() to make sure that the factorization was successfully constructed.
Solves a system of equations. Returns the vector x, which satisfies , where A is the matrix represented by this factorization. It is wise to call one of the member functions good() or fail() to make sure that the factorization was successfully constructed.
Calculates the reciprocal condition number of the matrix represented by the factorization A. If this number is near 0, the matrix is ill-conditioned and solutions to systems of equations computed using this factorization may not be accurate. If the number is near 1, the matrix is well-conditioned. For the condition number to be computed, the norm of the matrix must be computed at the time the factorization is constructed. If you set the optional boolean parameter in the constructor or the factor member function to false, calling condition() generates an exception.
Computes the inverse of the matrix represented by the factorization A. Although matrix inverses are very useful in theoretical analysis, they are rarely necessary in implementation. A factorization is nearly always as useful as the actual inverse, and can be constructed at far less cost.
Solves a system of equations. Returns the matrix x, which satisfies , where A is the matrix represented by the factorization. It is wise to call one of the member functions good() or fail() to make sure that the factorization was successfully constructed.
Solves a system of equations. Returns the vector x, which satisfies , where A is the matrix represented by the factorization. It is wise to call one of the member functions good() or fail() to make sure that the factorization was successfully constructed.