de.lmu.ifi.dbs.elki.distance.similarityfunction
Class SharedNearestNeighborSimilarityFunction<O extends DatabaseObject,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
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,SharedNearestNeighborsPreprocessor<O,D>,IntegerDistance>
de.lmu.ifi.dbs.elki.distance.similarityfunction.SharedNearestNeighborSimilarityFunction<O,D>
- Type Parameters:
O
- object typeD
- 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedNearestNeighborSimilarityFunction
public SharedNearestNeighborSimilarityFunction(Parameterization config)
- Constructor, adhering to
Parameterizable
- Parameters:
config
- Parameterization
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 idid2
- 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