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

hex.util.EigenPair Maven / Gradle / Ivy

There is a newer version: 3.46.0.6
Show newest version
package hex.util;

public class EigenPair implements Comparable {
  public double eigenvalue;
  public double[] eigenvector;

  public EigenPair(double eigenvalue, double[] eigenvector) {
    this.eigenvalue = eigenvalue;
    this.eigenvector = eigenvector;
  }

  /**
   * Compare an eigenPair = (eigenvalue, eigenVector) against otherEigenPair based on respective eigenValues
   */
  @Override
  public int compareTo(EigenPair otherEigenPair) {
    return eigenvalue < otherEigenPair.eigenvalue ? -1 : (eigenvalue > otherEigenPair.eigenvalue ? 1 : 0);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy