Applied clang-format and stripped all trailing whitespace.

This commit is contained in:
Josh Marshall 2019-05-02 16:31:08 -04:00
parent b3f9fa1284
commit 8747675e12
745 changed files with 76333 additions and 71083 deletions

View File

@ -177,7 +177,7 @@ matrix:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7 - llvm-toolchain-precise-3.7
# Fails to compile std lib headers (toolset issue): # Fails to compile std lib headers (toolset issue):
#- os: linux #- os: linux
# env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z # env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z

View File

@ -18,24 +18,24 @@ There is no mailing-list specific to Boost Graph, although you can use the gener
## Development ## ## Development ##
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)): Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
git clone https://github.com/boostorg/boost git clone https://github.com/boostorg/boost
cd boost cd boost
git submodule update --init git submodule update --init
The Boost Graph Library is located in `libs/graph/`. The Boost Graph Library is located in `libs/graph/`.
Boost Graph Library is mostly made of headers but also contains some compiled components. Here are the build commands: Boost Graph Library is mostly made of headers but also contains some compiled components. Here are the build commands:
./bootstrap.sh <- compile b2 ./bootstrap.sh <- compile b2
./b2 headers <- just installs headers ./b2 headers <- just installs headers
./b2 <- build compiled components ./b2 <- build compiled components
**Note:** The Boost Graph Library cannot currently be built outside of Boost itself. **Note:** The Boost Graph Library cannot currently be built outside of Boost itself.
### Running tests ### ### Running tests ###
First, make sure you are in `libs/graph/test`. First, make sure you are in `libs/graph/test`.
You can either run all the 300+ tests listed in `Jamfile.v2` or run a single test: You can either run all the 300+ tests listed in `Jamfile.v2` or run a single test:
../../../b2 <- run all tests ../../../b2 <- run all tests

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004 Kris Beevers Copyright (c) 2004 Kris Beevers
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: AStarHeuristic</Title> <Title>Boost Graph Library: AStarHeuristic</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -135,4 +135,4 @@ HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004 Kris Beevers Copyright (c) 2004 Kris Beevers
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: AStarVisitor</Title> <Title>Boost Graph Library: AStarVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -210,4 +210,4 @@ HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<!-- Copyright 2007 Aaron Windsor <!-- Copyright 2007 Aaron Windsor
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<title>AddEdgeVisitor Concept</title> <title>AddEdgeVisitor Concept</title>
</head> </head>
<body alink="#ff0000" <body alink="#ff0000"
bgcolor="#ffffff" bgcolor="#ffffff"
link="#0000ee" link="#0000ee"
text="#000000" text="#000000"
vlink="#551a8b"> vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277"> <img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear=""> <br clear="">
@ -23,7 +23,7 @@
The AddEdgeVisitor concept exists to allow for some indirection in algorithms The AddEdgeVisitor concept exists to allow for some indirection in algorithms
that modify graphs by adding edges. In such algorithms, it may be convenient that modify graphs by adding edges. In such algorithms, it may be convenient
to perform additional operations (such as updating an edge index map) at to perform additional operations (such as updating an edge index map) at
points in the algorithm where an edge addition occurs. Replacing calls to points in the algorithm where an edge addition occurs. Replacing calls to
to <tt>add_edge</tt> with calls to <tt>AddEdgeVisitor::visit_vertex_pair</tt> to <tt>add_edge</tt> with calls to <tt>AddEdgeVisitor::visit_vertex_pair</tt>
allows for such operations to be defined independently from the algorithm. allows for such operations to be defined independently from the algorithm.
@ -38,8 +38,8 @@ allows for such operations to be defined independently from the algorithm.
<td> is a type that models the AddEdgeVisitor concept </td> <td> is a type that models the AddEdgeVisitor concept </td>
</tr> </tr>
<tr> <tr>
<td> <tt>vis</tt> </td> <td> <tt>vis</tt> </td>
<td> is an object of type Visitor </td> <td> is an object of type Visitor </td>
</tr> </tr>
@ -48,15 +48,15 @@ allows for such operations to be defined independently from the algorithm.
<td> is the type of a graph </td> <td> is the type of a graph </td>
</tr> </tr>
<tr> <tr>
<td> <tt>u,v</tt> </td> <td> <tt>u,v</tt> </td>
<td> are objects of type <tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt> <td> are objects of type <tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <tt>e</tt> </td> <td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt> <td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</td> </td>
</tr> </tr>
@ -66,7 +66,7 @@ allows for such operations to be defined independently from the algorithm.
</td> </td>
</tr><tr> </tr><tr>
<td> <td>
</td></tr></tbody></table> </td></tr></tbody></table>
@ -84,7 +84,7 @@ None
<tbody><tr><th>Name</th><th>Expression</th><th>Return Type</th> <tbody><tr><th>Name</th><th>Expression</th><th>Return Type</th>
<th>Description</th> <th>Description</th>
</tr><tr> </tr><tr>
<td> Add an Edge </td> <td> Add an Edge </td>
<td> <tt>vis.visit_vertex_pair(u, v, g)</tt> </td> <td> <tt>vis.visit_vertex_pair(u, v, g)</tt> </td>
<td> <tt>void</tt></td> <td> <tt>void</tt></td>
@ -96,26 +96,26 @@ None
</p><h3>Models</h3> </p><h3>Models</h3>
Two models of this concept are defined in the file Two models of this concept are defined in the file
<a href="../../../boost/graph/planar_detail/add_edge_visitors.hpp"> <a href="../../../boost/graph/planar_detail/add_edge_visitors.hpp">
<tt>add_edge_visitors.hpp</tt></a>: <tt>add_edge_visitors.hpp</tt></a>:
<ul> <ul>
<li><tt>default_add_edge_visitor</tt>: The constructor of this class takes <li><tt>default_add_edge_visitor</tt>: The constructor of this class takes
no arguments.<tt>visit_vertex_pair(u, v, g)</tt> is just a dispatch to no arguments.<tt>visit_vertex_pair(u, v, g)</tt> is just a dispatch to
<tt>add_edge(u, v, g)</tt>. <tt>add_edge(u, v, g)</tt>.
<li><tt>edge_index_update_visitor</tt>: The constructor of this class takes <li><tt>edge_index_update_visitor</tt>: The constructor of this class takes
two arguments: the first, an EdgeIndexMap, two arguments: the first, an EdgeIndexMap,
is a <a href="../../property_map/doc/ReadWritePropertyMap.html"> is a <a href="../../property_map/doc/ReadWritePropertyMap.html">
ReadWritePropertyMap</a> that maps each edge in the associated graph ReadWritePropertyMap</a> that maps each edge in the associated graph
<tt>g</tt> to a distinct integer in the range <tt>[0, num_edges(g))</tt>. <tt>g</tt> to a distinct integer in the range <tt>[0, num_edges(g))</tt>.
The second argument is the number of edges in the underlying graph, which The second argument is the number of edges in the underlying graph, which
serves as the "next available index" counter within the visitor. serves as the "next available index" counter within the visitor.
For example, in the case the graph used has an initialized interior For example, in the case the graph used has an initialized interior
edge index, the <tt>edge_index_update_visitor</tt> constructor should be edge index, the <tt>edge_index_update_visitor</tt> constructor should be
called with <tt>get(edge_index, g)</tt> as the edge index and called with <tt>get(edge_index, g)</tt> as the edge index and
<tt>num_edges(g)</tt> as the next available index. When <tt>num_edges(g)</tt> as the next available index. When
<tt>visit_vertex_pair(u, v, g)</tt> is called, the <tt>visit_vertex_pair(u, v, g)</tt> is called, the
<tt>edge_index_update_visitor</tt> will add the edge <i>(u,v)</i> to the graph <tt>edge_index_update_visitor</tt> will add the edge <i>(u,v)</i> to the graph
and update the edge index for the newly created edge. and update the edge index for the newly created edge.
</ul> </ul>
@ -125,6 +125,6 @@ and update the edge index for the newly created edge.
<br> <br>
</p><hr> </p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com"> Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>) aaron.windsor@gmail.com</a>)
</body></html> </body></html>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>AdjacencyGraph</Title> <Title>AdjacencyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -164,4 +164,4 @@ experience with graph algorithm implementations.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>AdjacencyMatrix</Title> <Title>AdjacencyMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -100,4 +100,4 @@ The <TT>edge()</TT> function must return in constant time.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: BFSVisitor</Title> <Title>Boost Graph Library: BFSVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -142,7 +142,7 @@ edges for undirected graphs.
<td> <td>
This is invoked on the subset of non-tree edges whose target vertex is This is invoked on the subset of non-tree edges whose target vertex is
colored gray at the time of examination. The color gray indicates colored gray at the time of examination. The color gray indicates
that the vertex is currently in the queue. that the vertex is currently in the queue.
</td> </td>
</tr> </tr>
@ -217,4 +217,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>BasicMatrix</Title> <Title>BasicMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -78,11 +78,11 @@ Element access is constant time.
void constraints() { void constraints() {
V&amp; elt = A[i][j]; V&amp; elt = A[i][j];
const_constraints(A); const_constraints(A);
ignore_unused_variable_warning(elt); ignore_unused_variable_warning(elt);
} }
void const_constraints(const M&amp; A) { void const_constraints(const M&amp; A) {
const V&amp; elt = A[i][j]; const V&amp; elt = A[i][j];
ignore_unused_variable_warning(elt); ignore_unused_variable_warning(elt);
} }
M A; M A;
I i, j; I i, j;
@ -100,4 +100,4 @@ HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Bellman Ford Visitor</Title> <Title>Boost Graph Library: Bellman Ford Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -181,4 +181,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Bidirectional</Title> <Title>Bidirectional</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -177,4 +177,4 @@ undirected graphs).
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,7 +1,7 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
@ -9,10 +9,10 @@
<Head> <Head>
<Title>Buffer</Title> <Title>Buffer</Title>
</HEAD> </HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -43,7 +43,7 @@ For a type to model the Buffer concept it must have the following members.
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr> <tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <tt>value_type</tt> </td> <tr> <td> <tt>value_type</tt> </td>
<td> The type of object stored in the Buffer. The value type <td> The type of object stored in the Buffer. The value type
must be <A href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>.</td> must be <A href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>.</td>
</tr> </tr>
@ -70,7 +70,7 @@ For a type to model the Buffer concept it must have the following members.
</tr> </tr>
<tr> <td> <tt>const T& top() const</tt> </td> <tr> <td> <tt>const T& top() const</tt> </td>
<td> Returns a const reference to some object in the Buffer. <td> Returns a const reference to some object in the Buffer.
Precondition: <tt>empty()</tt> is <tt>false</tt>.</td> Precondition: <tt>empty()</tt> is <tt>false</tt>.</td>
</tr> </tr>
@ -114,5 +114,5 @@ most linear time complexity in the size of the Generalized Queue.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: ColorValue Concept</Title> <Title>Boost Graph Library: ColorValue Concept</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -105,4 +105,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>DFS Visitor</Title> <Title>DFS Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -150,15 +150,15 @@ undirected graph this method is never called.
</tr> </tr>
<tr> <tr>
<td>Finish Edge</td> <td>Finish Edge</td>
<td><tt>vis.finish_edge(e, g)</tt></td> <td><tt>vis.finish_edge(e, g)</tt></td>
<td><tt>void</tt></td> <td><tt>void</tt></td>
<td> <td>
This is invoked on each non-tree edge as well as on each tree edge after This is invoked on each non-tree edge as well as on each tree edge after
<tt>finish_vertex</tt> has been called on its target vertex.</td> <tt>finish_vertex</tt> has been called on its target vertex.</td>
</tr> </tr>
<tr> <tr>
<td>Finish Vertex</td> <td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td> <td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td> <td><tt>void</tt></td>
@ -218,4 +218,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Dijkstra Visitor</Title> <Title>Boost Graph Library: Dijkstra Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -219,4 +219,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>EdgeListGraph</Title> <Title>EdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -109,7 +109,7 @@ Return type: <TT>vertex_descriptor</TT>
<tr> <tr>
<TD><TT>target(e, g)</TT></TD> <TD><TT>target(e, g)</TT></TD>
<TD> <TD>
Returns the vertex descriptor for Returns the vertex descriptor for
<i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br> <i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT> Return type: <TT>vertex_descriptor</TT>
</TD> </TD>
@ -143,7 +143,7 @@ must all return in constant time.
template &lt;class G&gt; template &lt;class G&gt;
struct EdgeListGraphConcept struct EdgeListGraphConcept
{ {
typedef typename boost::graph_traits&lt;G&gt;::edge_iterator typedef typename boost::graph_traits&lt;G&gt;::edge_iterator
edge_iterator; edge_iterator;
void constraints() { void constraints() {
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; )); BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
@ -181,4 +181,4 @@ must all return in constant time.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2001 Copyright (c) Jeremy Siek 2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Edge Mutable Graph</Title> <Title>Edge Mutable Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -35,7 +35,7 @@ No additional associated types.
<ul> <ul>
<li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a> <li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a>
<b>returns</b> <TT>std::pair&lt;edge_descriptor,&nbsp;bool&gt;</TT> <b>returns</b> <TT>std::pair&lt;edge_descriptor,&nbsp;bool&gt;</TT>
<br><br> <br><br>
@ -105,4 +105,4 @@ UNDER CONSTRUCTION
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: EventVisitor</Title> <Title>Boost Graph Library: EventVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -158,4 +158,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: EventVisitorList</Title> <Title>Boost Graph Library: EventVisitorList</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -124,4 +124,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Graph</Title> <Title>Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -85,8 +85,8 @@ are <TT>allow_parallel_edge_tag</TT> and <TT>disallow_parallel_edge_tag</TT>.
<td><pre>boost::graph_traits&lt;G&gt;::traversal_category</pre> <td><pre>boost::graph_traits&lt;G&gt;::traversal_category</pre>
This describes the ways in which the vertices and edges of the This describes the ways in which the vertices and edges of the
graph can be visited. The choices are <TT>incidence_graph_tag</TT>, graph can be visited. The choices are <TT>incidence_graph_tag</TT>,
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>, <TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and <TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
<TT>adjacency_matrix_tag</TT>. <TT>adjacency_matrix_tag</TT>.
</td> </td>
</tr> </tr>
@ -145,4 +145,4 @@ any vertex of graph object which type is <tt>G</tt>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>IncidenceGraph</Title> <Title>IncidenceGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -199,4 +199,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>IteratorConstructibleGraph</Title> <Title>IteratorConstructibleGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -51,13 +51,13 @@ and can therefore be used to construct a graph.
typedef ... IteratorConstructibleGraph; typedef ... IteratorConstructibleGraph;
typedef boost::graph_traits<IteratorConstructibleGraph> Traits; typedef boost::graph_traits<IteratorConstructibleGraph> Traits;
typedef std::pair<Traits::vertices_size_type, typedef std::pair<Traits::vertices_size_type,
Traits::vertices_size_type> Edge; Traits::vertices_size_type> Edge;
Edge edge_array[] = Edge edge_array[] =
{ Edge(0,1), Edge(0,2), Edge(0,3), Edge(0,4), Edge(0,5), { Edge(0,1), Edge(0,2), Edge(0,3), Edge(0,4), Edge(0,5),
Edge(1, 2), Edge(1,5), Edge(1,3), Edge(1, 2), Edge(1,5), Edge(1,3),
Edge(2, 4), Edge(2,5), Edge(2, 4), Edge(2,5),
Edge(3, 2), Edge(3, 2),
Edge(4, 3), Edge(4,1), Edge(4, 3), Edge(4,1),
Edge(5, 4) }; Edge(5, 4) };
Edge* first = edge_array, Edge* first = edge_array,
@ -65,7 +65,7 @@ and can therefore be used to construct a graph.
IteratorConstructibleGraph G1(first, last); IteratorConstructibleGraph G1(first, last);
// do something with G1 ... // do something with G1 ...
Traits::vertices_size_type size_V = 6; Traits::vertices_size_type size_V = 6;
Traits::edges_size_type size_E = sizeof(edge_array)/sizeof(Edge); Traits::edges_size_type size_E = sizeof(edge_array)/sizeof(Edge);
IteratorConstructibleGraph G2(first, last, size_V, size_E); IteratorConstructibleGraph G2(first, last, size_V, size_E);
@ -158,4 +158,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -9,7 +9,7 @@
<head> <head>
<title>KeyedUpdatableQueue</title> <title>KeyedUpdatableQueue</title>
</head> </head>
<body> <body>
<img src="../../../boost.png" alt="C++ Boost"> <img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:KeyedUpdatableQueue">KeyedUpdatableQueue</a></h2> <h2><a name="concept:KeyedUpdatableQueue">KeyedUpdatableQueue</a></h2>
@ -28,7 +28,7 @@ values are mapped via a read/write key map.
<h3>Members</h3> <h3>Members</h3>
For a type to model the KeyedUpdatableQueue concept it must have the following members For a type to model the KeyedUpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./UpdatableQueue.html">UpdatableQueue</a>: in addition to the members that are required of types that model <a href="./UpdatableQueue.html">UpdatableQueue</a>:
<p> <p>
@ -61,17 +61,17 @@ in addition to the members that are required of types that model <a href="./Upda
{ {
typedef typename Q::key_type key_type; typedef typename Q::key_type key_type;
typedef typename Q::key_map key_map; typedef typename Q::key_map key_map;
void constraints() { void constraints() {
BOOST_CONCEPT_ASSERT(( UpdatableQueue&lt;Q&gt; )); BOOST_CONCEPT_ASSERT(( UpdatableQueue&lt;Q&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap&lt; key_map, typename Buffer&lt;Q&gt;::value_type &gt; )); BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap&lt; key_map, typename Buffer&lt;Q&gt;::value_type &gt; ));
} }
void const_constraints(const Q&amp; cq) { void const_constraints(const Q&amp; cq) {
km = cq.keys(); km = cq.keys();
k = get(km, g_ct); k = get(km, g_ct);
} }
static const typename Buffer&lt;Q&gt;::value_type g_ct; static const typename Buffer&lt;Q&gt;::value_type g_ct;
key_type k; key_type k;
key_map km; key_map km;

View File

@ -41,7 +41,7 @@ RESULT = pdf
epstopdf $*.eps epstopdf $*.eps
.dot.eps: .dot.eps:
dot -Tps -o $*.eps $*.dot dot -Tps -o $*.eps $*.dot
.w.tex: /afs/nd.edu/user11/jsiek/.jweb .w.tex: /afs/nd.edu/user11/jsiek/.jweb
jweb -np $*.w jweb -np $*.w

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Monoid</Title> <Title>Monoid</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -119,4 +119,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>MutableGraph</Title> <Title>MutableGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -59,7 +59,7 @@ edges and vertices.
<TD><tt>p</tt></TD> <TD><tt>p</tt></TD>
<TD>is an object of a type that models <a <TD>is an object of a type that models <a
href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a> href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>
and whose argument type matches the <tt>edge_descriptor</tt> type. and whose argument type matches the <tt>edge_descriptor</tt> type.
</TR> </TR>
</table> </table>
@ -296,4 +296,4 @@ is no longer a valid vertex descriptor.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>MutablePropertyGraph</Title> <Title>MutablePropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -147,4 +147,4 @@ Return type: <TT>vertex_descriptor</TT>
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,18 +1,18 @@
<html><head><!-- Copyright 2007 Aaron Windsor <html><head><!-- Copyright 2007 Aaron Windsor
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<title>Planar Embedding Concept</title> <title>Planar Embedding Concept</title>
</head> </head>
<body alink="#ff0000" <body alink="#ff0000"
bgcolor="#ffffff" bgcolor="#ffffff"
link="#0000ee" link="#0000ee"
text="#000000" text="#000000"
vlink="#551a8b"> vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277"> <img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear=""> <br clear="">
@ -21,12 +21,12 @@
A planar embedding is an important intermediate representation of a drawing A planar embedding is an important intermediate representation of a drawing
of a planar graph. Instead of specifying the absolute positions of the vertices of a planar graph. Instead of specifying the absolute positions of the vertices
and edges in the plane, a planar embedding specifies their positions relative and edges in the plane, a planar embedding specifies their positions relative
to one another. A planar embedding consists of a sequence, for each vertex in to one another. A planar embedding consists of a sequence, for each vertex in
the graph, of all of the edges incident on that vertex in the order in which the graph, of all of the edges incident on that vertex in the order in which
they are to be drawn around that vertex. they are to be drawn around that vertex.
<p> <p>
A planar embedding is a refinement of A planar embedding is a refinement of
<a href="../../property_map/doc/LvaluePropertyMap.html">LValuePropertyMap</a> that <a href="../../property_map/doc/LvaluePropertyMap.html">LValuePropertyMap</a> that
places additional restrictions the <tt>value_type</tt> used in the property places additional restrictions the <tt>value_type</tt> used in the property
map. map.
@ -36,24 +36,24 @@ map.
<table> <table>
<tbody> <tbody>
<tr> <tr>
<td> <tt>Embedding</tt> </td> <td> <tt>Embedding</tt> </td>
<td> is a type that models the Planar Embedding concept.</td> <td> is a type that models the Planar Embedding concept.</td>
</tr> </tr>
<tr> <tr>
<td> <tt>embedding</tt> </td> <td> <tt>embedding</tt> </td>
<td> is an object of type <tt>Embedding</tt>. </td> <td> is an object of type <tt>Embedding</tt>. </td>
</tr> </tr>
<tr> <tr>
<td> <tt>Graph</tt> </td> <td> <tt>Graph</tt> </td>
<td> is the type of the underlying graph.</td> <td> is the type of the underlying graph.</td>
</tr> </tr>
<tr> <tr>
<td> <tt>e</tt> </td> <td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>. <td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>.
</td> </td>
</tr> </tr>
@ -63,7 +63,7 @@ map.
</tt>.</td> </tt>.</td>
</tr><tr> </tr><tr>
<td> <td>
</td></tr></tbody></table> </td></tr></tbody></table>
@ -72,12 +72,12 @@ map.
<table border="1"> <table border="1">
<tbody><tr> <tbody><tr>
<td> Const Iterator </td> <td> Const Iterator </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator <td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt> </tt>
</td> </td>
<td> The iterator type used to iterate over the ordering of the edges in the <td> The iterator type used to iterate over the ordering of the edges in the
planar embedding of a particular vertex planar embedding of a particular vertex
</td> </td>
</tr> </tr>
@ -92,32 +92,32 @@ planar embedding of a particular vertex
<tbody><tr><th>Expression</th><th>Return Type</th><th>Description</th> <tbody><tr><th>Expression</th><th>Return Type</th><th>Description</th>
</tr><tr> </tr><tr>
<td> <tt>embedding[v].begin()</tt> </td> <td> <tt>embedding[v].begin()</tt> </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator <td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt></td> </tt></td>
<td> Returns an iterator to the beginning of the range of edges in the <td> Returns an iterator to the beginning of the range of edges in the
embedding around vertex v</td> embedding around vertex v</td>
</tr> </tr>
<tr> <tr>
<td> <tt>embedding[v].end()</tt> </td> <td> <tt>embedding[v].end()</tt> </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator <td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt></td> </tt></td>
<td> Returns an iterator to the end of the range of edges in the <td> Returns an iterator to the end of the range of edges in the
embedding around vertex v</td> embedding around vertex v</td>
</tr> </tr>
<tr> <tr>
<td> <tt>embedding[v].clear()</tt> </td> <td> <tt>embedding[v].clear()</tt> </td>
<td> <tt>void</tt></td> <td> <tt>void</tt></td>
<td> Clears all edges in the embedding around a vertex <tt>v</tt></td> <td> Clears all edges in the embedding around a vertex <tt>v</tt></td>
</tr> </tr>
<tr> <tr>
<td> <tt>embedding[v].push_back(e)</tt> </td> <td> <tt>embedding[v].push_back(e)</tt> </td>
<td> <tt>void</tt></td> <td> <tt>void</tt></td>
<td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges <td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges
around the vertex <tt>v</tt> </td> around the vertex <tt>v</tt> </td>
</tr> </tr>
@ -126,12 +126,12 @@ planar embedding of a particular vertex
</p><h3>Complexity Guarantees</h3> </p><h3>Complexity Guarantees</h3>
Starting with an empty embedding, any mixed sequence of <i>n</i> calls to a Starting with an empty embedding, any mixed sequence of <i>n</i> calls to a
particular vertex's <tt>push_back</tt> and <tt>clear</tt> should take particular vertex's <tt>push_back</tt> and <tt>clear</tt> should take
<i>O(n)</i> time. <i>O(n)</i> time.
<h3>Models</h3> <h3>Models</h3>
Any LValue property map that maps vertices to a <tt>std::vector</tt>, Any LValue property map that maps vertices to a <tt>std::vector</tt>,
<tt>std::list</tt>, or <tt>std::deque</tt> models this <tt>std::list</tt>, or <tt>std::deque</tt> models this
concept. Below is an example of using this approach to create a model of concept. Below is an example of using this approach to create a model of
PlanarEmbedding: PlanarEmbedding:
@ -146,7 +146,7 @@ PlanarEmbedding:
// an instance of Graph in a variable g. // an instance of Graph in a variable g.
// A typedef for the storage - a vector of vectors of edge descriptors // A typedef for the storage - a vector of vectors of edge descriptors
typedef typedef
std::vector&lt; std::vector&lt; graph_traits&lt;Graph&gt;::edge_descriptor &gt; &gt; std::vector&lt; std::vector&lt; graph_traits&lt;Graph&gt;::edge_descriptor &gt; &gt;
planar_embedding_storage_t; planar_embedding_storage_t;
@ -173,6 +173,6 @@ planar_embedding_t planar_embedding(planar_embedding_storage.begin(),
<br> <br>
</p><hr> </p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com"> Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>) aaron.windsor@gmail.com</a>)
</body></html> </body></html>

View File

@ -1,28 +1,28 @@
<HTML> <HTML>
<!-- Copyright 2007 Aaron Windsor <!-- Copyright 2007 Aaron Windsor
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<HEAD> <HEAD>
<TITLE>Planar Face Visitor Concept</TITLE> <TITLE>Planar Face Visitor Concept</TITLE>
</HEAD> </HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
<H1>Planar Face Visitor Concept</H1> <H1>Planar Face Visitor Concept</H1>
This concept defines the visitor interface for This concept defines the visitor interface for
<a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>. <a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>.
Users can define a class with the Planar Face Visitor interface and pass an Users can define a class with the Planar Face Visitor interface and pass an
object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the
actions taken during the traversal. Note that objects passed to actions taken during the traversal. Note that objects passed to
<tt>planar_face_traversal</tt> are passed by reference. <tt>planar_face_traversal</tt> are passed by reference.
<h3>Notation</h3> <h3>Notation</h3>
@ -79,8 +79,8 @@ This is invoked once per traversal, before the traversal begins.
<td><tt>vis.begin_face()</tt></td> <td><tt>vis.begin_face()</tt></td>
<td><tt>void</tt></td> <td><tt>void</tt></td>
<td> <td>
This is invoked once for each face, before any vertices or edges on the face This is invoked once for each face, before any vertices or edges on the face
are visited. are visited.
</td> </td>
</tr> </tr>
@ -108,7 +108,7 @@ This is invoked when an edge is encountered while traversing a face.
<td><tt>vis.end_face()</tt></td> <td><tt>vis.end_face()</tt></td>
<td><tt>void</tt></td> <td><tt>void</tt></td>
<td> <td>
This is invoked once for each face, after all vertices and edges on the face This is invoked once for each face, after all vertices and edges on the face
are visited. are visited.
</td> </td>
</tr> </tr>
@ -129,13 +129,13 @@ This is invoked once per traversal, after the traversal ends.
<ul> <ul>
<li> The file <a href="../../../boost/graph/planar_face_traversal.hpp"> <li> The file <a href="../../../boost/graph/planar_face_traversal.hpp">
<tt>planar_face_traversal.hpp</tt></a> contains a class <tt>planar_face_traversal.hpp</tt></a> contains a class
<tt>planar_face_traversal_visitor</tt> that implements empty actions for <tt>planar_face_traversal_visitor</tt> that implements empty actions for
all event points of a Planar Face Visitor. In the case where only a few of the all event points of a Planar Face Visitor. In the case where only a few of the
event points of Planar Face Visitor need to be implemented, one can derive from event points of Planar Face Visitor need to be implemented, one can derive from
<tt>planar_face_traversal_visitor</tt> and only implement the necessary event <tt>planar_face_traversal_visitor</tt> and only implement the necessary event
points. <li> The implementation of <a href="./make_maximal_planar.html"> points. <li> The implementation of <a href="./make_maximal_planar.html">
<tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is <tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
a model of Planar Face Visitor. a model of Planar Face Visitor.
</li> </li>
</ul> </ul>
@ -145,4 +145,4 @@ a model of Planar Face Visitor.
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com"> Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>) aaron.windsor@gmail.com</a>)
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>PropertyGraph</Title> <Title>PropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -90,7 +90,7 @@ function which returns a property map object.
<td><pre>boost::property_map&lt;G, PropertyTag&gt;::type</pre> <td><pre>boost::property_map&lt;G, PropertyTag&gt;::type</pre>
The type of the property map for the property specified by The type of the property map for the property specified by
<TT>PropertyTag</TT>. This type must be a model of <a <TT>PropertyTag</TT>. This type must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a> href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
with a key type the same as the graph's vertex or edge descriptor type. with a key type the same as the graph's vertex or edge descriptor type.
</td> </td>
</tr> </tr>
@ -207,4 +207,4 @@ The <tt>get()</tt> property map function must be constant time.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Property</Title> <Title>Property</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -67,7 +67,7 @@ href="../../../boost/pending/property.hpp"><tt>boost/pending/property.hpp</tt></
<h3>Refinement of</h3> <h3>Refinement of</h3>
<a <a
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a> href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a>
<h3>Models</h3> <h3>Models</h3>
@ -114,4 +114,4 @@ type is also required to specialize
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -9,7 +9,7 @@
<head> <head>
<title>UpdatableQueue</title> <title>UpdatableQueue</title>
</head> </head>
<body> <body>
<img src="../../../boost.png" alt="C++ Boost"> <img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:UpdatableQueue">UpdatableQueue</a></h2> <h2><a name="concept:UpdatableQueue">UpdatableQueue</a></h2>
@ -30,7 +30,7 @@
<h3>Members</h3> <h3>Members</h3>
For a type to model the UpdatableQueue concept it must have the following members For a type to model the UpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./Buffer.html">Buffer</a>: in addition to the members that are required of types that model <a href="./Buffer.html">Buffer</a>:
<p> <p>
@ -59,14 +59,14 @@ in addition to the members that are required of types that model <a href="./Buff
{ {
void constraints() { void constraints() {
BOOST_CONCEPT_ASSERT(( Buffer&lt;Q&gt; )); BOOST_CONCEPT_ASSERT(( Buffer&lt;Q&gt; ));
q.update(g_ct); q.update(g_ct);
} }
void const_constraints(const Q&amp; cq) { void const_constraints(const Q&amp; cq) {
if (cq.contains(g_ct)); if (cq.contains(g_ct));
} }
static const typename Buffer&lt;Q&gt;::value_type g_ct; static const typename Buffer&lt;Q&gt;::value_type g_ct;
Q q; Q q;
}; };

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>VertexAndEdgeListGraph</Title> <Title>VertexAndEdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -27,7 +27,7 @@ requirements are added.
<H3>Refinement of</H3> <H3>Refinement of</H3>
<a href="./VertexListGraph.html">VertexListGraph</a>, <a href="./VertexListGraph.html">VertexListGraph</a>,
<a href="./EdgeListGraph.html">EdgeListGraph</a> <a href="./EdgeListGraph.html">EdgeListGraph</a>
@ -67,4 +67,4 @@ requirements are added.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>VertexListGraph</Title> <Title>VertexListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -118,7 +118,7 @@ groups these requirements together, hence the VertexListGraph concept.
template &lt;class G&gt; template &lt;class G&gt;
struct VertexListGraphConcept struct VertexListGraphConcept
{ {
typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator
vertex_iterator; vertex_iterator;
void constraints() { void constraints() {
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; )); BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
@ -151,4 +151,4 @@ groups these requirements together, hence the VertexListGraph concept.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2001 Copyright (c) Jeremy Siek 2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Vertex Mutable Graph</Title> <Title>Vertex Mutable Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -37,7 +37,7 @@ No additional associated types.
<h3>Valid Expressions</h3> <h3>Valid Expressions</h3>
<ul> <ul>
<li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a> <li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a>
<b>returns</b> <TT>vertex_descriptor</TT> <b>returns</b> <TT>vertex_descriptor</TT>
<br><br> <br><br>
@ -56,7 +56,7 @@ No additional associated types.
<br> <br>
<b> Postconditions: </b> <TT>num_vertices(g)</TT> is one less; <i>u</i> <b> Postconditions: </b> <TT>num_vertices(g)</TT> is one less; <i>u</i>
no longer appears in the vertex set of the graph and it no longer appears in the vertex set of the graph and it
is no longer a valid vertex descriptor. is no longer a valid vertex descriptor.
</li> </li>
</ul> </ul>
@ -64,7 +64,7 @@ No additional associated types.
<H3>Complexity guarantees</H3> <H3>Complexity guarantees</H3>
<ul> <ul>
<li> Vertex insertion is guaranteed to be amortized constant time. <li> Vertex insertion is guaranteed to be amortized constant time.
<li> Vertex removal is at most <TT>O(|E| + |V|)</TT>. <li> Vertex removal is at most <TT>O(|E| + |V|)</TT>.
</ul> </ul>
@ -79,5 +79,5 @@ No additional associated types.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Acknowledgements</Title> <Title>Boost Graph Library: Acknowledgements</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -73,4 +73,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,7 +1,7 @@
<html> <html>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Graph Traits</Title> <Title>Boost Graph Library: Graph Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -155,4 +155,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,23 +1,23 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Adjacency Matrix</Title> <Title>Boost Graph Library: Adjacency Matrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
<H1><A NAME="sec:adjacency-matrix-class"></A> <H1><A NAME="sec:adjacency-matrix-class"></A>
<pre> <pre>
adjacency_matrix&lt;Directed, VertexProperty, adjacency_matrix&lt;Directed, VertexProperty,
EdgeProperty, GraphProperty, EdgeProperty, GraphProperty,
Allocator&gt; Allocator&gt;
</pre> </pre>
@ -61,7 +61,7 @@ href="adjacency_list.html"><tt>adjacency_list</tt></a>. These may be
<a <a
href="using_adjacency_list.html#sec:adjacency-list-properties">interior href="using_adjacency_list.html#sec:adjacency-list-properties">interior
properties</a>. The types of all property values must be properties</a>. The types of all property values must be
Copy Constructible, Assignable and Default Constructible. Copy Constructible, Assignable and Default Constructible.
In the case of an undirected graph, the In the case of an undirected graph, the
<tt>adjacency_matrix</tt>. class does not use a full <i>V x V</i> <tt>adjacency_matrix</tt>. class does not use a full <i>V x V</i>
@ -83,11 +83,11 @@ matrix representation of an undirected graph.
<h3>Example</h3> <h3>Example</h3>
Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>. Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
<pre> <pre>
enum { A, B, C, D, E, F, N }; enum { A, B, C, D, E, F, N };
const char* name = "ABCDEF"; const char* name = "ABCDEF";
typedef boost::adjacency_matrix&lt;boost::directedS> Graph; typedef boost::adjacency_matrix&lt;boost::directedS> Graph;
Graph g(N); Graph g(N);
add_edge(B, C, g); add_edge(B, C, g);
@ -112,17 +112,17 @@ Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
</pre> </pre>
The output is: The output is:
<pre> <pre>
vertex set: A B C D E F vertex set: A B C D E F
edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A) edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A)
out-edges: out-edges:
A --> A -->
B --> C F B --> C F
C --> A C C --> A C
D --> E D --> E
E --> D E --> D
F --> A F --> A
</pre> </pre>
Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>. Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
@ -152,17 +152,17 @@ Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
</pre> </pre>
The output is: The output is:
<pre> <pre>
vertex set: A B C D E F vertex set: A B C D E F
edge set: (C,A) (C,B) (E,D) (F,A) (F,B) edge set: (C,A) (C,B) (E,D) (F,A) (F,B)
incident edges: incident edges:
A &lt;--> C F A &lt;--> C F
B &lt;--> C F B &lt;--> C F
C &lt;--> A B C &lt;--> A B
D &lt;--> E D &lt;--> E
E &lt;--> D E &lt;--> D
F &lt;--> A B F &lt;--> A B
</pre> </pre>
@ -205,7 +205,7 @@ The output is:
<h3>Model Of</h3> <h3>Model Of</h3>
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, <a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./IncidenceGraph.html">Incidence Graph</a>, <a href="./IncidenceGraph.html">Incidence Graph</a>,
<a href="./BidirectionalGraph.html">Bidirectional Graph</a>, <a href="./BidirectionalGraph.html">Bidirectional Graph</a>,
<a <a
@ -236,7 +236,7 @@ The type for the edge descriptors associated with the
<hr> <hr>
<tt>graph_traits&lt;adjacency_matrix&gt;::vertex_iterator</tt> <tt>graph_traits&lt;adjacency_matrix&gt;::vertex_iterator</tt>
<br><br> <br><br>
The type for the iterators returned by <tt>vertices()</tt>. The type for the iterators returned by <tt>vertices()</tt>.
The vertex iterator models <a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br> The vertex iterator models <a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br>
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.) (Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
@ -420,7 +420,7 @@ degree_size_type
out_degree(vertex_descriptor u, const adjacency_matrix&amp; g) out_degree(vertex_descriptor u, const adjacency_matrix&amp; g)
</pre> </pre>
Returns the number of edges leaving vertex <tt>u</tt>.<br> Returns the number of edges leaving vertex <tt>u</tt>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.) (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr> <hr>
<hr> <hr>
@ -440,7 +440,7 @@ degree_size_type
in_degree(vertex_descriptor u, const adjacency_matrix&amp; g) in_degree(vertex_descriptor u, const adjacency_matrix&amp; g)
</pre> </pre>
Returns the number of edges entering vertex <tt>u</tt>.<br> Returns the number of edges entering vertex <tt>u</tt>.<br>
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.) (Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
<hr> <hr>
<hr> <hr>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004 Kris Beevers Copyright (c) 2004 Kris Beevers
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: astar_heuristic</Title> <Title>Boost Graph Library: astar_heuristic</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -93,4 +93,4 @@ HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004 Kris Beevers Copyright (c) 2004 Kris Beevers
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: A* Heuristic Search</Title> <Title>Boost Graph Library: A* Heuristic Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -309,7 +309,7 @@ IN: <tt>const VertexListGraph&amp; g</tt>
IN: <tt>const IncidenceGraph&amp; g</tt> IN: <tt>const IncidenceGraph&amp; g</tt>
<blockquote> <blockquote>
The graph object on which the algorithm will be applied for <tt>astar_search_no_init()</tt>. The type The graph object on which the algorithm will be applied for <tt>astar_search_no_init()</tt>. The type
<tt>IncidenceGraph</tt> must be a model of the <tt>IncidenceGraph</tt> must be a model of the
<a href="IncidenceGraph.html">Incidence Graph</a> <a href="IncidenceGraph.html">Incidence Graph</a>
concept. concept.
</blockquote> </blockquote>
@ -586,4 +586,4 @@ HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004 Kris Beevers Copyright (c) 2004 Kris Beevers
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: astar_visitor</Title> <Title>Boost Graph Library: astar_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -105,4 +105,4 @@ HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Bandwidth</Title> <Title>Boost Graph Library: Bandwidth</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -90,4 +90,4 @@ of the i-th bandwidths <i>B<sub>i</sub>(G)</i>.<br>
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- <!--
Copyright (c) 2004 Trustees of Indiana University Copyright (c) 2004 Trustees of Indiana University
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
@ -18,7 +18,7 @@
<div class="titlepage"></div> <div class="titlepage"></div>
<div class="refnamediv"> <div class="refnamediv">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function <h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function
@ -36,23 +36,23 @@ clustering based on edge betweenness centrality.</p>
<span class="bold"><b>template</b></span>&lt;<span class= <span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class= "bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done, <span class= "bold"><b>typename</b></span> Done, <span class=
"bold"><b>typename</b></span> EdgeCentralityMap, "bold"><b>typename</b></span> EdgeCentralityMap,
<span class= <span class=
"bold"><b>typename</b></span> VertexIndexMap&gt; "bold"><b>typename</b></span> VertexIndexMap&gt;
<span class="type"><span class= <span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done, "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
EdgeCentralityMap edge_centrality, EdgeCentralityMap edge_centrality,
VertexIndexMap vertex_index); VertexIndexMap vertex_index);
<span class="bold"><b>template</b></span>&lt;<span class= <span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class= "bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done, <span class= "bold"><b>typename</b></span> Done, <span class=
"bold"><b>typename</b></span> EdgeCentralityMap&gt; "bold"><b>typename</b></span> EdgeCentralityMap&gt;
<span class="type"><span class= <span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done, "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
EdgeCentralityMap edge_centrality); EdgeCentralityMap edge_centrality);
<span class="bold"><b>template</b></span>&lt;<span class= <span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class= "bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done&gt; "bold"><b>typename</b></span> Done&gt;
<span class="type"><span class= <span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done); "bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done);
</pre></div> </pre></div>
@ -108,7 +108,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt> <b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote> </blockquote>
IN: <tt>VertexIndexMap vertex_index</tt> IN: <tt>VertexIndexMap vertex_index</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the num_vertices(g))</tt>. This is necessary for efficient updates of the

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Bellman Ford Shortest Paths</Title> <Title>Bellman Ford Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -24,7 +24,7 @@
<PRE> <PRE>
<i>// named paramter version</i> <i>// named paramter version</i>
template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class P, class T, class R&gt; template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class P, class T, class R&gt;
bool bellman_ford_shortest_paths(const EdgeListGraph&amp; g, Size N, bool bellman_ford_shortest_paths(const EdgeListGraph&amp; g, Size N,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>); const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>);
template &lt;class <a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, class P, class T, class R&gt; template &lt;class <a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, class P, class T, class R&gt;
@ -36,8 +36,8 @@ template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size,
class PredecessorMap, class DistanceMap, class PredecessorMap, class DistanceMap,
class <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>, class <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>,
class <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>&gt; class <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>&gt;
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N, bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N,
WeightMap weight, PredecessorMap pred, DistanceMap distance, WeightMap weight, PredecessorMap pred, DistanceMap distance,
BinaryFunction combine, BinaryPredicate compare, BellmanFordVisitor v) BinaryFunction combine, BinaryPredicate compare, BellmanFordVisitor v)
</PRE> </PRE>
@ -51,7 +51,7 @@ shortest paths problem for a graph with both positive and negative
edge weights. For the definition of the shortest paths problem see edge weights. For the definition of the shortest paths problem see
Section <A Section <A
HREF="./graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths HREF="./graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A>. Algorithms</A>.
If you only need to solve the shortest paths problem for positive edge If you only need to solve the shortest paths problem for positive edge
weights, Dijkstra's algorithm provides a more efficient weights, Dijkstra's algorithm provides a more efficient
alternative. If all the edge weights are all equal to one then breadth-first alternative. If all the edge weights are all equal to one then breadth-first
@ -77,7 +77,7 @@ ultimately be the parent in the shortest paths tree
<td valign="top"> <td valign="top">
<pre> <pre>
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>) RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>) <b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i> <i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i> <i>p[v] := u</i>
<b>else</b> <b>else</b>
@ -91,7 +91,7 @@ RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
relax edge <i>(u,v)</i> relax edge <i>(u,v)</i>
edge <i>(u,v)</i> is not relaxed edge <i>(u,v)</i> is not relaxed
</pre> </pre>
</td> </td>
</tr> </tr>
@ -115,19 +115,19 @@ otherwise.
<pre> <pre>
BELLMAN-FORD(<i>G</i>) BELLMAN-FORD(<i>G</i>)
<i>// Optional initialization</i> <i>// Optional initialization</i>
<b>for</b> each vertex <i>u in V</i> <b>for</b> each vertex <i>u in V</i>
<i>d[u] := infinity</i> <i>d[u] := infinity</i>
<i>p[u] := u</i> <i>p[u] := u</i>
<b>end for</b> <b>end for</b>
<b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i> <b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i>
<b>for</b> each edge <i>(u,v) in E</i> <b>for</b> each edge <i>(u,v) in E</i>
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>) RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
<b>end for</b> <b>end for</b>
<b>end for</b> <b>end for</b>
<b>for</b> each edge <i>(u,v) in E</i> <b>for</b> each edge <i>(u,v) in E</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>) <b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<b>return</b> (false, , ) <b>return</b> (false, , )
<b>else</b> <b>else</b>
... ...
<b>end for</b> <b>end for</b>
<b>return</b> (true, <i>p</i>, <i>d</i>) <b>return</b> (true, <i>p</i>, <i>d</i>)
@ -148,9 +148,9 @@ examine edge <i>(u,v)</i>
edge <i>(u,v)</i> was not minimized edge <i>(u,v)</i> was not minimized
edge <i>(u,v)</i> was minimized edge <i>(u,v)</i> was minimized
</pre> </pre>
</td> </td>
</tr> </tr>
@ -175,7 +175,7 @@ algorithm's event points.
<h3>Parameters</h3> <h3>Parameters</h3>
IN: <tt>EdgeListGraph&amp; g</tt> IN: <tt>EdgeListGraph&amp; g</tt>
<blockquote> <blockquote>
A directed or undirected graph whose type must be a model of A directed or undirected graph whose type must be a model of
<a href="./EdgeListGraph.html">Edge List Graph</a>. If a root vertex is <a href="./EdgeListGraph.html">Edge List Graph</a>. If a root vertex is
@ -211,7 +211,7 @@ IN: <tt>weight_map(WeightMap w)</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt> <b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
</blockquote> </blockquote>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt> OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote> <blockquote>
The predecessor map records the edges in the minimum spanning The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i> tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
@ -227,7 +227,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br> <b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote> </blockquote>
IN/OUT: <tt>distance_map(DistanceMap d)</tt> IN/OUT: <tt>distance_map(DistanceMap d)</tt>
<blockquote> <blockquote>
The shortest path weight from the source vertex to each vertex in The shortest path weight from the source vertex to each vertex in
the graph <tt>g</tt> is recorded in this property map. The type the graph <tt>g</tt> is recorded in this property map. The type
@ -307,11 +307,11 @@ The time complexity is <i>O(V E)</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every edge in <li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every edge in
the graph <i>|V|</i> times. the graph <i>|V|</i> times.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> is invoked when the distance <li><b><tt>vis.edge_relaxed(e, g)</tt></b> is invoked when the distance
label for the target vertex is decreased. The edge <i>(u,v)</i> that label for the target vertex is decreased. The edge <i>(u,v)</i> that
participated in the last relaxation for vertex <i>v</i> is an edge in the participated in the last relaxation for vertex <i>v</i> is an edge in the
shortest paths tree. shortest paths tree.
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b> is invoked if the distance label <li><b><tt>vis.edge_not_relaxed(e, g)</tt></b> is invoked if the distance label
for the target vertex is not decreased. for the target vertex is not decreased.
<li><b><tt>vis.edge_minimized(e, g)</tt></b> is invoked during the <li><b><tt>vis.edge_minimized(e, g)</tt></b> is invoked during the
second stage of the algorithm, during the test of whether each edge second stage of the algorithm, during the test of whether each edge
was minimized. If the edge is minimized then this function was minimized. If the edge is minimized then this function
@ -330,7 +330,7 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -346,4 +346,4 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: bellman_visitor</Title> <Title>Boost Graph Library: bellman_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -108,4 +108,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -2,7 +2,7 @@
<html> <html>
<!-- <!--
Copyright (c) 2004 Trustees of Indiana University Copyright (c) 2004 Trustees of Indiana University
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
@ -12,54 +12,54 @@
</head> </head>
<body> <body>
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<h1><img src="figs/python.gif" alt="(Python)"/><tt>brandes_betweenness_centrality</tt></h1> <h1><img src="figs/python.gif" alt="(Python)"/><tt>brandes_betweenness_centrality</tt></h1>
<p> <p>
<pre> <pre>
<em>// named parameter versions</em> <em>// named parameter versions</em>
template&lt;typename Graph, typename Param, typename Tag, typename Rest&gt; template&lt;typename Graph, typename Param, typename Tag, typename Rest&gt;
void void
brandes_betweenness_centrality(const Graph&amp; g, brandes_betweenness_centrality(const Graph&amp; g,
const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params); const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params);
template&lt;typename Graph, typename CentralityMap&gt; template&lt;typename Graph, typename CentralityMap&gt;
void void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map); brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap&gt; template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap&gt;
void void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map, brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality); EdgeCentralityMap edge_centrality);
<em>// non-named parameter versions</em> <em>// non-named parameter versions</em>
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap, template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap,
typename IncomingMap, typename DistanceMap, typename DependencyMap, typename IncomingMap, typename DistanceMap, typename DependencyMap,
typename PathCountMap, typename VertexIndexMap&gt; typename PathCountMap, typename VertexIndexMap&gt;
void void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map, brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality, EdgeCentralityMap edge_centrality,
IncomingMap incoming, IncomingMap incoming,
DistanceMap distance, DependencyMap dependency, DistanceMap distance, DependencyMap dependency,
PathCountMap path_count, PathCountMap path_count,
VertexIndexMap vertex_index); VertexIndexMap vertex_index);
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap, template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap,
typename IncomingMap, typename DistanceMap, typename DependencyMap, typename IncomingMap, typename DistanceMap, typename DependencyMap,
typename PathCountMap, typename VertexIndexMap, typename WeightMap&gt; typename PathCountMap, typename VertexIndexMap, typename WeightMap&gt;
void void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map, brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality, EdgeCentralityMap edge_centrality,
IncomingMap incoming, IncomingMap incoming,
DistanceMap distance, DependencyMap dependency, DistanceMap distance, DependencyMap dependency,
PathCountMap path_count, PathCountMap path_count,
VertexIndexMap vertex_index, VertexIndexMap vertex_index,
WeightMap weight_map); WeightMap weight_map);
<em>// helper functions</em> <em>// helper functions</em>
template&lt;typename Graph, typename CentralityMap&gt; template&lt;typename Graph, typename CentralityMap&gt;
void void
relative_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map); relative_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap&gt; template&lt;typename Graph, typename CentralityMap&gt;
@ -137,8 +137,8 @@ IN: <tt>const Graph&amp; g</tt>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote> </blockquote>
UTIL: <tt>IncomingMap incoming</tt> UTIL: <tt>IncomingMap incoming</tt>
<blockquote> <blockquote>
This property map records the set of edges incoming to each vertex that comprise a shortest path from a particular source vertex through this vertex, and is used internally by the algorithm.The <tt>IncomingMap</tt> type must be a <a This property map records the set of edges incoming to each vertex that comprise a shortest path from a particular source vertex through this vertex, and is used internally by the algorithm.The <tt>IncomingMap</tt> type must be a <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
@ -155,7 +155,7 @@ UTIL: <tt>IncomingMap incoming</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL: <tt>DistanceMap distance_map</tt> UTIL: <tt>DistanceMap distance_map</tt>
<blockquote> <blockquote>
The shortest path weight from each source vertex <tt>s</tt> to each The shortest path weight from each source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map, but vertex in the graph <tt>g</tt> is recorded in this property map, but
@ -178,7 +178,7 @@ UTIL: <tt>DistanceMap distance_map</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL: <tt>DependencyMap dependency</tt> UTIL: <tt>DependencyMap dependency</tt>
<blockquote> <blockquote>
Property map used internally to accumulate partial betweenness Property map used internally to accumulate partial betweenness
centrality results. The type <tt>DependencyMap</tt> must be a model centrality results. The type <tt>DependencyMap</tt> must be a model
@ -198,7 +198,7 @@ UTIL: <tt>DependencyMap dependency</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL: <tt>PathCountMap path_count</tt> UTIL: <tt>PathCountMap path_count</tt>
<blockquote> <blockquote>
Property map used internally to accumulate the number of paths that Property map used internally to accumulate the number of paths that
pass through each particular vertex. The type <tt>PathCountMap</tt> pass through each particular vertex. The type <tt>PathCountMap</tt>
@ -254,7 +254,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt> <b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote> </blockquote>
IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt> IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the num_vertices(g))</tt>. This is necessary for efficient updates of the
@ -271,11 +271,11 @@ IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>weight_map(WeightMap w_map)</tt> IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote> <blockquote>
The weight or ``length'' of each edge in the graph. The weights The weight or ``length'' of each edge in the graph. The weights
must all be non-negative, and the algorithm will throw a must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a> <a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative. exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
@ -286,7 +286,7 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
<b>Python</b>: If supplied, must be an <tt>edge_double_map</tt> for the graph. <b>Python</b>: If supplied, must be an <tt>edge_double_map</tt> for the graph.
</blockquote> </blockquote>
<h3>Complexity</h3> <h3>Complexity</h3>
The time complexity is <em>O(VE)</em> for unweighted graphs and The time complexity is <em>O(VE)</em> for unweighted graphs and
<em>O(VE + V(V+E) log V)</em> for weighted graphs. The space complexity <em>O(VE + V(V+E) log V)</em> for weighted graphs. The space complexity
is <em>O(VE)</em>. is <em>O(VE)</em>.

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: bfs_visitor</Title> <Title>Boost Graph Library: bfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -38,10 +38,10 @@ visitor.
<pre> <pre>
// Construct graph G and obtain the source vertex s ... // Construct graph G and obtain the source vertex s ...
boost::breadth_first_search(G, s, boost::breadth_first_search(G, s,
boost::make_bfs_visitor( boost::make_bfs_visitor(
std::make_pair(boost::record_distances(d, boost::on_tree_edge()), std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
std::make_pair(boost::record_predecessors(p.begin(), std::make_pair(boost::record_predecessors(p.begin(),
boost::on_tree_edge()), boost::on_tree_edge()),
copy_graph(G_copy, boost::on_examine_edge())))) ); copy_graph(G_copy, boost::on_examine_edge())))) );
</pre> </pre>
@ -125,4 +125,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Named Parameters</Title> <Title>Boost Graph Library: Named Parameters</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -38,7 +38,7 @@ reasons:
he or she has to resort to providing all the parameters. he or she has to resort to providing all the parameters.
<li>Since the list of parameters is long, it is easy to forget <li>Since the list of parameters is long, it is easy to forget
the ordering. the ordering.
</ul> </ul>
<p> <p>
@ -54,7 +54,7 @@ indicates which parameter the argument is for. Each of the named
parameters is separated by a <b>period</b>, not a comma. parameters is separated by a <b>period</b>, not a comma.
<pre> <pre>
bool r = boost::bellman_ford_shortest_paths(g, int(N), bool r = boost::bellman_ford_shortest_paths(g, int(N),
boost::weight_map(weight). boost::weight_map(weight).
distance_map(&amp;distance[0]). distance_map(&amp;distance[0]).
predecessor_map(&amp;parent[0])); predecessor_map(&amp;parent[0]));
@ -66,7 +66,7 @@ an call to <tt>bellman_ford_shortest_paths</tt> that is equivalent to
the one above. the one above.
<pre> <pre>
bool r = boost::bellman_ford_shortest_paths(g, int(N), bool r = boost::bellman_ford_shortest_paths(g, int(N),
boost::predecessor_map(&amp;parent[0]). boost::predecessor_map(&amp;parent[0]).
distance_map(&amp;distance[0]). distance_map(&amp;distance[0]).
weight_map(weight)); weight_map(weight));

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Bibliography</Title> <Title>Boost Graph Library: Bibliography</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -264,7 +264,7 @@ SIAM Journal on Computing, 1(2):146-160, 1972
<P></P><DT><A NAME="eppstein97:dynamic_graph">42</a> <P></P><DT><A NAME="eppstein97:dynamic_graph">42</a>
<DD>David Eppstein, Zvi Galil, and Giuseppe F. Italiano<BR> <DD>David Eppstein, Zvi Galil, and Giuseppe F. Italiano<BR>
<EM>Dynamic Graph Algorithms.</EM><br> <EM>Dynamic Graph Algorithms.</EM><br>
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997. Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
<P></P><DT><A NAME="cuthill69:reducing_bandwith">43</a> <P></P><DT><A NAME="cuthill69:reducing_bandwith">43</a>
<DD>E. Cuthill and J. McKee<BR> <DD>E. Cuthill and J. McKee<BR>
@ -330,7 +330,7 @@ BIT, 10, 1970, pp. 76-94.
<p></p><dt><a name="brandes01">54</a> <p></p><dt><a name="brandes01">54</a>
<dd>Ulrik Brandes<br> <dd>Ulrik Brandes<br>
<em><a href="http://ella.slis.indiana.edu/~katy/L579/brandes.pdf">A <em><a href="http://ella.slis.indiana.edu/~katy/L579/brandes.pdf">A
Faster Algorithm for Betweenness Centrality</a></em><br> Faster Algorithm for Betweenness Centrality</a></em><br>
Journal of Mathematical Sociology 25 (2):163-177, 2001. Journal of Mathematical Sociology 25 (2):163-177, 2001.
@ -347,7 +347,7 @@ Technical Report BN9/71, Stichting Mahtematisch Centrum, Amsterdam, 1971.
<p></p><dt><a name="kamada89">57</a> <p></p><dt><a name="kamada89">57</a>
<dd>T. Kamada and S. Kawai<br> <dd>T. Kamada and S. Kawai<br>
<em>An algorithm for drawing general undirected graphs.</em><br> <em>An algorithm for drawing general undirected graphs.</em><br>
Information Processing Letters, 31, pp. 7-15, 1989. Information Processing Letters, 31, pp. 7-15, 1989.
<p></p><dt><a name="fruchterman91">58</a> <p></p><dt><a name="fruchterman91">58</a>
<dd>T. Fruchterman and E. Reingold<br> <dd>T. Fruchterman and E. Reingold<br>
@ -454,7 +454,7 @@ Journal of the ACM (JACM), 23(2): 221-234, 1976.
Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 434-443, 1990. Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 434-443, 1990.
</dl> </dl>
<br> <br>
<HR> <HR>
<TABLE> <TABLE>
@ -464,4 +464,4 @@ Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 4
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,21 +1,21 @@
<HTML> <HTML>
<!-- <!--
Copyright 2001-2004 The Trustees of Indiana University. Copyright 2001-2004 The Trustees of Indiana University.
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
Authors: Douglas Gregor Authors: Douglas Gregor
Jeremy Siek Jeremy Siek
Andrew Lumsdaine Andrew Lumsdaine
--> -->
<Head> <Head>
<Title>Boost Graph Library: Biconnected Components and Articulation Points</Title> <Title>Boost Graph Library: Biconnected Components and Articulation Points</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -25,7 +25,7 @@
<A NAME="sec:biconnected-components">biconnected_components <A NAME="sec:biconnected-components">biconnected_components
</A> </A>
</TT> </TT>
and and
<tt>articulation_points</tt> <tt>articulation_points</tt>
</h1> </h1>
@ -34,25 +34,25 @@ and
template &lt;typename Graph, typename ComponentMap, typename OutputIterator, template &lt;typename Graph, typename ComponentMap, typename OutputIterator,
typename P, typename T, typename R&gt; typename P, typename T, typename R&gt;
std::pair&lt;std::size_t, OutputIterator&gt; std::pair&lt;std::size_t, OutputIterator&gt;
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out, biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
const bgl_named_params&lt;P, T, R&gt;&amp; params) const bgl_named_params&lt;P, T, R&gt;&amp; params)
template &lt;typename Graph, typename ComponentMap, template &lt;typename Graph, typename ComponentMap,
typename P, typename T, typename R&gt; typename P, typename T, typename R&gt;
std::size_t std::size_t
biconnected_components(const Graph& g, ComponentMap comp, biconnected_components(const Graph& g, ComponentMap comp,
const bgl_named_params&lt;P, T, R&gt;&amp; params) const bgl_named_params&lt;P, T, R&gt;&amp; params)
template &lt;typename Graph, typename OutputIterator, template &lt;typename Graph, typename OutputIterator,
typename P, typename T, typename R&gt; typename P, typename T, typename R&gt;
OutputIterator articulation_points(const Graph& g, OutputIterator out, OutputIterator articulation_points(const Graph& g, OutputIterator out,
const bgl_named_params&lt;P, T, R&gt;&amp; params) const bgl_named_params&lt;P, T, R&gt;&amp; params)
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;typename Graph, typename ComponentMap, typename OutputIterator, template &lt;typename Graph, typename ComponentMap, typename OutputIterator,
typename DiscoverTimeMap, typename LowPointMap&gt; typename DiscoverTimeMap, typename LowPointMap&gt;
std::pair&lt;std::size_t, OutputIterator&gt; std::pair&lt;std::size_t, OutputIterator&gt;
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out, biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
DiscoverTimeMap discover_time, LowPointMap lowpt); DiscoverTimeMap discover_time, LowPointMap lowpt);
template &lt;typename Graph, typename ComponentMap, typename OutputIterator&gt; template &lt;typename Graph, typename ComponentMap, typename OutputIterator&gt;
@ -142,10 +142,10 @@ points.
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt> IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. The type num_vertices(g))</tt>. The type
<tt>VertexIndexMap</tt> must be a model of <tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be integer type. The vertex descriptor type of the graph needs to be
@ -192,9 +192,9 @@ UTIL/OUT: <tt>lowpoint_map(LowPointMap lowpt)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt> UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote> <blockquote>
The predecessor map records the depth first search tree. The predecessor map records the depth first search tree.
The <tt>PredecessorMap</tt> type The <tt>PredecessorMap</tt> type
must be a <a must be a <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
@ -241,7 +241,7 @@ articulation points of an undirected graph.
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -260,4 +260,4 @@ HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -5,7 +5,7 @@
\usepackage{amsfonts} \usepackage{amsfonts}
\usepackage{amssymb} \usepackage{amssymb}
\usepackage{amsthm} \usepackage{amsthm}
\usepackage{latexsym} \usepackage{latexsym}
\usepackage{jweb} \usepackage{jweb}
\usepackage{times} \usepackage{times}
\usepackage{graphicx} \usepackage{graphicx}
@ -358,7 +358,7 @@ int main()
% \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that % \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that
% consists of two disjoint sets of edges, denoted by $v \rightarrow w$ % consists of two disjoint sets of edges, denoted by $v \rightarrow w$
% and $v \backedge w$ respectively, with the following properties: % and $v \backedge w$ respectively, with the following properties:

