Encourage link merging

This commit is contained in:
Ian Gulliver
2019-07-09 05:55:04 +00:00
parent cda3cad6f9
commit 3f015a3540
2 changed files with 24 additions and 18 deletions

View File

@@ -68,7 +68,7 @@ class GraphNode {
// Try to preserve pagerank left-to-right flow from initial positions
let rankSign = Math.sign(node.pageRank - this.pageRank);
this.addAffinity(node, (d, v) =>
[Math.sign(v[0]) == rankSign ? 0 : -500, 0]);
[Math.sign(v[0]) == rankSign ? 0 : -1000, 0]);
}
for (let to of this.links) {