All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mikera.matrixx.decompose.impl.eigen.EigenResult Maven / Gradle / Ivy

Go to download

Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.

There is a newer version: 0.67.0
Show newest version
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