linalg.texi
来自「math library from gnu」· TEXI 代码 · 共 1,201 行 · 第 1/4 页
TEXI
1,201 行
(@var{A}, @var{tau}) obtained from @code{gsl_linalg_symmtd_decomp} intothe orthogonal matrix @var{Q}, the vector of diagonal elements @var{diag}and the vector of subdiagonal elements @var{subdiag}. @end deftypefun@deftypefun int gsl_linalg_symmtd_unpack_T (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})This function unpacks the diagonal and subdiagonal of the encodedsymmetric tridiagonal decomposition (@var{A}, @var{tau}) obtained from@code{gsl_linalg_symmtd_decomp} into the vectors @var{diag} and @var{subdiag}.@end deftypefun@node Tridiagonal Decomposition of Hermitian Matrices@section Tridiagonal Decomposition of Hermitian Matrices@cindex tridiagonal decompositionA hermitian matrix @math{A} can be factorized by similaritytransformations into the form,@tex\beforedisplay$$A = U T U^T$$\afterdisplay@end tex@ifinfo@exampleA = U T U^T@end example@end ifinfo@noindentwhere @math{U} is a unitary matrix and @math{T} is a real symmetrictridiagonal matrix.@deftypefun int gsl_linalg_hermtd_decomp (gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{tau})This function factorizes the hermitian matrix @var{A} into the symmetrictridiagonal decomposition @math{U T U^T}. On output the real parts ofthe diagonal and subdiagonal part of the input matrix @var{A} containthe tridiagonal matrix @math{T}. The remaining lower triangular part ofthe input matrix contains the Householder vectors which, together withthe Householder coefficients @var{tau}, encode the orthogonal matrix@math{Q}. This storage scheme is the same as used by @sc{lapack}. Theupper triangular part of @var{A} and imaginary parts of the diagonal arenot referenced.@end deftypefun@deftypefun int gsl_linalg_hermtd_unpack (const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{tau}, gsl_matrix_complex * @var{Q}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})This function unpacks the encoded tridiagonal decomposition (@var{A},@var{tau}) obtained from @code{gsl_linalg_hermtd_decomp} into theunitary matrix @var{U}, the real vector of diagonal elements @var{diag} andthe real vector of subdiagonal elements @var{subdiag}. @end deftypefun@deftypefun int gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})This function unpacks the diagonal and subdiagonal of the encodedtridiagonal decomposition (@var{A}, @var{tau}) obtained from the@code{gsl_linalg_hermtd_decomp} into the real vectors@var{diag} and @var{subdiag}.@end deftypefun@node Hessenberg Decomposition of Real Matrices@section Hessenberg Decomposition of Real Matrices@cindex hessenberg decompositionA general real matrix @math{A} can be decomposed by orthogonalsimilarity transformations into the form@tex\beforedisplay$$A = U H U^T$$\afterdisplay@end tex@ifinfo@exampleA = U H U^T@end example@end ifinfowhere @math{U} is orthogonal and @math{H} is an upper Hessenberg matrix,meaning that it has zeros below the first subdiagonal. TheHessenberg reduction is the first step in the Schur decompositionfor the nonsymmetric eigenvalue problem, but has applications inother areas as well.@deftypefun int gsl_linalg_hessenberg_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau})This function computes the Hessenberg decomposition of the matrix@var{A} by applying the similarity transformation @math{H = U^T A U}.On output, @math{H} is stored in the upper portion of @var{A}. Theinformation required to construct the matrix @math{U} is stored inthe lower triangular portion of @var{A}. @math{U} is a productof @math{N - 2} Householder matrices. The Householder vectorsare stored in the lower portion of @var{A} (below the subdiagonal)and the Householder coefficients are stored in the vector @var{tau}.@var{tau} must be of length @var{N}.@end deftypefun@deftypefun int gsl_linalg_hessenberg_unpack (gsl_matrix * @var{H}, gsl_vector * @var{tau}, gsl_matrix * @var{U})This function constructs the orthogonal matrix @math{U} from theinformation stored in the Hessenberg matrix @var{H} along with thevector @var{tau}. @var{H} and @var{tau} are outputs from@code{gsl_linalg_hessenberg_decomp}.@end deftypefun@deftypefun int gsl_linalg_hessenberg_unpack_accum (gsl_matrix * @var{H}, gsl_vector * @var{tau}, gsl_matrix * @var{V})This function is similar to @code{gsl_linalg_hessenberg_unpack}, exceptit accumulates the matrix @var{U} into @var{V}, so that @math{V' = VU}.The matrix @var{V} must be initialized prior to calling this function.Setting @var{V} to the identity matrix provides the same result as@code{gsl_linalg_hessenberg_unpack}. If @var{H} is order @var{N}, then@var{V} must have @var{N} columns but may have any number of rows.@end deftypefun@deftypefun int gsl_linalg_hessenberg_set_zero (gsl_matrix * @var{H})This function sets the lower triangular portion of @var{H}, belowthe subdiagonal, to zero. It is useful for clearing out theHouseholder vectors after calling @code{gsl_linalg_hessenberg_decomp}.@end deftypefun@node Hessenberg-Triangular Decomposition of Real Matrices@section Hessenberg-Triangular Decomposition of Real Matrices@cindex hessenberg triangular decompositionA general real matrix pair (@math{A}, @math{B}) can be decomposed byorthogonal similarity transformations into the form@tex\beforedisplay$$A = U H V^T$$$$B = U R V^T$$\afterdisplay@end tex@ifinfo@exampleA = U H V^TB = U R V^T@end example@end ifinfowhere @math{U} and @math{V} are orthogonal, @math{H} is an upperHessenberg matrix, and @math{R} is upper triangular. TheHessenberg-Triangular reduction is the first step in the generalizedSchur decomposition for the generalized eigenvalue problem.@deftypefun int gsl_linalg_hesstri_decomp (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_matrix * @var{U}, gsl_matrix * @var{V}, gsl_vector * @var{work})This function computes the Hessenberg-Triangular decomposition of thematrix pair (@var{A}, @var{B}). On output, @math{H} is stored in @var{A},and @math{R} is stored in @var{B}. If @var{U} and @var{V} are provided(they may be null), the similarity transformations are stored in them.Additional workspace of length @math{N} is needed in @var{work}.@end deftypefun@node Bidiagonalization@section Bidiagonalization @cindex bidiagonalization of real matricesA general matrix @math{A} can be factorized by similaritytransformations into the form,@tex\beforedisplay$$A = U B V^T$$\afterdisplay@end tex@ifinfo@exampleA = U B V^T@end example@end ifinfo@noindentwhere @math{U} and @math{V} are orthogonal matrices and @math{B} is a@math{N}-by-@math{N} bidiagonal matrix with non-zero entries only on thediagonal and superdiagonal. The size of @var{U} is @math{M}-by-@math{N}and the size of @var{V} is @math{N}-by-@math{N}.@deftypefun int gsl_linalg_bidiag_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V})This function factorizes the @math{M}-by-@math{N} matrix @var{A} intobidiagonal form @math{U B V^T}. The diagonal and superdiagonal of thematrix @math{B} are stored in the diagonal and superdiagonal of @var{A}.The orthogonal matrices @math{U} and @var{V} are stored as compressedHouseholder vectors in the remaining elements of @var{A}. TheHouseholder coefficients are stored in the vectors @var{tau_U} and@var{tau_V}. The length of @var{tau_U} must equal the number ofelements in the diagonal of @var{A} and the length of @var{tau_V} shouldbe one element shorter.@end deftypefun@deftypefun int gsl_linalg_bidiag_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau_U}, gsl_matrix * @var{U}, const gsl_vector * @var{tau_V}, gsl_matrix * @var{V}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag})This function unpacks the bidiagonal decomposition of @var{A} produced by@code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V})into the separate orthogonal matrices @var{U}, @var{V} and the diagonalvector @var{diag} and superdiagonal @var{superdiag}. Note that @var{U}is stored as a compact @math{M}-by-@math{N} orthogonal matrix satisfying@math{U^T U = I} for efficiency.@end deftypefun@deftypefun int gsl_linalg_bidiag_unpack2 (gsl_matrix * @var{A}, gsl_vector * @var{tau_U}, gsl_vector * @var{tau_V}, gsl_matrix * @var{V})This function unpacks the bidiagonal decomposition of @var{A} produced by@code{gsl_linalg_bidiag_decomp}, (@var{A}, @var{tau_U}, @var{tau_V})into the separate orthogonal matrices @var{U}, @var{V} and the diagonalvector @var{diag} and superdiagonal @var{superdiag}. The matrix @var{U}is stored in-place in @var{A}.@end deftypefun@deftypefun int gsl_linalg_bidiag_unpack_B (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{superdiag})This function unpacks the diagonal and superdiagonal of the bidiagonaldecomposition of @var{A} from @code{gsl_linalg_bidiag_decomp}, intothe diagonal vector @var{diag} and superdiagonal vector @var{superdiag}.@end deftypefun@node Householder Transformations@section Householder Transformations@cindex Householder matrix@cindex Householder transformation@cindex transformation, HouseholderA Householder transformation is a rank-1 modification of the identitymatrix which can be used to zero out selected elements of a vector. AHouseholder matrix @math{P} takes the form,@tex\beforedisplay$$P = I - \tau v v^T$$\afterdisplay@end tex@ifinfo@exampleP = I - \tau v v^T@end example@end ifinfo@noindentwhere @math{v} is a vector (called the @dfn{Householder vector}) and@math{\tau = 2/(v^T v)}. The functions described in this section use therank-1 structure of the Householder matrix to create and applyHouseholder transformations efficiently.@deftypefun double gsl_linalg_householder_transform (gsl_vector * @var{v})@deftypefunx gsl_complex gsl_linalg_complex_householder_transform (gsl_vector_complex * @var{v})This function prepares a Householder transformation @math{P = I - \tau vv^T} which can be used to zero all the elements of the input vector exceptthe first. On output the transformation is stored in the vector @var{v}and the scalar @math{\tau} is returned.@end deftypefun@deftypefun int gsl_linalg_householder_hm (double tau, const gsl_vector * v, gsl_matrix * A)@deftypefunx int gsl_linalg_complex_householder_hm (gsl_complex tau, const gsl_vector_complex * v, gsl_matrix_complex * A)This function applies the Householder matrix @math{P} defined by thescalar @var{tau} and the vector @var{v} to the left-hand side of thematrix @var{A}. On output the result @math{P A} is stored in @var{A}.@end deftypefun@deftypefun int gsl_linalg_householder_mh (double tau, const gsl_vector * v, gsl_matrix * A)@deftypefunx int gsl_linalg_complex_householder_mh (gsl_complex tau, const gsl_vector_complex * v, gsl_matrix_complex * A)This function applies the Householder matrix @math{P} defined by thescalar @var{tau} and the vector @var{v} to the right-hand side of thematrix @var{A}. On output the result @math{A P} is stored in @var{A}.@end deftypefun@deftypefun int gsl_linalg_householder_hv (double tau, const gsl_vector * v, gsl_vector * w)@deftypefunx int gsl_linalg_complex_householder_hv (gsl_complex tau, const gsl_vector_complex * v, gsl_vector_complex * w)This function applies the Householder transformation @math{P} defined bythe scalar @var{tau} and the vector @var{v} to the vector @var{w}. Onoutput the result @math{P w} is stored in @var{w}.@end deftypefun@comment @deftypefun int gsl_linalg_householder_hm1 (double tau, gsl_matrix * A)@comment This function applies the Householder transform, defined by the scalar@comment @var{tau} and the vector @var{v}, to a matrix being build up from the@comment identity matrix, using the first column of @var{A} as a householder vector.@comment @end deftypefun@node Householder solver for linear systems@section Householder solver for linear systems@cindex solution of linear system by Householder transformations@cindex Householder linear solver@deftypefun int gsl_linalg_HH_solve (gsl_matrix * @var{A}, const gsl_vector * @var{b}, gsl_vector * @var{x})This function solves the system @math{A x = b} directly usingHouseholder transformations. On output the solution is stored in @var{x}and @var{b} is not modified. The matrix @var{A} is destroyed by theHouseholder transformations.@end deftypefun@deftypefun int gsl_linalg_HH_svx (gsl_matrix * @var{A}, gsl_vector * @var{x})This function solves the system @math{A x = b} in-place usingHouseholder transformations. On input @var{x} should contain theright-hand side @math{b}, which is replaced by the solution on output. Thematrix @var{A} is destroyed by the Householder transformations.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?