@Reference(authors="J. L. Bentley", title="Multidimensional binary search trees used for associative searching", booktitle="Communications of the ACM 18(9)", url="https://doi.org/10.1145/361002.361007", bibkey="DBLP:journals/cacm/Bentley75") public class BinarySplitSpatialSorter extends java.lang.Object implements SpatialSorter
Note that when using this for bulk-loading an R-tree, the result will not be a k-d-tree, not even remotely similar, as the splits are not preserved.
Reference (for the bulk-loading):
J. L. Bentley
Multidimensional binary search trees used for associative searching
Communications of the ACM 18(9)
| Modifier and Type | Class and Description |
|---|---|
static class |
BinarySplitSpatialSorter.Parameterizer
Parameterization class.
|
private static class |
BinarySplitSpatialSorter.Sorter
Comparator for sorting spatial objects by the mean value in a single
dimension.
|
| Modifier and Type | Field and Description |
|---|---|
static BinarySplitSpatialSorter |
STATIC
Static instance.
|
| Constructor and Description |
|---|
BinarySplitSpatialSorter()
Constructor, use
STATIC instead! |
| Modifier and Type | Method and Description |
|---|---|
private void |
binarySplitSort(java.util.List<? extends SpatialComparable> objs,
int start,
int end,
int depth,
int numdim,
int[] dims,
BinarySplitSpatialSorter.Sorter comp)
Sort the array using a binary split in dimension curdim, then recurse with
the next dimension.
|
void |
sort(java.util.List<? extends SpatialComparable> objs,
int start,
int end,
double[] minmax,
int[] dims)
Sort part of the list (start to end).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeMinMax, sortpublic static final BinarySplitSpatialSorter STATIC
public BinarySplitSpatialSorter()
STATIC instead!public void sort(java.util.List<? extends SpatialComparable> objs, int start, int end, double[] minmax, int[] dims)
SpatialSortersort in interface SpatialSorterobjs - the spatial objects to be sortedstart - First index to sort (e.g. 0)end - End of range (e.g. site())minmax - Array with dim pairs of (min, max) of value rangesdims - Dimensions to sort by, for indexing vectors and
minmax.private void binarySplitSort(java.util.List<? extends SpatialComparable> objs, int start, int end, int depth, int numdim, int[] dims, BinarySplitSpatialSorter.Sorter comp)
objs - List of objectsstart - Interval startend - Interval end (exclusive)depth - Recursion depthnumdim - Number of dimensionsdims - Dimension indexes to sort by.comp - Comparator to useCopyright © 2019 ELKI Development Team. License information.