Last updated:
0 purchases
pybipartitematching 0.2.0
Py Bipartite Matching
Algorithms for Enumerating All Perfect, Maximum and Maximal Matchings in Bipartite Graphs.
Algorithm described in “Algorithms for Enumerating All Perfect, Maximum and Maximal Matchings in Bipartite Graphs”
By Takeaki Uno in “Algorithms and Computation: 8th International Symposium, ISAAC ‘97 Singapore,
December 17-19, 1997 Proceedings”
See http://dx.doi.org/10.1007/3-540-63890-3_11
Free software: MIT license
Documentation: https://py-bipartite-matching.readthedocs.io.
Features
Functions available:
enum_perfect_matchings
enum_maximum_matchings
usage
To use Py Bipartite Matching in a project the networkx package is needed as well
>>> import py_bipartite_matching as pbm
>>> import networkx as nx
Use enum_perfect_matchings to enumerate all perfect matchings
>>> n = 2
>>> graph = nx.complete_bipartite_graph(n, n, nx.Graph)
>>> for matching in pbm.enum_perfect_matchings(graph):
>>> print(matching)
{0: 2, 1: 3}
{0: 3, 1: 2}
Use enum_maximum_matchings to enumerate all maximum matchings
>>> n = 2
>>> m = 3
>>> graph = nx.complete_bipartite_graph(n, m, nx.Graph)
>>> for matching in enum_maximum_matchings(graph):
>>> print(matching)
{0: 3, 1: 4}
{0: 4, 1: 3}
{0: 3, 2: 4}
{1: 3, 2: 4}
{0: 4, 2: 3}
{2: 3, 1: 4}
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.2.0 (2021-04-25)
Implemented brute force functions
Increased testing of perfect and maximum matching enumerators
Fixed maximum matching enumeration (some results were missing)
improve code cleanness
0.1.16 (2021-04-04)
Iterators extended: top_nodes, bottom_nodes
More graphics utils
Removed plot_bipartite, only draw functions now
0.1.15 (2021-04-04)
Iterators implemented: top_nodes, bottom_nodes
Utils to plot with matplotlib: draw_bipartite, plot_bipartite
0.1.10 (2021-04-02)
Functions already available: enum_perfect_matchings and enum_maximum_matchings
Readme files updated
0.1.0 (2021-02-14)
First release on PyPI.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.