Skip to content

Commit

Permalink
♻️ refactor(blossom): Simplify logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Sep 24, 2020
1 parent fd34df3 commit c9ce5cc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/core/blossom/blossom.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,8 @@ export default function blossom(CHECK_OPTIMUM, CHECK_DELTA) {
}

for (const k of nblist) {
let [i, j] = edges[k];

if (inblossom[j] === b) {
const temporary_ = i;
i = j;
j = temporary_;
}

const bj = inblossom[j];
const [i, j] = edges[k];
const bj = inblossom[j] === b ? inblossom[i] : inblossom[j];

if (
bj !== b &&
Expand Down

0 comments on commit c9ce5cc

Please sign in to comment.