Skip to content

Rewrite of edit_distance with edge costs. fix #111 #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 28, 2023

Conversation

etiennedeg
Copy link
Member

@etiennedeg etiennedeg commented May 24, 2022

Fix #111

I changed the default costs, as otherwise, the default algorithm as absolutely no meaning. I kept in the file the MinkowskiCost and BoundedMinkowskiCost to avoid breakage because they are exported, but we should deprecate these methods, they are useless IMO.

I adapted the code to fix the support of directed graphs and self loops.

I kept the same type of implementation as before with a BFS , but I don't think that's a great idea, this allocates tremendously, even for rather small graphs. It should be good to rewrite this as a backtracking algorithm with some more efficient pruning, or using constraint programming or linear programming. IMO, we should at some point move it to the future GraphOptim, I don't think we have many exponential complexity functions in the code base, and this function merit a slightly more involved implementation.

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #137 (8a755ac) into master (11f54ad) will decrease coverage by 0.10%.
The diff coverage is 95.55%.

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
- Coverage   97.26%   97.17%   -0.10%     
==========================================
  Files         114      114              
  Lines        6579     6649      +70     
==========================================
+ Hits         6399     6461      +62     
- Misses        180      188       +8     

@gdalle gdalle added the bug Something isn't working label Jun 16, 2023
@gdalle
Copy link
Member

gdalle commented Jun 16, 2023

The tests fail because they now include doctests, it shouldn't be too hard to adapt?

@gdalle gdalle self-assigned this Jun 16, 2023
@gdalle gdalle merged commit 327740b into JuliaGraphs:master Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Edit distance between 2 equal graphs is not 0.
3 participants