hawick_circuits.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!--
  2. Copyright (c) 2013-2015 Louis Dionne
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. -->
  7. <p><body bgcolor="#ffffff" link="#0000ee" text="#000000" vlink="#551a8b" alink="#ff0000"></p>
  8. <p><img src="../../../boost.png" alt="C++ Boost" /></p>
  9. <h1 id="hawick_circuits"><code>hawick_circuits</code></h1>
  10. <pre><code>template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
  11. void hawick_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
  12. template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
  13. void hawick_unique_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
  14. </code></pre>
  15. <p>Enumerate all the elementary circuits in a directed multigraph. Specifically,
  16. self-loops and redundant circuits caused by parallel edges are enumerated too.
  17. <code>hawick_unique_circuits</code> may be used if redundant circuits caused by parallel
  18. edges are not desired.</p>
  19. <p>The algorithm is described in detail in
  20. <a href="https://www.researchgate.net/publication/221440635_Enumerating_Circuits_and_Loops_in_Graphs_with_Self-Arcs_and_Multiple-Arcs">https://www.researchgate.net/publication/221440635_Enumerating_Circuits_and_Loops_in_Graphs_with_Self-Arcs_and_Multiple-Arcs</a>.</p>
  21. <h3 id="where-defined">Where defined</h3>
  22. <p><a href="../../../boost/graph/hawick_circuits.hpp"><code>#include &lt;boost/graph/hawick_circuits.hpp&gt;</code></a></p>
  23. <h3 id="parameters">Parameters</h3>
  24. <p><strong>IN:</strong> <code>Graph const&amp; graph</code></p>
  25. <blockquote>
  26. <p>The graph on which the algorithm is to be performed. It must be a model of
  27. the <code>VertexListGraph</code> and <code>AdjacencyGraph</code> concepts.</p>
  28. </blockquote>
  29. <p><strong>IN:</strong> <code>Visitor visitor</code></p>
  30. <blockquote>
  31. <p>The visitor that will be notified on each circuit found by the algorithm.
  32. The <code>visitor.cycle(circuit, graph)</code> expression must be valid, with <code>circuit</code>
  33. being a <code>const</code>-reference to a random access sequence of <code>vertex_descriptor</code>s.</p>
  34. <p>For example, if a circuit <code>u -&gt; v -&gt; w -&gt; u</code> exists in the graph, the
  35. visitor will be called with a sequence consisting of <code>(u, v, w)</code>.</p>
  36. </blockquote>
  37. <p><strong>IN:</strong> <code>VertexIndexMap const&amp; vim = get(vertex_index, graph)</code></p>
  38. <blockquote>
  39. <p>A model of the <code>ReadablePropertyMap</code> concept mapping each <code>vertex_descriptor</code>
  40. to an integer in the range <code>[0, num_vertices(graph))</code>. It defaults to using
  41. the vertex index map provided by the <code>graph</code>.</p>
  42. </blockquote>
  43. <hr />
  44. <div class="footer">
  45. &copy; 2013-2015 Louis Dionne
  46. </div>