de.lmu.ifi.dbs.elki.distance.similarityfunction
Class FractionalSharedNearestNeighborSimilarityFunction<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction<O,SharedNearestNeighborIndex<O>,TreeSetDBIDs,DoubleDistance>
      extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.FractionalSharedNearestNeighborSimilarityFunction<O>
Type Parameters:
O - object type
All Implemented Interfaces:
IndexBasedSimilarityFunction<O,DoubleDistance>, NormalizedSimilarityFunction<O,DoubleDistance>, SimilarityFunction<O,DoubleDistance>, InspectionUtilFrequentlyScanned, Parameterizable

public class FractionalSharedNearestNeighborSimilarityFunction<O>
extends AbstractIndexBasedSimilarityFunction<O,SharedNearestNeighborIndex<O>,TreeSetDBIDs,DoubleDistance>
implements NormalizedSimilarityFunction<O,DoubleDistance>

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


Nested Class Summary
static class FractionalSharedNearestNeighborSimilarityFunction.Instance<T>
          Actual instance for a dataset.
static class FractionalSharedNearestNeighborSimilarityFunction.Parameterizer<O>
          Parameterization class.
 
Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction
INDEX_ID, indexFactory
 
Constructor Summary
FractionalSharedNearestNeighborSimilarityFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
          Constructor.
 
Method Summary
 DoubleDistance getDistanceFactory()
          Get a distance factory.
<T extends O>
FractionalSharedNearestNeighborSimilarityFunction.Instance<T>
instantiate(Relation<T> database)
          Preprocess the database to get the actual distance function.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction
getInputTypeRestriction, isSymmetric
 
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.similarityfunction.SimilarityFunction
getInputTypeRestriction, isSymmetric
 

Constructor Detail

FractionalSharedNearestNeighborSimilarityFunction

public FractionalSharedNearestNeighborSimilarityFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
Constructor.

Parameters:
indexFactory - Index factory.
Method Detail

instantiate

public <T extends O> FractionalSharedNearestNeighborSimilarityFunction.Instance<T> instantiate(Relation<T> database)
Description copied from interface: IndexBasedSimilarityFunction
Preprocess the database to get the actual distance function.

Specified by:
instantiate in interface IndexBasedSimilarityFunction<O,DoubleDistance>
Specified by:
instantiate in interface SimilarityFunction<O,DoubleDistance>
Specified by:
instantiate in class AbstractIndexBasedSimilarityFunction<O,SharedNearestNeighborIndex<O>,TreeSetDBIDs,DoubleDistance>
Parameters:
database - Representation to use
Returns:
Actual distance query.

getDistanceFactory

public DoubleDistance getDistanceFactory()
Description copied from interface: SimilarityFunction
Get a distance factory.

Specified by:
getDistanceFactory in interface SimilarityFunction<O,DoubleDistance>
Returns:
distance factory

Release 0.4.0 (2011-09-20_1324)