Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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.

Author:
Elke Achtert

Field Summary
private  double eigenvalue
          The corresponding eigenvalue.
private  Matrix eigenvector
          The eigenvector as a matrix.
 
Constructor Summary
EigenPair(Matrix 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.
 Matrix 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 Matrix eigenvector
The eigenvector as a matrix.


eigenvalue

private double eigenvalue
The corresponding eigenvalue.

Constructor Detail

EigenPair

public EigenPair(Matrix 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 Matrix 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.3 (2010-03-31_1612)