Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractPreprocessorBasedDistanceFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>

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,D>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPreprocessorBasedDistanceFunction<O,P,D>
All Implemented Interfaces:
DistanceFunction<O,D>, MeasurementFunction<O,D>, Loggable, Parameterizable
Direct Known Subclasses:
AbstractCorrelationDistanceFunction, ERiCDistanceFunction, FractalDimensionBasedDistanceFunction, SubspaceDistanceFunction

public abstract class AbstractPreprocessorBasedDistanceFunction<O extends DatabaseObject,P extends Preprocessor<O>,D extends Distance<D>>
extends AbstractDistanceFunction<O,D>

Abstract super class for distance functions needing a preprocessor.

Author:
Elke Achtert

Field Summary
private  PreprocessorHandler<O,P> preprocessorHandler
          The handler class for the preprocessor.
 
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
AbstractPreprocessorBasedDistanceFunction(Pattern pattern)
          Provides a super class for distance functions needing a preprocessor
 
Method Summary
(package private) abstract  AssociationID getAssociationID()
          Returns the assocoiation ID for the association to be set by the preprocessor.
 List<AttributeSettings> getAttributeSettings()
          Returns the parameter setting of the attributes.
(package private) abstract  String getDefaultPreprocessorClassName()
          Returns the name of the default preprocessor.
 P getPreprocessor()
          Returns the preprocessor of this distance function.
(package private) abstract  String getPreprocessorClassDescription()
          Returns the description for parameter preprocessor.
(package private) abstract  Class<? extends Preprocessor> getPreprocessorSuperClassName()
          Returns the super class for the preprocessor.
 void setDatabase(Database<O> database, boolean verbose, boolean time)
          Runs the preprocessor on the database.
 String[] setParameters(String[] args)
          Sets the values for the parameters delta and preprocessor if specified.
 
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, setRequiredInputPattern
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, description, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, 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
infiniteDistance, nullDistance, requiredInputPattern, undefinedDistance, valueOf
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

preprocessorHandler

private final PreprocessorHandler<O extends DatabaseObject,P extends Preprocessor<O>> preprocessorHandler
The handler class for the preprocessor.

Constructor Detail

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
Method Detail

setDatabase

public void setDatabase(Database<O> database,
                        boolean verbose,
                        boolean time)
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 set
verbose - flag to allow verbose messages while performing the method
time - flag to request output of performance time
See Also:
MeasurementFunction.setDatabase(de.lmu.ifi.dbs.elki.database.Database, boolean, boolean)

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Sets the values for the parameters delta and preprocessor if specified. If the parameters are not specified default values are set.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

getAttributeSettings

public List<AttributeSettings> getAttributeSettings()
Returns the parameter setting of the attributes.

Specified by:
getAttributeSettings in interface Parameterizable
Overrides:
getAttributeSettings in class AbstractParameterizable
Returns:
the parameter setting of the attributes
See Also:
Parameterizable.getAttributeSettings()

getPreprocessor

public P getPreprocessor()
Returns the preprocessor of this distance function.

Returns:
the preprocessor of this distance function

getDefaultPreprocessorClassName

abstract String getDefaultPreprocessorClassName()
Returns the name of the default preprocessor.


getPreprocessorClassDescription

abstract String getPreprocessorClassDescription()
Returns the description for parameter preprocessor.


getPreprocessorSuperClassName

abstract Class<? extends Preprocessor> getPreprocessorSuperClassName()
Returns the super class for the preprocessor.


getAssociationID

abstract AssociationID getAssociationID()
Returns the assocoiation ID for the association to be set by the preprocessor.


Release 0.1 (2008-07-10_1838)