8000 GitHub - graph-algorithm/maximum-matching at 7c96844451bb3afbc3c01d5d776e04ff0817718d
[go: up one dir, main page]

Skip to content

graph-algorithm/maximum-matching

Repository files navigation

Maximum matching algorithms for JavaScript. Parent is @aureooms/js-gn. See docs.

import maximumMatching, {iter} from '@aureooms/js-maximum-matching';
const edges = [[1, 2, 10], [2, 3, 11]] ;
const matching = maximumMatching(edges) ; // [-1, -1, 3, 2]
[...iter(matching)]; // [ [2, 3] ]

import maximumCardinalityMatching from '@aureooms/js-maximum-matching/cardinality';
for (const edge of iter(maximumCardinalityMatching([[1, 2], [2, 3], [3, 4]]))) {
	console.log(edge);
}
// [1,2]
// [3,4]

License Version Build Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

👏 Credits

The implementation of Edmond's blossom algorithm is adapted from Joris van Rantwijk's python implementation (python source). All credit for the implementation goes to him and others that helped him.

Another adaptation by Matt Krick distributed under the MIT license is available here.

About

🌸 Maximum matching algorithms for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

0