mikera.matrixx.decompose.Eigen Maven / Gradle / Ivy
Show all versions of vectorz Show documentation
package mikera.matrixx.decompose;
import mikera.matrixx.AMatrix;
import mikera.matrixx.decompose.impl.eigen.SymmetricQRAlgorithmDecomposition;
public class Eigen {
/**
*
* Computes the eigenvalues and eigenvectors of a matrix. Returns an object
* that represents the solution of the decomposition. Returns null if the
* decomposition fails.
*
*
* @param A
* The input matrix. It must be a square symmetric matrix.
* @param computeVectors
* Should it compute the eigenvectors or just eigenvalues.
* @return an IEigenResult object that represents the solution to the
* decomposition.
*/
public static IEigenResult decompose(AMatrix A, boolean computeVectors) {
throw new java.lang.UnsupportedOperationException("This has not yet been implemented");
}
/**
*
* Computes the eigenvalues and eigenvectors of a matrix. Returns an object
* that represents the solution of the decomposition. Returns null if the
* decomposition fails.
*
*
* @param A
* The input matrix. It must be a square symmetric matrix.
* @return an IEigenResult object that represents the solution to the
* decomposition.
*/
public static IEigenResult decompose(AMatrix A) {
return decompose(A, true);
}
/**
*
* Computes the eigenvalues and eigenvectors of a real symmetric matrix.
* Returns an object that represents the solution of the decomposition.
* Returns null if the decomposition fails.
*
*
* @param A
* The input matrix. It must be a square symmetric matrix.
* @param computeVectors
* Should it compute the eigenvectors or just eigenvalues.
* @return an IEigenResult object that represents the solution to the
* decomposition.
*/
public static IEigenResult decomposeSymmetric(AMatrix A, boolean computeVectors) {
SymmetricQRAlgorithmDecomposition alg = new SymmetricQRAlgorithmDecomposition(computeVectors);
return alg.decompose(A);
}
/**
*
* Computes the eigenvalues and eigenvectors of a real symmetric matrix.
* Returns an object that represents the solution of the decomposition.
* Returns null if the decomposition fails.
*
*
* @param A
* The input matrix. It must be a square symmetric matrix.
* @return an IEigenResult object that represents the solution to the
* decomposition.
*/
public static IEigenResult decomposeSymmetric(AMatrix A) {
return decomposeSymmetric(A, true);
}
}