de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractPreprocessorBasedDistanceFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>
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,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction<O,P,D>
- Type Parameters:
O
- the type of DatabaseObject to compute the distances in betweenP
- the type of Preprocessor usedD
- the type of Distance used
- All Implemented Interfaces:
- DistanceFunction<O,D>, MeasurementFunction<O,D>, PreprocessorBasedMeasurementFunction<O,P,D>, PreprocessorClient<P,O>, Parameterizable
- Direct Known Subclasses:
- AbstractCorrelationDistanceFunction, ERiCDistanceFunction, SubspaceDistanceFunction
public abstract class AbstractPreprocessorBasedDistanceFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>
- extends AbstractDistanceFunction<O,D>
- implements PreprocessorBasedMeasurementFunction<O,P,D>
Abstract super class for distance functions needing a preprocessor.
- Author:
- Elke Achtert
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
preprocessorHandler
private final PreprocessorHandler<O extends DatabaseObject,P extends Preprocessor<O>> preprocessorHandler
- The handler class for the preprocessor.
AbstractPreprocessorBasedDistanceFunction
public AbstractPreprocessorBasedDistanceFunction(Pattern pattern)
- Provides a super class for distance functions needing a preprocessor
- Parameters:
pattern
- a pattern to define the required input format
setDatabase
public void setDatabase(Database<O> database,
boolean verbose,
boolean time)
- Calls
AbstractMeasurementFunction(database, verbose, time)
and
runs the preprocessor on the database.
- Specified by:
setDatabase
in interface MeasurementFunction<O extends DatabaseObject,D extends Distance<D>>
- Overrides:
setDatabase
in class AbstractMeasurementFunction<O extends DatabaseObject,D extends Distance<D>>
- Parameters:
database
- the database to be setverbose
- flag to allow verbose messages while performing the methodtime
- flag to request output of performance time
setParameters
public List<String> setParameters(List<String> args)
throws ParameterException
- Calls
AbstractParameterizable#setParameters
and passes the remaining parameters to the preprocessorHandler
.
- Specified by:
setParameters
in interface Parameterizable
- Overrides:
setParameters
in class AbstractParameterizable
- Parameters:
args
- parameters to set the attributes accordingly to
- Returns:
- a list containing the unused parameters
- Throws:
ParameterException
- in case of wrong parameter-setting
getPreprocessor
public final P getPreprocessor()
- Description copied from interface:
PreprocessorBasedMeasurementFunction
- Returns the preprocessor of this measurement function.
- Specified by:
getPreprocessor
in interface PreprocessorBasedMeasurementFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>
- Returns:
- the preprocessor of this measurement function