Package elki.index.tree.spatial.kd.split
Class MidpointSplit
- java.lang.Object
-
- elki.index.tree.spatial.kd.split.MidpointSplit
-
- All Implemented Interfaces:
SplitStrategy
public class MidpointSplit extends java.lang.Object implements SplitStrategy
Classic midpoint split, halfway on the axis of largest extend.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MidpointSplit.Par
Parameterizer-
Nested classes/interfaces inherited from interface elki.index.tree.spatial.kd.split.SplitStrategy
SplitStrategy.Info, SplitStrategy.Util
-
-
Field Summary
Fields Modifier and Type Field Description static MidpointSplit
STATIC
Static instance.
-
Constructor Summary
Constructors Constructor Description MidpointSplit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitStrategy.Info
findSplit(Relation<? extends NumberVector> relation, int dims, ArrayModifiableDBIDs sorted, DBIDArrayMIter iter, int left, int right, VectorUtil.SortDBIDsBySingleDimension comp)
Build the k-d-tree using midpoint splitting.
-
-
-
Field Detail
-
STATIC
public static final MidpointSplit STATIC
Static instance.
-
-
Method Detail
-
findSplit
public SplitStrategy.Info findSplit(Relation<? extends NumberVector> relation, int dims, ArrayModifiableDBIDs sorted, DBIDArrayMIter iter, int left, int right, VectorUtil.SortDBIDsBySingleDimension comp)
Description copied from interface:SplitStrategy
Build the k-d-tree using midpoint splitting.- Specified by:
findSplit
in interfaceSplitStrategy
- Parameters:
relation
- data relationdims
- data dimensionalitysorted
- modifiable array to encode the partitionsiter
- reusable iterator to the arrayleft
- left subintervalright
- right subintervalcomp
- reusable comparator (bound to the relation above)- Returns:
- split info, null if no good split
-
-