Class GutmanSplitStrategy
- java.lang.Object
-
- org.apache.druid.collections.spatial.split.GutmanSplitStrategy
-
- All Implemented Interfaces:
SplitStrategy
- Direct Known Subclasses:
LinearGutmanSplitStrategy
public abstract class GutmanSplitStrategy extends Object implements SplitStrategy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GutmanSplitStrategy(int minNumChildren, int maxNumChildren, BitmapFactory b)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
needToSplit(Node node)
abstract Node
pickNext(List<Node> nodes)
abstract Node[]
pickSeeds(List<Node> nodes)
Node[]
split(Node node)
This algorithm is from the original paper.
-
-
-
Constructor Detail
-
GutmanSplitStrategy
protected GutmanSplitStrategy(int minNumChildren, int maxNumChildren, BitmapFactory b)
-
-
Method Detail
-
needToSplit
public boolean needToSplit(Node node)
- Specified by:
needToSplit
in interfaceSplitStrategy
-
split
public Node[] split(Node node)
This algorithm is from the original paper. Algorithm Split. Divide a set of M+1 index entries into two groups. S1. [Pick first entry for each group]. Apply AlgorithmpickSeeds(List)
to choose two entries to be the first elements of the groups. Assign each to a group. S2. [Check if done]. If all entries have been assigned, stop. If one group has so few entries that all the rest must be assigned to it in order for it to have the minimum number m, assign them and stop. S3. [Select entry to assign]. Invoke AlgorithmpickNext(List)
to choose the next entry to assign. Add it to the group whose covering rectangle will have to be enlarged least to accommodate it. Resolve ties by adding the entry to the group smaller area, then to the one with fewer entries, then to either. Repeat from S2.- Specified by:
split
in interfaceSplitStrategy
-
-