benchaplin / hungarian-algorithm

Python 3 implementation of the Hungarian Algorithm
MIT License
70 stars 12 forks source link

I got error with simple graph #2

Closed songheony closed 4 years ago

songheony commented 4 years ago

Hi, thanks for releasing a good library. I got an error with the graph below, can you help me?

G = {'p0': {'c0': 0.7542973970266263}, 'p2': {'c1': 0.49921363305452704}} matching = algorithm.find_matching(G, matching_type="max", return_type="list")

The error was 'G is not bipartite', so that find_matching function always returns 'False'.

songheony commented 4 years ago

Oh, my bad. It was not bipartite graph.