Boost C++ Libraries: Ticket #5636: BGL isomorphism vertex invariant interface change https://svn.boost.org/trac10/ticket/5636 <p> (This is the last isomorphism ticket I think. :-)) </p> <p> I have one more suggestion about how to handle vertex invariants. To determine whether <code>u</code> and <code>v</code> should be considered equivalent by the isomorphism, instead of providing two functors <code>f</code> and <code>g</code>, calling <code>f(u)</code> and <code>g(v)</code> to get a pair of integers, and finally comparing the result, I think it would be cleaner to have a "binary" predicate <code>p</code> which would be called as <code>p(u,v)</code>. (In reality of course you'd probably want to have it receive <code>g1</code> and <code>g2</code> as well, so it'd really be a 4-arg function.) This should also let you get rid of the <code>vertex_max_invariant</code> parameter perhaps. </p> <p> I'm not sure of how this would impact the performance or how you'd do sorting, but you could probably do it by doing an N<sup>2 traversal and recording for each <code>u</code> in <code>g1</code> how many <code>v</code>s in <code>g2</code> are considered equivalent. This is a bit different from what you're doing now, I think. </sup></p> <p> (The benefit of this would be it becomes easier to impose extra conditions on the isomorphism. Instead of figuring out how to encode everything into an integer -- and worrying about the fact that you make an array of size <code>vertex_max_invariant</code>, so you can't even use all that much of that size -- you can just test it directly.) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5636 Trac 1.4.3 Jeremiah Willcock Fri, 29 Jul 2011 02:26:06 GMT owner, status changed https://svn.boost.org/trac10/ticket/5636#comment:1 https://svn.boost.org/trac10/ticket/5636#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Andrew Sutton</span> to <span class="trac-author">Jeremiah Willcock</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket