org.grinvin.util
Class Tridiagonal
java.lang.Object
org.grinvin.util.Tridiagonal
public class Tridiagonal
extends java.lang.Object
This class represents a symmetric tridiagonal real matrix. The main purpose
of this class is to provide information related to eigenvalues and
eigenvectors of such matrices.
protected double[] | d - Diagonal elements of this matrix.
|
protected double[] | e - Subdiagonal elements of this matrix.
|
protected int | order - Order of this matrix.
|
Tridiagonal(double[][] a) - Create a tridiagonal matrix which is equivalent to the given symmetric
real matrix a by some orthogonal transformation.
|
double[] | eigenvalues() - Compute the eigenvalues of this symmetric tridiagonal matrix using the
QL algorithm with implicit shifts.
|
d
protected double[] d
Diagonal elements of this matrix. Element d[i] contains the matrix
element at position (i,i).
e
protected double[] e
Subdiagonal elements of this matrix. Element e[i] contains the matrix
element at position (i,i-1). Element e[0] is set to zero.
order
protected int order
Order of this matrix.
Tridiagonal
public Tridiagonal(double[][] a)
Create a tridiagonal matrix which is equivalent to the given symmetric
real matrix a by some orthogonal transformation. Uses Householder
reduction.
Note: This implementation is almost a literal copy of the
algorithm
tred2
from
Numerical recipes in C, ISBN
0-521-43108-5.
eigenvalues
public double[] eigenvalues()
Compute the eigenvalues of this symmetric tridiagonal matrix using the
QL algorithm with implicit shifts.
Note: This implementation is almost a literal copy of the
algorithm
tqli
from
Numerical recipes in C, ISBN
0-521-43108-5.