Go to the source code of this file.
void LaLinearSolve | ( | const LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B
Depending on the dimensions of A, either a LU or a QR decomposition is used.
void LaLinearSolveIP | ( | LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B in-place.
Depending on the dimensions of A, either a LU or a QR decomposition is used.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LaLULinearSolve | ( | const LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B by using the LU decomposition. This only works for a squares matrix A.
void LaLULinearSolveIP | ( | LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B by using the LU decomposition in-place. This only works for a squares matrix A.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LaQRLinearSolve | ( | const LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B by using QR decomposition, which works for any rectangular matrix A.
void LaQRLinearSolveIP | ( | LaGenMatDouble & | A, | |
LaGenMatDouble & | X, | |||
const LaGenMatDouble & | B | |||
) |
Compute the solution to a real system of linear equations A*X=B by using the QR decomposition in-place. This works for any rectangular matrix A.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LUFactorizeIP | ( | LaGenMatDouble & | GM, | |
LaVectorLongInt & | PIV | |||
) |
Compute the LU factorization.
Compute the LU factorization (in-place) of a general M-by-N matrix A.
More info: See man dgetrf
.
In-place means: The contents of GM are overwritten during the calculation.
GM | Matrix to be factorized in-place. | |
PIV | Vector to return the pivoting indices. This vector *has* to be at least as long as min(M,N). |
void LaLinearSolve | ( | const LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B
Depending on the dimensions of A, either a LU or a QR decomposition is used.
void LaLinearSolveIP | ( | LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B in-place.
Depending on the dimensions of A, either a LU or a QR decomposition is used.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LaLULinearSolve | ( | const LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B by using the LU decomposition. This only works for a squares matrix A.
void LaLULinearSolveIP | ( | LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B by using the LU decomposition in-place. This only works for a squares matrix A.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LaQRLinearSolve | ( | const LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B by using QR decomposition, which works for any rectangular matrix A.
void LaQRLinearSolveIP | ( | LaGenMatComplex & | A, | |
LaGenMatComplex & | X, | |||
const LaGenMatComplex & | B | |||
) |
Compute the solution to a complex-valued system of linear equations A*X=B by using the QR decomposition in-place. This works for any rectangular matrix A.
In-place means: The contents of A are overwritten during the calculation. B is not overwritten but always copied during this operation.
void LUFactorizeIP | ( | LaGenMatComplex & | GM, | |
LaVectorLongInt & | PIV | |||
) |
Compute the LU factorization.
Compute the LU factorization (in-place) of a general M-by-N matrix A.
In-place means: The contents of GM are overwritten during the calculation.
More info: See man zgetrf
.
GM | Matrix to be factorized in-place. | |
PIV | Vector to return the pivoting indices. This vector *has* to be at least as long as min(M,N). |
void LaLUInverseIP | ( | LaGenMatComplex & | A, | |
LaVectorLongInt & | PIV | |||
) |
Compute the inverse of a matrix from LU factorization.
Compute the inverse of a matrix in-place based on output from LUFactorizeIP
In-place means: The contents of A are overwritten during the calculation.
A | Matrix factorized output matrix from LUFactorizeIP | |
PIV | Vector pivoting indices output from LUFactorizeIP. |
void LaLUInverseIP | ( | LaGenMatComplex & | A, | |
LaVectorLongInt & | PIV, | |||
LaVectorComplex & | work | |||
) |
Compute the inverse of a matrix from LU factorization.
Compute the inverse of a matrix in-place based on output from LUFactorizeIP
In-place means: The contents of A are overwritten during the calculation.
A | Matrix factorized output matrix from LUFactorizeIP | |
PIV | Vector pivoting indices output from LUFactorizeIP. | |
work | Vector temporary work area (can be reused for efficiency). work.size() must be at least A.size(0), if it is less, it will get resized. |
void LaEigSolve | ( | const LaGenMatDouble & | A, | |
LaVectorComplex & | eigvals, | |||
LaGenMatDouble & | VR | |||
) |
This function calculates all eigenvalues and eigenvectors of a general matrix A. Uses dgeev
. A wrapper for the other function that uses two LaVectorDouble's for the eigenvalues.
Uses dgeev
A | On entry, the general matrix A of dimension N x N. | |
eigvals | On exit, this vector contains the eigenvalues. Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The given argument must be a vector of length N whose content will be overwritten. | |
VR | On exit, the right eigenvectors v(j) are stored one after another in the columns of VR , in the same order as their eigenvalues. If the j- th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If the j-th and (j+1)-st eigenvalues form a complex con- jugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and v(j+1) = VR(:,j) - i*VR(:,j+1). The given argument can be of size NxN, in which case the content will be overwritten, or of any other size, in which case it will be resized to dimension NxN. |
void LaEigSolve | ( | const LaGenMatDouble & | A, | |
LaVectorDouble & | eigvals_real, | |||
LaVectorDouble & | eigvals_imag, | |||
LaGenMatDouble & | VR | |||
) |
This function calculates all eigenvalues and eigenvectors of a general matrix A.
Uses dgeev
A | On entry, the general matrix A of dimension N x N. | |
eigvals_real | On exit, this vector contains the real parts of the eigenvalues. Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The given argument must be a vector of length N whose content will be overwritten. | |
eigvals_imag | On exit, this vector contains the imaginary parts of the eigenvalues. The given argument must be a vector of length N whose content will be overwritten. | |
VR | On exit, the right eigenvectors v(j) are stored one after another in the columns of VR , in the same order as their eigenvalues. If the j- th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If the j-th and (j+1)-st eigenvalues form a complex con- jugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and v(j+1) = VR(:,j) - i*VR(:,j+1). The given argument can be of size NxN, in which case the content will be overwritten, or of any other size, in which case it will be resized to dimension NxN. |
void LaEigSolveSymmetricVecIP | ( | LaGenMatDouble & | A_symmetric, | |
LaVectorDouble & | eigvals | |||
) |
FIXME: This is a misleading function! This function calculates all eigenvalues and eigenvectors of a symmetric matrix A, not a general matrix A!
In-place means: The contents of A_symmetric are overwritten during the calculation.
A_symmetric | On entry, the symmetric (not a general!!) matrix A. The leading N-by-N lower triangular part of A is used as the lower triangular part of the matrix to be decomposed. On exit, A contains the orthonormal eigenvectors of the matrix. | |
eigvals | Vector of length at least N. On exit, this vector contains the N eigenvalues. |
New in lapackpp-2.4.9.
void LaEigSolveVecIP | ( | LaGenMatDouble & | A_symmetric, | |
LaVectorDouble & | eigvals | |||
) |
DEPRECATED, has been renamed into LaEigSolveSymmetricVecIP().
This is a misleading function! This function calculates all eigenvalues and eigenvectors of a symmetric matrix A, not a general matrix A!
This function just passes on the arguments to LaEigSolveSymmetricVecIP().
void LaEigSolve | ( | const LaGenMatComplex & | A, | |
LaVectorComplex & | W, | |||
LaGenMatComplex & | VR | |||
) |
Compute for an N-by-N complex nonsymmetric matrix A the eigenvalues, and the right eigenvectors. Uses zgeev
.
(FIXME: Should add the option to select calculation of left eigenvectors instead of the right eigenvectors, or both, or none.)
A | On entry, the general matrix A of dimension N x N. | |
W | Contains the computed eigenvalues. The given argument must be a vector of length N whose content will be overwritten. | |
VR | On exit, the right eigenvectors v(j) are stored one after another in the columns of VR , in the same order as their eigenvalues. The given argument can be of size NxN or greater, in which case the content will be overwritten, or of any other size, in which case it will be resized to dimension NxN. |
void LaLUInverseIP | ( | LaGenMatDouble & | A, | |
LaVectorLongInt & | PIV | |||
) |
Compute the inverse of a matrix from LU factorization.
Compute the inverse of a matrix in-place based on output from LUFactorizeIP
In-place means: The contents of A are overwritten during the calculation.
A | Matrix factorized output matrix from LUFactorizeIP | |
PIV | Vector pivoting indices output from LUFactorizeIP. |
void LaLUInverseIP | ( | LaGenMatDouble & | A, | |
LaVectorLongInt & | PIV, | |||
LaVectorDouble & | work | |||
) |
Compute the inverse of a matrix from LU factorization.
Compute the inverse of a matrix in-place based on output from LUFactorizeIP
In-place means: The contents of A are overwritten during the calculation.
A | Matrix factorized output matrix from LUFactorizeIP | |
PIV | Vector pivoting indices output from LUFactorizeIP. | |
work | Vector temporary work area (can be reused for efficiency). work.size() must be at least A.size(0), if it is less, it will get resized. |