Skip to content

Commit

Permalink
Revert new cooling strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 11, 2019
1 parent 695b11f commit 9ccaed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ export default function Sankey() {
const columns = computeNodeLayers(graph);
initializeNodeBreadths(columns);
for (let i = 0; i < iterations; ++i) {
const beta = ((i + 1) / iterations) ** 1.5;
const alpha = 1 - beta;
const alpha = Math.pow(0.99, i);
const beta = Math.max(1 - alpha, (i + 1) / iterations);
relaxRightToLeft(columns, alpha, beta);
relaxLeftToRight(columns, alpha, beta);
}
Expand Down

0 comments on commit 9ccaed7

Please sign in to comment.