Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractDoubleDistanceFunction<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<O>
All Implemented Interfaces:
DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, Loggable, Parameterizable
Direct Known Subclasses:
AbstractDimensionsSelectingDoubleDistanceFunction, AbstractLocallyWeightedDistanceFunction, CosineDistanceFunction, DimensionSelectingDistanceFunction, EuklideanDistanceFunction, FileBasedDoubleDistanceFunction, LPNormDistanceFunction, ManhattanDistanceFunction, SharingDependentItemsetDistanceFunction, WeightedDistanceFunction

public abstract class AbstractDoubleDistanceFunction<O extends DatabaseObject>
extends AbstractDistanceFunction<O,DoubleDistance>

Provides an abstract superclass for DistanceFunctions that are based on DoubleDistance.

Author:
Arthur Zimek

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
INFINITY_PATTERN
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
protected AbstractDoubleDistanceFunction()
          Provides a AbstractDoubleDistanceFunction with a pattern defined to accept Strings that define a non-negative Double.
 
Method Summary
 DoubleDistance infiniteDistance()
          An infinite DoubleDistance is based on Double.POSITIVE_INFINITY.
 DoubleDistance nullDistance()
          A null DoubleDistance is based on 0.
 DoubleDistance undefinedDistance()
          An undefined DoubleDistance is based on Double.NaN.
 DoubleDistance valueOf(String pattern)
          As pattern is required a String defining a Double.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction
distance, distance, isInfiniteDistance, isNullDistance, isUndefinedDistance
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, matches, requiredInputPattern, setDatabase, setRequiredInputPattern
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters, setParameters
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction
distance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
requiredInputPattern, setDatabase
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription, setParameters
 

Constructor Detail

AbstractDoubleDistanceFunction

protected AbstractDoubleDistanceFunction()
Provides a AbstractDoubleDistanceFunction with a pattern defined to accept Strings that define a non-negative Double.

Method Detail

infiniteDistance

public DoubleDistance infiniteDistance()
An infinite DoubleDistance is based on Double.POSITIVE_INFINITY.

Returns:
an infinite distance
See Also:
MeasurementFunction.infiniteDistance()

nullDistance

public DoubleDistance nullDistance()
A null DoubleDistance is based on 0.

Returns:
a null distance
See Also:
MeasurementFunction.nullDistance()

undefinedDistance

public DoubleDistance undefinedDistance()
An undefined DoubleDistance is based on Double.NaN.

Returns:
an undefined distance
See Also:
MeasurementFunction.undefinedDistance()

valueOf

public DoubleDistance valueOf(String pattern)
                       throws IllegalArgumentException
As pattern is required a String defining a Double.

Parameters:
pattern - a pattern defining a similarity suitable to this measurement function
Returns:
a measurement suitable to this measurement function based on the given pattern
Throws:
IllegalArgumentException - if the given pattern is not compatible with the requirements of this measurement function
See Also:
MeasurementFunction.valueOf(String)

Release 0.1 (2008-07-10_1838)