public class InMemoryLSHIndex.Instance extends AbstractRefiningIndex<V> implements KNNIndex<V>, RangeIndex<V>
Modifier and Type | Class and Description |
---|---|
protected class |
InMemoryLSHIndex.Instance.LSHKNNQuery
Class for handling kNN queries against the LSH index.
|
protected class |
InMemoryLSHIndex.Instance.LSHRangeQuery
Class for handling kNN queries against the LSH index.
|
AbstractRefiningIndex.AbstractKNNQuery, AbstractRefiningIndex.AbstractRangeQuery
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super V>> |
hashfunctions
Hash functions to use.
|
(package private) java.util.ArrayList<it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DBIDs>> |
hashtables
The actual table
|
private int |
numberOfBuckets
Number of buckets to use.
|
relation
Constructor and Description |
---|
Instance(Relation<V> relation,
java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super V>> hashfunctions,
int numberOfBuckets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected DBIDs |
getCandidates(V obj)
Get the candidates: points which have at least one hash bucket in common.
|
KNNQuery<V> |
getKNNQuery(DistanceQuery<V> distanceQuery,
java.lang.Object... hints)
Get a KNN query object for the given distance query and k.
|
Logging |
getLogger()
Get the class logger.
|
java.lang.String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<V> |
getRangeQuery(DistanceQuery<V> distanceQuery,
java.lang.Object... hints)
Get a range query object for the given distance query and k.
|
java.lang.String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
countRefinements, logStatistics, refine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logStatistics
java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super V>> hashfunctions
java.util.ArrayList<it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<DBIDs>> hashtables
private int numberOfBuckets
public Instance(Relation<V> relation, java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super V>> hashfunctions, int numberOfBuckets)
relation
- Relation to index.hashfunctions
- Hash functions.public java.lang.String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<V>
public java.lang.String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<V>
public void initialize()
Index
initialize
in interface Index
public Logging getLogger()
AbstractRefiningIndex
getLogger
in class AbstractRefiningIndex<V>
public KNNQuery<V> getKNNQuery(DistanceQuery<V> distanceQuery, java.lang.Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<V>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RangeQuery<V> getRangeQuery(DistanceQuery<V> distanceQuery, java.lang.Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<V>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
Copyright © 2019 ELKI Development Team. License information.