📄 laslv.h
字号:
* * 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. * * @param A Matrix factorized output matrix from LUFactorizeIP * @param PIV Vector pivoting indices output from LUFactorizeIP. */DLLIMPORTvoid LaLUInverseIP(LaGenMatComplex &A, LaVectorLongInt &PIV);/** @brief 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. * * @param A Matrix factorized output matrix from LUFactorizeIP * @param PIV Vector pivoting indices output from LUFactorizeIP. * @param 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. */DLLIMPORTvoid LaLUInverseIP(LaGenMatComplex &A, LaVectorLongInt &PIV, LaVectorComplex &work);#endif // LA_COMPLEX_SUPPORT#ifdef _LA_SPD_MAT_DOUBLE_H_DLLIMPORTvoid LaLinearSolve( const LaSpdMatDouble& A, LaGenMatDouble& X, LaGenMatDouble& B );DLLIMPORTvoid LaLinearSolveIP( LaSpdMatDouble& A, LaGenMatDouble& X, LaGenMatDouble& B );DLLIMPORTvoid LaCholLinearSolve( const LaSpdMatDouble& A, LaGenMatDouble& X, LaGenMatDouble& B );DLLIMPORTvoid LaCholLinearSolveIP( LaSpdMatDouble& A, LaGenMatDouble& X, LaGenMatDouble& B );#endif // _LA_SPD_MAT_DOUBLE_H_#ifdef _LA_SYMM_MAT_DOUBLE_H_/** FIXME: Document me! FIXME: Needs verification. */DLLIMPORTvoid LaLinearSolve( const LaSymmMatDouble& A, LaGenMatDouble& X, const LaGenMatDouble& B );/** FIXME: Document me! FIXME: Needs verification. */DLLIMPORTvoid LaLinearSolveIP( LaSymmMatDouble& A, LaGenMatDouble& X, const LaGenMatDouble& B );/** FIXME: Document me! FIXME: Needs verification. */DLLIMPORTvoid LaCholLinearSolve( const LaSymmMatDouble& A, LaGenMatDouble& X, const LaGenMatDouble& B );/** FIXME: Document me! FIXME: Needs verification. */DLLIMPORTvoid LaCholLinearSolveIP( LaSymmMatDouble& A, LaGenMatDouble& X, const LaGenMatDouble& B );// Eigenvalue problems DLLIMPORTvoid LaEigSolve(const LaSymmMatDouble &S, LaVectorDouble &eigvals);DLLIMPORTvoid LaEigSolve(const LaSymmMatDouble &S, LaVectorDouble &eigvals, LaGenMatDouble &eigvec);DLLIMPORTvoid LaEigSolveIP(LaSymmMatDouble &S, LaVectorDouble &eigvals);#endif // _LA_SYMM_MAT_DOUBLE_H_#ifdef LA_COMPLEX_SUPPORT/** This function calculates all eigenvalues and eigenvectors of a * <i>general</i> matrix A. Uses \c dgeev . A wrapper for the other * function that uses two LaVectorDouble's for the eigenvalues. * * Uses @c dgeev * * @param A On entry, the general matrix A of dimension N x N. * * @param 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. * * @param VR On exit, the right eigenvectors v(j) are stored one * after another in the columns of \c 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.*/DLLIMPORTvoid LaEigSolve(const LaGenMatDouble &A, LaVectorComplex &eigvals, LaGenMatDouble &VR);#endif/** This function calculates all eigenvalues and eigenvectors of a * <i>general</i> matrix A. * * Uses @c dgeev * * @param A On entry, the general matrix A of dimension N x N. * * @param 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. * * @param 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. * * @param VR On exit, the right eigenvectors v(j) are stored one * after another in the columns of \c 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. * * FIXME: Needs verification! */DLLIMPORTvoid LaEigSolve(const LaGenMatDouble &A, LaVectorDouble &eigvals_real, LaVectorDouble &eigvals_imag, LaGenMatDouble &VR);/** FIXME: This is a misleading function! This function calculates all * eigenvalues and eigenvectors of a <i>symmetric</i> matrix A, <i>not * a general matrix A</i>! * * In-place means: The contents of A_symmetric are overwritten * during the calculation. * * @param 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. * * @param eigvals Vector of length at least N. On exit, this * vector contains the N eigenvalues. * * FIXME: Needs verification! FIXME: This uses dsyev which only works * on symmetric matrices. Instead, this should be changed to use dgeev * or even better dgeevx. For the complex case, we would have to write * another function that uses zgeev or zgeevx. * * New in lapackpp-2.4.9. */DLLIMPORTvoid LaEigSolveSymmetricVecIP(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 <i>symmetric</i> matrix A, * <i>not a general matrix A</i>! * * This function just passes on the arguments to * LaEigSolveSymmetricVecIP(). * * \deprecated */DLLIMPORTvoid LaEigSolveVecIP(LaGenMatDouble &A_symmetric, LaVectorDouble &eigvals);#ifdef LA_COMPLEX_SUPPORT/** Compute for an N-by-N complex nonsymmetric matrix A the * eigenvalues, and the right eigenvectors. Uses \c zgeev . * * (FIXME: Should add the option to select calculation of left * eigenvectors instead of the right eigenvectors, or both, or * none.) * * @param A On entry, the general matrix A of dimension N x N. * * @param W Contains the computed eigenvalues. The given argument * must be a vector of length N whose content will be overwritten. * * @param VR On exit, the right eigenvectors v(j) are stored one * after another in the columns of \c 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. * * FIXME: Needs verification! */DLLIMPORTvoid LaEigSolve(const LaGenMatComplex &A, LaVectorComplex &W, LaGenMatComplex &VR);#endif // LA_COMPLEX_SUPPORT/** @brief 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. * * @param A Matrix factorized output matrix from LUFactorizeIP * @param PIV Vector pivoting indices output from LUFactorizeIP. */DLLIMPORTvoid LaLUInverseIP(LaGenMatDouble &A, LaVectorLongInt &PIV);/** @brief 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. * * @param A Matrix factorized output matrix from LUFactorizeIP * @param PIV Vector pivoting indices output from LUFactorizeIP. * @param 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. */DLLIMPORTvoid LaLUInverseIP(LaGenMatDouble &A, LaVectorLongInt &PIV, LaVectorDouble &work);#endif // _LASLV_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -