de.lmu.ifi.dbs.elki.distance.distancefunction
Class FileBasedDoubleDistanceFunction
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<ExternalObject>
de.lmu.ifi.dbs.elki.distance.distancefunction.FileBasedDoubleDistanceFunction
- All Implemented Interfaces:
- DistanceFunction<ExternalObject,DoubleDistance>, MeasurementFunction<ExternalObject,DoubleDistance>, Loggable, Parameterizable
public class FileBasedDoubleDistanceFunction
- extends AbstractDoubleDistanceFunction<ExternalObject>
Provides a DistanceFunction that is based on double distances
given by a distance matrix of an external file.
- Author:
- Elke Achtert
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, checkGlobalParameterConstraints, deleteOption, 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 |
FileBasedDoubleDistanceFunction
public FileBasedDoubleDistanceFunction()
distance
public DoubleDistance distance(ExternalObject o1,
ExternalObject o2)
- Computes the distance between two given DatabaseObjects according to this
distance function.
- Parameters:
o1
- first DatabaseObjecto2
- second DatabaseObject
- Returns:
- the distance between two given DatabaseObject according to this
distance function
distance
public DoubleDistance distance(Integer id1,
ExternalObject o2)
- Returns the distance between the two specified objects.
- Specified by:
distance
in interface DistanceFunction<ExternalObject,DoubleDistance>
- Overrides:
distance
in class AbstractDistanceFunction<ExternalObject,DoubleDistance>
- Parameters:
id1
- first object ido2
- second DatabaseObject
- Returns:
- the distance between the two objcts specified by their obejct ids
- See Also:
DistanceFunction.distance(Integer, Integer)
distance
public DoubleDistance distance(Integer id1,
Integer id2)
- Returns the distance between the two objcts specified by their obejct ids.
If a cache is used, the distance value is looked up in the cache. If the distance
does not yet exists in cache, it will be computed an put to cache. If
no cache is used, the distance is computed.
- Specified by:
distance
in interface DistanceFunction<ExternalObject,DoubleDistance>
- Overrides:
distance
in class AbstractDistanceFunction<ExternalObject,DoubleDistance>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the distance between the two objcts specified by their obejct ids
description
public String description()
- Returns a description of the class and the required parameters.
This description should be suitable for a usage description.
- Specified by:
description
in interface Parameterizable
- Overrides:
description
in class AbstractParameterizable
- Returns:
- String a description of the class and the required parameters
- See Also:
Parameterizable.description()