Repository navigation
fix: vf2 isomorphism on vertex filtered graphs - #692
Merged
Merged
Conversation
|
Boost dependency footprint vs Header-inclusion weights (graph files pulling each direct dependency in): No header-inclusion-weight changes. Transitive Boost modules: 47 → 47 (0) |
This fixes a bug when num_vertices() returns a value that does not match the actual number of vertices. This happens for instances of filtered_graph<>. The fix involves looping over the graph to count the actual number of vertices. The performance overhead is negligible.
Becheler
force-pushed
the
fix/pr-282-vf2-filtered
branch
2 times, most recently
from
November 1, 2026 14:43
14a8bea to
67d7c9c
Compare
|
Compiler-warning counts vs
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Becheler
marked this pull request as ready for review
November 1, 2026 16:18
Collaborator
|
Great work fixing this comprehensively! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Supersedes #282, which went stale. Refs #690.
vf2_subgraph_isoandvf2_graph_isousenum_verticesandnum_edgesas counts. For afiltered_graphthese forward to the underlying graph, so hidden vertices and edges are counted. With a vertex filter, vf2 then reports no match when one exists.What this PR does
67d7c9ceaddsvf2_filtered_graph_test.cpp, which hides one vertex of a small graph. Both subgraph and graph isomorphism fail on it (CI red).0954b4dd,d0411e33,64b1f125are the original vf2_sub_graph_iso.hpp: fix bug when subgraph is filtered #282 commits by @count0 and @jeremy-murphy, rebased on develop. They count vertices withstd::distanceoververtices(g), which stays O(1) for random access iterators.14a8bea9does the same for edges.vf2_graph_isorejects graphs whose edge counts differ, so the vertex fix alone leaves graph isomorphism broken (CI green).Before submitting
developbranch.Kind of change
Change category