public abstract class GutmanSplitStrategy extends Object implements SplitStrategy
Modifier | Constructor and Description |
---|---|
protected |
GutmanSplitStrategy(int minNumChildren,
int maxNumChildren,
BitmapFactory b) |
Modifier and Type | Method and Description |
---|---|
boolean |
needToSplit(Node node) |
abstract Node |
pickNext(List<Node> nodes,
Node[] groups) |
abstract Node[] |
pickSeeds(List<Node> nodes) |
Node[] |
split(Node node)
This algorithm is from the original paper.
|
protected GutmanSplitStrategy(int minNumChildren, int maxNumChildren, BitmapFactory b)
public boolean needToSplit(Node node)
needToSplit
in interface SplitStrategy
public Node[] split(Node node)
pickSeeds(java.util.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 Algorithm pickNext(java.util.List, Node[])
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.split
in interface SplitStrategy
Copyright © 2011–2017. All rights reserved.