
O - Object type@Reference(authors="C. Yu, B. C. Ooi, K. L. Tan, H. V. Jagadish", title="Indexing the distance: An efficient method to knn processing", booktitle="In Proceedings of the 27th International Conference on Very Large Data Bases", url="http://www.vldb.org/conf/2001/P421.pdf") public class InMemoryIDistanceIndex<O> extends AbstractRefiningIndex<O> implements RangeIndex<O>, KNNIndex<O>
C. Yu, B. C. Ooi, K. L. Tan, H. V. Jagadish
Indexing the Distance: An Efficient Method to KNN Processing.
In Proceedings of the 27th International Conference on Very Large Data Bases
H. V. Jagadish, B. C. Ooi, K. L. Tan, C. Yu, R. Zhang
iDistance: An adaptive B+-tree based indexing method for nearest neighbor
search.
ACM Transactions on Database Systems (TODS), 30(2), 364-397.
| Modifier and Type | Class and Description |
|---|---|
static class |
InMemoryIDistanceIndex.Factory<V>
Index factory for iDistance indexes.
|
protected class |
InMemoryIDistanceIndex.IDistanceKNNQuery
kNN query implementation.
|
protected class |
InMemoryIDistanceIndex.IDistanceRangeQuery
Exact Range query implementation.
|
AbstractRefiningIndex.AbstractKNNQuery, AbstractRefiningIndex.AbstractRangeQuery| Modifier and Type | Field and Description |
|---|---|
private DistanceQuery<O> |
distanceQuery
Distance query.
|
private ModifiableDoubleDBIDList[] |
index
The actual index.
|
private KMedoidsInitialization<O> |
initialization
Initialization method.
|
private static Logging |
LOG
Class logger.
|
private int |
numref
Number of reference points.
|
private ArrayDBIDs |
referencepoints
Reference points.
|
static Void |
SECOND_REFERENCE
Second reference, for documentation generation.
|
relation| Constructor and Description |
|---|
InMemoryIDistanceIndex(Relation<O> relation,
DistanceQuery<O> distance,
KMedoidsInitialization<O> initialization,
int numref)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
binarySearch(ModifiableDoubleDBIDList index,
DoubleDBIDListIter iter,
double val)
Seek an iterator to the desired position, using binary search.
|
private DistanceFunction<? super O> |
getDistanceFunction()
Distance function.
|
KNNQuery<O> |
getKNNQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
Logging |
getLogger()
Get the class logger.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<O> |
getRangeQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a range query object for the given distance query and k.
|
String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
void |
logStatistics()
Send statistics to the logger, if enabled.
|
protected static <O> DoubleIntPair[] |
rankReferencePoints(DistanceQuery<O> distanceQuery,
O obj,
ArrayDBIDs referencepoints)
Sort the reference points by distance to the query object
|
countRefinements, refineprivate static final Logging LOG
private DistanceQuery<O> distanceQuery
private KMedoidsInitialization<O> initialization
private int numref
private ArrayDBIDs referencepoints
private ModifiableDoubleDBIDList[] index
@Reference(authors="H. V. Jagadish, B. C. Ooi, K. L. Tan, C. Yu, R. Zhang", title="iDistance: An adaptive B+-tree based indexing method for nearest neighbor search", booktitle="ACM Transactions on Database Systems (TODS), 30(2), 364-397") public static final Void SECOND_REFERENCE
public InMemoryIDistanceIndex(Relation<O> relation, DistanceQuery<O> distance, KMedoidsInitialization<O> initialization, int numref)
relation - Data relationdistance - Distanceinitialization - Initialization methodnumref - Number of reference pointspublic void initialize()
Indexinitialize in interface Indexpublic KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, Object... hints)
KNNIndexgetKNNQuery in interface KNNIndex<O>distanceQuery - Distance queryhints - Hints for the optimizernullpublic RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, Object... hints)
RangeIndexgetRangeQuery in interface RangeIndex<O>distanceQuery - Distance queryhints - Hints for the optimizernullprivate DistanceFunction<? super O> getDistanceFunction()
public String getLongName()
ResultgetLongName in interface ResultgetLongName in class AbstractIndex<O>public String getShortName()
ResultgetShortName in interface ResultgetShortName in class AbstractIndex<O>public Logging getLogger()
AbstractRefiningIndexgetLogger in class AbstractRefiningIndex<O>public void logStatistics()
IndexlogStatistics in interface IndexlogStatistics in class AbstractRefiningIndex<O>protected static <O> DoubleIntPair[] rankReferencePoints(DistanceQuery<O> distanceQuery, O obj, ArrayDBIDs referencepoints)
distanceQuery - Distance queryobj - Query objectreferencepoints - Iterator for reference pointsprotected static void binarySearch(ModifiableDoubleDBIDList index, DoubleDBIDListIter iter, double val)
index - Index to searchiter - Iteratorval - Distance to search toCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.