Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance
Class AbstractDistance<D extends AbstractDistance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.distance.AbstractDistance<D>
All Implemented Interfaces:
Distance<D>, Loggable, Externalizable, Serializable, Comparable<D>
Direct Known Subclasses:
CorrelationDistance, NumberDistance, SubspaceDistance

abstract class AbstractDistance<D extends AbstractDistance<D>>
extends AbstractLoggable
implements Distance<D>

An abstract distance implements equals conveniently for any extending class. At the same time any extending class is to implement hashCode properly.

Author:
Arthur Zimek

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
protected AbstractDistance()
          Sets as debug status LoggingConfiguration.DEBUG.
 
Method Summary
 boolean equals(Object o)
          Returns true if o is of the same class as this instance and this.compareTo(o) is 0, false otherwise.
abstract  int hashCode()
          Any extending class should implement a proper hashCode method.
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.Distance
description, externalizableSize, minus, plus, toString
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

AbstractDistance

protected AbstractDistance()
Sets as debug status LoggingConfiguration.DEBUG.

Method Detail

hashCode

public abstract int hashCode()
Any extending class should implement a proper hashCode method.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Returns true if o is of the same class as this instance and this.compareTo(o) is 0, false otherwise.

Overrides:
equals in class Object
See Also:
Object.equals(Object)

Release 0.1 (2008-07-10_1838)