Comments (3)
I am also having the same problem. I tried to recreate it as simply as possible:
from hungarian_algorithm import algorithm
G = {
0: {2: 4, 3: 6},
1: {2: 5, 3: 7}
}
print(algorithm.find_matching(G, matching_type = 'max', return_type = 'list'))
Output:
[((1, 3), 7), ((0, 3), 6)]
On the other hand, it seems to work when I use the exact same graph structure, but I instead make the nodes str
objects (though I cannot say for sure as I have not tested many examples):
H = {
'a': {'c': 4, 'd': 6},
'b': {'c': 5, 'd': 7}
}
print(algorithm.find_matching(H, matching_type = 'max', return_type = 'list'))
Output:
[(('a', 'c'), 4), (('b', 'd'), 7)]
from hungarian-algorithm.
Alright, thank you :)
from hungarian-algorithm.
I should mention that that I still think this is an open issue. You would expect the algorithm to work with integer nodes, and it would be a bit inconvenient to need to convert to str
. Plus, it is still not entirely clear if the same problems arise with str
, as it hasn't been tested.
from hungarian-algorithm.
Related Issues (7)
- I got error with simple graph HOT 1
- I got a empty set error during run the algorithm on my graph HOT 3
- Return value of False HOT 14
- AttributeError: 'bool' object has no attribute 'vertices' HOT 1
- AttributeError: 'bool' object has no attribute 'vertices' HOT 1
- Algorithm hangs/crashes undeterministically
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hungarian-algorithm.