mikera.matrixx.decompose.impl.eigen.EigenResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vectorz Show documentation
Show all versions of vectorz Show documentation
Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.
package mikera.matrixx.decompose.impl.eigen;
import mikera.matrixx.decompose.IEigenResult;
import mikera.vectorz.AVector;
import mikera.vectorz.Vector2;
public class EigenResult implements IEigenResult {
private final AVector[] eigenVectors;
private final Vector2[] eigenValues;
public EigenResult(Vector2[] eigenValues, AVector[] eigenVectors) {
this.eigenValues = eigenValues;
this.eigenVectors = eigenVectors;
}
public EigenResult(Vector2[] eigenValues) {
this.eigenValues = eigenValues;
this.eigenVectors = null;
}
@Override
public Vector2[] getEigenvalues() {
return eigenValues;
}
@Override
public AVector[] getEigenVectors() {
if (eigenVectors == null)
throw new UnsupportedOperationException("EigenVectors not computed");
return eigenVectors;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy