Skip to content

Enforce correct graph types for graph matchers - #8043

Merged
dschult merged 2 commits into
networkx:mainfrom
Peiffap:check-directedness-matchers
May 17, 2025
Merged

dschult merged 2 commits into
networkx:mainfrom
Peiffap:check-directedness-matchers

Conversation

@Peiffap

@Peiffap Peiffap commented May 12, 2025 •

Copy link
Copy Markdown
Member

Fixes #7964.

Check that both graphs have the correct directedness in (Multi-)(Di-)GraphMatcher initialization.

@dschult, you mentioned switching to a function-oriented interface in the linked issue. Is this something that has been discussed previously/is there some kind of consensus on what that should look like? I feel the graph matching subsection of the codebase could use a revamp (there are still untouched lines of code from 2007 in there! :) ). I'd give it a shot, but it would entail some significant, opinionated API changes, and I'm curious what people think about that.

Check that both graphs have the correct directedness in
(Multi-)(Di-)GraphMatcher initialization

@dschult dschult left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!
Thanks!

@dschult
dschult merged commit e2140f7 into networkx:main May 17, 2025
@Peiffap
Peiffap deleted the check-directedness-matchers branch May 18, 2025 11:15
@jarrodmillman jarrodmillman added this to the 3.5 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Directed edges in MultiDiGraph not handled correctly by subgraph monomorphism

4 participants