picture.math
Class SymMat
java.lang.Object
|
+--picture.math.SymMat
- public class SymMat
- extends java.lang.Object
Method Summary |
static void |
main(java.lang.String[] args)
|
static void |
printArray(double[] a)
|
static void |
printMatrice(double[][] a)
|
static double |
pythag(double a,
double b)
Computes (a^2 + b^2)^(1/2) without destructive underflow or
overflow. |
static double |
SIGN(double a,
double b)
Magnitude of a times sign of b. |
static double |
SQR(double a)
Square a double value. |
protected static void |
tqli(double[] d,
double[] e,
int n,
double[][] z)
QL algorithm with implicit shifts, to determine the eigenvalues
and eigenvectors of a real, symmetric, tridiagonal matrix, or
of a real, symmetric matrix previously reduced by tred2 x
11.2. |
protected static void |
tred2(double[][] a,
int n,
double[] d,
double[] e)
Householder reduction of a real, symmetric matrix
a[1..n][1..n]. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SymMat
public SymMat()
tred2
protected static final void tred2(double[][] a,
int n,
double[] d,
double[] e)
- Householder reduction of a real, symmetric matrix
a[1..n][1..n]. On output, a is replaced by the orthogonal
matrix Q effecting the transformation. d[1..n] returns the
diagonal elements of the tridiagonal matrix, and e[1..n] the
off-diagonal elements, with e[1]=0. Several statements, as
noted in comments, can be omitted if only eigenvalues are to be
found, in which case a contains no useful information on
output. Otherwise they are to be included. Based on NUMERICAL
RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN
0-521-43108-5) chapter 11.2
SIGN
public static final double SIGN(double a,
double b)
- Magnitude of a times sign of b.
SQR
public static final double SQR(double a)
- Square a double value.
pythag
public static final double pythag(double a,
double b)
- Computes (a^2 + b^2)^(1/2) without destructive underflow or
overflow. Based on NUMERICAL RECIPES IN C: THE ART OF
SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) chapter 2.6
tqli
protected static final void tqli(double[] d,
double[] e,
int n,
double[][] z)
throws PictureException
- QL algorithm with implicit shifts, to determine the eigenvalues
and eigenvectors of a real, symmetric, tridiagonal matrix, or
of a real, symmetric matrix previously reduced by tred2 x
11.2. On input, d[1..n] contains the diagonal elements of the
tridiagonal matrix. On output, it returns the eigenvalues. The
vector e[1..n] inputs the subdiagonal elements of the
tridiagonal matrix, with e[1] arbitrary. On output e is
destroyed. When finding only the eigenvalues, several lines may
be omitted, as noted in the comments. If the eigenvectors of a
tridiagonal matrix are desired, the matrix z[1..n][1..n] is
input as the identity matrix. If the eigenvectors of a matrix
that has been reduced by tred2 are required, then z is input as
the matrix output by tred2. In either case, the kth column of z
returns the normalized eigenvector corresponding to d[k]. Based
on NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING
(ISBN 0-521-43108-5) chapter 11.3
printArray
public static void printArray(double[] a)
printMatrice
public static void printMatrice(double[][] a)
main
public static void main(java.lang.String[] args)
throws PictureException