de.lmu.ifi.dbs.elki.result.optics
Class GenericClusterOrderEntry<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.result.optics.GenericClusterOrderEntry<D>
Type Parameters:
D - the type of Distance used by the ClusterOrderEntry
All Implemented Interfaces:
ClusterOrderEntry<D>, Comparable<ClusterOrderEntry<D>>

public class GenericClusterOrderEntry<D extends Distance<D>>
extends Object
implements Comparable<ClusterOrderEntry<D>>, ClusterOrderEntry<D>

Provides an entry in a cluster order.


Field Summary
private  DBID objectID
          The id of the entry.
private  DBID predecessorID
          The id of the entry's predecessor.
private  D reachability
          The reachability of the entry.
 
Constructor Summary
GenericClusterOrderEntry(DBID objectID, DBID predecessorID, D reachability)
          Creates a new entry in a cluster order with the specified parameters.
 
Method Summary
 int compareTo(ClusterOrderEntry<D> o)
           
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 DBID getID()
          Returns the object id of this entry.
 DBID getPredecessorID()
          Returns the id of the predecessor of this entry if this entry has a predecessor, null otherwise.
 D getReachability()
          Returns the reachability distance of this entry
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

objectID

private DBID objectID
The id of the entry.


predecessorID

private DBID predecessorID
The id of the entry's predecessor.


reachability

private D extends Distance<D> reachability
The reachability of the entry.

Constructor Detail

GenericClusterOrderEntry

public GenericClusterOrderEntry(DBID objectID,
                                DBID predecessorID,
                                D reachability)
Creates a new entry in a cluster order with the specified parameters.

Parameters:
objectID - the id of the entry
predecessorID - the id of the entry's predecessor
reachability - the reachability of the entry
Method Detail

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one. NOTE: for the use in an UpdatableHeap, only the ID is compared!

Overrides:
equals in class Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object has the same attribute values as the o argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
the object id if this entry

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

getID

public DBID getID()
Returns the object id of this entry.

Specified by:
getID in interface ClusterOrderEntry<D extends Distance<D>>
Returns:
the object id of this entry

getPredecessorID

public DBID getPredecessorID()
Returns the id of the predecessor of this entry if this entry has a predecessor, null otherwise.

Specified by:
getPredecessorID in interface ClusterOrderEntry<D extends Distance<D>>
Returns:
the id of the predecessor of this entry

getReachability

public D getReachability()
Returns the reachability distance of this entry

Specified by:
getReachability in interface ClusterOrderEntry<D extends Distance<D>>
Returns:
the reachability distance of this entry

compareTo

public int compareTo(ClusterOrderEntry<D> o)
Specified by:
compareTo in interface Comparable<ClusterOrderEntry<D extends Distance<D>>>

Release 0.4.0 (2011-09-20_1324)