ch.akuhn.matrix.eigenvalues

## Class Eigenvalues

• Direct Known Subclasses:
AllEigenvalues, FewEigenvalues

```public class Eigenvalues
extends Object```
The eigen-decomposition of a matrix.
Author:
• ### Field Summary

Fields
Modifier and Type Field and Description
`protected int` `n`
`protected int` `nev`
`double[]` `value`
The eigenvalues
`Vector[]` `vector`
The eigenvectors
• ### Constructor Summary

Constructors
Constructor and Description
`Eigenvalues(int n)`
Construct with the given dimensions
• ### Method Summary

All Methods
Modifier and Type Method and Description
`int` `getN()`
`Eigenvalues` `largest(int nev)`
Configure to compute the largest `nev` values/vectors.
`static Eigenvalues` `of(Matrix A)`
Get an object that can compute the eigendecomposition of the given matrix.
`Eigenvalues` `run()`
Run the decomposition algorithm.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### value

`public double[] value`
The eigenvalues
• #### vector

`public Vector[] vector`
The eigenvectors
• #### n

`protected int n`
• #### nev

`protected int nev`
• ### Constructor Detail

• #### Eigenvalues

`public Eigenvalues(int n)`
Construct with the given dimensions
Parameters:
`n` -
• ### Method Detail

• #### of

`public static Eigenvalues of(Matrix A)`
Get an object that can compute the eigendecomposition of the given matrix. If the matrix has fewer than 10 columns, this will be an `AllEigenvalues`, otherwise it will be a `FewEigenvalues`.
Parameters:
`A` -
Returns:
the object to compute the eigen decomposition
• #### largest

`public Eigenvalues largest(int nev)`
Configure to compute the largest `nev` values/vectors.
Parameters:
`nev` -
Returns:
this
• #### run

`public Eigenvalues run()`
Run the decomposition algorithm. Subclasses should override as necessary.
Returns:
this
• #### getN

`public int getN()`
Returns:
the total number of possible eigen vectors (i.e. the number of rows of the input)