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

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<O,SharedNearestNeighborIndex<O>,SetDBIDs,IntegerDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.SharedNearestNeighborSimilarityFunction.Instance<O>
Type Parameters:
O - Object type
All Implemented Interfaces:
DatabaseQuery, SimilarityQuery<O,IntegerDistance>, IndexBasedSimilarityFunction.Instance<O,SharedNearestNeighborIndex<O>,IntegerDistance>
Enclosing class:
SharedNearestNeighborSimilarityFunction<O>

public static class SharedNearestNeighborSimilarityFunction.Instance<O>
extends AbstractIndexBasedSimilarityFunction.Instance<O,SharedNearestNeighborIndex<O>,SetDBIDs,IntegerDistance>

Instance for a particular database.


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
SharedNearestNeighborSimilarityFunction.Instance(Relation<O> database, SharedNearestNeighborIndex<O> preprocessor)
          Constructor.
 
Method Summary
 IntegerDistance getDistanceFactory()
          Method to get the distance functions factory.
 IntegerDistance 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

SharedNearestNeighborSimilarityFunction.Instance

public SharedNearestNeighborSimilarityFunction.Instance(Relation<O> database,
                                                        SharedNearestNeighborIndex<O> preprocessor)
Constructor.

Parameters:
database - Database
preprocessor - Index
Method Detail

similarity

public IntegerDistance 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<O,IntegerDistance>
Specified by:
similarity in class AbstractSimilarityQuery<O,IntegerDistance>
Parameters:
id1 - first object id
id2 - second object id
Returns:
the distance between the two objects specified by their object ids

getDistanceFactory

public IntegerDistance 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)