net.sf.jtreemap.ktreemap
Class SplitBySortedWeight
java.lang.Object
net.sf.jtreemap.ktreemap.SplitStrategy
net.sf.jtreemap.ktreemap.SplitBySortedWeight
public class SplitBySortedWeight
- extends SplitStrategy
Strategy who split the elements in 2 groups of equivalent weight.
The elements are first sorted by descending weight. Then they are splitted in
2 groups of equivalent weight.
The heaviest elements are on the top left of the KTreeMap. The lightest
elements are on the bottom right of the KTreeMap
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SplitBySortedWeight
public SplitBySortedWeight()
splitElements
public void splitElements(java.util.List<TreeMapNode> list,
java.util.List<TreeMapNode> group1,
java.util.List<TreeMapNode> group2)
- Description copied from class:
SplitStrategy
- split the elements of a JTreeMap.
- Specified by:
splitElements
in class SplitStrategy
- Parameters:
list
- Vector with the elements to split (arg IN)group1
- first Vector of the split (arg OUT)group2
- second Vector of the split (arg OUT)