@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
Modifier and Type | Class and Description |
---|---|
private static class |
BinarySplitSpatialSorter.DimC
Comparator that uses only a particular dimension.
|
Constructor and Description |
---|
BinarySplitSpatialSorter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private <T extends SpatialComparable> |
binarySplitSort(List<T> objs,
int start,
int end,
int curdim,
int dims,
BinarySplitSpatialSorter.DimC 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)
Sort part of the list (start to end).
|
computeMinMax, pivotizeList1D, sort
public <T extends SpatialComparable> void sort(List<T> objs, int start, int end, double[] minmax)
SpatialSorter
T
- 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 rangesprivate <T extends SpatialComparable> void binarySplitSort(List<T> objs, int start, int end, int curdim, int dims, BinarySplitSpatialSorter.DimC comp)
T
- Object typeobjs
- List of objectsstart
- Interval startend
- Interval end (exclusive)curdim
- Current dimensiondims
- Number of dimensionscomp
- Comparator to use