de.lmu.ifi.dbs.elki.math.linearalgebra
Class EigenPair

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.math.linearalgebra.EigenPair
All Implemented Interfaces:
Comparable<EigenPair>

public class EigenPair
extends Object
implements Comparable<EigenPair>

Helper class which encapsulates an eigenvector and its corresponding eigenvalue. This class is used to sort eigenpairs.


Field Summary
private  double eigenvalue
          The corresponding eigenvalue.
private  Vector eigenvector
          The eigenvector as a matrix.
 
Constructor Summary
EigenPair(Vector eigenvector, double eigenvalue)
          Creates a new EigenPair object.
 
Method Summary
 int compareTo(EigenPair o)
          Compares this object with the specified object for order.
 double getEigenvalue()
          Returns the eigenvalue.
 Vector getEigenvector()
          Returns the eigenvector.
 String toString()
          Returns a string representation of this EigenPair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eigenvector

private Vector eigenvector
The eigenvector as a matrix.


eigenvalue

private double eigenvalue
The corresponding eigenvalue.

Constructor Detail

EigenPair

public EigenPair(Vector eigenvector,
                 double eigenvalue)
Creates a new EigenPair object.

Parameters:
eigenvector - the eigenvector as a matrix
eigenvalue - the corresponding eigenvalue
Method Detail

compareTo

public int compareTo(EigenPair o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object's eigenvalue is greater than, equal to, or less than the specified object's eigenvalue.

Specified by:
compareTo in interface Comparable<EigenPair>
Parameters:
o - the Eigenvector to be compared.
Returns:
a negative integer, zero, or a positive integer as this object's eigenvalue is greater than, equal to, or less than the specified object's eigenvalue.

getEigenvector

public Vector getEigenvector()
Returns the eigenvector.

Returns:
the eigenvector

getEigenvalue

public double getEigenvalue()
Returns the eigenvalue.

Returns:
the eigenvalue

toString

public String toString()
Returns a string representation of this EigenPair.

Overrides:
toString in class Object
Returns:
a string representation of this EigenPair

Release 0.4.0 (2011-09-20_1324)