eigen.texi
来自「math library from gnu」· TEXI 代码 · 共 829 行 · 第 1/3 页
TEXI
829 行
\beforedisplay$$A x = \lambda B x$$\afterdisplay@end tex@ifinfo@exampleA x = \lambda B x@end example@end ifinfowhere @math{A} and @math{B} are symmetric matrices, and @math{B} ispositive-definite. This problem reduces to the standard symmetriceigenvalue problem by applying the Cholesky decomposition to @math{B}:@tex\beforedisplay$$\eqalign{A x & = \lambda B x \crA x & = \lambda L L^t x \cr\left( L^{-1} A L^{-t} \right) L^t x & = \lambda L^t x}$$\afterdisplay@end tex@ifinfo@example A x = \lambda B x A x = \lambda L L^t x( L^@{-1@} A L^@{-t@} ) L^t x = \lambda L^t x@end example@end ifinfoTherefore, the problem becomes @math{C y = \lambda y} where@c{$C = L^{-1} A L^{-t}$}@math{C = L^@{-1@} A L^@{-t@}}is symmetric, and @math{y = L^t x}. The standardsymmetric eigensolver can be applied to the matrix @math{C}.The resulting eigenvectors are backtransformed to find thevectors of the original problem. The eigenvalues and eigenvectorsof the generalized symmetric-definite eigenproblem are always real.@deftypefun {gsl_eigen_gensymm_workspace *} gsl_eigen_gensymm_alloc (const size_t @var{n})This function allocates a workspace for computing eigenvalues of@var{n}-by-@var{n} real generalized symmetric-definite eigensystems. Thesize of the workspace is @math{O(2n)}.@end deftypefun@deftypefun void gsl_eigen_gensymm_free (gsl_eigen_gensymm_workspace * @var{w})This function frees the memory associated with the workspace @var{w}.@end deftypefun@deftypefun int gsl_eigen_gensymm (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector * @var{eval}, gsl_eigen_gensymm_workspace * @var{w})This function computes the eigenvalues of the real generalizedsymmetric-definite matrix pair (@var{A}, @var{B}), and stores them in @var{eval}, using the method outlined above. On output, @var{B}contains its Cholesky decomposition and @var{A} is destroyed.@end deftypefun@deftypefun {gsl_eigen_gensymmv_workspace *} gsl_eigen_gensymmv_alloc (const size_t @var{n})This function allocates a workspace for computing eigenvalues andeigenvectors of @var{n}-by-@var{n} real generalized symmetric-definiteeigensystems. The size of the workspace is @math{O(4n)}.@end deftypefun@deftypefun void gsl_eigen_gensymmv_free (gsl_eigen_gensymmv_workspace * @var{w})This function frees the memory associated with the workspace @var{w}.@end deftypefun@deftypefun int gsl_eigen_gensymmv (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector * @var{eval}, gsl_matrix * @var{evec}, gsl_eigen_gensymmv_workspace * @var{w})This function computes the eigenvalues and eigenvectors of the realgeneralized symmetric-definite matrix pair (@var{A}, @var{B}), andstores them in @var{eval} and @var{evec} respectively. The computedeigenvectors are normalized to have unit magnitude. On output,@var{B} contains its Cholesky decomposition and @var{A} is destroyed.@end deftypefun@node Complex Generalized Hermitian-Definite Eigensystems@section Complex Generalized Hermitian-Definite Eigensystems@cindex generalized hermitian definite eigensystemsThe complex generalized hermitian-definite eigenvalue problem is to findeigenvalues @math{\lambda} and eigenvectors @math{x} such that@tex\beforedisplay$$A x = \lambda B x$$\afterdisplay@end tex@ifinfo@exampleA x = \lambda B x@end example@end ifinfowhere @math{A} and @math{B} are hermitian matrices, and @math{B} ispositive-definite. Similarly to the real case, this can be reducedto @math{C y = \lambda y} where@c{$C = L^{-1} A L^{-\dagger}$}@math{C = L^@{-1@} A L^@{-H@}}is hermitian, and@c{$y = L^{\dagger} x$}@math{y = L^H x}. The standardhermitian eigensolver can be applied to the matrix @math{C}.The resulting eigenvectors are backtransformed to find thevectors of the original problem. The eigenvaluesof the generalized hermitian-definite eigenproblem are always real.@deftypefun {gsl_eigen_genherm_workspace *} gsl_eigen_genherm_alloc (const size_t @var{n})This function allocates a workspace for computing eigenvalues of@var{n}-by-@var{n} complex generalized hermitian-definite eigensystems. Thesize of the workspace is @math{O(3n)}.@end deftypefun@deftypefun void gsl_eigen_genherm_free (gsl_eigen_genherm_workspace * @var{w})This function frees the memory associated with the workspace @var{w}.@end deftypefun@deftypefun int gsl_eigen_genherm (gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}, gsl_vector * @var{eval}, gsl_eigen_genherm_workspace * @var{w})This function computes the eigenvalues of the complex generalizedhermitian-definite matrix pair (@var{A}, @var{B}), and stores them in @var{eval}, using the method outlined above. On output, @var{B}contains its Cholesky decomposition and @var{A} is destroyed.@end deftypefun@deftypefun {gsl_eigen_genhermv_workspace *} gsl_eigen_genhermv_alloc (const size_t @var{n})This function allocates a workspace for computing eigenvalues andeigenvectors of @var{n}-by-@var{n} complex generalized hermitian-definiteeigensystems. The size of the workspace is @math{O(5n)}.@end deftypefun@deftypefun void gsl_eigen_genhermv_free (gsl_eigen_genhermv_workspace * @var{w})This function frees the memory associated with the workspace @var{w}.@end deftypefun@deftypefun int gsl_eigen_genhermv (gsl_matrix_complex * @var{A}, gsl_matrix_complex * @var{B}, gsl_vector * @var{eval}, gsl_matrix_complex * @var{evec}, gsl_eigen_genhermv_workspace * @var{w})This function computes the eigenvalues and eigenvectors of the complexgeneralized hermitian-definite matrix pair (@var{A}, @var{B}), andstores them in @var{eval} and @var{evec} respectively. The computedeigenvectors are normalized to have unit magnitude. On output,@var{B} contains its Cholesky decomposition and @var{A} is destroyed.@end deftypefun@node Real Generalized Nonsymmetric Eigensystems@section Real Generalized Nonsymmetric Eigensystems@cindex generalized eigensystemsGiven two square matrices (@math{A}, @math{B}), the generalizednonsymmetric eigenvalue problem is to find eigenvalues @math{\lambda} andeigenvectors @math{x} such that@tex\beforedisplay$$A x = \lambda B x$$\afterdisplay@end tex@ifinfo@exampleA x = \lambda B x@end example@end ifinfoWe may also define the problem as finding eigenvalues @math{\mu} andeigenvectors @math{y} such that@tex\beforedisplay$$\mu A y = B y$$\afterdisplay@end tex@ifinfo@example\mu A y = B y@end example@end ifinfoNote that these two problems are equivalent (with @math{\lambda = 1/\mu})if neither @math{\lambda} nor @math{\mu} is zero. If say, @math{\lambda}is zero, then it is still a well defined eigenproblem, but its alternateproblem involving @math{\mu} is not. Therefore, to allow for zero(and infinite) eigenvalues, the problem which is actually solved is@tex\beforedisplay$$\beta A x = \alpha B x$$\afterdisplay@end tex@ifinfo@example\beta A x = \alpha B x@end example@end ifinfoThe eigensolver routines below will return two values @math{\alpha}and @math{\beta} and leave it to the user to perform the divisions@math{\lambda = \alpha / \beta} and @math{\mu = \beta / \alpha}.If the determinant of the matrix pencil @math{A - \lambda B} is zerofor all @math{\lambda}, the problem is said to be singular; otherwiseit is called regular. Singularity normally leads to some@math{\alpha = \beta = 0} which means the eigenproblem is ill-conditionedand generally does not have well defined eigenvalue solutions. Theroutines below are intended for regular matrix pencils and could yieldunpredictable results when applied to singular pencils.The solution of the real generalized nonsymmetric eigensystem problem for amatrix pair @math{(A, B)} involves computing the generalized Schurdecomposition@tex\beforedisplay$$A = Q S Z^T$$$$B = Q T Z^T$$\afterdisplay@end tex@ifinfo@exampleA = Q S Z^TB = Q T Z^T@end example@end ifinfowhere @math{Q} and @math{Z} are orthogonal matrices of left and rightSchur vectors respectively, and @math{(S, T)} is the generalized Schurform whose diagonal elements give the @math{\alpha} and @math{\beta}values. The algorithm used is the QZ method due to Moler and Stewart(see references).@deftypefun {gsl_eigen_gen_workspace *} gsl_eigen_gen_alloc (const size_t @var{n})This function allocates a workspace for computing eigenvalues of@var{n}-by-@var{n} real generalized nonsymmetric eigensystems. Thesize of the workspace is @math{O(n)}.@end deftypefun@deftypefun void gsl_eigen_gen_free (gsl_eigen_gen_workspace * @var{w})This function frees the memory associated with the workspace @var{w}.@end deftypefun@deftypefun void gsl_eigen_gen_params (const int @var{compute_s}, const int @var{compute_t}, const int @var{balance}, gsl_eigen_gen_workspace * @var{w})This function sets some parameters which determine how the eigenvalueproblem is solved in subsequent calls to @code{gsl_eigen_gen}.If @var{compute_s} is set to 1, the full Schur form @math{S} will becomputed by @code{gsl_eigen_gen}. If it is set to 0,@math{S} will not be computed (this is the default setting). @math{S}is a quasi upper triangular matrix with 1-by-1 and 2-by-2 blockson its diagonal. 1-by-1 blocks correspond to real eigenvalues, and2-by-2 blocks correspond to complex eigenvalues.If @var{compute_t} is set to 1, the full Schur form @math{T} will becomputed by @code{gsl_eigen_gen}. If it is set to 0,@math{T} will not be computed (this is the default setting). @math{T}is an upper triangular matrix with non-negative elements on its diagonal.Any 2-by-2 blocks in @math{S} will correspond to a 2-by-2 diagonalblock in @math{T}.The @var{balance} parameter is currently ignored, since generalizedbalancing is not yet implemented.@end deftypefun@deftypefun int gsl_eigen_gen (gsl_matrix * @var{A}, gsl_matrix * @var{B}, gsl_vector_complex * @var{alpha}, gsl_vector * @var{beta}, gsl_eigen_gen_workspace * @var{w})This function computes the eigenvalues of the real generalized nonsymmetricmatrix pair (@var{A}, @var{B}), and stores them as pairs in(@var{alpha}, @var{beta}), where @var{alpha} is complex and @var{beta} isreal. If @math{\beta_i} is non-zero, then@math{\lambda = \alpha_i / \beta_i} is an eigenvalue. Likewise,if @math{\alpha_i} is non-zero, then@math{\mu = \beta_i / \alpha_i} is an eigenvalue of the alternateproblem @math{\mu A y = B y}. The elements of @var{beta} are normalizedto be non-negative.If @math{S} is desired, it is stored in @var{A} on output. If @math{T}is desired, it is stored in @var{B} on output. The ordering ofeigenvalues in (@var{alpha}, @var{beta}) follows the orderingof the diagonal blocks in the Schur forms @math{S} and @math{T}. In rarecases, this function may fail to find all eigenvalues. If this occurs, an
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?