Struct rgsl::types::eigen_symmetric_workspace::EigenNonSymmWorkspace
[−]
[src]
pub struct EigenNonSymmWorkspace { /* fields omitted */ }
Methods
impl EigenNonSymmWorkspace
[src]
fn new(n: usize) -> Option<EigenNonSymmWorkspace>
This function allocates a workspace for computing eigenvalues of n-by-n complex hermitian matrices. The size of the workspace is O(3n).
fn params(&mut self, compute_t: i32, balance: i32)
This function 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
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
T = Qt D-1 A D Q
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
T = Z-1 A Z
with Z = D Q. Note that Z will not be orthogonal. For this reason, balancing is not performed by default.
fn nonsymm(&mut self, A: &mut MatrixF64, eval: &mut VectorComplexF64) -> Value
This function computes the eigenvalues of the real nonsymmetric matrix A
and stores them
in the vector eval
. If T is desired, it is stored in the upper portion of A
on output.
Otherwise, on output, the diagonal of A
will contain the 1-by-1 real eigenvalues and
2-by-2 complex conjugate eigenvalue systems, and the rest of A
is destroyed. In rare
cases, this function may fail to find all eigenvalues. If this happens, an error code is
returned and the number of converged eigenvalues is stored in w->n_evals. The converged
eigenvalues are stored in the beginning of eval
.
fn nonsymm_Z(
&mut self,
A: &mut MatrixF64,
eval: &mut VectorComplexF64,
Z: &mut MatrixF64
) -> Value
&mut self,
A: &mut MatrixF64,
eval: &mut VectorComplexF64,
Z: &mut MatrixF64
) -> Value
This function is identical to gsl_eigen_nonsymm except that it also computes the Schur
vectors and stores them into Z
.