GraphsMatching.jl icon indicating copy to clipboard operation
GraphsMatching.jl copied to clipboard

fix blossom

Open etiennedeg opened this issue 1 year ago • 8 comments

fixes #10

etiennedeg avatar May 03 '24 11:05 etiennedeg

@etiennedeg , could you check whether the switch to LEMONGraphs.jl is fixing this? If you have a chance to rebase, I will be prompt to review.

Krastanov avatar Jul 07 '25 20:07 Krastanov

I briefly looked into this, but I don't know what behavior is expected from LEMON if no matching exists. I wanted to check the dualValue (see LEMON docs) but this binding is not exposed by LEMON_jll. What would it take to wrap additional methods? I'm not familiar with CxxWrap.jl, I don't know where it was specified that only very few names get exported.

simsurace avatar Oct 23 '25 08:10 simsurace

The wrapper is bundled with the build script for LEMON in Yggdrasil: https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/LEMON/bundled/cxxwrap/lemoncxxwrap.cpp

And then the wrapping happens here: https://github.com/JuliaGraphs/LEMONGraphs.jl/blob/main/src/LEMONGraphs.jl

The wrapper is so minimal because my goal was just to make GraphsMatching installable on all systems where BlossomV.jl fails to install, so I just matched the minimal existing capabilities.

Could you run me through what other API you need access to? I can try to enable it.

Krastanov avatar Oct 23 '25 12:10 Krastanov

The official docs did not load for me. Here is the waybackmachine archive https://web.archive.org/web/20200111124408/https://lemon.cs.elte.hu/pub/doc/1.3.1/a00263.html

Do you need anything besides the scalar dualValue()?

Krastanov avatar Oct 23 '25 12:10 Krastanov

I don't know what I need, I'm trying to reverse engineer what happens if there is no matching. So preferably one would have access to all the methods for MaxWeightedPerfectMatching:

init
fractionalinit
start
run
matchingWeight
matching
MatchingMap
mate
dualValue
nodeValue
blossomNum
blossomSize
blossomValue
dualScale

simsurace avatar Oct 23 '25 14:10 simsurace

I will try to set up a pull request to Yggdrassil that makes these available later in the day and tag you there so you also have an example. Maybe we can work together on this over the next few days (I will not have enough bandwidth to take care of updating LEMONGraphs.jl and GraphsMatching.jl themselves)?

Krastanov avatar Oct 23 '25 14:10 Krastanov

That would be nice, if you can get me started on where to change things I can take it from there.

simsurace avatar Oct 23 '25 15:10 simsurace

attempt to wrap these is here https://github.com/JuliaPackaging/Yggdrasil/pull/12376

Krastanov avatar Oct 23 '25 22:10 Krastanov