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

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

public abstract class GeneralEvD1<N extends Number>
extends EigenvalueDecomposition<N>


Method Summary
 boolean compute(Access2D<N> aMtrx)
           
 boolean computeNonsymmetric(Access2D<N> aNonsymmetric)
           
 boolean computeSymmetric(Access2D<N> aSymmetric)
           
 boolean equals(MatrixDecomposition<N> aDecomp, NumberContext aCntxt)
           
 boolean equals(MatrixStore<N> aMtrx, 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].
 ComplexNumber getDeterminant()
           A matrix' determinant is the product of its eigenvalues.
 Array1D<ComplexNumber> getEigenvalues()
           Even for real matrices the eigenvalues are potentially complex numbers.
 MatrixStore<N> getInverse()
          The output must be a "right inverse" and a "generalised inverse".
 ComplexNumber getTrace()
          A matrix' trace is the sum of the diagonal elements.
 MatrixStore<N> getV()
          The columns of [V] represent the eigenvectors of [A] in the sense that [A][V] = [V][D].
 MatrixStore<N> invert(MatrixStore<N> aStore)
          A convenience method that produces exactly the same result as if you first call MatrixDecomposition.compute(Access2D) and then MatrixDecomposition.getInverse().
 boolean isAspectRatioNormal()
           
 boolean isComputed()
           
 boolean isFullSize()
           
 boolean isOrdered()
           
 boolean isSolvable()
           
 boolean isSymmetric()
           
 void reset()
          Delete computed results, and resets attributes to default values
 MatrixStore<N> solve(MatrixStore<N> aRHS)
           
 
Methods inherited from class org.ojalgo.matrix.decomposition.EigenvalueDecomposition
getAllPrimitiveGeneral, getAllPrimitiveNonsymmetric, getAllPrimitiveSymmetric, makeBig, makeJama, makePrimitive, reconstruct
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
equals, getInverse, invert, isComputed
 

Method Detail

compute

public boolean compute(Access2D<N> aMtrx)
Parameters:
aMtrx - A matrix to decompose
Returns:
true if the computation suceeded; false if not

computeNonsymmetric

public boolean computeNonsymmetric(Access2D<N> aNonsymmetric)
Parameters:
aNonsymmetric - A nonsymmetric (assumed to be) matrix to decompose
Returns:
true if the computation suceeded; false if not

computeSymmetric

public boolean computeSymmetric(Access2D<N> aSymmetric)
Parameters:
aSymmetric - A symmetric (assumed to be) matrix to decompose
Returns:
true if the computation suceeded; false if not

equals

public boolean equals(MatrixStore<N> aMtrx,
                      NumberContext aCntxt)

getD

public 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.

Returns:
The (block) diagonal eigenvalue matrix.

getDeterminant

public ComplexNumber getDeterminant()
Description copied from interface: Eigenvalue

A matrix' determinant is the product of its eigenvalues.

Returns:
The matrix' determinant

getEigenvalues

public 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.

Returns:
The eigenvalues in an ordered array.

getTrace

public ComplexNumber getTrace()
Description copied from interface: Eigenvalue
A matrix' trace is the sum of the diagonal elements. It is also the sum of the eigenvalues. This method should return the sum of the eigenvalues.

Returns:
The matrix' trace

getV

public 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].

Returns:
The eigenvector matrix.

isFullSize

public boolean isFullSize()
Returns:
True if the implementation generates a full sized decomposition.

isOrdered

public boolean isOrdered()

isSolvable

public boolean isSolvable()
Returns:
true if it is ok to call MatrixDecomposition.solve(MatrixStore) (computation was successful); false if not
See Also:
MatrixDecomposition.solve(MatrixStore), MatrixDecomposition.isComputed()

isSymmetric

public boolean isSymmetric()

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 MatrixStore<N> solve(MatrixStore<N> aRHS)
Specified by:
solve in interface MatrixDecomposition<N extends Number>

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

getInverse

public final MatrixStore<N> getInverse()
Description copied from interface: MatrixDecomposition
The output must be a "right inverse" and a "generalised inverse".

Specified by:
getInverse in interface MatrixDecomposition<N extends Number>
See Also:
BasicMatrix.invert()

invert

public final MatrixStore<N> invert(MatrixStore<N> aStore)
Description copied from interface: MatrixDecomposition
A convenience method that produces exactly the same result as if you first call MatrixDecomposition.compute(Access2D) and then MatrixDecomposition.getInverse().

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

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()