de.lmu.ifi.dbs.elki.distance.similarityfunction
Class FractionalSharedNearestNeighborSimilarityFunction.Instance<T>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.similarity.AbstractSimilarityQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.similarity.AbstractDBIDSimilarityQuery<O,D>
de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction.Instance<T,SharedNearestNeighborIndex<T>,TreeSetDBIDs,DoubleDistance>
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FractionalSharedNearestNeighborSimilarityFunction.Instance
public FractionalSharedNearestNeighborSimilarityFunction.Instance(Relation<T> database,
SharedNearestNeighborIndex<T> preprocessor)
- Constructor.
- Parameters:
database
- Databasepreprocessor
- Preprocessor
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 idid2
- 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