Affinity migration checkpoint

Issue #6
This commit is contained in:
Ian Gulliver
2019-07-13 03:34:34 +00:00
parent 9d46c061c6
commit 2663c64bcd
2 changed files with 25 additions and 10 deletions

View File

@@ -46,15 +46,6 @@ class GraphNode {
const INF = 999999;
for (let node of nodes) {
// Weak affinity full mesh
// Keep unassociated subgroups together
this.addAffinity(node, d => d);
// Keep one space between subgraphs
if (this.subgraph != node.subgraph && this.label != node.label) {
this.addAffinity(node, d => d <= 2 ? -INF : 0);
}
// Am I in any labeled groups that node is not?
// If so, preserve one space above the group
let labeled = new Set(Array.from(this.groups).filter(g => g.label != ''));