Skip to content

graph-algorithm/maximum-matching

Repository files navigation

Maximum matching algorithms for JavaScript. Parent is js-algorithms. See docs.

import{iter,weightasmaximumMatching}from'@graph-algorithm/maximum-matching';constedges=[[1,2,10],[2,3,11]];constmatching=maximumMatching(edges);// [-1, -1, 3, 2][...iter(matching)];// [ [2, 3] ]import{optasmaximumCardinalityMatching}from'@graph-algorithm/maximum-matching/cardinality/index.js';for(constedgeofiter(maximumCardinalityMatching([[1,2],[2,3],[3,4]]))){console.log(edge);}// [1,2]// [3,4]

LicenseVersionTestsDependenciesGitHub issuesDownloads

Code issuesCode maintainabilityCode coverage (cov)Code technical debtDocumentationPackage 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