View File

@ -1,39 +1,39 @@
<HTML> <HTML>
<!-- Copyright 2007 Aaron Windsor <!-- Copyright 2007 Aaron Windsor
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Boyer-Myrvold Planarity Testing/Embedding</Title> <Title>Boost Graph Library: Boyer-Myrvold Planarity Testing/Embedding</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
<H1>Boyer-Myrvold Planarity Testing/Embedding</H1> <H1>Boyer-Myrvold Planarity Testing/Embedding</H1>
<p> <p>
A graph is <a href="./planar_graphs.html#planar"><i>planar</i></a> if it can A graph is <a href="./planar_graphs.html#planar"><i>planar</i></a> if it can
be drawn in two-dimensional space without any of its edges crossing. Such a be drawn in two-dimensional space without any of its edges crossing. Such a
drawing of a planar graph is called a drawing of a planar graph is called a
<a href="./planar_graphs.html#plane_drawing"><i>plane drawing</i></a>. Each <a href="./planar_graphs.html#plane_drawing"><i>plane drawing</i></a>. Each
plane drawing belongs to an equivalence class called a <i>planar embedding</i> plane drawing belongs to an equivalence class called a <i>planar embedding</i>
<a href="#1">[1]</a> that is defined by the clockwise ordering of adjacent <a href="#1">[1]</a> that is defined by the clockwise ordering of adjacent
edges around each vertex in the graph. A planar embedding is a convenient edges around each vertex in the graph. A planar embedding is a convenient
intermediate representation of an actual drawing of a planar graph, and many intermediate representation of an actual drawing of a planar graph, and many
planar graph drawing algorithms are formulated as functions mapping a planar planar graph drawing algorithms are formulated as functions mapping a planar
embedding to a plane drawing. embedding to a plane drawing.
<br> <br>
<br> <br>
<table align="center" class="image"> <table align="center" class="image">
<caption align="bottom"><h5>A planar graph (top left), along with a planar <caption align="bottom"><h5>A planar graph (top left), along with a planar
embedding of that graph (bottom left) can be used to create a plane drawing embedding of that graph (bottom left) can be used to create a plane drawing
(right) by embedding edges around each vertex in the order in which they (right) by embedding edges around each vertex in the order in which they
appear in the planar embedding. appear in the planar embedding.
</h5></caption> </h5></caption>
<tr><td> <tr><td>
@ -44,16 +44,16 @@ appear in the planar embedding.
</table> </table>
<br> <br>
<p> <p>
The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity
testing/embedding algorithm of Boyer and Myrvold testing/embedding algorithm of Boyer and Myrvold
[<a href="./bibliography.html#boyermyrvold04">70</a>]. [<a href="./bibliography.html#boyermyrvold04">70</a>].
<tt>boyer_myrvold_planarity_test</tt> returns <tt>true</tt> if the input graph <tt>boyer_myrvold_planarity_test</tt> returns <tt>true</tt> if the input graph
is planar and <tt>false</tt> otherwise. As a side-effect of this test, a planar is planar and <tt>false</tt> otherwise. As a side-effect of this test, a planar
embedding can be constructed if the graph is planar or a minimal set of edges embedding can be constructed if the graph is planar or a minimal set of edges
that form a <a href = "./planar_graphs.html#kuratowskisubgraphs">Kuratowski that form a <a href = "./planar_graphs.html#kuratowskisubgraphs">Kuratowski
subgraph</a> can be found if the graph is not planar. subgraph</a> can be found if the graph is not planar.
<tt>boyer_myrvold_planarity_test</tt> uses named parameter arguments (courtesy <tt>boyer_myrvold_planarity_test</tt> uses named parameter arguments (courtesy
of the <a href="../../parameter/doc/html/index.html">Boost.Parameter</a> of the <a href="../../parameter/doc/html/index.html">Boost.Parameter</a>
library) to specify what the function actually does. Some examples are: library) to specify what the function actually does. Some examples are:
<ul> <ul>
@ -65,8 +65,8 @@ bool is_planar = boyer_myrvold_planarity_test(g);
<li>Computing a planar embedding for a graph if it is planar, otherwise finding <li>Computing a planar embedding for a graph if it is planar, otherwise finding
a set of edges that forms an obstructing Kuratowski subgraph: a set of edges that forms an obstructing Kuratowski subgraph:
<pre> <pre>
if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g, if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
boyer_myrvold_params::embedding = embedding_pmap, boyer_myrvold_params::embedding = embedding_pmap,
boyer_myrvold_params::kuratowski_subgraph = out_itr boyer_myrvold_params::kuratowski_subgraph = out_itr
) )
) )
@ -81,81 +81,81 @@ else
</ul> </ul>
<p> <p>
The parameters passed to <tt>boyer_myrvold_planarity_test</tt> in the examples The parameters passed to <tt>boyer_myrvold_planarity_test</tt> in the examples
above do more than just carry the data structures used for input and output - above do more than just carry the data structures used for input and output -
the algorithm is optimized at compile time based on which parameters are the algorithm is optimized at compile time based on which parameters are
present. A complete list of parameters accepted and their interactions are present. A complete list of parameters accepted and their interactions are
described below. described below.
<p> <p>
<tt>boyer_myrvold_planarity_test</tt> accepts as input any undirected graph, <tt>boyer_myrvold_planarity_test</tt> accepts as input any undirected graph,
even those with self-loops and multiple edges. even those with self-loops and multiple edges.
However, many planar graph drawing algorithms make additional restrictions However, many planar graph drawing algorithms make additional restrictions
on the structure of the input graph - for example, requiring that the input on the structure of the input graph - for example, requiring that the input
graph is connected, biconnected, or even maximal planar (triangulated.) graph is connected, biconnected, or even maximal planar (triangulated.)
Fortunately, any planar graph on <i>n</i> vertices that lacks one of these Fortunately, any planar graph on <i>n</i> vertices that lacks one of these
properties can be augmented with additional edges so that it satisfies that properties can be augmented with additional edges so that it satisfies that
property in <i>O(n)</i> time - the functions property in <i>O(n)</i> time - the functions
<tt><a href="./make_connected.html">make_connected</a></tt>, <tt><a href="./make_connected.html">make_connected</a></tt>,
<tt><a href="./make_biconnected_planar.html">make_biconnected_planar</a></tt>, <tt><a href="./make_biconnected_planar.html">make_biconnected_planar</a></tt>,
and <tt><a href="./make_maximal_planar.html">make_maximal_planar</a></tt> and <tt><a href="./make_maximal_planar.html">make_maximal_planar</a></tt>
exist for this purpose. If the graph drawing algorithm you're using requires, exist for this purpose. If the graph drawing algorithm you're using requires,
say, a biconnected graph, then you must make your input graph biconnected say, a biconnected graph, then you must make your input graph biconnected
<i>before</i> passing it into <tt>boyer_myrvold_planarity_test</tt> so that the <i>before</i> passing it into <tt>boyer_myrvold_planarity_test</tt> so that the
computed planar embedding includes these additional edges. This may require computed planar embedding includes these additional edges. This may require
more than one call to <tt>boyer_myrvold_planarity_test</tt> depending on the more than one call to <tt>boyer_myrvold_planarity_test</tt> depending on the
structure of the graph you begin with, since both structure of the graph you begin with, since both
<tt>make_biconnected_planar</tt> and <tt>make_maximal_planar</tt> require a <tt>make_biconnected_planar</tt> and <tt>make_maximal_planar</tt> require a
planar embedding of the existing graph as an input parameter. planar embedding of the existing graph as an input parameter.
<p><p> <p><p>
The named parameters accepted by <tt>boyer_myrvold_planarity_test</tt> are: The named parameters accepted by <tt>boyer_myrvold_planarity_test</tt> are:
<ul> <ul>
<li><b><tt>graph</tt></b> : The input graph - this is the only required <li><b><tt>graph</tt></b> : The input graph - this is the only required
parameter. parameter.
<li><b><tt>vertex_index_map</tt></b> : A mapping from vertices of the input <li><b><tt>vertex_index_map</tt></b> : A mapping from vertices of the input
graph to indexes in the range <tt>[0..num_vertices(g))</tt>. If this parameter graph to indexes in the range <tt>[0..num_vertices(g))</tt>. If this parameter
is not provided, the vertex index map is assumed to be available as an interior is not provided, the vertex index map is assumed to be available as an interior
property of the graph, accessible by calling <tt>get(vertex_index, g)</tt>. property of the graph, accessible by calling <tt>get(vertex_index, g)</tt>.
<li><b><tt>edge_index_map</tt></b>: A mapping from the edges of the input graph <li><b><tt>edge_index_map</tt></b>: A mapping from the edges of the input graph
to indexes in the range <tt>[0..num_edges(g))</tt>. This parameter is only to indexes in the range <tt>[0..num_edges(g))</tt>. This parameter is only
needed if the <tt>kuratowski_subgraph</tt> argument is provided. If the needed if the <tt>kuratowski_subgraph</tt> argument is provided. If the
<tt>kuratowski_subgraph</tt> argument is provided and this parameter is not <tt>kuratowski_subgraph</tt> argument is provided and this parameter is not
provided, the EdgeIndexMap is assumed to be available as an interior property provided, the EdgeIndexMap is assumed to be available as an interior property
accessible by calling <tt>get(edge_index, g)</tt>. accessible by calling <tt>get(edge_index, g)</tt>.
<li><b><tt>embedding</tt></b> : If the graph is planar, this will be populated <li><b><tt>embedding</tt></b> : If the graph is planar, this will be populated
with a mapping from vertices to the clockwise order of neighbors in the planar with a mapping from vertices to the clockwise order of neighbors in the planar
embedding. embedding.
<li><b><tt>kuratowski_subgraph</tt></b> : If the graph is not planar, a minimal <li><b><tt>kuratowski_subgraph</tt></b> : If the graph is not planar, a minimal
set of edges that form the obstructing Kuratowski subgraph will be written to set of edges that form the obstructing Kuratowski subgraph will be written to
this iterator. this iterator.
</ul> </ul>
These named parameters all belong to the namespace These named parameters all belong to the namespace
<tt>boyer_myrvold_params</tt>. See below for more information on the concepts <tt>boyer_myrvold_params</tt>. See below for more information on the concepts
required for these arguments. required for these arguments.
<H3>Verifying the output</H3> <H3>Verifying the output</H3>
Whether or not the input graph is planar, <tt>boyer_myrvold_planarity_test</tt> Whether or not the input graph is planar, <tt>boyer_myrvold_planarity_test</tt>
can produce a certificate that can be automatically checked to verify that the can produce a certificate that can be automatically checked to verify that the
function is working properly. function is working properly.
<p> <p>
If the graph is planar, a planar embedding can be produced. The If the graph is planar, a planar embedding can be produced. The
planar embedding can be verified by passing it to a plane drawing routine planar embedding can be verified by passing it to a plane drawing routine
(such as <tt><a href="straight_line_drawing.html"> (such as <tt><a href="straight_line_drawing.html">
chrobak_payne_straight_line_drawing</a></tt>) and using the function chrobak_payne_straight_line_drawing</a></tt>) and using the function
<tt><a href="is_straight_line_drawing.html">is_straight_line_drawing</a></tt> <tt><a href="is_straight_line_drawing.html">is_straight_line_drawing</a></tt>
to verify that the resulting graph is planar. to verify that the resulting graph is planar.
<p> <p>
If the graph is not planar, a set of edges that forms a Kuratowski subgraph in If the graph is not planar, a set of edges that forms a Kuratowski subgraph in
the original graph can be produced. This set of edges can be passed to the the original graph can be produced. This set of edges can be passed to the
function <tt><a href="is_kuratowski_subgraph.html">is_kuratowski_subgraph</a> function <tt><a href="is_kuratowski_subgraph.html">is_kuratowski_subgraph</a>
</tt> to verify that they can be contracted into a <i>K<sub>5</sub></i> or </tt> to verify that they can be contracted into a <i>K<sub>5</sub></i> or
<i>K<sub>3,3</sub></i>. <tt>boyer_myrvold_planarity_test</tt> chooses the set <i>K<sub>3,3</sub></i>. <tt>boyer_myrvold_planarity_test</tt> chooses the set
of edges forming the Kuratowski subgraph in such a way that the contraction to of edges forming the Kuratowski subgraph in such a way that the contraction to
a <i>K<sub>5</sub></i> or <i>K<sub>3,3</sub></i> can be done by a simple a <i>K<sub>5</sub></i> or <i>K<sub>3,3</sub></i> can be done by a simple
deterministic process which is described in the documentation to deterministic process which is described in the documentation to
<tt>is_kuratowski_subgraph</tt>. <tt>is_kuratowski_subgraph</tt>.
<H3>Where Defined</H3> <H3>Where Defined</H3>
@ -170,8 +170,8 @@ deterministic process which is described in the documentation to
IN: <tt>Graph&amp; g</tt> IN: <tt>Graph&amp; g</tt>
<blockquote> <blockquote>
Any undirected graph. The graph type must be a model of Any undirected graph. The graph type must be a model of
<a href="VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a> and <a href="VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a> and
<a href="IncidenceGraph.html">IncidenceGraph</a>. <a href="IncidenceGraph.html">IncidenceGraph</a>.
</blockquote> </blockquote>
@ -184,7 +184,7 @@ Must model the <a href="PlanarEmbedding.html">PlanarEmbedding</a> concept.
IN <tt>OutputIterator kuratowski_subgraph</tt> IN <tt>OutputIterator kuratowski_subgraph</tt>
<blockquote> <blockquote>
An OutputIterator which accepts values of the type An OutputIterator which accepts values of the type
<tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt> <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</blockquote> </blockquote>
@ -192,7 +192,7 @@ IN <tt>VertexIndexMap vm</tt>
<blockquote> <blockquote>
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
</a> that maps vertices from <tt>g</tt> to distinct integers in the range </a> that maps vertices from <tt>g</tt> to distinct integers in the range
<tt>[0, num_vertices(g) )</tt><br> <tt>[0, num_vertices(g) )</tt><br>
<b>Default</b>: <tt>get(vertex_index,g)</tt><br> <b>Default</b>: <tt>get(vertex_index,g)</tt><br>
</blockquote> </blockquote>
@ -201,21 +201,21 @@ IN <tt>EdgeIndexMap em</tt>
<blockquote> <blockquote>
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
</a> that maps edges from <tt>g</tt> to distinct integers in the range </a> that maps edges from <tt>g</tt> to distinct integers in the range
<tt>[0, num_edges(g) )</tt><br> <tt>[0, num_edges(g) )</tt><br>
<b>Default</b>: <tt>get(edge_index,g)</tt>, but this parameter is only used if <b>Default</b>: <tt>get(edge_index,g)</tt>, but this parameter is only used if
the <tt>kuratowski_subgraph_iterator</tt> is provided.<br> the <tt>kuratowski_subgraph_iterator</tt> is provided.<br>
</blockquote> </blockquote>
<H3>Complexity</H3> <H3>Complexity</H3>
Assuming that both the vertex index and edge index supplied take time Assuming that both the vertex index and edge index supplied take time
<i>O(1)</i> to return an index and there are <i>O(n)</i> <i>O(1)</i> to return an index and there are <i>O(n)</i>
total self-loops and parallel edges in the graph, most combinations of total self-loops and parallel edges in the graph, most combinations of
arguments given to arguments given to
<tt>boyer_myrvold_planarity_test</tt> result in an algorithm that runs in time <tt>boyer_myrvold_planarity_test</tt> result in an algorithm that runs in time
<i>O(n)</i> for a graph with <i>n</i> vertices and <i>m</i> edges. The only <i>O(n)</i> for a graph with <i>n</i> vertices and <i>m</i> edges. The only
exception is when Kuratowski subgraph isolation is requested for a dense graph exception is when Kuratowski subgraph isolation is requested for a dense graph
(a graph with <i>n = o(m)</i>) - the running time will be <i>O(n+m)</i> (a graph with <i>n = o(m)</i>) - the running time will be <i>O(n+m)</i>
<a href = "#2">[2]</a>. <a href = "#2">[2]</a>.
@ -224,9 +224,9 @@ exception is when Kuratowski subgraph isolation is requested for a dense graph
<P> <P>
<ul> <ul>
<li><a href="../example/simple_planarity_test.cpp">A simple planarity test</a> <li><a href="../example/simple_planarity_test.cpp">A simple planarity test</a>
<li><a href="../example/kuratowski_subgraph.cpp">Isolating a Kuratowski <li><a href="../example/kuratowski_subgraph.cpp">Isolating a Kuratowski
Subgraph</a> Subgraph</a>
<li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to <li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to
create a straight line drawing</a> create a straight line drawing</a>
</ul> </ul>
@ -237,17 +237,17 @@ create a straight line drawing</a>
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1] A planar embedding is also called a <i>combinatorial <p><a name="1">[1] A planar embedding is also called a <i>combinatorial
embedding</i>. embedding</i>.
<p><a name="2">[2] The algorithm can still be made to run in time <i>O(n)</i> <p><a name="2">[2] The algorithm can still be made to run in time <i>O(n)</i>
for this case, if needed. <a href="planar_graphs.html#EulersFormula">Euler's for this case, if needed. <a href="planar_graphs.html#EulersFormula">Euler's
formula</a> implies that a planar graph with <i>n</i> vertices can have no more formula</a> implies that a planar graph with <i>n</i> vertices can have no more
than <i>3n - 6</i> edges, which means that any non-planar graph on <i>n</i> than <i>3n - 6</i> edges, which means that any non-planar graph on <i>n</i>
vertices has a subgraph of only <i>3n - 5</i> edges that contains a Kuratowski vertices has a subgraph of only <i>3n - 5</i> edges that contains a Kuratowski
subgraph. So, if you need to find a Kuratowski subgraph of a graph with more subgraph. So, if you need to find a Kuratowski subgraph of a graph with more
than <i>3n - 5</i> edges in time <i>O(n)</i>, you can create a subgraph of the than <i>3n - 5</i> edges in time <i>O(n)</i>, you can create a subgraph of the
original graph consisting of any arbitrary <i>3n - 5</i> edges and pass that original graph consisting of any arbitrary <i>3n - 5</i> edges and pass that
graph to <tt>boyer_myrvold_planarity_test</tt>. graph to <tt>boyer_myrvold_planarity_test</tt>.
@ -256,4 +256,4 @@ graph to <tt>boyer_myrvold_planarity_test</tt>.
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com"> Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>) aaron.windsor@gmail.com</a>)
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000, 2001 Copyright (c) Jeremy Siek 2000, 2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Breadth-First Search</Title> <Title>Boost Graph Library: Breadth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -24,15 +24,15 @@
<PRE> <PRE>
<i>// named parameter version</i> <i>// named parameter version</i>
template &lt;class Graph, class P, class T, class R&gt; template &lt;class Graph, class P, class T, class R&gt;
void breadth_first_search(Graph& G, void breadth_first_search(Graph& G,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s, typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
const bgl_named_params&lt;P, T, R&gt;&amp; params); const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;class Graph, class Buffer, class BFSVisitor, template &lt;class Graph, class Buffer, class BFSVisitor,
class ColorMap&gt; class ColorMap&gt;
void breadth_first_search(const Graph&amp; g, void breadth_first_search(const Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s, typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
Buffer&amp; Q, BFSVisitor vis, ColorMap color); Buffer&amp; Q, BFSVisitor vis, ColorMap color);
</PRE> </PRE>
@ -70,25 +70,25 @@ BFS algorithm is a listed below.
<pre> <pre>
BFS(<i>G</i>, <i>s</i>) BFS(<i>G</i>, <i>s</i>)
<b>for</b> each vertex <i>u in V[G]</i> <b>for</b> each vertex <i>u in V[G]</i>
<i>color[u] :=</i> WHITE <i>color[u] :=</i> WHITE
<i>d[u] := infinity</i> <i>d[u] := infinity</i>
<i>p[u] := u</i> <i>p[u] := u</i>
<b>end for</b> <b>end for</b>
<i>color[s] :=</i> GRAY <i>color[s] :=</i> GRAY
<i>d[s] := 0</i> <i>d[s] := 0</i>
ENQUEUE(<i>Q</i>, <i>s</i>) ENQUEUE(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>) <b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> DEQUEUE(Q) <i>u :=</i> DEQUEUE(Q)
<b>for</b> each vertex <i>v in Adj[u]</i> <b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>color[v] =</i> WHITE) <b>if</b> (<i>color[v] =</i> WHITE)
<i>color[v] :=</i> GRAY <i>color[v] :=</i> GRAY
<i>d[v] := d[u] + 1</i> <i>d[v] := d[u] + 1</i>
<i>p[v] := u</i> <i>p[v] := u</i>
ENQUEUE(<i>Q</i>, <i>v</i>) ENQUEUE(<i>Q</i>, <i>v</i>)
<b>else</b> <b>else</b>
<b>if</b> (<i>color[v] =</i> GRAY) <b>if</b> (<i>color[v] =</i> GRAY)
... ...
<b>else</b> <b>else</b>
... ...
<b>end for</b> <b>end for</b>
<i>color[u] :=</i> BLACK <i>color[u] :=</i> BLACK
@ -99,29 +99,29 @@ BFS(<i>G</i>, <i>s</i>)
<td valign="top"> <td valign="top">
<pre> <pre>
initialize vertex <i>u</i> initialize vertex <i>u</i>
discover vertex <i>s</i> discover vertex <i>s</i>
examine vertex <i>u</i> examine vertex <i>u</i>
examine edge <i>(u,v)</i> examine edge <i>(u,v)</i>
<i>(u,v)</i> is a tree edge <i>(u,v)</i> is a tree edge
discover vertex <i>v</i> discover vertex <i>v</i>
<i>(u,v)</i> is a non-tree edge <i>(u,v)</i> is a non-tree edge
<i>(u,v)</i> has a gray target <i>(u,v)</i> has a gray target
<i>(u,v)</i> has a black target <i>(u,v)</i> has a black target
finish vertex <i>u</i> finish vertex <i>u</i>
</pre> </pre>
</tr> </tr>
</table> </table>
@ -244,7 +244,7 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
<b>Python</b>: The buffer must derive from the <a <b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph. href="./Buffer.html">Buffer</a> type for the graph.
</blockquote> </blockquote>
<H3><A NAME="SECTION001330300000000000000"> <H3><A NAME="SECTION001330300000000000000">
@ -252,7 +252,7 @@ Complexity</A>
</H3> </H3>
<P> <P>
The time complexity is <i>O(E + V)</i>. The time complexity is <i>O(E + V)</i>.
<P> <P>
@ -260,13 +260,13 @@ The time complexity is <i>O(E + V)</i>.
<ul> <ul>
<li><b><tt>vis.initialize_vertex(v, g)</tt></b> is invoked on every vertex <li><b><tt>vis.initialize_vertex(v, g)</tt></b> is invoked on every vertex
before the start of the search. before the start of the search.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>r is invoked in each <li><b><tt>vis.examine_vertex(u, g)</tt></b>r is invoked in each
vertex as it is removed from the queue. vertex as it is removed from the queue.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge <li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex immediately after the vertex is removed from the queue. of each vertex immediately after the vertex is removed from the queue.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is a tree edge. The <tt>examine_edge()</tt>) if the edge is a tree edge. The
@ -275,20 +275,20 @@ The time complexity is <i>O(E + V)</i>.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the <li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
algorithm encounters vertex <i>u</i>. All vertices closer to the algorithm encounters vertex <i>u</i>. All vertices closer to the
source vertex have been discovered, and vertices further from the source vertex have been discovered, and vertices further from the
source have not yet been discovered. source have not yet been discovered.
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is not a tree edge. <tt>examine_edge()</tt>) if the edge is not a tree edge.
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the <tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
time of examination. The color gray indicates that time of examination. The color gray indicates that
the vertex is currently in the queue. the vertex is currently in the queue.
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the <tt>non_tree_edge()</tt>) if the target vertex is colored black at the
time of examination. The color black indicates that the time of examination. The color black indicates that the
vertex is no longer in the queue. vertex is no longer in the queue.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out <li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
edges of <i>u</i> have been examined and all of the adjacent vertices edges of <i>u</i> have been examined and all of the adjacent vertices
@ -319,7 +319,7 @@ to <tt>listS</tt>.
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -335,4 +335,4 @@ to <tt>listS</tt>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000, 2001 Copyright (c) Jeremy Siek 2000, 2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Breadth-First Visit</Title> <Title>Boost Graph Library: Breadth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -22,14 +22,14 @@
<P> <P>
<PRE> <PRE>
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class P, class T, class R&gt; template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class P, class T, class R&gt;
void breadth_first_visit(IncidenceGraph& G, void breadth_first_visit(IncidenceGraph& G,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s, typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
const bgl_named_params&lt;P, T, R&gt;&amp; params); const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./Buffer.html">Buffer</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>, class ColorMap&gt; template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./Buffer.html">Buffer</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>, class ColorMap&gt;
void breadth_first_visit void breadth_first_visit
(const IncidenceGraph&amp; g, (const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s, typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
Buffer&amp; Q, BFSVisitor vis, ColorMap color) Buffer&amp; Q, BFSVisitor vis, ColorMap color)
</PRE> </PRE>
@ -110,7 +110,7 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
<b>Python</b>: The buffer must derive from the <a <b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph. href="./Buffer.html">Buffer</a> type for the graph.
</blockquote> </blockquote>
<H3><A NAME="SECTION001330300000000000000"> <H3><A NAME="SECTION001330300000000000000">
@ -118,7 +118,7 @@ Complexity</A>
</H3> </H3>
<P> <P>
The time complexity is <i>O(E)</i>. The time complexity is <i>O(E)</i>.
<P> <P>
@ -129,7 +129,7 @@ The time complexity is <i>O(E)</i>.
vertex as it is removed from the queue. vertex as it is removed from the queue.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge <li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex immediately after the vertex is removed from the queue. of each vertex immediately after the vertex is removed from the queue.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is a tree edge. The <tt>examine_edge()</tt>) if the edge is a tree edge. The
@ -138,20 +138,20 @@ The time complexity is <i>O(E)</i>.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the <li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
algorithm encounters vertex <i>u</i>. All vertices closer to the algorithm encounters vertex <i>u</i>. All vertices closer to the
source vertex have been discovered, and vertices further from the source vertex have been discovered, and vertices further from the
source have not yet been discovered. source have not yet been discovered.
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is not a tree edge. <tt>examine_edge()</tt>) if the edge is not a tree edge.
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the <tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
time of examination. The color gray indicates that time of examination. The color gray indicates that
the vertex is currently in the queue. the vertex is currently in the queue.
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to <li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the <tt>non_tree_edge()</tt>) if the target vertex is colored black at the
time of examination. The color black indicates that the time of examination. The color black indicates that the
vertex is no longer in the queue. vertex is no longer in the queue.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out <li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
edges of <i>u</i> have been examined and all of the adjacent vertices edges of <i>u</i> have been examined and all of the adjacent vertices
@ -167,7 +167,7 @@ The time complexity is <i>O(E)</i>.
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -183,4 +183,4 @@ The time complexity is <i>O(E)</i>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Challenge</Title> <Title>Challenge</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -43,12 +43,12 @@ review. The pending items are:</li>
<li>Construct a set of planar graph algorithms.</li> <li>Construct a set of planar graph algorithms.</li>
<ul> <ul>
<li> Is the graph planar?</li> <li> Is the graph planar?</li>
<li> &quot;Walk around the block&quot; and similar open and closed neighborhood <li> &quot;Walk around the block&quot; and similar open and closed neighborhood
traversals. Note that edge traversals need to resolve to particular ends traversals. Note that edge traversals need to resolve to particular ends
and sides (see below), not just to the edge as a whole.</li> and sides (see below), not just to the edge as a whole.</li>
<li> Given a point, find the nearest vertex, edge, or bounded polygon. <li> Given a point, find the nearest vertex, edge, or bounded polygon.
Again, edges are viewed as having left and right sides.</li> Again, edges are viewed as having left and right sides.</li>
<li> Given a line segment, find intersecting vertices, edges, or bounded <li> Given a line segment, find intersecting vertices, edges, or bounded
polygons.</li> polygons.</li>
<li> Given a polygon, find intersecting whatever...</li> <li> Given a polygon, find intersecting whatever...</li>
<li> Various minimum bounding rectangle and clipping problems.</li> <li> Various minimum bounding rectangle and clipping problems.</li>
@ -117,4 +117,4 @@ It is currently difficult to use from a C++ program.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,14 +1,14 @@
<html><!-- <html><!--
Copyright (c) 2004 Trustees of Indiana University Copyright (c) 2004 Trustees of Indiana University
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Function template circle_graph_layout</title></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table cellpadding="2" width="100%"><td valign="top"><img src="../../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td><td align="center"><a href="../../../index.htm">Home</a></td><td align="center"><a href="../../libraries.htm">Libraries</a></td><td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td><td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td><td align="center"><a href="../../../more/index.htm">More</a></td></table><hr><div class="refentry" lang="en"><a name="id103562-bb"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function template circle_graph_layout</span></h2><p>boost::circle_graph_layout &#8212; Layout the graph with the vertices at the points of a regular n-polygon. </p></div><h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2><div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"> <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Function template circle_graph_layout</title></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table cellpadding="2" width="100%"><td valign="top"><img src="../../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td><td align="center"><a href="../../../index.htm">Home</a></td><td align="center"><a href="../../libraries.htm">Libraries</a></td><td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td><td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td><td align="center"><a href="../../../more/index.htm">More</a></td></table><hr><div class="refentry" lang="en"><a name="id103562-bb"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function template circle_graph_layout</span></h2><p>boost::circle_graph_layout &#8212; Layout the graph with the vertices at the points of a regular n-polygon. </p></div><h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2><div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
<span class="bold"><b>template</b></span>&lt;<span class="bold"><b>typename</b></span> VertexListGraph, <span class="bold"><b>typename</b></span> PositionMap, <span class="bold"><b>typename</b></span> Radius&gt; <span class="bold"><b>template</b></span>&lt;<span class="bold"><b>typename</b></span> VertexListGraph, <span class="bold"><b>typename</b></span> PositionMap, <span class="bold"><b>typename</b></span> Radius&gt;
  <span class="type"><span class="bold"><b>void</b></span></span> circle_graph_layout(<span class="bold"><b>const</b></span> VertexListGraph &amp; g, PositionMap position,   <span class="type"><span class="bold"><b>void</b></span></span> circle_graph_layout(<span class="bold"><b>const</b></span> VertexListGraph &amp; g, PositionMap position,
                           Radius radius);</pre></div><div class="refsect1" lang="en"><a name="id821794"></a><h2>Where Defined</h2><a href="../../../boost/graph/circle_layout.hpp">boost/graph/circle_layout.hpp</a><h2>Description</h2><p>The distance from the center of the polygon to each point is determined by the <tt class="computeroutput">radius</tt> parameter. The <tt class="computeroutput">position</tt> parameter must be an Lvalue Property Map whose value type is a class type containing <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> members that will be set to the <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> coordinates.                            Radius radius);</pre></div><div class="refsect1" lang="en"><a name="id821794"></a><h2>Where Defined</h2><a href="../../../boost/graph/circle_layout.hpp">boost/graph/circle_layout.hpp</a><h2>Description</h2><p>The distance from the center of the polygon to each point is determined by the <tt class="computeroutput">radius</tt> parameter. The <tt class="computeroutput">position</tt> parameter must be an Lvalue Property Map whose value type is a class type containing <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> members that will be set to the <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> coordinates.
