de.lmu.ifi.dbs.elki.distance.distancefunction
Class FileBasedFloatDistanceFunction
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,FloatDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractFloatDistanceFunction<ExternalObject>
de.lmu.ifi.dbs.elki.distance.distancefunction.FileBasedFloatDistanceFunction
- All Implemented Interfaces:
- DistanceFunction<ExternalObject,FloatDistance>, MeasurementFunction<ExternalObject,FloatDistance>, Loggable, Parameterizable
public class FileBasedFloatDistanceFunction
- extends AbstractFloatDistanceFunction<ExternalObject>
Provides a DistanceFunction that is based on float 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 |
FileBasedFloatDistanceFunction
public FileBasedFloatDistanceFunction()
distance
public FloatDistance 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 DatabaseObjects according to this
distance function
distance
public FloatDistance distance(Integer id1,
ExternalObject o2)
- Returns the distance between the two specified objects.
- Specified by:
distance
in interface DistanceFunction<ExternalObject,FloatDistance>
- Overrides:
distance
in class AbstractDistanceFunction<ExternalObject,FloatDistance>
- 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 FloatDistance 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,FloatDistance>
- Overrides:
distance
in class AbstractDistanceFunction<ExternalObject,FloatDistance>
- 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()