Skip to content

Commit 9ccaed7

Browse files
committed
Revert new cooling strategy.
1 parent 695b11f commit 9ccaed7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sankey.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ export default function Sankey() {
229229
const columns = computeNodeLayers(graph);
230230
initializeNodeBreadths(columns);
231231
for (let i = 0; i < iterations; ++i) {
232-
const beta = ((i + 1) / iterations) ** 1.5;
233-
const alpha = 1 - beta;
232+
const alpha = Math.pow(0.99, i);
233+
const beta = Math.max(1 - alpha, (i + 1) / iterations);
234234
relaxRightToLeft(columns, alpha, beta);
235235
relaxLeftToRight(columns, alpha, beta);
236236
}

0 commit comments

Comments
 (0)