Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance
Interface MeasurementFunction<O extends DatabaseObject,D extends Distance<D>>

All Superinterfaces:
Parameterizable
All Known Subinterfaces:
DistanceFunction<O,D>, KernelFunction<O,D>, SimilarityFunction<O,D>, SpatialDistanceFunction<O,D>
All Known Implementing Classes:
AbstractCorrelationDistanceFunction, AbstractDimensionsSelectingDoubleDistanceFunction, AbstractDistanceFunction, AbstractDoubleDistanceFunction, AbstractDoubleKernelFunction, AbstractFloatDistanceFunction, AbstractIntegerSimilarityFunction, AbstractKernelFunction, AbstractLocallyWeightedDistanceFunction, AbstractMeasurementFunction, AbstractPreprocessorBasedDistanceFunction, AbstractPreprocessorBasedSimilarityFunction, AbstractSimilarityFunction, ArbitraryKernelFunctionWrapper, ClusterSimilarity, CosineDistanceFunction, DimensionSelectingDistanceFunction, DimensionsSelectingEuklideanDistanceFunction, DirectSupportDependentItemsetDistanceFunction, DiSHDistanceFunction, ERiCDistanceFunction, EuklideanDistanceFunction, FileBasedDoubleDistanceFunction, FileBasedFloatDistanceFunction, FooKernelFunction, FractalDimensionBasedDistanceFunction, FrequencyDependentItemsetDistanceFunction, HiSCDistanceFunction, KernelBasedLocallyWeightedDistanceFunction, LinearKernelFunction, LocallyWeightedDistanceFunction, LPNormDistanceFunction, ManhattanDistanceFunction, PCABasedCorrelationDistanceFunction, PolynomialKernelFunction, PreferenceVectorBasedCorrelationDistanceFunction, ReciprocalSupportDependentItemsetDistanceFunction, RepresentationSelectingDistanceFunction, SharedMaximumDistanceFunction, SharedNearestNeighborSimilarityFunction, SharedUnitedDistanceFunction, SharingDependentItemsetDistanceFunction, SquareRootSupportLengthDependentItemsetDistanceFunction, SubspaceDistanceFunction, SupportLengthDependentItemsetDistanceFunction, WeightedDistanceFunction

public interface MeasurementFunction<O extends DatabaseObject,D extends Distance<D>>
extends Parameterizable

Interface Measurement describes the requirements of any measurement function (e.g. distance function or similarity function), that provides a measurement for comparing database objects.

Author:
Elke Achtert

Method Summary
 D infiniteDistance()
          Provides an infinite distance.
 boolean isInfiniteDistance(D distance)
          Returns true, if the given distance is an infinite distance, false otherwise.
 boolean isNullDistance(D distance)
          Returns true, if the given distance is a null distance, false otherwise.
 boolean isUndefinedDistance(D distance)
          Returns true, if the given distance is an undefined distance, false otherwise.
 D nullDistance()
          Provides a null distance.
 String requiredInputPattern()
          Returns a String as description of the required input format.
 void setDatabase(Database<O> database, boolean verbose, boolean time)
          Set the database that holds the associations for the DatabaseObject for which the measurements should be computed.
 D undefinedDistance()
          Provides an undefined distance.
 D valueOf(String pattern)
          Provides a measurement suitable to this measurement function based on the given pattern.
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription, setParameters
 

Method Detail

setDatabase

void setDatabase(Database<O> database,
                 boolean verbose,
                 boolean time)
Set the database that holds the associations for the DatabaseObject for which the measurements should be computed.

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

requiredInputPattern

String requiredInputPattern()
Returns a String as description of the required input format.

Returns:
a String as description of the required input format

valueOf

D valueOf(String pattern)
                              throws IllegalArgumentException
Provides a measurement suitable to this measurement function based on the given pattern.

Parameters:
pattern - a pattern defining a similarity suitable to this measurement function
Returns:
a measurement suitable to this measurement function based on the given pattern
Throws:
IllegalArgumentException - if the given pattern is not compatible with the requirements of this measurement function

infiniteDistance

D infiniteDistance()
Provides an infinite distance.

Returns:
an infinite distance

nullDistance

D nullDistance()
Provides a null distance.

Returns:
a null distance

undefinedDistance

D undefinedDistance()
Provides an undefined distance.

Returns:
an undefined distance

isInfiniteDistance

boolean isInfiniteDistance(D distance)
Returns true, if the given distance is an infinite distance, false otherwise.

Parameters:
distance - the distance to be tested on infinity
Returns:
true, if the given distance is an infinite distance, false otherwise

isNullDistance

boolean isNullDistance(D distance)
Returns true, if the given distance is a null distance, false otherwise.

Parameters:
distance - the distance to be tested whether it is a null distance
Returns:
true, if the given distance is a null distance, false otherwise

isUndefinedDistance

boolean isUndefinedDistance(D distance)
Returns true, if the given distance is an undefined distance, false otherwise.

Parameters:
distance - the distance to be tested whether it is undefined
Returns:
true, if the given distance is an undefined distance, false otherwise

Release 0.1 (2008-07-10_1838)