
O - Vector type@Reference(authors="J. L. Bentley", title="Multidimensional binary search trees used for associative searching", booktitle="Communications of the ACM, Vol. 18 Issue 9, Sept. 1975", url="http://dx.doi.org/10.1145/361002.361007") public class SmallMemoryKDTree<O extends NumberVector> extends AbstractIndex<O> implements KNNIndex<O>, RangeIndex<O>
ModifiableDoubleDBIDList to sort the data in a
 serialized tree and store the current attribute value.
 It needs about 3 times as much memory as MinimalisticMemoryKDTree but
 it is also considerably faster because it does not need to lookup this value
 from the vectors.
 Reference:
 
 J. L. Bentley
 Multidimensional binary search trees used for associative searching
 Communications of the ACM, Vol. 18 Issue 9, Sept. 1975
 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SmallMemoryKDTree.Factory<O extends NumberVector>Factory class | 
| class  | SmallMemoryKDTree.KDTreeKNNQuerykNN query for the k-d-tree. | 
| class  | SmallMemoryKDTree.KDTreeRangeQuerykNN query for the k-d-tree. | 
| Modifier and Type | Field and Description | 
|---|---|
| (package private) int | dimsThe number of dimensions. | 
| (package private) Counter | distcalcCounter for distance computations. | 
| (package private) int | leafsizeMaximum size of leaf nodes. | 
| private static Logging | LOGClass logger | 
| (package private) Counter | objaccessCounter for comparisons. | 
| (package private) ModifiableDoubleDBIDList | sortedThe actual "tree" as a sorted array. | 
relation| Constructor and Description | 
|---|
| SmallMemoryKDTree(Relation<O> relation,
                 int leafsize)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| private void | buildTree(int left,
         int right,
         int axis,
         DoubleDBIDListMIter iter)Recursively build the tree by partial sorting. | 
| protected void | countDistanceComputation()Count a distance computation. | 
| protected void | countObjectAccess()Count a single object access. | 
| KNNQuery<O> | getKNNQuery(DistanceQuery<O> distanceQuery,
           Object... hints)Get a KNN query object for the given distance query and k. | 
| 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. | 
private static final Logging LOG
ModifiableDoubleDBIDList sorted
int dims
int leafsize
final Counter objaccess
final Counter distcalc
public void initialize()
Indexinitialize in interface Indexprivate void buildTree(int left,
             int right,
             int axis,
             DoubleDBIDListMIter iter)
left - Interval minimumright - Interval maximumaxis - Current splitting axisiter - Iteratorpublic String getLongName()
ResultgetLongName in interface ResultgetLongName in class AbstractIndex<O extends NumberVector>public String getShortName()
ResultgetShortName in interface ResultgetShortName in class AbstractIndex<O extends NumberVector>public void logStatistics()
IndexlogStatistics in interface Indexprotected void countObjectAccess()
protected void countDistanceComputation()
public KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, Object... hints)
KNNIndexgetKNNQuery in interface KNNIndex<O extends NumberVector>distanceQuery - Distance queryhints - Hints for the optimizernullpublic RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, Object... hints)
RangeIndexgetRangeQuery in interface RangeIndex<O extends NumberVector>distanceQuery - Distance queryhints - Hints for the optimizernullCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.