GSL::Eigen::Symm::Workspace.alloc(n)
GSL::Eigen::Symmv::Workspace.alloc(n)
GSL::Eigen::Herm::Workspace.alloc(n)
GSL::Eigen::Hermv::Workspace.alloc(n)
GSL::Eigen::symm(A)
GSL::Eigen::symm(A, workspace)
GSL::Matrix#eigen_symm
GSL::Matrix#eigen_symm(workspace)
GSL::Eigen::symmv(A)
GSL::Matrix#eigen_symmv
GSL::Vector
object which stores all the eigenvalues.
The second is a GSL::Matrix object
, whose columns contain
eigenvectors.
Singleton method of the GSL::Eigen
module, GSL::Eigen::symm
m = GSL::Matrix.alloc([1.0, 1/2.0, 1/3.0, 1/4.0], [1/2.0, 1/3.0, 1/4.0, 1/5.0], [1/3.0, 1/4.0, 1/5.0, 1/6.0], [1/4.0, 1/5.0, 1/6.0, 1/7.0]) eigval, eigvec = Eigen::symmv(m)
Instance method of GSL::Matrix
class
eigval, eigvec = m.eigen_symmv
GSL::Eigen::herm(A)
GSL::Eigen::herm(A, workspace)
GSL::Matrix::Complex#eigen_herm
GSL::Matrix::Complex#eigen_herm(workspace)
GSL::Eigen::hermv(A)
GSL::Eigen::hermv(A, workspace)
GSL::Matrix::Complex#eigen_hermv
GSL::Matrix::Complex#eigen_hermv(workspace
GSL::Eigen::Nonsymm.alloc(n)
GSL::Eigen::Nonsymm::params(compute_t, balance, wspace)
GSL::Eigen::Nonsymm::Workspace#params(compute_t, balance)
This method sets some parameters which determine how the eigenvalue
problem is solved in subsequent calls to GSL::Eigen::nonsymm
.
If compute_t is set to 1, the full Schur form T
will be
computed by gsl_eigen_nonsymm. If it is set to 0, T
will not be
computed (this is the default setting).
Computing the full Schur form T
requires approximately 1.5-2 times
the number of flops.
If balance is set to 1, a balancing transformation is applied to
the matrix prior to computing eigenvalues. This transformation is designed
to make the rows and columns of the matrix have comparable norms, and can
result in more accurate eigenvalues for matrices whose entries vary widely
in magnitude. See section Balancing for more information. Note that the
balancing transformation does not preserve the orthogonality of the Schur
vectors, so if you wish to compute the Schur vectors with
GSL::Eigen::nonsymm_Z
you will obtain the Schur vectors of the
balanced matrix instead of the original matrix. The relationship will be
where Q is the matrix of Schur vectors for the balanced matrix, and D
is the balancing transformation. Then GSL::Eigen::nonsymm_Z
will
compute a matrix Z
which satisfies with Z = D Q
.
Note that Z
will not be orthogonal. For this reason, balancing is
not performed by default.
GSL::Eigen::nonsymm(m, eval, wspace)
GSL::Eigen::nonsymm(m)
GSL::Matrix#eigen_nonsymm()
GSL::Matrix#eigen_nonsymm(wspace)
GSL::Matrix#eigen_nonsymm(eval, wspace)
m
and return them, or store in the vector eval if it given.
If T
is desired, it is stored in m
on output, however the lower
triangular portion will not be zeroed out. Otherwise, on output, the diagonal
of m
will contain the 1-by-1 real eigenvalues and 2-by-2 complex
conjugate eigenvalue systems, and the rest of m
is destroyed. GSL::Eigen::nonsymm_Z(m, eval, Z, wspace)
GSL::Eigen::nonsymm_Z(m)
GSL::Matrix#eigen_nonsymm_Z()
GSL::Matrix#eigen_nonsymm(eval, Z, wspace)
GSL::Eigen::nonsymm
except they also
compute the Schur vectors and return them (or store into Z
).GSL::Eigen::Nonsymmv.alloc(n)
GSL::Eigen::nonsymm(m)
GSL::Eigen::nonsymm(m, wspace)
GSL::Eigen::nonsymm(m, eval, evec)
GSL::Eigen::nonsymm(m, eval, evec, wspace)
GSL::Matrix#eigen_nonsymmv()
GSL::Matrix#eigen_nonsymmv(wspace)
GSL::Matrix#eigen_nonsymmv(eval, evec)
GSL::Matrix#eigen_nonsymmv(eval, evec, wspace)
The real generalized symmetric-definite eigenvalue problem is to find eigenvalues lambda and eigenvectors x such that where A and B are symmetric matrices, and B is positive-definite. This problem reduces to the standard symmetric eigenvalue problem by applying the Cholesky decomposition to B: Therefore, the problem becomes C y = lambda y where C = L^{-1} A L^{-t} is symmetric, and y = L^t x. The standard symmetric eigensolver can be applied to the matrix C. The resulting eigenvectors are backtransformed to find the vectors of the original problem. The eigenvalues and eigenvectors of the generalized symmetric-definite eigenproblem are always real.
GSL::Eigen::Gensymm.alloc(n)
GSL::Eigen::Gensymm::Workspace.alloc(n)
GSL::Eigen::gensymm(A, B, w)
GSL::Vector
,
using the method outlined above. On output, B contains its Cholesky
decomposition.GSL::Eigen::gensymmv(A, B, w)
GSL::Vector
and a GSL::Matrix
.
The computed eigenvectors are normalized to have unit magnitude.
On output, B contains its Cholesky decomposition.The complex generalized hermitian-definite eigenvalue problem is to find eigenvalues lambda and eigenvectors x such that where A and B are hermitian matrices, and B is positive-definite. Similarly to the real case, this can be reduced to C y = lambda y where C = L^{-1} A L^{-H} is hermitian, and y = L^H x. The standard hermitian eigensolver can be applied to the matrix C. The resulting eigenvectors are backtransformed to find the vectors of the original problem. The eigenvalues of the generalized hermitian-definite eigenproblem are always real.
GSL::Eigen::Genherm.alloc(n)
GSL::Eigen::genherm(A, B, w)
GSL::Vector
,
using the method outlined above.
On output, B contains its Cholesky decomposition.GSL::Eigen::genherm(A, B, w)
GSL::Vector
and a GSL::Matrix::Complex
.
The computed eigenvectors are normalized to have unit magnitude.
On output, B contains its Cholesky decomposition.GSL::Eigen::Gen.alloc(n)
GSL::Eigen::Gen::Workspace.alloc(n)
GSL::Eigen::Gen::params(compute_s, compute_t, balance, w)
GSL::Eigen::gen_params(compute_s, compute_t, balance, w)
Set some parameters which determine how the eigenvalue problem is solved in subsequent calls to (({GSL::Eigen::gen})). If ((|compute_s|)) is set to 1, the full Schur form ((|S|)) will be computed by (({GSL::Eigen::gen}). If it is set to 0, ((|S|)) will not be computed (this is the default setting). ((|S|)) is a quasi upper triangular matrix with 1-by-1 and 2-by-2 blocks on its diagonal. 1-by-1 blocks correspond to real eigenvalues, and 2-by-2 blocks correspond to complex eigenvalues. If ((|compute_t|)) is set to 1, the full Schur form ((|T|)) will be computed by (({GSL::Eigen::gen}). If it is set to 0, ((|T|)) will not be computed (this is the default setting). ((|T|)) is an upper triangular matrix with non-negative elements on its diagonal. Any 2-by-2 blocks in ((|S|)) will correspond to a 2-by-2 diagonal block in ((|T|)). The ((|balance|)) parameter is currently ignored, since generalized balancing is not yet implemented.
GSL::Eigen::gen(A, B, w)
Computes the eigenvalues of the real generalized nonsymmetric matrix pair
A, B, and returns them as pairs in (alpha, beta),
where alpha is GSL::Vector::Complex
and beta is GSL::Vector
.
If beta_i is non-zero, then lambda = alpha_i / beta_i is an eigenvalue.
Likewise, if alpha_i is non-zero, then mu = beta_i / alpha_i is an
eigenvalue of the alternate problem mu A y = B y.
The elements of beta are normalized to be non-negative.
If S is desired, it is stored in A on output. If T is desired, it is stored in B on output. The ordering of eigenvalues in alpha, beta follows the ordering of the diagonal blocks in the Schur forms S and T.
GSL::Eigen::gen_QZ(A, B, w)
GSL::Eigen::gen
except it also computes
the left and right Schur vectors and returns them.GSL::Eigen::Genv.alloc(n)
GSL::Eigen::Genv::Workspace.alloc(n)
GSL::Eigen::genv(A, B, w)
GSL::Eigen::genv_QZ(A, B, w)
GSL::Eigen::genv
except it also computes
the left and right Schur vectors and returns them.GSL::Eigen::symmv_sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Symmv::sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
These methods simultaneously sort the eigenvalues stored in the vector eval and the corresponding real eigenvectors stored in the columns of the matrix evec into ascending or descending order according to the value of the parameter type,
GSL::Eigen::SORT_VAL_ASC
ascending order in numerical valueGSL::Eigen::SORT_VAL_DESC
escending order in numerical valueGSL::Eigen::SORT_ABS_ASC
scending order in magnitudeGSL::Eigen::SORT_ABS_DESC
descending order in magnitudeThe sorting is carried out in-place.
GSL::Eigen::hermv_sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Hermv::sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::nonsymmv_sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Nonsymmv::sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::EIGEN_SORT_ABS_ASC
and GSL::EIGEN_SORT_ABS_DESC
are supported due to the eigenvalues being complex. GSL::Eigen::gensymmv_sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Gensymmv::sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::gensymmv_sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Gensymmv::sort(eval, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::genv_sort(alpha, beta, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::Eigen::Genv::sort(alpha, beta, evec, type = GSL::Eigen::SORT_VAL_ASC)
GSL::EIGEN_SORT_ABS_ASC
and GSL::EIGEN_SORT_ABS_DESC
are supported due to the eigenvalues
being complex.