public class JacobiDiagonalization extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
EPSILON
Default precision level for convergence check.
|
static int |
MAX_ITERATIONS
Default max number of iterations.
|
| Constructor and Description |
|---|
JacobiDiagonalization(double[][] matrix)
Initializes a Jacobi iteration for finding eigenvalues and eigenvectors of a matrix.
|
JacobiDiagonalization(int[][] matrix)
Initializes a Jacobi iteration for finding eigenvalues and eigenvectors of a matrix.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compute()
Computes the eigenvalues and eigenvectors using Jacobi Iteration.
|
boolean |
compute(double epsilon)
Computes the eigenvalues and eigenvectors using Jacobi Iteration.
|
boolean |
compute(double epsilon,
int maxIters)
Computes the eigenvalues and eigenvectors using Jacobi Iteration.
|
boolean |
compute(int maxIters)
Computes the eigenvalues and eigenvectors using Jacobi Iteration.
|
double[] |
eigenvalues()
Gets the computed eigenvalues.
|
double[][] |
eigenvectors()
Gets the computed eigenvectors.
|
public static final double EPSILON
public static final int MAX_ITERATIONS
public JacobiDiagonalization(int[][] matrix)
matrix - a square matrixpublic JacobiDiagonalization(double[][] matrix)
matrix - a square matrixpublic double[][] eigenvectors()
public double[] eigenvalues()
public boolean compute()
public boolean compute(double epsilon)
epsilon - Precision level, where off-diagonal elements less than epsilon in absolute value are set to 0.public boolean compute(int maxIters)
maxIters - Maximum number of iterations.public boolean compute(double epsilon,
int maxIters)
epsilon - Precision level, where off-diagonal elements less than epsilon in absolute value are set to 0.maxIters - Maximum number of iterations.Copyright © 2005-2020 Vincent A. Cicirello. All rights reserved.