boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
326 stars 208 forks source link

providing an initial mapping to mcgregor_common_subgraph? #311

Open proteneer opened 2 years ago

proteneer commented 2 years ago

Would it be reasonable to extend functionality so that the user can provide a pre-specified mapping (often determined by some heuristic) as a seed? I noticed that the internals initialize with an empty correspondence:

https://github.com/boostorg/graph/blob/e4e12158e78157397254505f6cbae688e3e3174f/include/boost/graph/mcgregor_common_subgraphs.hpp#L414

So presumably it might not be too hard to allow for an explicit map? Main question is I'm not sure if there's an invariant that would forbid this.

jeremy-murphy commented 2 years ago

I'm not familiar with this algorithm, but in principle what you want sounds reasonable.