2 Copyright (c) 2013-2015 Louis Dionne
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
9 <p><body bgcolor=
"#ffffff" link=
"#0000ee" text=
"#000000" vlink=
"#551a8b" alink=
"#ff0000"></p>
11 <p><img src=
"../../../boost.png" alt=
"C++ Boost" /></p>
13 <h1 id=
"hawick_circuits"><code>hawick_circuits
</code></h1>
15 <pre><code>template
<typename Graph, typename Visitor, typename VertexIndexMap
>
16 void hawick_circuits(Graph const
& graph, Visitor visitor, VertexIndexMap const
& vim = get(vertex_index, graph));
18 template
<typename Graph, typename Visitor, typename VertexIndexMap
>
19 void hawick_unique_circuits(Graph const
& graph, Visitor visitor, VertexIndexMap const
& vim = get(vertex_index, graph));
22 <p>Enumerate all the elementary circuits in a directed multigraph. Specifically,
23 self-loops and redundant circuits caused by parallel edges are enumerated too.
24 <code>hawick_unique_circuits
</code> may be used if redundant circuits caused by parallel
25 edges are not desired.
</p>
27 <p>The algorithm is described in detail in
28 <a href=
"http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf">http://complexity.massey.ac.nz/cstn/
013/cstn-
013.pdf
</a>.
</p>
30 <h3 id=
"where-defined">Where defined
</h3>
32 <p><a href=
"../../../boost/graph/hawick_circuits.hpp"><code>#include
<boost/graph/hawick_circuits.hpp
></code></a></p>
34 <h3 id=
"parameters">Parameters
</h3>
36 <p><strong>IN:
</strong> <code>Graph const
& graph
</code></p>
39 <p>The graph on which the algorithm is to be performed. It must be a model of
40 the
<code>VertexListGraph
</code> and
<code>AdjacencyGraph
</code> concepts.
</p>
43 <p><strong>IN:
</strong> <code>Visitor visitor
</code></p>
46 <p>The visitor that will be notified on each circuit found by the algorithm.
47 The
<code>visitor.cycle(circuit, graph)
</code> expression must be valid, with
<code>circuit
</code>
48 being a
<code>const
</code>-reference to a random access sequence of
<code>vertex_descriptor
</code>s.
</p>
50 <p>For example, if a circuit
<code>u -
> v -
> w -
> u
</code> exists in the graph, the
51 visitor will be called with a sequence consisting of
<code>(u, v, w)
</code>.
</p>
54 <p><strong>IN:
</strong> <code>VertexIndexMap const
& vim = get(vertex_index, graph)
</code></p>
57 <p>A model of the
<code>ReadablePropertyMap
</code> concept mapping each
<code>vertex_descriptor
</code>
58 to an integer in the range
<code>[
0, num_vertices(graph))
</code>. It defaults to using
59 the vertex index map provided by the
<code>graph
</code>.
</p>
65 © 2013-
2015 Louis Dionne