Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.similarityfunction
Class SharedNearestNeighborSimilarityFunction<O extends DatabaseObject,D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
          extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractSimilarityFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractPreprocessorBasedSimilarityFunction<O,SharedNearestNeighborsPreprocessor<O,D>,IntegerDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.SharedNearestNeighborSimilarityFunction<O,D>
Type Parameters:
O - object type
D - distance type
All Implemented Interfaces:
MeasurementFunction<O,IntegerDistance>, PreprocessorBasedMeasurementFunction<O,SharedNearestNeighborsPreprocessor<O,D>,IntegerDistance>, SimilarityFunction<O,IntegerDistance>, PreprocessorClient<SharedNearestNeighborsPreprocessor<O,D>,O>, Parameterizable

public class SharedNearestNeighborSimilarityFunction<O extends DatabaseObject,D extends Distance<D>>
extends AbstractPreprocessorBasedSimilarityFunction<O,SharedNearestNeighborsPreprocessor<O,D>,IntegerDistance>

SharedNearestNeighborSimilarityFunction with a pattern defined to accept Strings that define a non-negative Integer.

Author:
Arthur Zimek

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
distanceFactory
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
SharedNearestNeighborSimilarityFunction(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected static int countSharedNeighbors(SortedSet<Integer> neighbors1, SortedSet<Integer> neighbors2)
           
 AssociationID<SortedSet<Integer>> getAssociationID()
          Returns the association ID for the association to be set by the preprocessor.
 Class<?> getDefaultPreprocessorClass()
          Returns the name of the default preprocessor.
 String getPreprocessorDescription()
          Returns the description for the preprocessor parameter.
 Class<SharedNearestNeighborsPreprocessor<O,D>> getPreprocessorSuperClass()
          Returns the super class for the preprocessor parameter.
 IntegerDistance similarity(Integer id1, Integer id2)
          Returns the similarity between the two objects specified by their object ids.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractPreprocessorBasedSimilarityFunction
getPreprocessor, setDatabase
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractSimilarityFunction
similarity, similarity
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance, valueOf
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, 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.MeasurementFunction
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance, valueOf
 

Constructor Detail

SharedNearestNeighborSimilarityFunction

public SharedNearestNeighborSimilarityFunction(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

similarity

public IntegerDistance similarity(Integer id1,
                                  Integer id2)
Description copied from interface: SimilarityFunction
Returns the similarity between the two objects specified by their object ids.

Parameters:
id1 - first object id
id2 - second object id
Returns:
the similarity between the two objects specified by their object ids

countSharedNeighbors

protected static int countSharedNeighbors(SortedSet<Integer> neighbors1,
                                          SortedSet<Integer> neighbors2)

getAssociationID

public AssociationID<SortedSet<Integer>> getAssociationID()
Description copied from interface: PreprocessorClient
Returns the association ID for the association to be set by the preprocessor.

Returns:
the association ID for the association to be set by the preprocessor, which is AssociationID.SHARED_NEAREST_NEIGHBORS_SET

getDefaultPreprocessorClass

public Class<?> getDefaultPreprocessorClass()
Description copied from interface: PreprocessorClient
Returns the name of the default preprocessor.

Returns:
the name of the default preprocessor, which is SharedNearestNeighborsPreprocessor

getPreprocessorDescription

public String getPreprocessorDescription()
Description copied from interface: PreprocessorClient
Returns the description for the preprocessor parameter.

Returns:
the description for the preprocessor parameter

getPreprocessorSuperClass

public Class<SharedNearestNeighborsPreprocessor<O,D>> getPreprocessorSuperClass()
Description copied from interface: PreprocessorClient
Returns the super class for the preprocessor parameter.

Returns:
the super class for the preprocessor, which is SharedNearestNeighborsPreprocessor

Release 0.3 (2010-03-31_1612)