Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.result
Class ClusterOrderEntry<D extends Distance<?>>

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

public class ClusterOrderEntry<D extends Distance<?>>
extends Object
implements Identifiable

Provides an entry in a cluster order.

Author:
Elke Achtert

Field Summary
private  Integer objectID
          The id of the entry.
private  Integer predecessorID
          The id of the entry's predecessor.
private  D reachability
          The reachability of the entry.
 
Constructor Summary
ClusterOrderEntry(Integer objectID, Integer predecessorID, D reachability)
          Creates a new entry in a cluster order with the specified parameters.
 
Method Summary
 int compareTo(Identifiable o)
          Compares this object with the specified object for order.
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 Integer getID()
          Returns the object id of this entry.
 Integer 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 Integer objectID
The id of the entry.


predecessorID

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


reachability

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

Constructor Detail

ClusterOrderEntry

public ClusterOrderEntry(Integer objectID,
                         Integer 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.

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 Integer getID()
Returns the object id of this entry.

Specified by:
getID in interface Identifiable
Returns:
the object id of this entry

getPredecessorID

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

Returns:
the id of the predecessor of this entry

getReachability

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

Returns:
the reachability distance of this entry

compareTo

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

Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Release 0.3 (2010-03-31_1612)