<h2>Parameters</h2> <h2>Parameters</h2>
IN: <tt>const VertexListGraph&amp; g</tt> IN: <tt>const VertexListGraph&amp; g</tt>

Binary file not shown.

View File

@ -2,7 +2,7 @@
<html> <html>
<!-- <!--
Copyright (c) 2005-2009 Trustees of Indiana University Copyright (c) 2005-2009 Trustees of Indiana University
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
@ -32,12 +32,12 @@ function address(host, user) {
</script> </script>
</head> </head>
<body> <body>
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"></img> ALT="C++ Boost" width="277" height="86"></img>
<h1>Compressed Sparse Row Graph</h1> <h1>Compressed Sparse Row Graph</h1>
<p>The class template <code>compressed_sparse_row_graph</code> is <p>The class template <code>compressed_sparse_row_graph</code> is
a graph class that uses the compact Compressed Sparse Row (CSR) a graph class that uses the compact Compressed Sparse Row (CSR)
format to store directed (and bidirectional) graphs. While CSR graphs have format to store directed (and bidirectional) graphs. While CSR graphs have
@ -101,8 +101,8 @@ function address(host, user) {
<pre> <pre>
namespace boost { namespace boost {
template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = no_property, template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = no_property,
typename <a href="#EdgeProperty">EdgeProperty</a> = no_property, typename <a href="#GraphProperty">GraphProperty</a> = no_property, typename <a href="#EdgeProperty">EdgeProperty</a> = no_property, typename <a href="#GraphProperty">GraphProperty</a> = no_property,
typename <a href="#Vertex">Vertex</a> = std::size_t, typename <a href="#EdgeIndex">EdgeIndex</a> = Vertex&gt; typename <a href="#Vertex">Vertex</a> = std::size_t, typename <a href="#EdgeIndex">EdgeIndex</a> = Vertex&gt;
class compressed_sparse_row_graph class compressed_sparse_row_graph
{ {
@ -173,7 +173,7 @@ public:
template&lt;typename Graph, typename VertexIndexMap&gt; template&lt;typename Graph, typename VertexIndexMap&gt;
<a href="#graph-const">compressed_sparse_row_graph</a>(const Graph&amp; g, const VertexIndexMap&amp; vi, <a href="#graph-const">compressed_sparse_row_graph</a>(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts, vertices_size_type numverts,
edges_size_type numedges); edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt; template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi); compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
@ -202,17 +202,17 @@ public:
<i>// <a href="IncidenceGraph.html">Incidence Graph requirements</a></i> <i>// <a href="IncidenceGraph.html">Incidence Graph requirements</a></i>
vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&amp;); vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&amp;);
vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&amp;); vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&amp;);
std::pair&lt;out_edge_iterator, out_edge_iterator&gt; std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
out_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;); out_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;); degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
<i>// <a href="BidirectionalGraph.html">Bidirectional Graph requirements <b>(bidirectional only)</b></a></i> <i>// <a href="BidirectionalGraph.html">Bidirectional Graph requirements <b>(bidirectional only)</b></a></i>
std::pair&lt;in_edge_iterator, in_edge_iterator&gt; std::pair&lt;in_edge_iterator, in_edge_iterator&gt;
in_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;); in_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;); degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
<i>// <a href="AdjacencyGraph.html">Adjacency Graph requirements</a></i> <i>// <a href="AdjacencyGraph.html">Adjacency Graph requirements</a></i>
std::pair&lt;adjacency_iterator, adjacency_iterator&gt; std::pair&lt;adjacency_iterator, adjacency_iterator&gt;
adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&amp;); adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&amp;);
<i>// <a href="VertexListGraph.html">Vertex List Graph requirements</a></i> <i>// <a href="VertexListGraph.html">Vertex List Graph requirements</a></i>
@ -227,7 +227,7 @@ edges_size_type num_edges(const compressed_sparse_row_graph&amp;);
vertex_descriptor <a href="#vertex-lookup">vertex</a>(vertices_size_type i, const compressed_sparse_row_graph&amp;); vertex_descriptor <a href="#vertex-lookup">vertex</a>(vertices_size_type i, const compressed_sparse_row_graph&amp;);
<i>// <a href="#edge-access">Edge access</a></i> <i>// <a href="#edge-access">Edge access</a></i>
std::pair&lt;edge_descriptor, bool&gt; std::pair&lt;edge_descriptor, bool&gt;
<a href="#edge">edge</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;); <a href="#edge">edge</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
edge_descriptor <a href="#edge_from_index">edge_from_index</a>(edges_size_type i, const compressed_sparse_row_graph&amp;); edge_descriptor <a href="#edge_from_index">edge_from_index</a>(edges_size_type i, const compressed_sparse_row_graph&amp;);
@ -283,7 +283,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<p><code>&lt;<a href="../../../boost/graph/compressed_sparse_row_graph.hpp">boost/graph/compressed_sparse_row_graph.hpp</a>&gt;</code></p> <p><code>&lt;<a href="../../../boost/graph/compressed_sparse_row_graph.hpp">boost/graph/compressed_sparse_row_graph.hpp</a>&gt;</code></p>
<a name="models"></a><h2>Models</h2> <a name="models"></a><h2>Models</h2>
<p>The <tt>compressed_sparse_row_graph</tt> class template models <p>The <tt>compressed_sparse_row_graph</tt> class template models
(i.e., implements the requirements of) many of the (i.e., implements the requirements of) many of the
BGL <a href="graph_concepts.html">graph concepts</a>, allowing it BGL <a href="graph_concepts.html">graph concepts</a>, allowing it
@ -628,7 +628,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
template&lt;typename Graph, typename VertexIndexMap&gt; template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi, compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts, vertices_size_type numverts,
edges_size_type numedges); edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt; template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi); compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
@ -666,14 +666,14 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<ul> <ul>
<li><tt>g</tt>: The incoming graph.</li> <li><tt>g</tt>: The incoming graph.</li>
<li><tt>vi</tt>: A map from vertices to indices. If not <li><tt>vi</tt>: A map from vertices to indices. If not
provided, <tt>get(vertex_index, g)</tt> will be used.</li> provided, <tt>get(vertex_index, g)</tt> will be used.</li>
<li><tt>numverts</tt>: The number of vertices in the graph <li><tt>numverts</tt>: The number of vertices in the graph
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of <tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
<a href="VertexListGraph.html">VertexListGraph</a>.</li> <a href="VertexListGraph.html">VertexListGraph</a>.</li>
<li><tt>numedges</tt>: The number of edges in the graph <li><tt>numedges</tt>: The number of edges in the graph
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of <tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
<a href="EdgeListGraph.html">EdgeListGraph</a>.</li> <a href="EdgeListGraph.html">EdgeListGraph</a>.</li>
@ -726,7 +726,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<a name="edge-access"></a><h3>Edge access</h3> <a name="edge-access"></a><h3>Edge access</h3>
<pre><a name="edge"></a> <pre><a name="edge"></a>
std::pair&lt;edge_descriptor, bool&gt; std::pair&lt;edge_descriptor, bool&gt;
edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;); edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
</pre> </pre>
@ -766,7 +766,7 @@ template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>&gt;
property_map&lt;compressed_sparse_row_graph, Tag&gt;::const_type property_map&lt;compressed_sparse_row_graph, Tag&gt;::const_type
get(PropertyTag, const compressed_sparse_row_graph&amp; g) get(PropertyTag, const compressed_sparse_row_graph&amp; g)
</pre> </pre>
<p class="indent"> <p class="indent">
Returns the property map object for the vertex property Returns the property map object for the vertex property
specified by <TT>PropertyTag</TT>. The <TT>PropertyTag</TT> must specified by <TT>PropertyTag</TT>. The <TT>PropertyTag</TT> must
@ -816,7 +816,7 @@ get_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag);
<p class="indent"> <p class="indent">
Return the property specified by <tt>GraphPropertyTag</tt> that Return the property specified by <tt>GraphPropertyTag</tt> that
is attached to the graph object <tt>g</tt>. is attached to the graph object <tt>g</tt>.
</p> </p>
<hr></hr> <hr></hr>
@ -840,7 +840,7 @@ void set_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag,
template&lt;typename InputIterator&gt; template&lt;typename InputIterator&gt;
void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g) void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g)
</pre> </pre>
<p class="indent"> <p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph. Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>InputIterator</tt> must be a model of <a The <tt>InputIterator</tt> must be a model of <a
@ -856,7 +856,7 @@ void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_gr
template&lt;typename InputIterator, typename EPIter&gt; template&lt;typename InputIterator, typename EPIter&gt;
void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph&amp; g) void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph&amp; g)
</pre> </pre>
<p class="indent"> <p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) with Add a range of edges (from <tt>first</tt> to <tt>last</tt>) with
corresponding edge properties (from <tt>ep_first</tt> to corresponding edge properties (from <tt>ep_first</tt> to
@ -876,7 +876,7 @@ void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter
template&lt;typename BidirectionalIterator&gt; template&lt;typename BidirectionalIterator&gt;
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph&amp; g) void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph&amp; g)
</pre> </pre>
<p class="indent"> <p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph. Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>BidirectionalIterator</tt> must be a model of <a The <tt>BidirectionalIterator</tt> must be a model of <a
@ -893,7 +893,7 @@ void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, c
template&lt;typename BidirectionalIterator, typename EPIter&gt; template&lt;typename BidirectionalIterator, typename EPIter&gt;
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph&amp; g) void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph&amp; g)
</pre> </pre>
<p class="indent"> <p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph. Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>BidirectionalIterator</tt> and <tt>EPIter</tt> must be models of The <tt>BidirectionalIterator</tt> and <tt>EPIter</tt> must be models of
@ -950,7 +950,7 @@ BGL_FORALL_VERTICES(v, g, WebGraph)
// Output each of the links // Output each of the links
std::cout &lt;&lt; "The web graph:" &lt;&lt; std::endl; std::cout &lt;&lt; "The web graph:" &lt;&lt; std::endl;
BGL_FORALL_EDGES(e, g, WebGraph) BGL_FORALL_EDGES(e, g, WebGraph)
std::cout &lt;&lt; " " &lt;&lt; g[source(e, g)].url &lt;&lt; " -> " &lt;&lt; g[target(e, g)].url std::cout &lt;&lt; " " &lt;&lt; g[source(e, g)].url &lt;&lt; " -> " &lt;&lt; g[target(e, g)].url
&lt;&lt; std::endl; &lt;&lt; std::endl;
</pre> </pre>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000-2001 Copyright (c) Jeremy Siek 2000-2001
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Connected Components</Title> <Title>Boost Graph Library: Connected Components</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -154,4 +154,4 @@ undirected graph.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Constructing Graph Algorithms</Title> <Title>Boost Graph Library: Constructing Graph Algorithms</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -113,7 +113,7 @@ color of all the vertices to "uncolored."
namespace boost { namespace boost {
template &lt;class VertexListGraph, class Order, class Color&gt; template &lt;class VertexListGraph, class Order, class Color&gt;
typename graph_traits&lt;VertexListGraph&gt;::vertices_size_type typename graph_traits&lt;VertexListGraph&gt;::vertices_size_type
sequential_vertex_color_ting(const VertexListGraph&amp; G, sequential_vertex_color_ting(const VertexListGraph&amp; G,
Order order, Color color) Order order, Color color)
{ {
typedef graph_traits&lt;VertexListGraph&gt; GraphTraits; typedef graph_traits&lt;VertexListGraph&gt; GraphTraits;
@ -127,27 +127,27 @@ namespace boost {
BOOST_CONCEPT_ASSERT(( IntegerConcept&lt;ColorType&gt; )); BOOST_CONCEPT_ASSERT(( IntegerConcept&lt;ColorType&gt; ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;Order, size_type&gt; )); BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;Order, size_type&gt; ));
BOOST_STATIC_ASSERT((is_same&lt;OrderType, vertex_descriptor&gt;::value)); BOOST_STATIC_ASSERT((is_same&lt;OrderType, vertex_descriptor&gt;::value));
size_type max_color = 0; size_type max_color = 0;
const size_type V = num_vertices(G); const size_type V = num_vertices(G);
std::vector&lt;size_type&gt; std::vector&lt;size_type&gt;
mark(V, numeric_limits_max(max_color)); mark(V, numeric_limits_max(max_color));
typename GraphTraits::vertex_iterator v, vend; typename GraphTraits::vertex_iterator v, vend;
for (boost::tie(v, vend) = vertices(G); v != vend; ++v) for (boost::tie(v, vend) = vertices(G); v != vend; ++v)
color[*v] = V - 1; // which means "not colored" color[*v] = V - 1; // which means "not colored"
for (size_type i = 0; i &lt; V; i++) { for (size_type i = 0; i &lt; V; i++) {
vertex_descriptor current = order[i]; vertex_descriptor current = order[i];
// mark all the colors of the adjacent vertices // mark all the colors of the adjacent vertices
typename GraphTraits::adjacency_iterator ai, aend; typename GraphTraits::adjacency_iterator ai, aend;
for (boost::tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai) for (boost::tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
mark[color[*ai]] = i; mark[color[*ai]] = i;
// find the smallest color unused by the adjacent vertices // find the smallest color unused by the adjacent vertices
size_type smallest_color = 0; size_type smallest_color = 0;
while (smallest_color &lt; max_color &amp;&amp; mark[smallest_color] == i) while (smallest_color &lt; max_color &amp;&amp; mark[smallest_color] == i)
++smallest_color; ++smallest_color;
// if all the colors are used up, increase the number of colors // if all the colors are used up, increase the number of colors
@ -180,4 +180,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,24 +1,24 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Copy Graph</Title> <Title>Boost Graph Library: Copy Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
<H1><TT>copy_graph</TT></H1> <H1><TT>copy_graph</TT></H1>
<PRE> <PRE>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>&gt; template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>&gt;
void copy_graph(const VertexListGraph&amp; G, MutableGraph&amp; G_copy, void copy_graph(const VertexListGraph&amp; G, MutableGraph&amp; G_copy,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>) const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>)
</PRE> </PRE>
@ -113,4 +113,4 @@ The time complexity is <i>O(V + E)</i>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,19 +1,19 @@
<HTML> <HTML>
<!-- Copyright (c) Jeremy Siek 2000 <!-- Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Cuthill-Mckee Ordering</Title> <Title>Boost Graph Library: Cuthill-Mckee Ordering</Title>
</Head> </Head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -46,25 +46,25 @@
OutputIterator OutputIterator
cuthill_mckee_ordering(const IncidenceGraph&amp; g, cuthill_mckee_ordering(const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s, typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
OutputIterator inverse_permutation, OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree) ColorMap color, DegreeMap degree)
(2) (2)
template &lt;class VertexListGraph, class OutputIterator&gt; template &lt;class VertexListGraph, class OutputIterator&gt;
OutputIterator OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation); cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation);
template &lt;class VertexListGraph, class OutputIterator, class VertexIndexMap&gt; template &lt;class VertexListGraph, class OutputIterator, class VertexIndexMap&gt;
OutputIterator OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation, cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
VertexIndexMap index_map); VertexIndexMap index_map);
template &lt;class VertexListGraph, class OutputIterator, template &lt;class VertexListGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt; class ColorMap, class DegreeMap&gt;
OutputIterator OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation, cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree) ColorMap color, DegreeMap degree)
(3) (3)
template &lt;class IncidenceGraph, class OutputIterator, template &lt;class IncidenceGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt; class ColorMap, class DegreeMap&gt;
@ -72,7 +72,7 @@
cuthill_mckee_ordering(const IncidenceGraph&amp; g, cuthill_mckee_ordering(const IncidenceGraph&amp; g,
std::deque&lt; typename std::deque&lt; typename
graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor &gt; vertex_queue, graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor &gt; vertex_queue,
OutputIterator inverse_permutation, OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree) ColorMap color, DegreeMap degree)
</pre> </pre>
@ -92,10 +92,10 @@ increasing degree.
<p> <p>
Version 1 of the algorithm lets the user choose the ``starting Version 1 of the algorithm lets the user choose the ``starting
vertex'', version 2 finds a good starting vertex using the vertex'', version 2 finds a good starting vertex using the
pseudo-peripheral pair heuristic (among each component), while version 3 pseudo-peripheral pair heuristic (among each component), while version 3
contains the starting nodes for each vertex in the deque. The choice of the contains the starting nodes for each vertex in the deque. The choice of the
``starting vertex'' can have a significant effect on the quality of the ``starting vertex'' can have a significant effect on the quality of the
ordering. For versions 2 and 3, <tt>find_starting_vertex</tt> will be called ordering. For versions 2 and 3, <tt>find_starting_vertex</tt> will be called
for each component in the graph, increasing run time significantly. for each component in the graph, increasing run time significantly.
</p> </p>
@ -140,7 +140,7 @@ For version 1:
<ul> <ul>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br> <li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a An undirected graph. The graph's type must be a model of <a
href="./IncidenceGraph.html">IncidenceGraph</a>.<br> href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
@ -149,13 +149,13 @@ For version 1:
The starting vertex.<br> The starting vertex.<br>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br> <li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the <a The new vertex ordering. The vertices are written to the <a
href="http://www.boost.org/sgi/stl/OutputIterator.html">output href="http://www.boost.org/sgi/stl/OutputIterator.html">output
iterator</a> in their new order.<br> iterator</a> in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex <b>Python</b>: This parameter is unused in Python. The new vertex
ordering is returned as a Python <tt>list</tt>. ordering is returned as a Python <tt>list</tt>.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br> <li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).<br> (to avoid visiting the same vertex twice).<br>
@ -171,13 +171,13 @@ For version 2:
<ul> <ul>
<li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br> <li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a An undirected graph. The graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a>.<br> href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
<li> <tt><a href="http://www.boost.org/sgi/stl/OutputIterator.html"> <li> <tt><a href="http://www.boost.org/sgi/stl/OutputIterator.html">
OutputIterator</a> inverse_permutation</tt> &nbsp(OUT) <br> OutputIterator</a> inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the The new vertex ordering. The vertices are written to the
output iterator in their new order.<br> output iterator in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex <b>Python</b>: This parameter is unused in Python. The new vertex
@ -198,7 +198,7 @@ For version 3:
<ul> <ul>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br> <li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a An undirected graph. The graph's type must be a model of <a
href="./IncidenceGraph.html">IncidenceGraph</a>.<br> href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
@ -207,13 +207,13 @@ For version 3:
The deque containing the starting vertices for each component.<br> The deque containing the starting vertices for each component.<br>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br> <li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the <a The new vertex ordering. The vertices are written to the <a
href="http://www.boost.org/sgi/stl/OutputIterator.html">output href="http://www.boost.org/sgi/stl/OutputIterator.html">output
iterator</a> in their new order.<br> iterator</a> in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex <b>Python</b>: This parameter is unused in Python. The new vertex
ordering is returned as a Python <tt>list</tt>. ordering is returned as a Python <tt>list</tt>.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br> <li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).<br> (to avoid visiting the same vertex twice).<br>
@ -245,4 +245,4 @@ and <tt>degree_property_map</tt> in <tt>boost/graph/properties.hpp</tt>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Piotr Wygocki 2013 Copyright (c) Piotr Wygocki 2013
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Cycle Canceling for Min Cost Max Flow</Title> <Title>Boost Graph Library: Cycle Canceling for Min Cost Max Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -23,25 +23,25 @@
<i>// named parameter version</i> <i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt; template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt;
void cycle_canceling( void cycle_canceling(
Graph &amp;g, Graph &amp;g,
const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>) const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class Pred, class Distance, class Reversed, class ResidualCapacity, class Weight&gt; template &lt;class <a href="./Graph.html">Graph</a>, class Pred, class Distance, class Reversed, class ResidualCapacity, class Weight&gt;
void cycle_canceling(const Graph &amp; g, Weight weight, Reversed rev, ResidualCapacity residual_capacity, Pred pred, Distance distance) void cycle_canceling(const Graph &amp; g, Weight weight, Reversed rev, ResidualCapacity residual_capacity, Pred pred, Distance distance)
</PRE> </PRE>
<P> <P>
The <tt>cycle_canceling()</tt> function calculates the minimum cost flow of a network with given flow. See Section <a The <tt>cycle_canceling()</tt> function calculates the minimum cost flow of a network with given flow. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow. Flow Algorithms</a> for a description of maximum flow.
For given flow values <i> f(u,v)</i> function minimizes flow cost in such a way, that for each <i>v in V</i> the For given flow values <i> f(u,v)</i> function minimizes flow cost in such a way, that for each <i>v in V</i> the
<i> sum<sub> u in V</sub> f(v,u) </i> is preserved. Particularly if the input flow was the maximum flow, the function produces min cost max flow. <i> sum<sub> u in V</sub> f(v,u) </i> is preserved. Particularly if the input flow was the maximum flow, the function produces min cost max flow.
The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
<i>E</i>, which are returned in the form of the residual capacity <i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>. <i>r(u,v) = c(u,v) - f(u,v)</i>.
<p> <p>
There are several special requirements on the input graph and property There are several special requirements on the input graph and property
@ -51,12 +51,12 @@ include the reverse edge for every edge in <i>E</i>. That is, the
input graph should be <i>G<sub>in</sub> = (V,{E U input graph should be <i>G<sub>in</sub> = (V,{E U
E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt> E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt>
must map each edge in the original graph to its reverse edge, that is must map each edge in the original graph to its reverse edge, that is
<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>. <i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>.
The <tt>WeightMap</tt> has to map each edge from <i>E<sup>T</sup></i> to <i>-weight</i> of its reversed edge. The <tt>WeightMap</tt> has to map each edge from <i>E<sup>T</sup></i> to <i>-weight</i> of its reversed edge.
Note that edges from <i>E</i> can have negative weights. Note that edges from <i>E</i> can have negative weights.
<p> <p>
If weights in the graph are nonnegative, the If weights in the graph are nonnegative, the
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a> <a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a>
might be better choice for min cost max flow. might be better choice for min cost max flow.
<p> <p>
@ -70,7 +70,7 @@ If there is no negative cycle in the network, the cost is optimized.
<p> <p>
Note that, although we mention capacity in the problem description, the actual algorithm doesn't have to now it. Note that, although we mention capacity in the problem description, the actual algorithm doesn't have to now it.
<p> <p>
In order to find the cost of the result flow use: In order to find the cost of the result flow use:
<a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>. <a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
@ -92,10 +92,10 @@ IN: <tt>Graph&amp; g</tt>
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also <i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph. be in the graph.
</blockquote> </blockquote>
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
IN/OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt> IN/OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote> <blockquote>
This maps edges to their residual capacity. The type must be a model This maps edges to their residual capacity. The type must be a model
@ -142,7 +142,7 @@ UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
using the <tt>i_map</tt> for the index map. using the <tt>i_map</tt> for the index map.
</blockquote> </blockquote>
UTIL: <tt>distance_map(DistanceMap d_map)</tt> UTIL: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote> <blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The vertex in the graph <tt>g</tt> is recorded in this property map. The
@ -150,7 +150,7 @@ UTIL: <tt>distance_map(DistanceMap d_map)</tt>
shortest path. The type <tt>DistanceMap</tt> must be a model of <a shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map. be usable as the key type of the distance map.
<b>Default:</b> <a <b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html"> href="../../property_map/doc/iterator_property_map.html">
@ -178,8 +178,8 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
</blockquote> </blockquote>
<h3>Complexity</h3> <h3>Complexity</h3>
In the integer capacity and weight case, if <i>C</i> is the initial cost of the flow, then the complexity is <i> O(C * |V| * |E|)</i>, In the integer capacity and weight case, if <i>C</i> is the initial cost of the flow, then the complexity is <i> O(C * |V| * |E|)</i>,
where <i>O(|E|* |V|)</i> is the complexity of the bellman ford shortest paths algorithm and <i>C</i> is upper bound on number of iteration. where <i>O(|E|* |V|)</i> is the complexity of the bellman ford shortest paths algorithm and <i>C</i> is upper bound on number of iteration.
In many real world cases number of iterations is much smaller than <i>C</i>. In many real world cases number of iterations is much smaller than <i>C</i>.
@ -203,7 +203,7 @@ Piotr Wygocki, University of Warsaw (<A HREF="mailto:wygos@mimuw.edu.pl">wygos a
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC <!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
--> -->
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt <!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Directed Acyclic Graph Shortest Paths</Title> <Title>Boost Graph Library: Directed Acyclic Graph Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -30,21 +30,21 @@ void dag_shortest_paths(const VertexListGraph&amp; g,
const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params) const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params)
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;class VertexListGraph, class DijkstraVisitor, template &lt;class VertexListGraph, class DijkstraVisitor,
class DistanceMap, class WeightMap, class ColorMap, class DistanceMap, class WeightMap, class ColorMap,
class PredecessorMap, class PredecessorMap,
class Compare, class Combine, class Compare, class Combine,
class DistInf, class DistZero&gt; class DistInf, class DistZero&gt;
void dag_shortest_paths(const VertexListGraph&amp; g, void dag_shortest_paths(const VertexListGraph&amp; g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s, typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
DistanceMap distance, WeightMap weight, ColorMap color, DistanceMap distance, WeightMap weight, ColorMap color,
PredecessorMap pred, DijkstraVisitor vis, PredecessorMap pred, DijkstraVisitor vis,
Compare compare, Combine combine, DistInf inf, DistZero zero) Compare compare, Combine combine, DistInf inf, DistZero zero)
</PRE> </PRE>
<P> <P>
This algorithm&nbsp;[<A HREF="bibliography.html#clr90">8</A>] solves This algorithm&nbsp;[<A HREF="bibliography.html#clr90">8</A>] solves
the single-source shortest-paths problem on a weighted, directed the single-source shortest-paths problem on a weighted, directed
acyclic graph (DAG). This algorithm is more efficient for DAG's acyclic graph (DAG). This algorithm is more efficient for DAG's
than either the Dijkstra or Bellman-Ford algorithm. than either the Dijkstra or Bellman-Ford algorithm.
Use breadth-first search instead of this algorithm Use breadth-first search instead of this algorithm
@ -74,7 +74,7 @@ algorithm's event points.</P>
<h3>Parameters</h3> <h3>Parameters</h3>
IN: <tt>const VertexListGraph&amp; g</tt> IN: <tt>const VertexListGraph&amp; g</tt>
<blockquote> <blockquote>
The graph object on which the algorithm will be applied. The graph object on which the algorithm will be applied.
The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.<br> The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.<br>
@ -82,7 +82,7 @@ IN: <tt>const VertexListGraph&amp; g</tt>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote> </blockquote>
IN: <tt>vertex_descriptor s</tt> IN: <tt>vertex_descriptor s</tt>
<blockquote> <blockquote>
The source vertex. All distance will be calculated from this vertex, The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.<br> and the shortest paths tree will be rooted at this vertex.<br>
@ -92,7 +92,7 @@ IN: <tt>vertex_descriptor s</tt>
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap w_map)</tt> IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote> <blockquote>
The weight or ``length'' of each edge in the graph. The weight or ``length'' of each edge in the graph.
The type <tt>WeightMap</tt> must be a model of The type <tt>WeightMap</tt> must be a model of
@ -106,7 +106,7 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
</blockquote> </blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt> IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the num_vertices(g))</tt>. This is necessary for efficient updates of the
@ -124,7 +124,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt> OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote> <blockquote>
The predecessor map records the edges in the minimum spanning The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i> tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
@ -139,7 +139,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br> <b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote> </blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt> UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote> <blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The vertex in the graph <tt>g</tt> is recorded in this property map. The
@ -147,7 +147,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
shortest path. The type <tt>DistanceMap</tt> must be a model of <a shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map. be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</tt> formed with the <tt>combine</tt> href="./Monoid.html">Monoid</tt> formed with the <tt>combine</tt>
@ -166,7 +166,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph. <b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.
</blockquote> </blockquote>
IN: <tt>distance_compare(CompareFunction cmp)</tt> IN: <tt>distance_compare(CompareFunction cmp)</tt>
<blockquote> <blockquote>
This function is use to compare distances to determine which vertex This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>CompareFunction</tt> type is closer to the source vertex. The <tt>CompareFunction</tt> type
@ -182,7 +182,7 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_combine(CombineFunction cmb)</tt> IN: <tt>distance_combine(CombineFunction cmb)</tt>
<blockquote> <blockquote>
This function is used to combine distances to compute the distance This function is used to combine distances to compute the distance
of a path. The <tt>CombineFunction</tt> type must be a model of <a of a path. The <tt>CombineFunction</tt> type must be a model of <a
@ -199,7 +199,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_inf(D inf)</tt> IN: <tt>distance_inf(D inf)</tt>
<blockquote> <blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object. The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>. That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>.
@ -209,7 +209,7 @@ IN: <tt>distance_inf(D inf)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_zero(D zero)</tt> IN: <tt>distance_zero(D zero)</tt>
<blockquote> <blockquote>
The <tt>zero</tt> value must be the identity element for the The <tt>zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values <a href="./Monoid.html">Monoid</a> formed by the distance values
@ -220,7 +220,7 @@ IN: <tt>distance_zero(D zero)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt> UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote> <blockquote>
This is used during the execution of the algorithm to mark the This is used during the execution of the algorithm to mark the
vertices. The vertices start out white and become gray when they are vertices. The vertices start out white and become gray when they are
@ -242,13 +242,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
the graph. the graph.
</blockquote> </blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt> OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote> <blockquote>
Use this to specify actions that you would like to happen Use this to specify actions that you would like to happen
during certain event points within the algorithm. during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept. <a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a The visitor object is passed by value <a
href="#1">[1]</a>.<br> href="#1">[1]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br> <b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
@ -272,21 +272,21 @@ The time complexity is <i>O(V + E)</i>.
is invoked on each vertex in the graph before the start of the is invoked on each vertex in the graph before the start of the
algorithm. algorithm.
<li><b><tt>vis.examine_vertex(u, g)</tt></b> <li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is added to set <i>S</i>. is invoked on a vertex as it is added to set <i>S</i>.
At this point we know that <i>(p[u],u)</i> At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances <i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>. <i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b> <li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>. been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> <li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>. is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree. relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b> <li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge is invoked on vertex <i>v</i> when the edge
<i>(u,v)</i> is examined and <i>v</i> is WHITE. Since <i>(u,v)</i> is examined and <i>v</i> is WHITE. Since
a vertex is colored GRAY when it is discovered, a vertex is colored GRAY when it is discovered,
each reacable vertex is discovered exactly once. each reacable vertex is discovered exactly once.
@ -306,7 +306,7 @@ algorithm.
<H3>Notes</H3> <H3>Notes</H3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -322,5 +322,5 @@ algorithm.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Depth-First Search</Title> <Title>Boost Graph Library: Depth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -31,7 +31,7 @@ template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class
void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color) void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color)
template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt; template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color, void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start) typename graph_traits&lt;Graph&gt;::vertex_descriptor start)
</PRE> </PRE>
@ -84,33 +84,33 @@ be used to do this.
<td valign="top"> <td valign="top">
<pre> <pre>
DFS(<i>G</i>) DFS(<i>G</i>)
<b>for</b> each vertex <i>u in V</i> <b>for</b> each vertex <i>u in V</i>
<i>color[u] :=</i> WHITE <i>color[u] :=</i> WHITE
<i>p[u] = u</i> <i>p[u] = u</i>
<b>end for</b> <b>end for</b>
<i>time := 0</i> <i>time := 0</i>
<b>if</b> there is a starting vertex <i>s</i> <b>if</b> there is a starting vertex <i>s</i>
<b>call</b> DFS-VISIT(<i>G</i>, <i>s</i>) <b>call</b> DFS-VISIT(<i>G</i>, <i>s</i>)
<b>for</b> each vertex <i>u in V</i> <b>for</b> each vertex <i>u in V</i>
<b>if</b> <i>color[u] =</i> WHITE <b>if</b> <i>color[u] =</i> WHITE
<b>call</b> DFS-VISIT(<i>G</i>, <i>u</i>) <b>call</b> DFS-VISIT(<i>G</i>, <i>u</i>)
<b>end for</b> <b>end for</b>
return (<i>p</i>,<i>d_time</i>,<i>f_time</i>) <br> return (<i>p</i>,<i>d_time</i>,<i>f_time</i>) <br>
DFS-VISIT(<i>G</i>, <i>u</i>) DFS-VISIT(<i>G</i>, <i>u</i>)
<i>color[u] :=</i> GRAY <i>color[u] :=</i> GRAY
<i>d_time[u] := time := time + 1</i> <i>d_time[u] := time := time + 1</i>
<b>for</b> each <i>v in Adj[u]</i> <b>for</b> each <i>v in Adj[u]</i>
<b>if</b> (<i>color[v] =</i> WHITE) <b>if</b> (<i>color[v] =</i> WHITE)
<i>p[v] = u</i> <i>p[v] = u</i>
<b>call</b> DFS-VISIT(<i>G</i>, <i>v</i>) <b>call</b> DFS-VISIT(<i>G</i>, <i>v</i>)
<b>else if</b> (<i>color[v] =</i> GRAY) <b>else if</b> (<i>color[v] =</i> GRAY)
<i>...</i> <i>...</i>
<b>else if</b> (<i>color[v] =</i> BLACK) <b>else if</b> (<i>color[v] =</i> BLACK)
<i>...</i> <i>...</i>
<i>...</i> <i>...</i>
<b>end for</b> <b>end for</b>
<i>color[u] :=</i> BLACK <i>color[u] :=</i> BLACK
<i>f_time[u] := time := time + 1</i> <i>f_time[u] := time := time + 1</i>
<pre> <pre>
</td> </td>
<td valign="top"> <td valign="top">
@ -252,27 +252,27 @@ The time complexity is <i>O(E + V)</i>.
<li><b><tt>vis.start_vertex(s, g)</tt></b> is invoked on the source <li><b><tt>vis.start_vertex(s, g)</tt></b> is invoked on the source
vertex once before the start of the search. vertex once before the start of the search.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked when a vertex <li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked when a vertex
is encountered for the first time. is encountered for the first time.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge <li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex after it is discovered. of each vertex after it is discovered.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked on each edge as it <li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked on each edge as it
becomes a member of the edges that form the search tree. If you becomes a member of the edges that form the search tree. If you
wish to record predecessors, do so at this event point. wish to record predecessors, do so at this event point.
<li><b><tt>vis.back_edge(e, g)</tt></b> is invoked on the back edges in <li><b><tt>vis.back_edge(e, g)</tt></b> is invoked on the back edges in
the graph. the graph.
<li><b><tt>vis.forward_or_cross_edge(e, g)</tt></b> is invoked on <li><b><tt>vis.forward_or_cross_edge(e, g)</tt></b> is invoked on
forward or cross edges in the graph. In an undirected graph this forward or cross edges in the graph. In an undirected graph this
method is never called. method is never called.
<li><b><tt>vis.finish_edge(e, g)</tt></b> is invoked on the non-tree edges in <li><b><tt>vis.finish_edge(e, g)</tt></b> is invoked on the non-tree edges in
the graph as well as on each tree edge after its target vertex is finished. the graph as well as on each tree edge after its target vertex is finished.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked on a vertex after <li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked on a vertex after
all of its out edges have been added to the search tree and all of all of its out edges have been added to the search tree and all of
the adjacent vertices have been discovered (but before their the adjacent vertices have been discovered (but before their
@ -295,7 +295,7 @@ The example in <a href="../example/dfs-example.cpp">
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -317,4 +317,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Depth-First Visit</Title> <Title>Boost Graph Library: Depth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -25,13 +25,13 @@
<PRE> <PRE>
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt; template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_visit(IncidenceGraph& g, void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s, typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color) DFSVisitor&amp; vis, ColorMap color)
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap, template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap,
class TerminatorFunc&gt; class TerminatorFunc&gt;
void depth_first_visit(IncidenceGraph& g, void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s, typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color, TerminatorFunc func = TerminatorFunc()) DFSVisitor&amp; vis, ColorMap color, TerminatorFunc func = TerminatorFunc())
</PRE> </PRE>
@ -41,7 +41,7 @@ component as the source vertex <tt>s</tt>, using the <a
href="./graph_theory_review.html#sec:dfs-algorithm">depth-first href="./graph_theory_review.html#sec:dfs-algorithm">depth-first
pattern</a>. The main purpose of the function is for the pattern</a>. The main purpose of the function is for the
implementation of <TT>depth_first_search()</TT> though sometimes it is implementation of <TT>depth_first_search()</TT> though sometimes it is
useful on its own. useful on its own.
<p> <p>
The <tt>DFSVisitor</tt> supplied by the user determines what The <tt>DFSVisitor</tt> supplied by the user determines what
@ -124,7 +124,7 @@ Time complexity is <i>O(E)</i>.
<h3>Notes</h3> <h3>Notes</h3>
<p><a name="1">[1]</a> <p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -141,4 +141,4 @@ Time complexity is <i>O(E)</i>.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: dfs_visitor</Title> <Title>Boost Graph Library: dfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -108,4 +108,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Dijkstra's Shortest Paths</Title> <Title>Boost Graph Library: Dijkstra's Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -29,14 +29,14 @@ dijkstra_shortest_paths(Graph&amp; g,
const bgl_named_params&lt;P, T, R&gt;&amp; params); const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>, template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap, typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>, typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename DistInf, typename DistZero, typename ColorMap = <i>default</i>&gt; typename DistInf, typename DistZero, typename ColorMap = <i>default</i>&gt;
void dijkstra_shortest_paths void dijkstra_shortest_paths
(const Graph&amp; g, (const Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s, typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance, WeightMap weight, PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
VertexIndexMap index_map, VertexIndexMap index_map,
CompareFunction compare, CombineFunction combine, DistInf inf, DistZero zero, CompareFunction compare, CombineFunction combine, DistInf inf, DistZero zero,
DijkstraVisitor vis, ColorMap color = <i>default</i>) DijkstraVisitor vis, ColorMap color = <i>default</i>)
@ -123,12 +123,12 @@ indicated by the labels on the right.
<pre> <pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>) DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>u in V</i> <b>(This loop is not run in dijkstra_shortest_paths_no_init)</b> <b>for</b> each vertex <i>u in V</i> <b>(This loop is not run in dijkstra_shortest_paths_no_init)</b>
<i>d[u] := infinity</i> <i>d[u] := infinity</i>
<i>p[u] := u</i> <i>p[u] := u</i>
<i>color[u] :=</i> WHITE <i>color[u] :=</i> WHITE
<b>end for</b> <b>end for</b>
<i>color[s] := </i>GRAY <i>color[s] := </i>GRAY
<i>d[s] := 0</i> <i>d[s] := 0</i>
INSERT(<i>Q</i>, <i>s</i>) INSERT(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>) <b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> EXTRACT-MIN(<i>Q</i>) <i>u :=</i> EXTRACT-MIN(<i>Q</i>)
@ -136,10 +136,10 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>v in Adj[u]</i> <b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>) <b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i> <i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i> <i>p[v] := u</i>
<b>if</b> (<i>color[v] =</i> WHITE) <b>if</b> (<i>color[v] =</i> WHITE)
<i>color[v] :=</i> GRAY <i>color[v] :=</i> GRAY
INSERT(<i>Q</i>, <i>v</i>) INSERT(<i>Q</i>, <i>v</i>)
<b>else if</b> (<i>color[v] =</i> GRAY) <b>else if</b> (<i>color[v] =</i> GRAY)
DECREASE-KEY(<i>Q</i>, <i>v</i>) DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>else</b> <b>else</b>
@ -188,17 +188,17 @@ finish vertex <i>u</i>
<h3>Parameters</h3> <h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt> IN: <tt>const Graph&amp; g</tt>
<blockquote> <blockquote>
The graph object on which the algorithm will be applied. The graph object on which the algorithm will be applied.
The type <tt>Graph</tt> must be a model of The type <tt>Graph</tt> must be a model of
<a href="./VertexListGraph.html">Vertex List Graph</a> <a href="./VertexListGraph.html">Vertex List Graph</a>
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br> and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>. <b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote> </blockquote>
IN: <tt>vertex_descriptor s</tt> IN: <tt>vertex_descriptor s</tt>
<blockquote> <blockquote>
The source vertex. All distance will be calculated from this vertex, The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.<br> and the shortest paths tree will be rooted at this vertex.<br>
@ -208,11 +208,11 @@ IN: <tt>vertex_descriptor s</tt>
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap w_map)</tt> IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote> <blockquote>
The weight or ``length'' of each edge in the graph. The weights The weight or ``length'' of each edge in the graph. The weights
must all be non-negative, and the algorithm will throw a must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a> <a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative. exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
@ -225,13 +225,13 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt> <b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
</blockquote> </blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt> IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the num_vertices(g))</tt>. This is necessary for efficient updates of the
heap data structure&nbsp;[<A heap data structure&nbsp;[<A
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed. HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
The type The type
<tt>VertexIndexMap</tt> must be a model of <tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be integer type. The vertex descriptor type of the graph needs to be
@ -246,10 +246,10 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt> OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote> <blockquote>
The predecessor map records the edges in the shortest path tree, the tree computed The predecessor map records the edges in the shortest path tree, the tree computed
by the traversal of the graph. Upon completion of the algorithm, the edges by the traversal of the graph. Upon completion of the algorithm, the edges
<i>(p[u],u)</i> for all <i>u in V</i> are in the tree. The shortest path <i>(p[u],u)</i> for all <i>u in V</i> are in the tree. The shortest path
from vertex <i>s</i> to each vertex <i>v</i> in the graph consists of the from vertex <i>s</i> to each vertex <i>v</i> in the graph consists of the
vertices <i>v</i>, <i>p[v]</i>, <i>p[p[v]]</i>, and so on until <i>s</i> is vertices <i>v</i>, <i>p[v]</i>, <i>p[p[v]]</i>, and so on until <i>s</i> is
@ -266,7 +266,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br> <b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote> </blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt> UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote> <blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The vertex in the graph <tt>g</tt> is recorded in this property map. The
@ -274,7 +274,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
shortest path. The type <tt>DistanceMap</tt> must be a model of <a shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map. be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</a> formed with the <tt>combine</tt> href="./Monoid.html">Monoid</a> formed with the <tt>combine</tt>
@ -293,7 +293,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br> <b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
</blockquote> </blockquote>
IN: <tt>distance_compare(CompareFunction cmp)</tt> IN: <tt>distance_compare(CompareFunction cmp)</tt>
<blockquote> <blockquote>
This function is use to compare distances to determine which vertex This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>CompareFunction</tt> type is closer to the source vertex. The <tt>CompareFunction</tt> type
@ -309,7 +309,7 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_combine(CombineFunction cmb)</tt> IN: <tt>distance_combine(CombineFunction cmb)</tt>
<blockquote> <blockquote>
This function is used to combine distances to compute the distance This function is used to combine distances to compute the distance
of a path. The <tt>CombineFunction</tt> type must be a model of <a of a path. The <tt>CombineFunction</tt> type must be a model of <a
@ -326,7 +326,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_inf(D inf)</tt> IN: <tt>distance_inf(D inf)</tt>
<blockquote> <blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object. The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>. That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>.
@ -338,7 +338,7 @@ IN: <tt>distance_inf(D inf)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
IN: <tt>distance_zero(D zero)</tt> IN: <tt>distance_zero(D zero)</tt>
<blockquote> <blockquote>
The <tt>zero</tt> value must be the identity element for the The <tt>zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values <a href="./Monoid.html">Monoid</a> formed by the distance values
@ -350,7 +350,7 @@ IN: <tt>distance_zero(D zero)</tt>
<b>Python</b>: Unsupported parameter. <b>Python</b>: Unsupported parameter.
</blockquote> </blockquote>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt> UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote> <blockquote>
This is used during the execution of the algorithm to mark the This is used during the execution of the algorithm to mark the
vertices. The vertices start out white and become gray when they are vertices. The vertices start out white and become gray when they are
@ -371,13 +371,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for <b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph. the graph.
</blockquote> </blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt> OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote> <blockquote>
Use this to specify actions that you would like to happen Use this to specify actions that you would like to happen
during certain event points within the algorithm. during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept. <a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a The visitor object is passed by value <a
href="#2">[2]</a>.<br> href="#2">[2]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br> <b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
@ -404,19 +404,19 @@ The time complexity is <i>O(V log V + E)</i>.
<li><b><tt>vis.examine_vertex(u, g)</tt></b> <li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is removed from the priority queue is invoked on a vertex as it is removed from the priority queue
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i> and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances <i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>. <i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b> <li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>. been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> <li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>. is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree. relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b> <li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge is invoked on vertex <i>v</i> when the edge
<i>(u,v)</i> is examined and <i>v</i> is WHITE. Since <i>(u,v)</i> is examined and <i>v</i> is WHITE. Since
a vertex is colored GRAY when it is discovered, a vertex is colored GRAY when it is discovered,
each reachable vertex is discovered exactly once. This each reachable vertex is discovered exactly once. This
@ -445,7 +445,7 @@ S</i> vertices in the priority queue at once, but instead only those
vertices in <i>V - S</i> that are discovered and therefore have a vertices in <i>V - S</i> that are discovered and therefore have a
distance less than infinity. distance less than infinity.
<p><a name="2">[2]</a> <p><a name="2">[2]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
@ -461,4 +461,4 @@ distance less than infinity.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Michael Hansen 2009 Copyright (c) Michael Hansen 2009
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Dijkstra's Shortest Paths (No Color Map)</Title> <Title>Boost Graph Library: Dijkstra's Shortest Paths (No Color Map)</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -27,29 +27,29 @@ void dijkstra_shortest_paths_no_color_map
(const Graph&amp; graph, (const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex, typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
const bgl_named_params<Param,Tag,Rest>& params); const bgl_named_params<Param,Tag,Rest>& params);
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>, template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap, typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>, typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
typename DistanceInfinity, typename DistanceZero&gt; typename DistanceInfinity, typename DistanceZero&gt;
void dijkstra_shortest_paths_no_color_map void dijkstra_shortest_paths_no_color_map
(const Graph&amp; graph, (const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex, typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map, PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
VertexIndexMap index_map, VertexIndexMap index_map,
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine, DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
DistanceInfinity distance_infinity, DistanceZero distance_zero); DistanceInfinity distance_infinity, DistanceZero distance_zero);
<i>// version that does not initialize the property maps</i> <i>// version that does not initialize the property maps</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>, template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap, typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>, typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
typename DistanceInfinity, typename DistanceZero&gt; typename DistanceInfinity, typename DistanceZero&gt;
void dijkstra_shortest_paths_no_color_map_no_init void dijkstra_shortest_paths_no_color_map_no_init
(const Graph&amp; graph, (const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex, typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map, PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
VertexIndexMap index_map, VertexIndexMap index_map,
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine, DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
DistanceInfinity distance_infinity, DistanceZero distance_zero); DistanceInfinity distance_infinity, DistanceZero distance_zero);
@ -116,16 +116,16 @@ indicated by the labels on the right.
<td valign="top"> <td valign="top">
<pre> <pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>) DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<i>d[s] := 0</i> <i>d[s] := 0</i>
INSERT(<i>Q</i>, <i>s</i>) INSERT(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>) <b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> EXTRACT-MIN(<i>Q</i>) <i>u :=</i> EXTRACT-MIN(<i>Q</i>)
<b>for</b> each vertex <i>v in Adj[u]</i> <b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>) <b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i> <i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i> <i>p[v] := u</i>
<b>if</b> (<i>d[v]</i> was originally infinity) <b>if</b> (<i>d[v]</i> was originally infinity)
INSERT(<i>Q</i>, <i>v</i>) INSERT(<i>Q</i>, <i>v</i>)
<b>else</b> <b>else</b>
DECREASE-KEY(<i>Q</i>, <i>v</i>) DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>else</b> <b>else</b>
@ -164,15 +164,15 @@ finish vertex <i>u</i>
<h3>Parameters</h3> <h3>Parameters</h3>
IN: <tt>const Graph&amp; graph</tt> IN: <tt>const Graph&amp; graph</tt>
<blockquote> <blockquote>
The graph object on which the algorithm will be applied. The graph object on which the algorithm will be applied.
The type <tt>Graph</tt> must be a model of The type <tt>Graph</tt> must be a model of
<a href="./VertexListGraph.html">Vertex List Graph</a> <a href="./VertexListGraph.html">Vertex List Graph</a>
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br> and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
</blockquote> </blockquote>
IN: <tt>vertex_descriptor start_vertex</tt> IN: <tt>vertex_descriptor start_vertex</tt>
<blockquote> <blockquote>
The source vertex. All distance will be calculated from this vertex, The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.<br> and the shortest paths tree will be rooted at this vertex.<br>
@ -180,11 +180,11 @@ IN: <tt>vertex_descriptor start_vertex</tt>
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap weight_map)</tt> IN: <tt>weight_map(WeightMap weight_map)</tt>
<blockquote> <blockquote>
The weight or ``length'' of each edge in the graph. The weights The weight or ``length'' of each edge in the graph. The weights
must all be non-negative and non-infinite <a href="#3">[3]</a>. The algorithm will throw a must all be non-negative and non-infinite <a href="#3">[3]</a>. The algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a> <a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative. exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
@ -194,13 +194,13 @@ IN: <tt>weight_map(WeightMap weight_map)</tt>
<b>Default:</b> <tt>get(edge_weight, graph)</tt><br> <b>Default:</b> <tt>get(edge_weight, graph)</tt><br>
</blockquote> </blockquote>
IN: <tt>index_map(VertexIndexMap index_map)</tt> IN: <tt>index_map(VertexIndexMap index_map)</tt>
<blockquote> <blockquote>
This maps each vertex to an integer in the range <tt>[0, This maps each vertex to an integer in the range <tt>[0,
num_vertices(graph))</tt>. This is necessary for efficient updates of the num_vertices(graph))</tt>. This is necessary for efficient updates of the
heap data structure&nbsp;[<A heap data structure&nbsp;[<A
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed. HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
The type The type
<tt>VertexIndexMap</tt> must be a model of <tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be integer type. The vertex descriptor type of the graph needs to be
@ -213,7 +213,7 @@ IN: <tt>index_map(VertexIndexMap index_map)</tt>
<br> <br>
</blockquote> </blockquote>
OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt> OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt>
<blockquote> <blockquote>
The predecessor map records the edges in the minimum spanning The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i> tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
@ -229,7 +229,7 @@ OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br> <b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote> </blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt> UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
<blockquote> <blockquote>
The shortest path weight from the source vertex <tt>start_vertex</tt> to each The shortest path weight from the source vertex <tt>start_vertex</tt> to each
vertex in the graph <tt>graph</tt> is recorded in this property map. The vertex in the graph <tt>graph</tt> is recorded in this property map. The
@ -237,7 +237,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
shortest path. The type <tt>DistanceMap</tt> must be a model of <a shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map. be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</a> formed with the <tt>distance_weight_combine</tt> href="./Monoid.html">Monoid</a> formed with the <tt>distance_weight_combine</tt>
@ -254,7 +254,7 @@ UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
map.<br> map.<br>
</blockquote> </blockquote>
IN: <tt>distance_compare(CompareFunction distance_compare)</tt> IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
<blockquote> <blockquote>
This function is use to compare distances to determine which vertex This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>DistanceCompareFunction</tt> type is closer to the source vertex. The <tt>DistanceCompareFunction</tt> type
@ -268,7 +268,7 @@ IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
property_traits&lt;DistanceMap&gt;::value_type</tt><br> property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote> </blockquote>
IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt> IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
<blockquote> <blockquote>
This function is used to combine distances to compute the distance This function is used to combine distances to compute the distance
of a path. The <tt>DistanceWeightCombineFunction</tt> type must be a model of <a of a path. The <tt>DistanceWeightCombineFunction</tt> type must be a model of <a
@ -283,7 +283,7 @@ IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br> <tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote> </blockquote>
IN: <tt>distance_inf(D distance_infinity)</tt> IN: <tt>distance_inf(D distance_infinity)</tt>
<blockquote> <blockquote>
The <tt>distance_infinity</tt> object must be the greatest value of any <tt>D</tt> object. The <tt>distance_infinity</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>distance_compare(d, distance_infinity) == true</tt> for any <tt>d != distance_infinity</tt>. That is, <tt>distance_compare(d, distance_infinity) == true</tt> for any <tt>d != distance_infinity</tt>.
@ -293,7 +293,7 @@ IN: <tt>distance_inf(D distance_infinity)</tt>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br> <b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
</blockquote> </blockquote>
IN: <tt>distance_zero(D distance_zero)</tt> IN: <tt>distance_zero(D distance_zero)</tt>
<blockquote> <blockquote>
The <tt>distance_zero</tt> value must be the identity element for the The <tt>distance_zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values <a href="./Monoid.html">Monoid</a> formed by the distance values
@ -302,13 +302,13 @@ IN: <tt>distance_zero(D distance_zero)</tt>
<b>Default:</b> <tt>D()</tt>with <b>Default:</b> <tt>D()</tt>with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br> <tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote> </blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt> OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote> <blockquote>
Use this to specify actions that you would like to happen Use this to specify actions that you would like to happen
during certain event points within the algorithm. during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept. <a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a The visitor object is passed by value <a
href="#2">[2]</a>.<br> href="#2">[2]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br> <b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
@ -330,19 +330,19 @@ The time complexity is <i>O(V log V + E)</i>.
<li><b><tt>vis.examine_vertex(u, g)</tt></b> <li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is removed from the priority queue is invoked on a vertex as it is removed from the priority queue
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i> and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances <i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>. <i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b> <li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>. been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> <li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>. is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree. relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b> <li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge is invoked on vertex <i>v</i> when the edge
<i>(u,v)</i> is examined and <i>v</i> has not yet been discovered (i.e. its distance was infinity before relaxation was attempted on the edge). This <i>(u,v)</i> is examined and <i>v</i> has not yet been discovered (i.e. its distance was infinity before relaxation was attempted on the edge). This
is also when the vertex is inserted into the priority queue. is also when the vertex is inserted into the priority queue.
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b> <li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
@ -370,17 +370,17 @@ S</i> vertices in the priority queue at once, but instead only those
vertices in <i>V - S</i> that are discovered and therefore have a vertices in <i>V - S</i> that are discovered and therefore have a
distance less than infinity. distance less than infinity.
<p><a name="2">[2]</a> <p><a name="2">[2]</a>
Since the visitor parameter is passed by value, if your visitor Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object will be made to a copy of the visitor object, not the visitor object
passed in. Therefore you may want the visitor to hold this state by passed in. Therefore you may want the visitor to hold this state by
pointer or reference. pointer or reference.
<p><a name="3">[3]</a> <p><a name="3">[3]</a>
The algorithm will not work correctly if any of the edge weights are equal to infinity since the infinite distance value is used to determine if a vertex has been discovered. The algorithm will not work correctly if any of the edge weights are equal to infinity since the infinite distance value is used to determine if a vertex has been discovered.
<p><a name="4">[4]</a> <p><a name="4">[4]</a>
Calls to the visitor events occur in the same order as <tt>dijkstra_shortest_paths</tt> (i.e. <i>discover_vertex(u)</i> will always be called after <i>examine_vertex(u)</i> for an undiscovered vertex <i>u</i>). However, the vertices of the graph given to <i>dijkstra_shortest_paths_no_color_map</i> will <b>not</b> necessarily be visited in the same order as <i>dijkstra_shortest_paths</i>. Calls to the visitor events occur in the same order as <tt>dijkstra_shortest_paths</tt> (i.e. <i>discover_vertex(u)</i> will always be called after <i>examine_vertex(u)</i> for an undiscovered vertex <i>u</i>). However, the vertices of the graph given to <i>dijkstra_shortest_paths_no_color_map</i> will <b>not</b> necessarily be visited in the same order as <i>dijkstra_shortest_paths</i>.
<br> <br>
@ -391,4 +391,4 @@ distance less than infinity.
Trustees of Indiana University</TD></TR></TABLE> Trustees of Indiana University</TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: dijkstra_visitor</Title> <Title>Boost Graph Library: dijkstra_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -37,7 +37,7 @@ by Dijkstra's algorithm.
<pre> <pre>
boost::dijkstra_shortest_paths boost::dijkstra_shortest_paths
(G, vertex(a, G), (G, vertex(a, G),
distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])). distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])).
predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])). predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])).
visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge())))); visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
@ -122,4 +122,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) David Doria 2012 Copyright (c) David Doria 2012
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Directed Graph</Title> <Title>Boost Graph Library: Directed Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -93,4 +93,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -73,7 +73,7 @@ disjoint_sets&lt;Rank, Parent, FindCompress&gt;
<pre> <pre>
... ...
disjoint_sets&lt;Rank, Parent, FindCompress&gt; dsets(rank, p); disjoint_sets&lt;Rank, Parent, FindCompress&gt; dsets(rank, p);
for (ui = vertices(G).first; ui != vertices(G).second; ++ui) for (ui = vertices(G).first; ui != vertices(G).second; ++ui)
dsets.make_set(*ui); dsets.make_set(*ui);
... ...
@ -282,7 +282,7 @@ Element operator()(Parent p, Element x)
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional" "../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p> height="31" width="88"></a></p>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01 <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p> December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>

View File

@ -37,7 +37,7 @@
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional" "../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p> height="31" width="88"></a></p>
<p>Revised <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01 <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p> December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: distance_recorder</Title> <Title>Boost Graph Library: distance_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -124,7 +124,7 @@ template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g); void operator()(Edge e, const Graph& g);
</tt></td> </tt></td>
<td> <td>
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
one plus the distance of <i>u</i>. one plus the distance of <i>u</i>.
</td> </td>
</tr> </tr>
@ -173,7 +173,7 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>
<!-- LocalWords: DistanceMap EventTag EventVisitor map bfs dfs const Siek <!-- LocalWords: DistanceMap EventTag EventVisitor map bfs dfs const Siek
--> -->
<!-- LocalWords: EventVisitorList WritablePropertyMap Univ Quan <!-- LocalWords: EventVisitorList WritablePropertyMap Univ Quan

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Edge List Class</Title> <Title>Boost Graph Library: Edge List Class</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -52,7 +52,7 @@ Applying the Bellman-Ford shortest paths algorithm to an
E(x,y), E(x,v), E(x,y), E(x,v),
E(y,v), E(y,z), E(y,v), E(y,z),
E(z,u), E(z,x) }; E(z,u), E(z,x) };
int weight[] = { -4, 8, 5, int weight[] = { -4, 8, 5,
-2, -2,
9, -3, 9, -3,
@ -61,16 +61,16 @@ Applying the Bellman-Ford shortest paths algorithm to an
typedef boost::edge_list&lt;E*&gt; Graph; typedef boost::edge_list&lt;E*&gt; Graph;
Graph g(edges, edges + sizeof(edges) / sizeof(E)); Graph g(edges, edges + sizeof(edges) / sizeof(E));
std::vector&lt;int&gt; distance(N, std::numeric_limits&lt;short&gt;::max()); std::vector&lt;int&gt; distance(N, std::numeric_limits&lt;short&gt;::max());
std::vector&lt;int&gt; parent(N,-1); std::vector&lt;int&gt; parent(N,-1);
distance[z] = 0; distance[z] = 0;
parent[z] = z; parent[z] = z;
bool r = boost::bellman_ford_shortest_paths(g, int(N), weight, bool r = boost::bellman_ford_shortest_paths(g, int(N), weight,
distance.begin(), distance.begin(),
parent.begin()); parent.begin());
if (r) if (r)
for (int i = 0; i &lt; N; ++i) for (int i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[i] &lt;&lt; ": " &lt;&lt; distance[i] std::cout &lt;&lt; name[i] &lt;&lt; ": " &lt;&lt; distance[i]
&lt;&lt; " " &lt;&lt; name[parent[i]] &lt;&lt; std::endl; &lt;&lt; " " &lt;&lt; name[parent[i]] &lt;&lt; std::endl;
@ -145,7 +145,7 @@ boost::graph_traits&lt;edge_list&gt;::edge_descriptor
</tt> </tt>
<br><br> <br><br>
The type for the edge descriptors associated with the The type for the edge descriptors associated with the
<TT>edge_list</TT>. <TT>edge_list</TT>.
<hr> <hr>
@ -218,4 +218,4 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: edge_predecessor_recorder</Title> <Title>Boost Graph Library: edge_predecessor_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -188,7 +188,7 @@ HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>
<!-- LocalWords: PredEdgeMap EventTag EventVisitor map bfs dfs const <!-- LocalWords: PredEdgeMap EventTag EventVisitor map bfs dfs const
--> -->
<!-- LocalWords: EventVisitorList WritablePropertyMap Siek Univ Quan <!-- LocalWords: EventVisitorList WritablePropertyMap Siek Univ Quan

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2000 Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Edmonds-Karp Maximum Flow</Title> <Title>Boost Graph Library: Edmonds-Karp Maximum Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -23,20 +23,20 @@
<i>// named parameter version</i> <i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt; template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt;
typename detail::edge_capacity_value&lt;Graph, P, T, R&gt;::value_type typename detail::edge_capacity_value&lt;Graph, P, T, R&gt;::value_type
edmonds_karp_max_flow(Graph& g, edmonds_karp_max_flow(Graph& g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src, typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink, typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>) const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i> <i>// non-named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, template &lt;class <a href="./Graph.html">Graph</a>,
class CapacityEdgeMap, class ResidualCapacityEdgeMap, class CapacityEdgeMap, class ResidualCapacityEdgeMap,
class ReverseEdgeMap, class ColorMap, class PredEdgeMap&gt; class ReverseEdgeMap, class ColorMap, class PredEdgeMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type typename property_traits&lt;CapacityEdgeMap&gt;::value_type
edmonds_karp_max_flow(Graph&amp; g, edmonds_karp_max_flow(Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src, typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink, typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev, CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
ColorMap color, PredEdgeMap pred) ColorMap color, PredEdgeMap pred)
</PRE> </PRE>
@ -48,7 +48,7 @@ Flow Algorithms</a> for a description of maximum flow. The calculated
maximum flow will be the return value of the function. The function maximum flow will be the return value of the function. The function
also calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in also calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
<i>E</i>, which are returned in the form of the residual capacity <i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>. <i>r(u,v) = c(u,v) - f(u,v)</i>.
<p> <p>
There are several special requirements on the input graph and property There are several special requirements on the input graph and property
@ -112,12 +112,12 @@ IN: <tt>vertex_descriptor src</tt>
<blockquote> <blockquote>
The source vertex for the flow network graph. The source vertex for the flow network graph.
</blockquote> </blockquote>
IN: <tt>vertex_descriptor sink</tt> IN: <tt>vertex_descriptor sink</tt>
<blockquote> <blockquote>
The sink vertex for the flow network graph. The sink vertex for the flow network graph.
</blockquote> </blockquote>
<h3>Named Parameters</h3> <h3>Named Parameters</h3>
@ -129,7 +129,7 @@ IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
key type of the map must be the graph's edge descriptor type.<br> key type of the map must be the graph's edge descriptor type.<br>
<b>Default:</b> <tt>get(edge_capacity, g)</tt> <b>Default:</b> <tt>get(edge_capacity, g)</tt>
</blockquote> </blockquote>
OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt> OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote> <blockquote>
This maps edges to their residual capacity. The type must be a model This maps edges to their residual capacity. The type must be a model
@ -228,7 +228,7 @@ from a file in the DIMACS format and computes the maximum flow.
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC <!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
--> -->
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt <!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt

View File

@ -30,77 +30,95 @@
using namespace boost; using namespace boost;
enum
enum { a, b, c, d, e, f, g, h };
enum { _1, _2, _3, _4, _5, _6, _7, _8 };
void test_isomorphism()
{ {
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphA; a,
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphB; b,
c,
d,
e,
f,
g,
h
};
enum
{
_1,
_2,
_3,
_4,
_5,
_6,
_7,
_8
};
char a_names[] = "abcdefgh"; void test_isomorphism()
char b_names[] = "12345678"; {
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphA;
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphB;
GraphA Ga(8); char a_names[] = "abcdefgh";
add_edge(a, d, Ga); char b_names[] = "12345678";
add_edge(a, h, Ga);
add_edge(b, c, Ga);
add_edge(b, e, Ga);
add_edge(c, f, Ga);
add_edge(d, a, Ga);
add_edge(d, h, Ga);
add_edge(e, b, Ga);
add_edge(f, b, Ga);
add_edge(f, e, Ga);
add_edge(g, d, Ga);
add_edge(g, f, Ga);
add_edge(h, c, Ga);
add_edge(h, g, Ga);
GraphB Gb(8); GraphA Ga(8);
add_edge(_1, _6, Gb); add_edge(a, d, Ga);
add_edge(_2, _1, Gb); add_edge(a, h, Ga);
add_edge(_2, _5, Gb); add_edge(b, c, Ga);
add_edge(_3, _2, Gb); add_edge(b, e, Ga);
add_edge(_3, _4, Gb); add_edge(c, f, Ga);
add_edge(_4, _2, Gb); add_edge(d, a, Ga);
add_edge(_4, _3, Gb); add_edge(d, h, Ga);
add_edge(_5, _4, Gb); add_edge(e, b, Ga);
add_edge(_5, _6, Gb); add_edge(f, b, Ga);
add_edge(_6, _7, Gb); add_edge(f, e, Ga);
add_edge(_6, _8, Gb); add_edge(g, d, Ga);
add_edge(_7, _8, Gb); add_edge(g, f, Ga);
add_edge(_8, _1, Gb); add_edge(h, c, Ga);
add_edge(_8, _7, Gb); add_edge(h, g, Ga);
std::vector<std::size_t> in_degree_A(num_vertices(Ga)); GraphB Gb(8);
boost::detail::compute_in_degree(Ga, &in_degree_A[0]); add_edge(_1, _6, Gb);
add_edge(_2, _1, Gb);
add_edge(_2, _5, Gb);
add_edge(_3, _2, Gb);
add_edge(_3, _4, Gb);
add_edge(_4, _2, Gb);
add_edge(_4, _3, Gb);
add_edge(_5, _4, Gb);
add_edge(_5, _6, Gb);
add_edge(_6, _7, Gb);
add_edge(_6, _8, Gb);
add_edge(_7, _8, Gb);
add_edge(_8, _1, Gb);
add_edge(_8, _7, Gb);
std::vector<std::size_t> in_degree_B(num_vertices(Gb)); std::vector< std::size_t > in_degree_A(num_vertices(Ga));
boost::detail::compute_in_degree(Gb, &in_degree_B[0]); boost::detail::compute_in_degree(Ga, &in_degree_A[0]);
degree_vertex_invariant<std::size_t*, GraphA> std::vector< std::size_t > in_degree_B(num_vertices(Gb));
invariantA(&in_degree_A[0], Ga); boost::detail::compute_in_degree(Gb, &in_degree_B[0]);
degree_vertex_invariant<std::size_t*, GraphB>
invariantB(&in_degree_B[0], Gb);
std::vector<graph_traits<GraphB>::vertex_descriptor> f(num_vertices(Ga)); degree_vertex_invariant< std::size_t*, GraphA > invariantA(
&in_degree_A[0], Ga);
degree_vertex_invariant< std::size_t*, GraphB > invariantB(
&in_degree_B[0], Gb);
bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB, std::vector< graph_traits< GraphB >::vertex_descriptor > f(
(invariantB.max)(), num_vertices(Ga));
get(vertex_index, Ga), get(vertex_index, Gb));
assert(ret == true);
for (std::size_t i = 0; i < num_vertices(Ga); ++i) bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB,
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl; (invariantB.max)(), get(vertex_index, Ga), get(vertex_index, Gb));
assert(ret == true);
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
for (std::size_t i = 0; i < num_vertices(Ga); ++i)
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl;
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
} }
int test_main(int, char* []) int test_main(int, char*[])
{ {
test_isomorphism(); test_isomorphism();
return boost::report_errors(); return boost::report_errors();
} }

View File

@ -1,11 +1,11 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) 2004, 2005 The Trustees of Indiana University Copyright (c) 2004, 2005 The Trustees of Indiana University
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
Authors: Douglas Gregor Authors: Douglas Gregor
Jeremiah Willcock Jeremiah Willcock
Andrew Lumsdaine Andrew Lumsdaine
@ -24,10 +24,10 @@ function address(host, user) {
</script> </script>
</head> </head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<tt>erdos_renyi_iterator</tt> <tt>erdos_renyi_iterator</tt>
@ -57,7 +57,7 @@ public:
erdos_renyi_iterator operator++(int); erdos_renyi_iterator operator++(int);
bool operator==(const erdos_renyi_iterator&amp; other) const; bool operator==(const erdos_renyi_iterator&amp; other) const;
bool operator!=(const erdos_renyi_iterator&amp; other) const; bool operator!=(const erdos_renyi_iterator&amp; other) const;
}; };
</PRE> </PRE>
<p> This class template implements a generator for Erd&ouml;s-Renyi <p> This class template implements a generator for Erd&ouml;s-Renyi
@ -149,4 +149,4 @@ Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")<
</TD></TR></TABLE> </TD></TR></TABLE>
</BODY> </BODY>
</HTML> </HTML>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek 2002 Copyright (c) Jeremy Siek 2002
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: Exceptions</Title> <Title>Boost Graph Library: Exceptions</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>

