Skip to content

Commit fbaf3e5

Browse files
♻️ refactor(blossom): Simplify slack.
1 parent 23b932b commit fbaf3e5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/core/blossom/blossom.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,8 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
188188
let queue = [];
189189

190190
// Return 2 * slack of edge k (does not work inside blossoms).
191-
const slack = function (k) {
192-
const i = edges[k][0];
193-
const j = edges[k][1];
194-
const wt = edges[k][2];
191+
const slack = (k) => {
192+
const [i, j, wt] = edges[k];
195193
return dualvar[i] + dualvar[j] - 2 * wt;
196194
};
197195

0 commit comments

Comments
 (0)