aplbrain / grandiso-networkx

Performant, pure-Python subgraph isomorphism and monomorphism search (aka "motif search")
Apache License 2.0
52 stars 10 forks source link

Also check edge attributes #23

Closed MelomanCool closed 2 years ago

MelomanCool commented 2 years ago

I've changed the matching a bit so that it would also check for edge attributes. What do you think?

j6k4m8 commented 2 years ago

Hey @MelomanCool! Thanks so much for the contribution — this is great work, and I believe it will speed up a lot of queries I commonly run as well :)

Before I merge, I am going to investigate adding this check earlier in the get_next_backbone_candidates call; I think that there may be a place earlier in the check where we can add it that will dramatically improve performance, by checking edges as the motif candidate is added (rather than waiting until a complete motif is generated). I will try to get to this tomorrow or Friday! Thanks a ton for sharing :)

j6k4m8 commented 2 years ago

Hm. Okay — thought I had a clever idea for where to put this, but it turns out I couldn't get it to perform noticeably better than where it is now!

So this is great — ready to merge, @MelomanCool ?

MelomanCool commented 2 years ago

Ready, @j6k4m8!