Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can find <a href="http://www.boost.org/doc/libs/1_51_0/boost/graph/isomorphism.hpp" rel="nofollow">here</a> the definition of <code>degree_vertex_invariant</code>. It's simply a function object with typedefs for <code>result_type</code> and <code>argument_type</code> that is expected to be called with each of the vertices of the graph and that also has a member called <code>max</code> that return an integer equal to the max value of your invariants plus one.</p> <p>A similar functor using your <code>discrete_vertex_invariant</code> function would look like this:</p> <pre><code>template &lt;typename Graph&gt; class discrete_vertex_invariant_functor { typedef typename boost::graph_traits&lt;Graph&gt;::vertex_descriptor vertex_t; const Graph &amp;graph; public: typedef unsigned int result_type; typedef vertex_t argument_type; discrete_vertex_invariant_functor(const Graph &amp;g):graph(g){} result_type operator()(argument_type v)const { return discrete_vertex_invariant(v,graph); } result_type max() { return MAX_LABEL+1; } }; //helper function to help with argument deduction template &lt;typename Graph&gt; discrete_vertex_invariant_functor&lt;Graph&gt; make_discrete_vertex_invariant(const Graph &amp;g) { return discrete_vertex_invariant_functor&lt;Graph&gt;(g); } </code></pre> <p>You could then invoke <code>isomorphism</code> using its named-parameter version:</p> <pre><code>bool ret=isomorphism(g1, g2, isomorphism_map(make_iterator_property_map(f.begin(), v1_index_map, f[0])) .vertex_invariant1(make_discrete_vertex_invariant(g1)) .vertex_invariant2(make_discrete_vertex_invariant(g2)) ); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload