Comments (12)
Thanks for the report.
A first wild guess would be that the algorithm depends on some unreliable behavior, e.g., hash table ordering.
I assume you're using a recent version of Racket?
It's been a while since I've checked the tests against the latest Racket so I'm going to do that first. Then I will revisit this bug.
from graph.
Thanks for the response! Yes, that's right: v7.2. Your suspicions here sound like good intuition to me, for sure.
from graph.
I think I see the problem. The maximum-bipartite-matching
function uses a max flow algorithm for directed graphs. So giving it an undirected graph counts the edges twice.
Looking into possible fixes.
from graph.
from graph.
Actually, you are right. Looking at the code more closely, it looks like the duplicate edges are removed before calling the max flow algorithm, so it should work out. Back to testing.
from graph.
from graph.
Wow! Thanks for handling this so quickly!
from graph.
I think I fixed it.
Problem was that edge-weight
was returning inf
for non-existent edges, but that is the wrong default for maxflow
.
Let me know if anything still seems off.
from graph.
Thanks again for the report!
from graph.
from graph.
since I installed this as a Racket package, is there a good way to get the fixed version in a way that is harmonious?
Normally, yes. But the commits before this fix were somewhat drastic. Specifically, they modernized the package by splitting docs/tests/core into different packages, to accommodate min-racket installs and minimize dependencies (see #37). And I've had mixed experiences with updating this kind of change. But worst case, an uninstall-reinstall should do the trick.
from graph.
from graph.
Related Issues (20)
- Racket 5 tests don't work HOT 3
- stop supporting Racket versions < 6 HOT 1
- Tests fail on Racket 7 HOT 1
- Please add the racket topic to this repo HOT 1
- Allow setting of graphviz attributes other than color HOT 1
- Implement multigraphs HOT 1
- Serialization HOT 3
- document gen:queue and queue-lib
- edge-weight should allow default value
- invalid version number
- Functional interface? HOT 3
- graphviz: support arbitrary edge values HOT 3
- `undirected-graph` raises `apply` error HOT 4
- support for multigraphs HOT 5
- Typed Racket interface HOT 7
- racket 8 breaks tests
- Is it possible to use Graph Properties to generate better `.dot` files? HOT 7
- Add `directed-graph?` and `undirected-graph?` HOT 8
- Inbound and outbound neighbors for directed graphs
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 graph.