de.lmu.ifi.dbs.elki.distance.similarityfunction
Class AbstractPreprocessorBasedSimilarityFunction<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.similarityfunction.AbstractSimilarityFunction<O,D>
de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractPreprocessorBasedSimilarityFunction<O,P,D>
- Type Parameters:
O
- object typeP
- preprocessor typeD
- distance type
- All Implemented Interfaces:
- MeasurementFunction<O,D>, PreprocessorBasedMeasurementFunction<O,P,D>, SimilarityFunction<O,D>, PreprocessorClient<P,O>, Parameterizable
- Direct Known Subclasses:
- FractionalSharedNearestNeighborSimilarityFunction, SharedNearestNeighborSimilarityFunction
public abstract class AbstractPreprocessorBasedSimilarityFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>
- extends AbstractSimilarityFunction<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.
AbstractPreprocessorBasedSimilarityFunction
public AbstractPreprocessorBasedSimilarityFunction(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 the super method
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
- See Also:
PreprocessorHandler.getPreprocessor()