View File

@ -1,17 +1,17 @@
<HTML> <HTML>
<!-- <!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) http://www.boost.org/LICENSE_1_0.txt)
--> -->
<Head> <Head>
<Title>Boost Graph Library: FAQ</Title> <Title>Boost Graph Library: FAQ</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000"> ALINK="#ff0000">
<IMG SRC="../../../boost.png" <IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"> ALT="C++ Boost" width="277" height="86">
<BR Clear> <BR Clear>
@ -76,8 +76,8 @@ convenient. Granted, this is not a huge difference, but since there
weren't other strong reasons, it was enough for us to choose free weren't other strong reasons, it was enough for us to choose free
functions. functions.
</p> </p>
<p> <p>
Our religious reason for choosing free functions is to send the message Our religious reason for choosing free functions is to send the message
that BGL is a generic library, and not a traditional object-oriented that BGL is a generic library, and not a traditional object-oriented
library. OO was hip in the 80s and 90s, but its time we moved beyond! library. OO was hip in the 80s and 90s, but its time we moved beyond!
@ -124,13 +124,13 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
not being found, such as: not being found, such as:
<pre> <pre>
../../../boost/concept_check.hpp:209: no match for ../../../boost/concept_check.hpp:209: no match for
`boost::detail::error_property_not_found &amp; == `boost::detail::error_property_not_found &amp; ==
boost::detail::error_property_not_found &amp;' boost::detail::error_property_not_found &amp;'
</pre> </pre>
or a message such as: or a message such as:
<pre> <pre>
../../..\boost/graph/depth_first_search.hpp(78) : error C2664: 'white' ../../..\boost/graph/depth_first_search.hpp(78) : error C2664: 'white'
: cannot convert parameter 1 from : cannot convert parameter 1 from
'struct boost::detail::error_property_not_found' 'struct boost::detail::error_property_not_found'
to 'enum boost::default_color_type' to 'enum boost::default_color_type'
</pre> </pre>

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Portrait Portrait
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

View File

@ -2,7 +2,7 @@
Landscape Landscape
Center Center
Inches Inches
Letter Letter
100.00 100.00
Single Single
-2 -2

Some files were not shown because too many files have changed in this diff Show More