
@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 BinarySplitSpatialSorter extends AbstractSpatialSorter
J. L. Bentley
Multidimensional binary search trees used for associative searching
Communications of the ACM, Vol. 18 Issue 9, Sept. 1975
| Constructor and Description |
|---|
BinarySplitSpatialSorter()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private <T extends SpatialComparable> |
binarySplitSort(List<T> objs,
int start,
int end,
int depth,
int numdim,
int[] dims,
SpatialSingleMeanComparator comp)
Sort the array using a binary split in dimension curdim, then recurse with
the next dimension.
|
<T extends SpatialComparable> |
sort(List<T> objs,
int start,
int end,
double[] minmax,
int[] dims)
Sort part of the list (start to end).
|
computeMinMax, pivotizeList1D, sortpublic <T extends SpatialComparable> void sort(List<T> objs, int start, int end, double[] minmax, int[] dims)
SpatialSorterT - actual type we sortobjs - 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 <T extends SpatialComparable> void binarySplitSort(List<T> objs, int start, int end, int depth, int numdim, int[] dims, SpatialSingleMeanComparator comp)
T - Object typeobjs - List of objectsstart - Interval startend - Interval end (exclusive)depth - Recursion depthnumdim - Number of dimensionsdims - Dimension indexes to sort by.comp - Comparator to use