Package elki.math.spacefillingcurves
Class PeanoSpatialSorter
- java.lang.Object
-
- elki.math.spacefillingcurves.PeanoSpatialSorter
-
- All Implemented Interfaces:
SpatialSorter
@Reference(authors="G. Peano", title="Sur une courbe, qui remplit toute une aire plane", booktitle="Mathematische Annalen 36(1)", url="http://resolver.sub.uni-goettingen.de/purl?GDZPPN002252376", bibkey="journals/mathann/Peano1890") public class PeanoSpatialSorter extends java.lang.Object implements SpatialSorter
Bulk-load an R-tree index by presorting the objects with their position on the Peano curve.The basic shape of this space-filling curve looks like this:
3---4 9 | | | 2 5 8 | | | 1 6---7
Which then expands to the next level as:+-+ +-+ +-+ +-+ E | | | | | | | | | | +-+ +-+ | | +-+ | | | | +-+ +-+ | | +-+ | | | | | | | | | +-+ | | +-+ +-+ | | | | +-+ | | +-+ +-+ | | | | | | | | | | S +-+ +-+ +-+ +-+and so on.Reference:
G. Peano
Sur une courbe, qui remplit toute une aire plane
Mathematische Annalen 36(1)- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPeanoSpatialSorter.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description static PeanoSpatialSorterSTATICStatic instance.
-
Constructor Summary
Constructors Constructor Description PeanoSpatialSorter()Constructor, useSTATICinstead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidpeanoSort(java.util.List<? extends SpatialComparable> objs, int start, int end, double[] mms, int[] dims, int depth, long[] bits, boolean desc)Sort by Peano curve.voidsort(java.util.List<? extends SpatialComparable> objs, int start, int end, double[] minmax, int[] dims)Sort part of the list (start to end).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.math.spacefillingcurves.SpatialSorter
sort
-
-
-
-
Field Detail
-
STATIC
public static final PeanoSpatialSorter STATIC
Static instance.
-
-
Constructor Detail
-
PeanoSpatialSorter
public PeanoSpatialSorter()
Constructor, useSTATICinstead.
-
-
Method Detail
-
sort
public void sort(java.util.List<? extends SpatialComparable> objs, int start, int end, double[] minmax, int[] dims)
Description copied from interface:SpatialSorterSort part of the list (start to end).- Specified by:
sortin interfaceSpatialSorter- Parameters:
objs- 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 andminmax.
-
peanoSort
protected void peanoSort(java.util.List<? extends SpatialComparable> objs, int start, int end, double[] mms, int[] dims, int depth, long[] bits, boolean desc)
Sort by Peano curve.- Parameters:
objs- Objectsstart- Start indexend- Endmms- Minmax valuesdims- Dimensions indexdepth- Dimensionbits- Bit set for inversionsdesc- Current ordering
-
-