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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
      extended by de.lmu.ifi.dbs.elki.database.query.similarity.AbstractSimilarityQuery<O,D>
          extended by de.lmu.ifi.dbs.elki.database.query.similarity.AbstractDBIDSimilarityQuery<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction.Instance<T,SharedNearestNeighborIndex<T>,TreeSetDBIDs,DoubleDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.FractionalSharedNearestNeighborSimilarityFunction.Instance<T>
Type Parameters:
T - Object type
All Implemented Interfaces:
DatabaseQuery, SimilarityQuery<T,DoubleDistance>, IndexBasedSimilarityFunction.Instance<T,SharedNearestNeighborIndex<T>,DoubleDistance>
Enclosing class:
FractionalSharedNearestNeighborSimilarityFunction<O>

public static class FractionalSharedNearestNeighborSimilarityFunction.Instance<T>
extends AbstractIndexBasedSimilarityFunction.Instance<T,SharedNearestNeighborIndex<T>,TreeSetDBIDs,DoubleDistance>

Actual instance for a dataset.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction.Instance
index
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
relation
 
Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
 
Constructor Summary
FractionalSharedNearestNeighborSimilarityFunction.Instance(Relation<T> database, SharedNearestNeighborIndex<T> preprocessor)
          Constructor.
 
Method Summary
protected static int countSharedNeighbors(TreeSetDBIDs neighbors1, TreeSetDBIDs neighbors2)
           
 DoubleDistance getDistanceFactory()
          Method to get the distance functions factory.
 DoubleDistance similarity(DBID id1, DBID id2)
          Returns the distance between the two objects specified by their object ids.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction.Instance
getIndex
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.similarity.AbstractDBIDSimilarityQuery
similarity, similarity, similarity
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
getRelation
 
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.database.query.similarity.SimilarityQuery
getRelation, similarity, similarity, similarity
 

Constructor Detail

FractionalSharedNearestNeighborSimilarityFunction.Instance

public FractionalSharedNearestNeighborSimilarityFunction.Instance(Relation<T> database,
                                                                  SharedNearestNeighborIndex<T> preprocessor)
Constructor.

Parameters:
database - Database
preprocessor - Preprocessor
Method Detail

countSharedNeighbors

protected static int countSharedNeighbors(TreeSetDBIDs neighbors1,
                                          TreeSetDBIDs neighbors2)

similarity

public DoubleDistance similarity(DBID id1,
                                 DBID id2)
Description copied from class: AbstractSimilarityQuery
Returns the distance between the two objects specified by their object ids.

Specified by:
similarity in interface SimilarityQuery<T,DoubleDistance>
Specified by:
similarity in class AbstractSimilarityQuery<T,DoubleDistance>
Parameters:
id1 - first object id
id2 - second object id
Returns:
the distance between the two objects specified by their object ids

getDistanceFactory

public DoubleDistance getDistanceFactory()
Description copied from interface: SimilarityQuery
Method to get the distance functions factory.

Returns:
Factory for distance objects

Release 0.4.0 (2011-09-20_1324)