org.ojalgo.matrix.decomposition
Class EigenvalueDecomposition<N extends Number>

java.lang.Object
  extended by org.ojalgo.matrix.decomposition.EigenvalueDecomposition<N>
All Implemented Interfaces:
Eigenvalue<N>, MatrixDecomposition<N>

public abstract class EigenvalueDecomposition<N extends Number>
extends Object
implements Eigenvalue<N>

You create instances of (some subclass of) this class by calling one of the static factory methods: makeBig(), makePrimitive() or makeJama().

Author:
apete

Method Summary
 boolean compute(Access2D<?> aMtrx)
           
 boolean equals(MatrixDecomposition<N> aDecomp, NumberContext aCntxt)
           
 boolean equals(Object someObj)
           
 MatrixStore<N> getD()
          The only requirements on [D] are that it should contain the eigenvalues and that [A][V] = [V][D].
 Array1D<ComplexNumber> getEigenvalues()
           Even for real matrices the eigenvalues are potentially complex numbers.
 MatrixStore<N> getV()
          The columns of [V] represent the eigenvectors of [A] in the sense that [A][V] = [V][D].
 boolean isAspectRatioNormal()
           
 boolean isComputed()
           
static
<N extends Number>
Eigenvalue<N>
make(Access2D<N> aTypical)
           
static Eigenvalue<BigDecimal> makeBig()
          Deprecated. v30
static Eigenvalue<Double> makeJama()
           
static Eigenvalue<Double> makeJama(boolean symmetric)
           
static Eigenvalue<Double> makePrimitive()
           
static Eigenvalue<Double> makePrimitive(boolean symmetric)
           
 MatrixStore<N> reconstruct()
           
 void reset()
          Delete computed results, and resets attributes to default values
 MatrixStore<N> solve(MatrixStore<N> aRHS)
          [A][X]=[B] or [this][return]=[aRHS]
 MatrixStore<N> solve(MatrixStore<N> aRHS, DecompositionStore<N> preallocated)
           Implementiong this method is optional.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ojalgo.matrix.decomposition.Eigenvalue
compute, getDeterminant, getTrace, isOrdered, isSymmetric
 
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
equals, equals, getInverse, getInverse, isComputed, isFullSize, isSolvable
 

Method Detail

make

public static final <N extends Number> Eigenvalue<N> make(Access2D<N> aTypical)

makeBig

@Deprecated
public static final Eigenvalue<BigDecimal> makeBig()
Deprecated. v30

Returns:
A BigDecimal adapter to PrimitiveEigenvalue.

makeJama

public static final Eigenvalue<Double> makeJama()

makeJama

public static final Eigenvalue<Double> makeJama(boolean symmetric)

makePrimitive

public static final Eigenvalue<Double> makePrimitive()

makePrimitive

public static final Eigenvalue<Double> makePrimitive(boolean symmetric)

compute

public final boolean compute(Access2D<?> aMtrx)
Specified by:
compute in interface MatrixDecomposition<N extends Number>
Parameters:
aMtrx - A matrix to decompose
Returns:
true if the computation suceeded; false if not

getD

public final MatrixStore<N> getD()
Description copied from interface: Eigenvalue
The only requirements on [D] are that it should contain the eigenvalues and that [A][V] = [V][D]. The ordering of the eigenvalues is not specified.

Specified by:
getD in interface Eigenvalue<N extends Number>
Returns:
The (block) diagonal eigenvalue matrix.

getEigenvalues

public final Array1D<ComplexNumber> getEigenvalues()
Description copied from interface: Eigenvalue

Even for real matrices the eigenvalues are potentially complex numbers. Typically they need to be expressed as complex numbers when [A] is not symmetric.

The eigenvalues in this array should be ordered in descending order - largest (modulus) first.

Specified by:
getEigenvalues in interface Eigenvalue<N extends Number>
Returns:
The eigenvalues in an ordered array.

getV

public final MatrixStore<N> getV()
Description copied from interface: Eigenvalue
The columns of [V] represent the eigenvectors of [A] in the sense that [A][V] = [V][D].

Specified by:
getV in interface Eigenvalue<N extends Number>
Returns:
The eigenvector matrix.

reconstruct

public final MatrixStore<N> reconstruct()
Specified by:
reconstruct in interface MatrixDecomposition<N extends Number>

reset

public void reset()
Description copied from interface: MatrixDecomposition
Delete computed results, and resets attributes to default values

Specified by:
reset in interface MatrixDecomposition<N extends Number>

solve

public final MatrixStore<N> solve(MatrixStore<N> aRHS)
Description copied from interface: MatrixDecomposition
[A][X]=[B] or [this][return]=[aRHS]

Specified by:
solve in interface MatrixDecomposition<N extends Number>

solve

public final MatrixStore<N> solve(MatrixStore<N> aRHS,
                                  DecompositionStore<N> preallocated)
Description copied from interface: MatrixDecomposition

Implementiong this method is optional.

Exactly how a specific implementation makes use of preallocated is not specified by this interface. It must be documented for each implementation.

Should produce the same results as calling MatrixDecomposition.solve(MatrixStore).

Specified by:
solve in interface MatrixDecomposition<N extends Number>
Parameters:
aRHS - The Right Hand Side, wont be modfied
preallocated - Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/final/correct solution.
Returns:
The solution

equals

public final boolean equals(MatrixDecomposition<N> aDecomp,
                            NumberContext aCntxt)
Specified by:
equals in interface MatrixDecomposition<N extends Number>

equals

public boolean equals(Object someObj)
Overrides:
equals in class Object

isAspectRatioNormal

public boolean isAspectRatioNormal()

isComputed

public final boolean isComputed()
Specified by:
isComputed in interface MatrixDecomposition<N extends Number>
Returns:
true if computation has been attemped; false if not.
See Also:
MatrixDecomposition.compute(Access2D), MatrixDecomposition.isSolvable()