![]() |
University of Murcia, Spain ![]() |
Matrix AlgebraSeveral matrix functions. |
Functions | |
void | singularValueDecomposition (const QVMatrix &M, QVMatrix &U, QVMatrix &V, QVMatrix &S) |
Obtains the singular value decomposition (SVD) for a matrix. | |
void | LUDecomposition (const QVMatrix &M, QVMatrix &L, QVMatrix &U, QVMatrix &P) |
Obtains the LU decomposition for a matrix. | |
void | CholeskyDecomposition (const QVMatrix &M, QVMatrix &L) |
Obtains the Cholesky decomposition for a matrix. | |
void | QRDecomposition (const QVMatrix &M, QVMatrix &Q, QVMatrix &R) |
Obtains the QR decomposition for a matrix. | |
QVMatrix | pseudoInverse (const QVMatrix &M) |
Obtains the pseudoinverse for a matrix. | |
void | eigenDecomposition (const QVMatrix &M, QVVector &eigVals, QVMatrix &eigVecs) |
Obtains the eigendecomposition for a symetric matrix. | |
double | determinant (const QVMatrix &M) |
Obtains the determinant of a squared matrix. | |
void | solveLinear (const QVMatrix &A, QVVector &x, const QVVector &b) |
Solves a system of linear equations using a Householder transformation. | |
void | solveLinear (const QVMatrix &A, QVMatrix &X, const QVMatrix &B) |
Solves several system of linear equations, using a LU decomposition. | |
void | solveOverDetermined (const QVMatrix &A, QVMatrix &X, const QVMatrix &B) |
Solves several system of linear equations, using a SV decomposition. | |
void | solveHomogeneousLinear (const QVMatrix &A, QVector< double > &x) |
Solves an homogeneous linear system. |
Decompositions, etc...
Obtains the Cholesky decomposition for a matrix.
M | matrix containing matrix to decompose (must be positive-definite) | |
L | matrix to store resulting matrix L from decomposition |
Definition at line 278 of file qvmatrixalgebra.cpp.
double determinant | ( | const QVMatrix & | M | ) |
Obtains the determinant of a squared matrix.
M | matrix to obtain the determinant |
Por ahora con la SVD, quizá sería mejor de otro modo...
Definition at line 356 of file qvmatrixalgebra.cpp.
Referenced by QVMatrix::det().
Obtains the eigendecomposition for a symetric matrix.
M | symetric matrix to obtain eigendecomposition | |
eigVals | matrix to store resulting eigenvalues vector | |
eigVecs | matrix to store resulting eigenvectors matrix, as row vectors |
Definition at line 385 of file qvmatrixalgebra.cpp.
Obtains the LU decomposition for a matrix.
Returms two triangular, upper and lower, matrixes and a permutation matrix (identity if M is invertible). And M = P*L*U
M | matrix containing matrix to decompose | |
L | matrix to store resulting matrix L from decomposition | |
U | matrix to store resulting matrix U from decomposition | |
P | matrix to store resulting matrix P from decomposition |
Definition at line 224 of file qvmatrixalgebra.cpp.
Obtains the pseudoinverse for a matrix.
M | matrix containing matrix to obtain pseudoinverse |
Definition at line 338 of file qvmatrixalgebra.cpp.
Referenced by GetExtrinsicCameraMatrixFromHomography(), QVMatrix::inverse(), and pseudoInverse().
Obtains the QR decomposition for a matrix.
M | matrix containing matrix to decompose | |
Q | matrix to store resulting matrix Q from decomposition | |
R | matrix to store resulting matrix R from decomposition |
Definition at line 304 of file qvmatrixalgebra.cpp.
Obtains the singular value decomposition (SVD) for a matrix.
M | matrix containing matrix to decompose | |
U | matrix to store resulting matrix U from decomposition | |
V | matrix to store resulting matrix V from decomposition | |
S | matrix to store resulting matrix S from decomposition |
Definition at line 172 of file qvmatrixalgebra.cpp.
Referenced by determinant(), pseudoInverse(), and solveHomogeneousLinear().
void solveHomogeneousLinear | ( | const QVMatrix & | A, | |
QVector< double > & | x | |||
) |
Solves an homogeneous linear system.
A | coeficient matrix in the matrix equation form of the problem. | |
x | vector to store the solution. |
Definition at line 128 of file qvmatrixalgebra.cpp.
Referenced by ComputeProjectiveHomography().
Solves several system of linear equations, using a LU decomposition.
A | coeficient matrix in the matrix equation form of the problem. | |
x | matrix to store the solutions, each column is a solution. | |
B | right-hand side matrix in the matrix equation form of the problem, each column is a right-hand side. |
Definition at line 48 of file qvmatrixalgebra.cpp.
Solves a system of linear equations using a Householder transformation.
A | coeficient matrix in the matrix equation form of the problem. | |
x | vector to store the solution. | |
B | right-hand side vector in the matrix equation form of the problem. |
Definition at line 32 of file qvmatrixalgebra.cpp.
Referenced by QVMatrix::matrixDivide().
Solves several system of linear equations, using a SV decomposition.
Solves determined and over-determined systems, in the over-determined case the system is solved in the least squares sense.
A | coeficient matrix in the matrix equation form of the problem. | |
x | matrix to store the solutions, each column is a solution. | |
B | right-hand side matrix in the matrix equation form of the problem, each column is a right-hand side. |
Definition at line 85 of file qvmatrixalgebra.cpp.
Referenced by QVMatrix::matrixDivide().