graph-algorithm/maximum-matching

View on GitHub
src/iter.js

Summary

Maintainability
A
0 mins
Test Coverage
export function* iter(matching) {
    let i = 0;
    for (const j of matching) {
        // This takes care of j === -1
        if (i < j) yield [i, j];
        ++i;
    }
}