public class SplitBySortedWeight extends SplitStrategy
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 JTreeMap. The lightest elements are on the bottom right of the JTreeMap
| Constructor and Description |
|---|
SplitBySortedWeight() |
| Modifier and Type | Method and Description |
|---|---|
void |
splitElements(List<TreeMapNode> v,
List<TreeMapNode> v1,
List<TreeMapNode> v2)
split the elements of a JTreeMap.
|
calculatePositions, calculatePositionsRec, sortList, sumWeight, workOutWeightpublic void splitElements(List<TreeMapNode> v, List<TreeMapNode> v1, List<TreeMapNode> v2)
SplitStrategysplitElements in class SplitStrategyv - List with the elements to split (arg IN)v1 - first List of the split (arg OUT)v2 - second List of the split (arg OUT)Copyright © 2005–2019 Appendium - Portfolio Financing Platform. All rights reserved.