2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-19 04:12:11 +00:00

This commit was manufactured by cvs2svn to create branch

'unlabeled-1.6.2'.

[SVN r9380]
This commit is contained in:
nobody
2001-03-02 15:57:15 +00:00
parent 13cda0a4df
commit ad3bbb2c3e
334 changed files with 0 additions and 46063 deletions

100
LICENSE
View File

@@ -1,100 +0,0 @@
COPYRIGHT NOTICE:
Copyright 1997-2000, University of Notre Dame.
Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
The Boost Graph Library "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less free fashion, plus the right to make
reasonable modifications.
Definitions
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files created
through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes of the
Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or copyrights for the package.
"You" is you, if you're thinking about copying or distributing this Package.
"Reasonable copying fee" is whatever you can justify on the basis of
media cost, duplication charges, time of people involved, and so
on. (You will not be required to justify it to the Copyright Holder,
but only to the computing community at large as a market that must
bear the fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same
conditions they received it.
1. You may make and give away verbatim copies of the source form of
the Standard Version of this Package without restriction, provided
that you duplicate all of the original copyright notices and
associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way,
provided that you insert a prominent notice in each changed file
stating how and when you changed that file, and provided that you do
at least ONE of the following:
a. place your modifications in the Public Domain or otherwise make
them Freely Available, such as by posting said modifications to Usenet
or an equivalent medium, or placing the modifications on a major
archive site such as uunet.uu.net, or by allowing the Copyright Holder
to include your modifications in the Standard Version of the Package.
b. use the modified Package only within your corporation or organization.
c. rename any non-standard types and functions so the names do not
conflict with Standard Vibrary, which must also be provided, and
provide a separate documentation for each non-standard type of function
that clearly documents how it differs from the Standard Version.
d. make other distribution arrangements with the Copyright Holder.
4. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial)
software distribution provided that you do not advertise this Package
as a product of your own.
5. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
DISCLAIMER:
LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
By way of example, but not limitation, Licensor MAKES NO
REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
OR OTHER RIGHTS.
The Authors and the University of Notre Dame du Lac shall not be held
liable for any liability nor for any direct, indirect or consequential
damages with respect to any claim by LICENSEE or any third party on
account of or arising from this Agreement or use of this software.
Any disputes arising out of this Agreement or LICENSEE'S use of the
software at any time shall be resolved by the courts of the state of
Indiana. LICENSEE hereby consents to the jurisdiction of the Indiana
courts and waives the right to challenge the jurisdiction thereof in
any dispute arising out of this Agreement or Licensee's use of the
software.

View File

@@ -1,164 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>AdjacencyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:AdjacencyGraph"></A>
AdjacencyGraph
</H2>
The AdjacencyGraph concept provides and interface for efficient access
of the adjacent vertices to a vertex in a graph. This is quite similar
to the <a href="./IncidenceGraph.html">IncidenceGraph</a> concept (the
target of an out-edge is an adjacent vertex). Both concepts are
provided because in some contexts there is only concern for the
vertices, whereas in other contexts the edges are also important.
<H3>Refinement of</H3>
<a href="Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>v</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<H3>Associated Types</H3>
<Table border>
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::adjacency_iterator</pre>
An adjacency iterator for a vertex <i>v</i> provides access to the
vertices adjacent to <i>v</i>. As such, the value type of an
adjacency iterator is the vertex descriptor type of its graph. An
adjacency iterator must meet the requirements of <a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
</TD>
</TR>
</table>
<h3>Valid Expressions</h3>
<table border>
<tr>
<td><a name="sec:adjacent-vertices"><TT>adjacent_vertices(v,&nbsp;g)</TT></a></TD>
<TD>
Returns an iterator-range providing access to the vertices adjacent to
vertex <TT>v</TT> in graph <TT>g</TT>.<a
href="adjacencygraph.html#1">[1]</a>
<br> Return type:
<TT>std::pair&lt;adjacency_iterator,&nbsp;adjacency_iterator&gt;</TT>
</TD>
</TR>
</table>
<H3>Complexity guarantees</H3>
The <TT>adjacent_vertices()</TT> function must return in constant time.
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct AdjacencyGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::adjacency_iterator
adjacency_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; &gt;();
p = adjacent_vertices(v, g);
v = *p.first;
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = adjacent_vertices(v, g);
}
std::pair&lt;adjacency_iterator,adjacency_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
G g;
};
</PRE>
<h3>Design Rationale</h3>
The AdjacencyGraph concept is somewhat frivolous since <a
href="./IncidenceGraph.html">IncidenceGraph</a> really covers the same
functionality (and more). The AdjacencyGraph concept exists because
there are situations when <tt>adjacent_vertices()</tt> is more
convenient to use than <tt>out_edges()</tt>. If you are constructing a
graph class and do not want to put in the extra work of creating an
adjacency iterator, have no fear. There is an adaptor class in
<tt>boost/graph/detail/adjacency_iterator.hpp</tt> that you can use to
create an adjacency iterator out of an out-edge iterator.
<h3>Notes</h3>
<a name="1">[1]</a> The case of a
<I>multigraph</I> (where multiple edges can connect the same two
vertices) brings up an issue as to whether the iterators returned by
the <TT>adjacent_vertices()</TT> function access a range that
includes each adjacent vertex once, or whether it should match the
behavior of the <TT>out_edges()</TT> function, and access a
range that may include an adjacent vertex more than once. For now the
behavior is defined to match that of <TT>out_edges()</TT>,
though this decision may need to be reviewed in light of more
experience with graph algorithm implementations.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,90 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>AdjacencyMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:AdjacencyMatrix"></A>
AdjacencyMatrix
</H2>
<P>
The AdjacencyMatrix concept refines <a href="./Graph.html">Graph</a>
concept and adds the requirement for efficient access to any edge in
the graph given the source and target vertices. No Boost Graph Library
algorithms currently use this concept. However there are algorithms
not yet implemented such as Floyd-Warshall that would require this
concept.
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a>
<H3>Valid Expressions</H3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Direct Edge Access</td>
<TD><TT>edge(u,v,g)</TT></TD>
<TD><TT>std::pair&lt;edge_descriptor, bool&gt;</TT></TD>
<TD>
Returns a pair consisting of a flag saying whether there exists an
edge between <TT>u</TT> and <TT>v</TT> in graph <TT>g</TT>, and
consisting of the edge descriptor if the edge was found.
</TD>
</TR>
</TABLE>
<H3>Models</H3>
No models of this concept are currently in the Boost Graph Library.
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct AdjacencyMatrix
{
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
p = edge(u, v, g);
}
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
std::pair&lt;bool, edge_descriptor&gt; p;
G g;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,202 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: BFSVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>BFSVisitor Concept</H1>
This concept defines the visitor interface for <a
href="./breadth_first_search.html"><tt>breadth_first_search()</tt></a>.
Users can define a class with the BFSVisitor interface and pass and
object of the class to <tt>breadth_first_search()</tt>, thereby
augmenting the actions taken during the graph search.
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of BFSVisitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>s,u</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(s, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every vertex of the graph before the start of the
graph search.
</td>
</tr>
<tr>
<td>Discover Vertex</td>
<td><tt>vis.discover_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex is encountered for the first time.
</td>
</tr>
<tr>
<td>Examine Vertex</td>
<td><tt>vis.examine_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on a vertex as it is popped from the queue. This
happens immediately before <tt>examine_edge()</tt> is invoked
on each of the out-edges of vertex <tt>u</tt>.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every out-edge of each vertex after it is discovered.
</td>
</tr>
<tr>
<td>Tree Edge</td>
<td><tt>vis.tree_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each edge as it becomes a member of the edges that
form the search tree.</td>
</tr>
<tr>
<td>Non-Tree Edge</td>
<td><tt>vis.non_tree_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on back or cross edges for directed graphs and cross
edges for undirected graphs.
</td>
</tr>
<tr>
<td>Gray Target</td>
<td><tt>vis.gray_target(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the subset of non-tree edges who's target vertex is
colored gray at the time of examination. The color gray indicates
that the vertex is currently in the queue.
</td>
</tr>
<tr>
<td>Black Target</td>
<td><tt>vis.black_target(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the subset of non-tree edges who's target vertex is
colored black at the time of examination. The color black indicates
that the vertex has been removed from the queue.
</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This invoked on a vertex after all of its out edges have been added to the
search tree and all of the adjacent vertices have been discovered
(but before their out-edges have been examined).
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>
</ul>
<h3>See also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,175 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: BellmanFordVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>BellmanFordVisitor Concept</H1>
This concept defines the visitor interface for <a
href="./bellman_ford_shortest.html"><tt>bellman_ford_shortest_paths()</tt></a>.
Users can define a class with the BellmanFordVisitor interface and
pass and object of the class to <tt>bellman_ford_shortest_paths()</tt>,
thereby augmenting the actions taken during the graph search.
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of BellmanFordVisitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>s,u</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(s, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every vertex of the graph before the start of the
graph search.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every edge in the graph <tt>num_vertices(g)</tt> times.
</td>
</tr>
<tr>
<td>Edge Relaxed</td>
<td><tt>vis.edge_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if the following condition holds then the edge
is relaxed (its distance is reduced), and this method is invoked.<br>
<tt>
tie(u,v) = incident(e, g);<br>
D d_u = get(d, u), d_v = get(d, v);<br>
W w_e = get(w, e);<br>
assert(compare(combine(d_u, w_e), d_v));<br>
</tt>
</td>
</tr>
<tr>
<td>Edge Not Relaxed</td>
<td><tt>edge_not_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if the edge is not relaxed (see above) then
this method is invoked.
</td>
</tr>
<tr>
<td>Edge Minimized</td>
<td><tt>vis.edge_minimized(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
After the <tt>num_vertices(g)</tt> iterations through the edge set
of the graph is complete, one last iteration is made to test whether
each edge was minimized. If the edge is minimized then this function
is invoked.
</td>
</tr>
<tr>
<td>Edge Not Minimized</td>
<td><tt>edge_not_minimized(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
If the edge is not minimized, this function is invoked. This happens
when there is a negative cycle in the graph.
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./bellman_visitor.html"><tt>bellman_visitor</tt></a>
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,173 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Bidirectional</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2>
<A NAME="concept:BidirectionalGraph"></A>
BidirectionalGraph
</H2>
<P>
The BidirectionalGraph concept refines <a
href="./IncidenceGraph.html">IncidenceGraph</a> and adds the
requirement for efficient access to the in-edges of each vertex. This
concept is separated from <a
href="./IncidenceGraph.html">IncidenceGraph</a> because for directed
graphs efficient access to in-edges typically requires more storage
space, and many algorithms do not require access to in-edges. For
undirected graphs this is not an issue, since the <TT>in_edges()</TT>
and <TT>out_edges()</TT> functions are the same, they both return the
edges incident to the vertex.
<H3>Refinement of</H3>
<a href="./IncidenceGraph.html">IncidenceGraph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>v</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<H3>Associated Types</H3>
<Table border>
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::in_edge_iterator</pre>
An in-edge iterator for a vertex <i>v</i> provides access to the
in-edges of <i>v</i>. As such, the value type of an in-edge iterator
is the edge descriptor type of its graph. An in-edge iterator must
meet the requirements of <a href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
</TD>
</TR>
</Table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<td><a name="sec:in-edges"><TT>in_edges(v, g)</TT></a></TD>
<TD>
Returns an iterator-range providing access to the
in-edges (for directed graphs) or incident edges (for
undirected graphs) of vertex <TT>v</TT> in graph <TT>g</TT>.
For both directed and undirected graphs, the target of
an out-edge is required to be vertex <tt>v</tt> and the
source is required to be a vertex that is adjacent to <tt>v</tt>.
<br>
Return type: <TT>std::pair&lt;in_edge_iterator, in_edge_iterator&gt;</TT>
</TD>
</TR>
<tr>
<TD><TT>in_degree(v, g)</TT></TD>
<TD>
Returns the number of in-edges (for directed graphs) or the
number of incident edges (for undirected graphs) of vertex <TT>v</TT>
in graph <TT>g</TT>.<br>
Return type: <TT>degree_size_type</TT>
</TD>
</TR>
<tr>
<TD><TT>degree(v, g)</TT></TD>
<TD>Returns the number of in-edges plus out-edges (for directed graphs) or the
number of incident edges (for undirected graphs) of vertex <TT>v</TT>
in graph <TT>g</TT>.<br>
Return type: <TT>degree_size_type</TT>
</TD>
</TR>
</Table>
<H3>Models</H3>
<ul>
<li><a href="./adjacency_list.html"><tt>adjacency_list</tt></a> with <tt>Directed=bidirectionalS</tt></li>
<li><a href="./adjacency_list.html"><tt>adjacency_list</tt></a> with <tt>Directed=undirectedS</tt></li>
</ul>
<H3>Complexity guarantees</H3>
The <TT>in_edges()</TT> function is required to be constant time. The
<tt>in_degree()</tt> and <tt>degree()</tt> functions must be linear in
the number of in-edges (for directed graphs) or incident edges (for
undirected graphs).
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct BidirectionalGraph_concept
{
typedef typename boost::graph_traits&lt;G&gt;::in_edge_iterator
in_edge_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; &gt;();
p = in_edges(v, g);
e = *p.first;
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = in_edges(v, g);
e = *p.first;
}
std::pair&lt;in_edge_iterator, in_edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
G g;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,123 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Buffer</Title>
</HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h3>Buffer Concept</h3>
A Buffer is something in which items can be put and removed.
The Buffer <i>concept</i> has very few requirements. It does
not require any particular ordering of how the items are stored or in
what order they will appear when removed, however, there is typically
some sort of ordering policy.
<h3>Notation</h3>
<table>
<tr> <td> <tt>B</tt> </td> <td> is a type that models Buffer. </td></tr>
<tr> <td> <tt>T</tt> </td> <td> is the value type of <tt>B</tt>. </td></tr>
<tr> <td> <tt>t</tt> </td> <td> is an object of type <tt>T</tt>. </td></tr>
</table>
<h3>Members</h3>
For a type to model the Buffer concept it must have the following members.
<p>
<table border="1">
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <tt>value_type</tt> </td>
<td> The type of object stored in the Buffer. The value type
must be <A href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.</td>
</tr>
<tr> <td> <tt>size_type</tt> </td>
<td> An unsigned integral type for representing the number of
objects in the Buffer.</td>
</tr>
<tr> <td> <tt>void push(const T& t)</tt> </td>
<td> Inserts <tt>t</tt> into the Buffer. <tt>size()</tt> will be
incremented by one.</td>
</tr>
<tr> <td> <tt>void pop()</tt> </td>
<td> Removes an object from the Buffer. <tt>size()</tt> will be
decremented by one. Precondition: <tt>empty()</tt>
is <tt>false</tt>. </td>
</tr>
<tr> <td> <tt>T& top()</tt> </td>
<td> Returns a mutable reference to some object in the Buffer.
Precondition: <tt>empty()</tt> is <tt>false</tt>.</td>
</tr>
<tr> <td> <tt>const T& top() const</tt> </td>
<td> Returns a const reference to some object in the Buffer.
Precondition: <tt>empty()</tt> is <tt>false</tt>.</td>
</tr>
<tr> <td> <tt>void size() const</tt> </td>
<td> Returns the number of objects in the Buffer.
Invariant: <tt>size() >= 0</tt>. </td>
</tr>
<tr> <td> <tt>bool empty() const</tt> </td>
<td> Equivalent to <tt>b.size() == 0</tt>.</td>
</tr>
</table>
<h3>Complexity Guarantees</h3>
<UL>
<LI> <tt>push()</tt>, <tt>pop()</tt>, and <tt>size()</tt> must be at
most linear time complexity in the size of the Generalized Queue.
<LI> <tt>top()</tt> and <tt>empty()</tt> must be amortized constant time.
</UL>
<h3>Models</h3>
<UL>
<LI><a href="http://www.sgi.com/tech/stl/stack.html"><tt>std::stack</tt></a>
<LI><a href="../../pri_queue/queue.html"><tt>boost::queue</tt></a>
<LI><a href="../../pri_queue/p_queue.html"><tt>boost::priority_queue</tt></a>
</UL>
<p>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame and C++ Library & Compiler Group/SGI (<A HREF="mailto:jsiek@engr.sgi.com">jsiek@engr.sgi.com</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,112 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: ColorValue Concept</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="concept:ColorValue"></A>
ColorValue
</H1>
<P>
This concept describes the requirements for the type used for color
values, as in for coloring a graph during a breath-first search to
mark which vertices have been visited.
<P>
<h3>Refinement of</h3> <a
href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>
and <a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>T</tt></TD>
<TD>A type that is a model of ColorValue.</TD>
</TR>
<TR>
<TD><tt>cv</tt></TD>
<TD>An object of type <tt>T</tt>.</TD>
</TR>
</table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Get Color White </td>
<TD><TT>color_traits&lt;T&gt;::white()</TT></TD>
<TD><TT>T</TT></TD>
<TD>Returns an object that represents the color white.</TD>
</TR>
<tr>
<td>Get Color Gray </td>
<TD><TT>color_traits&lt;T&gt;::gray()</TT></TD>
<TD><TT>T</TT></TD>
<TD>Returns an object that represents the color gray.</TD>
</TR>
<tr>
<td>Get Color Black </td>
<TD><TT>color_traits&lt;T&gt;::black()</TT></TD>
<TD><TT>T</TT></TD>
<TD>Returns an object that represents the color black.</TD>
</TR>
</TABLE>
<P>
</LI>
</UL>
<h3>Models</h3>
<ul>
<li><tt>default_color_type</tt> (in <a href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt>)
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,184 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>DFSVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>DFSVisitor Concept</H1>
This concept defines the visitor interface for <a
href="./depth_first_search.html"><tt>depth_first_search()</tt></a>.
Users can define a class with the DFSVisitor interface and pass and
object of the class to <tt>depth_first_search()</tt>, thereby
augmenting the actions taken during the graph search.
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of DFSVisitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>s,u</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(s, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every vertex of the graph before the start of the
graph search.
</td>
</tr>
<tr>
<td>Start Vertex</td>
<td><tt>vis.start_vertex(s, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the source vertex once before the start of the
search.
</td>
</tr>
<tr>
<td>Discover Vertex</td>
<td><tt>vis.discover_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex is encountered for the first time.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every out-edge of each vertex after it is discovered.
</td>
</tr>
<tr>
<td>Tree Edge</td>
<td><tt>vis.tree_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each edge as it becomes a member of the edges that
form the search tree.</td>
</tr>
<tr>
<td>Back Edge</td>
<td><tt>vis.back_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the back edges in the graph.
</td>
</tr>
<tr>
<td>Forward or Cross Edge</td>
<td><tt>vis.forward_or_cross_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on forward or cross edges in the graph. In an
undirected graph this method is never called.
</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This invoked on a vertex after all of its out edges have been added to the
search tree and all of the adjacent vertices have been discovered
(but before their out-edges have been examined).
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,182 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>EdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:EdgeListGraph"></A>
EdgeListGraph
</H2>
The EdgeListGraph concept refines the <a href="./Graph.html">Graph</a>
concept, and adds the requirement for efficient access to all the
edges in the graph.
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of EdgeListGraph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
</table>
<H3>Associated Types</H3>
<table border>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::edge_iterator</pre>
An edge iterator (obtained via <TT>edges(g)</TT>) provides access to
all of the edges in a graph. An edge iterator type must meet the
requirements of <a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>. The
value type of the edge iterator must be the same as the edge
descriptor of the graph.
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::edges_size_type</pre>
The unsigned integer type used to represent the number of edges in the
graph.
</td>
</tr>
</table>
<h3>Valid Expressions</h3>
<table border>
<tr>
<TD><a name="sec:edges"><TT>edges(g)</TT></a></TD>
<TD>Returns an iterator-range providing access to all
the edges in the graph <TT>g</TT>.<br>
Return type: <TT>std::pair&lt;edge_iterator, edge_iterator&gt;</TT>
</td>
</TR>
<tr>
<TD><TT>num_edges(g)</TT></TD>
<TD>Returns the number of edges in the graph <TT>g</TT>.<br>
Return type: <TT>edges_size_type</TT>
</td>
</TR>
<tr>
<TD><TT>source(e, g)</TT></TD>
<TD>
Returns the vertex descriptor for <i>u</i> of the edge <i>(u,v)</i>
represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT>
</td>
</tr>
<tr>
<TD><TT>target(e, g)</TT></TD>
<TD>
Returns the vertex descriptor for
<i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT>
</TD>
</TR>
</TABLE>
<H3>Models</H3>
<UL>
<LI><a href="./adjacency_list.html"><TT>adjacency_list</TT></a></LI>
<LI><a href="./edge_list.html"><TT>edge_list</TT></a></LI>
</UL>
<H3>Complexity guarantees</H3>
The <TT>edges()</TT>, <TT>source()</TT>, and <TT>target()</TT> functions
must all return in constant time.
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Concept Checking Class</H3>
<P>
<PRE>
template &lt;class G&gt;
struct EdgeListGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::edge_iterator
edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;edge_iterator&gt; &gt;();
p = edges(g);
E = num_edges(g);
e = *p.first;
u = source(e, g);
v = target(e, g);
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = edges(g);
E = num_edges(g);
e = *p.first;
u = source(e, g);
v = target(e, g);
}
std::pair&lt;edge_iterator,edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
typename boost::graph_traits&lt;G&gt;::edges_size_type E;
G g;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,165 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: EventVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>EventVisitor Concept</H1>
This concept defines the interface for single-event visitors. An
EventVisitor has an apply member function (<tt>operator()</tt>) which
is invoked within the graph algorithm at the event-point specified by
the <tt>event_filter</tt> typedef within the
EventVisitor. EventVisitor's can be combined into an <a
href="./EventVisitorList.html">EventVistorList</a>.
<p>
The following is the list of event tags that can be invoked in BGL
algorithms. Each tag corresponds to a member function of the visitor
for an algorithm. For example, the <a
href="./BFSVisitor.html">BFSVisitor</a> of <a
href="./breadth_first_search.html"><tt>breadth_first_search()</tt></a>
has a <tt>cycle_edge()</tt> member function. The corresponding tag is
<tt>on_cycle_edge</tt>. The first argument is the event visitor's
<tt>operator()</tt> must be either an edge or vertex descriptor
depending on the event tag.
<pre>
namespace boost {
struct on_initialize_vertex { };
struct on_start_vertex { };
struct on_discover_vertex { };
struct on_examine_edge { };
struct on_tree_edge { };
struct on_cycle_edge { };
struct on_finish_vertex { };
struct on_forward_or_cross_edge { };
struct on_back_edge { };
struct on_edge_relaxed { };
struct on_edge_not_relaxed { };
struct on_edge_minimized { };
struct on_edge_not_minimized { };
} // namespace boost
</pre>
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of <a href="./Graph.html">Graph</a>.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of EventVisitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>x</tt></TD>
<TD>An object of type
<tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>
or <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
<Table border>
<TR>
<TD>Event Filter </TD>
<TD><TT>V::event_filter</TT></TD>
<TD>
A tag struct to specify on which event the visitor should be invoked.
</TD>
</TR>
</table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Apply Visitor</td>
<td><TT>vis(x, g)</TT></TD>
<TD><TT>void</TT></TD>
<TD>
Invokes the visitor operation on object <tt>x</tt>, which is
either a vertex or edge descriptor of the graph.
</TD>
</TR>
</table>
<h3>Models</h3>
<ul>
<li><a
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>
<li><a href="./distance_recorder.html"><tt>distance_recorder</tt></a>
<li><a href="./time_stamper.html"><tt>time_stamper</tt></a>
<li><a href="./property_writer.html"><tt>property_writer</tt></a>
<li><a href="./null_visitor.html"><tt>null_visitor</tt></a>
</ul>
<h3>See Also</h3>
<a href="./EventVisitorList.html">EventVisitorList</a>,
<a href="./visitor_concepts.html">Visitor concepts</a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,131 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: EventVisitorList</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>EventVisitorList Concept</H1>
An EventVisitorList is either an <a
href="./EventVisitor.html">EventVisitor</a>, or a list of
EventVisitor's combined using <tt>std::pair</tt>. Each graph algorithm
defines visitor adaptors that convert an EventVisitorList into the
particular kind of visitor needed by the algorithm.
In the following example we will show how to combine event visitors
into a list using <tt>std::pair</tt> and how to use an algorithm's
visitor adaptor class.
<p>
Suppose we would like to print out the parenthesis
structure of the discover/finish times of vertices in a <a
href="./graph_theory_review.html#sec:dfs-algorithm">depth-first
search</a>. We can use the BGL algorithm <a
href="./depth_first_search.html"><tt>depth_first_search()</tt></a> and
two event visitors to accomplish this. The complete source code for
the following example is in <a href="../example/dfs_parenthesis.cpp">
<tt>examples/dfs_parenthesis.cpp</tt></a>. First we define the two
event visitors. We use <tt>on_discover_vertex</tt> and
<tt>on_finish_vertex</tt> as the event points, selected from the list
of event points specified in <a
href="./DFSVisitor.html">DFSVisitor</a>.
<pre>
struct open_paren : public base_visitor&lt;open_paren&gt; {
typedef on_discover_vertex event_filter;
template &lt;class Vertex, class Graph&gt;
void operator()(Vertex v, Graph& G) {
std::cout &lt;&lt; "(" &lt;&lt; v;
}
};
struct close_paren : public base_visitor&lt;close_paren&gt; {
typedef on_finish_vertex event_filter;
template &lt;class Vertex, class Graph&gt;
void operator()(Vertex v, Graph& G) {
std::cout &lt;&lt; v &lt;&lt; ")";
}
};
</pre>
Next we create two event visitor objects and make an EventVisitorList
out of them using a <tt>std::pair</tt> which created by
<tt>std::make_pair</tt>.
<pre>
std::make_pair(open_paren(), close_paren())
</pre>
Next we want to pass this list into <tt>depth_first_search()</tt>, but
<tt>depth_first_search()</tt> is expecting a <a
href="./DFSVisitor.html">DFSVisitor</a>, not a EventVisitorList. We
therefore use the <a
href="./dfs_visitor.html"><tt>dfs_visitor</tt></a> adaptor which turns
an EventVisitor list into a DFSVisitor. Like all of the visitor
adaptors, <tt>dfs_visitor</tt> has a creation function called
<tt>make_dfs_visitor()</tt>.
<pre>
make_dfs_visitor(std::make_pair(open_paren(), close_paren()))
</pre>
Now we can pass the resulting visitor object into
<tt>depth_first_search()</tt> as follows.
<pre>
// graph object G is created ...
std::vector&lt;default_color_type&gt; color(num_vertices(G));
depth_first_search(G, make_dfs_visitor(std::make_pair(open_paren(), close_paren())),
color.begin());
</pre>
For creating a list of more than two event visitors, nest calls to
<tt>std::make_pair</tt> in the following way:
<pre>
std::make_pair(<i>visitor1</i>,
std::make_pair(<i>visitor2</i>,
...
std::make_pair(<i>visitorN-1</i>, <i>visitorN</i>)...));
</pre>
<h3>See Also</h3>
<a href="./EventVisitor.html">EventVisitor</a>,
<a href="./visitor_concepts.html">Visitor concepts</a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,133 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:Graph"></A>
Graph
</H2>
<P>
The Graph concept contains a few requirements that are common to all
the graph concepts. These include some associated types for
<tt>vertex_descriptor</tt>, <tt>edge_descriptor</tt>, etc., and the
<tt>num_vertices()</tt> and <tt>num_edges()</tt> functions. One should
note that a model of Graph is <B>not</B> required to be a model of <a
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
so algorithms should pass graph objects by reference.
<P>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
</table>
<H3>Associated Types</H3>
<table border>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::vertex_descriptor</pre>
A vertex descriptor corresponds to a unique vertex in an abstract
graph instance. A vertex descriptor must be
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>,
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>, and
<a href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>.
</td>
</tr>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::edge_descriptor</pre>
An edge descriptor corresponds to a unique edge <i>(u,v)</i> in a
graph. An edge descriptor must be <a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</I>,
<a
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
and <a href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>.
</td>
</tr>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::directed_category</pre>
The choices are <TT>directed_tag</TT> and <TT>undirected_tag</TT>.
</td>
</tr>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::edge_parallel_category</pre>
This describes whether the graph class allows the insertion of
parallel edges (edges with the same source and target). The two tags
are <TT>allow_parallel_edge_tag</TT> and <TT>disallow_parallel_edge_tag</TT>.
</td>
</tr>
</table>
<H3>Valid Expressions</H3>
None required.
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct GraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
typedef typename boost::graph_traits&lt;G&gt;::directed_category directed_category;
typedef typename boost::graph_traits&lt;G&gt;::edge_parallel_category edge_parallel_category;
void constraints() {
function_requires&lt; DefaultConstructibleConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; DefaultConstructibleConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;edge_descriptor&gt; &gt;();
}
G g;
};
</PRE>
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,199 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>IncidenceGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="concept:IncidenceGraph"></A>
IncidenceGraph
</H1>
The IncidenceGraph concept provides an interface for
efficient access to the out-edges of each vertex in the graph.
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of IncidenceGraph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>u, v</tt></TD>
<TD>Are objects of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<H3>Associated Types</H3>
<Table border>
<TR>
<TD>
<pre>boost::graph_traits&lt;G&gt;::out_edge_iterator</pre>
An out-edge iterator for a vertex <i>v</i> provides access to the
out-edges of the vertex. As such, the value type of an out-edge
iterator is the edge descriptor type of its graph. An out-edge
iterator must meet the requirements of <a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
</TD>
</TR>
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::degree_size_type</pre>
The unsigned intergral type used for representing the number
out-edges or incident edges of a vertex.
</TD>
</TR>
</table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<td><a name="sec:source"><TT>source(e, g)</TT></a></TD>
<TD>Returns the vertex descriptor for <i>u</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT>
</TD>
</TR>
<tr>
<td><a name="sec:target"><TT>target(e, g)</TT></a></TD>
<TD>Returns the vertex descriptor for <i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT>
</td></tr>
<tr>
<td><a name="sec:out-edges"><TT>out_edges(u, g)</TT></a></TD>
<TD>Returns an iterator-range providing access to the out-edges (for
directed graphs) or incident edges (for undirected graphs) of vertex
<TT>u</TT> in graph <TT>g</TT>. The source vertex of an edge obtained
via and out edge iterator is guaranteed (for both directed and
undirected graphs) to be the vertex <tt>u</tt> used in the call to
<tt>out_edges(u, g)</tt> and the target vertex must the a vertex
adjacent to <tt>u</tt>.<a href="">[1]</a>
<br>
Return type: <TT>std::pair&lt;out_edge_iterator, out_edge_iterator&gt;</TT>
</TD>
</tr>
<tr>
<TD><TT>out_degree(u, g)</TT></TD>
<TD>Returns the number of out-edges (for directed graphs) or the
number of incident edges (for undirected graphs) of vertex <TT>u</TT>
in graph <TT>g</TT>.<br>
Return type: <TT>degree_size_type</TT>
</TD>
</TR>
</TABLE>
<P>
<H3>Complexity guarantees</H3>
<P>
The <TT>source()</TT>, <TT>target()</TT>, and <TT>out_edges()</TT>
functions must all be constant time. The <tt>out_degree()</tt>
function must be linear in the number of out-edges.
<P>
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Notes</H3>
<a name="1">[1]</a> For undirected graphs, the edge <tt>(u,v)</tt> is
the same as edge <tt>(v,u)</tt>, so without some extra guarantee an
implementation would be free use any ordering for the pair of vertices
in an out-edge. For example, if you call <tt>out_edges(u, g)</tt>, and
<tt>v</tt> is one of the vertices adjacent to <tt>u</tt>, then the
implementation would be free to return <tt>(v,u)</tt> as an out-edge
which would be non-intuitive and cause trouble for algorithms.
Therefore, the extra requirement is added that the out-edge connecting
<tt>u</tt> and <tt>v</tt> must be given as <tt>(u,v)</tt> and not
<tt>(v,u)</tt>.
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct IncidenceGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::out_edge_iterator out_edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;out_edge_iterator&gt; &gt;();
p = out_edges(v, g);
e = *p.first;
u = source(e, g);
v = target(e, g);
}
void const_constraints(const G&amp; g) {
p = out_edges(v, g);
e = *p.first;
u = source(e, g);
v = target(e, g);
}
std::pair&lt;out_edge_iterator, out_edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
G g;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,165 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>IteratorConstructibleGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="concept:IteratorConstructibleGraph"></A>
IteratorConstructibleGraph
</H1>
The IteratorConstructibleGraph concept describes the interface for
graph types that can be constructed using a kind of edge iterator. The
edge iterator can be any <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
that dereferences to a pair of integers <i>(i,j)</i>, which represent
an edge that should be in the graph. The two integers <i>i</i> and
<i>j</i> represent vertices where <i>0 <= i < |V|</i> and <i>0 <= j <
|V|</i>. The edge iterator's value type should be
<tt>std::pair&lt;T,T&gt;</tt> (or at least be a structure that has
members <tt>first</tt> and <tt>second</tt>) and the value type
<tt>T</tt> of the pair must be convertible to the
<tt>vertices_size_type</tt> of the graph (an integer).
There are two valid expressions required by this concept, both of
which are constructors. The first creates a graph object from a
first/last iterator range. The second constructor also takes a
first/last iterator range and in addition requires the number of
vertices and number of edges. For some graph and edge iterator types
the second constructor can be more efficient than the first.
<h3>Example</h3>
The following exampe creates two graph objects from an array of edges
(vertex pairs). The type <tt>Edge*</tt> satisfies the requirements for
an <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
and can therefore be used to construct a graph.
<pre>
typedef ... IteratorConstructibleGraph;
typedef boost::graph_traits<IteratorConstructibleGraph> Traits;
typedef std::pair<Traits::vertices_size_type,
Traits::vertices_size_type> Edge;
Edge edge_array[] =
{ 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(2, 4), Edge(2,5),
Edge(3, 2),
Edge(4, 3), Edge(4,1),
Edge(5, 4) };
Edge* first = edge_array,
last = edge_array + sizeof(edge_array)/sizeof(Edge);
IteratorConstructibleGraph G1(first, last);
// do something with G1 ...
Traits::vertices_size_type size_V = 6;
Traits::edges_size_type size_E = sizeof(edge_array)/sizeof(Edge);
IteratorConstructibleGraph G2(first, last, size_V, size_E);
// do something with G2 ...
</pre>
<h3>Refinement of</h3>
<a href="Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<tr>
<td><tt>G</tt></td>
<td>is a graph type that models IteratorConstructibleGraph.</td>
<tr>
<tr>
<td><tt>g</tt></td>
<td>is an object of type <tt>G</tt>.</td>
</tr>
<tr>
<td><tt>first, last</tt></td>
<td>are edge iterators (see above).</td>
</tr>
<tr>
<td><tt>Tr</tt></td>
<td>is an object of type <tt>graph_traits&lt;G&gt;</tt>.</td>
</tr>
<tr>
<td><tt>n_vertices</tt></td>
<td>is an object of type <tt>Tr::vertices_size_type</tt>.</td>
</tr>
<tr>
<td><tt>n_edges</tt></td>
<td>is an object of type <tt>Tr::edges_size_type</tt>.</td>
</tr>
</Table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<td>
<pre>G g(first, last);</pre>
Construct graph object <tt>g</tt> given an edge range <tt>[first,last)</tt>.
</td>
<tr>
<tr>
<td>
<pre>G g(first, last, n_vertices, n_edges);</pre>
Construct graph object <tt>g</tt> given an edge range
<tt>[first,last)</tt>, the number of vertices, and the number of
edges. Sometimes this constructor is more efficient than the
constructor lacking the graph size information.
</td>
</tr>
</Table>
<!--
<H3>Concept Checking Class</H3>
<PRE>
</PRE>
-->
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,303 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>MutableGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="sec:MutableGraph"></A>
MutableGraph
</H2>
A MutableGraph can be changed via the addition or removal of
edges and vertices.
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>u,v</tt></TD>
<TD>are objects of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>iter</tt></TD>
<TD>is an object of type <tt>boost::graph_traits&lt;G&gt;::out_edge_iterator</tt>.</TD>
</TR>
<TR>
<TD><tt>p</tt></TD>
<TD>is an object of a type that models <a
href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>
and whose argument type matches the <tt>edge_descriptor</tt> type.
</TR>
</table>
<H3>Valid Expressions</H3>
<table border>
<tr>
<TD><a name="sec:add-edge"><TT>add_edge(u,&nbsp;v,&nbsp;g)</TT></a></TD>
<TD>
Inserts the edge <i>(u,v)</i> into the graph, and returns an edge
descriptor pointing to the new edge. If the graph disallows parallel
edges, and the edge <i>(u,v)</i> is already in the graph, then the
<tt>bool</tt> flag returned is <tt>false</tt> and the returned edge
descriptor points to the already existing edge. Note that for
undirected graphs, <i>(u,v)</i> is the same edge as <i>(v,u)</i>, so
after a call to the function <tt>add_edge()</tt>, this implies that
edge <i>(u,v)</i> will appear in the out-edges of <i>u</i> and
<i>(u,v)</i> (or equivalently <i>(v,u)</i>) will appear in the
out-edges of <i>v</i>. Put another way, <i>v</i> will be adjacent to
<i>u</i> and <i>u</i> will be adjacent to <i>v</i>.
<br>
Return type: <TT>std::pair&lt;edge_descriptor, bool&gt;</TT>
</TD>
</tr>
<tr>
<TD><a name="sec:remove_edge"><TT>remove_edge(u,&nbsp;v,&nbsp;g)</TT></a></TD>
<TD>
Remove the edge <i>(u,v)</i> from the graph. If the
graph allows parallel edges this remove all occurances of
<i>(u,v)</i>.<br>
Return type: <TT>void</TT><br>
Precondition: <i>u</i> and <i>v</i> are vertices in the graph.<br>
Postcondition: <i>(u,v)</i> is no longer in the edge set for
<TT>g</TT>.<br>
</TD>
</TR>
<tr>
<TD><TT>remove_edge(e,&nbsp;g)</TT></TD>
<TD>Remove the edge <i>e</i> from the graph.<br>
Return type: <TT>void</TT><br>
Precondition: <i>e</i> is an edge in the graph.<br>
Postcondition: <i>e</i> is no longer in the edge set for <TT>g</TT>.
</TD>
</TR>
<tr>
<TD><TT>remove_edge(iter,&nbsp;g)</TT></TD>
<TD>Remove the edge pointed to be <tt>iter</tt> from the graph. This
expression is only required when the graph also models <a
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
Return type: <TT>void</TT><br>
Precondition: <tt>*iter</tt> is an edge in the graph.<br>
Postcondition: <tt>*iter</tt> is no longer in the edge set for <TT>g</TT>.
</TD>
</TR>
<tr>
<TD><TT>remove_edge_if(p,&nbsp;g)</TT></TD>
<TD>Remove all the edges from graph <tt>g</tt> for which
the predicate <tt>p</tt> returns true.<br>
Return type: <TT>void</TT>
</TD>
</TR>
<tr>
<TD><TT>remove_out_edge_if(u,&nbsp;p,&nbsp;g)</TT></TD>
<TD>Remove all the out-edges of vertex <tt>u</tt> for which the
predicate <tt>p</tt> returns true. This expression is only required
when the graph also models <a
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
Return type: <TT>void</TT>
</TD>
</TR>
<tr>
<TD><TT>remove_in_edge_if(u,&nbsp;p,&nbsp;g)</TT></TD>
<TD>Remove all the in-edges of vertex <tt>u</tt> for which the
predicate <tt>p</tt> returns true. This expression is only required when the
graph also models <a
href="./BidirectionalGraph.html">BidirectionalGraph</a>.<br>
Return type: <TT>void</TT>
</TD>
</TR>
<tr>
<TD><a name="sec:add-vertex"><TT>add_vertex(g)</TT></a></TD>
<TD>
Add a new vertex to the graph. The <TT>vertex_descriptor</TT> for the
new vertex is returned.<br>
Return type: <TT>vertex_descriptor</TT>
</TD>
</TR>
<tr>
<TD><TT>clear_vertex(u,&nbsp;g)</TT></TD>
<TD>
Remove all edges to and from vertex <tt>u</tt> from the graph.<br>
Return type: <TT>void</TT><br>
Precondition: <tt>u</tt> is a valid vertex descriptor of <TT>g</TT>.<br>
Postcondition: <tt>u</tt> does not appear as a source or target of
any edge in <TT>g</TT>.
</TD>
</TR>
<tr>
<TD><a name="sec:remove-vertex"><TT>remove_vertex(u,&nbsp;g)</TT></a></TD>
<TD>
Remove <i>u</i> from the vertex set of the graph. Note that undefined
behavior may result if there are edges remaining in the graph who's
target is <i>u</i>. Typically the <TT>clear_vertex()</TT> function
should be called first.<br>
Return type: <TT>void</TT><br>
Precondition: <TT>u</TT> is a valid vertex descriptor of <TT>g</TT>.<br>
Postcondition: <TT>num_vertices(g)</TT> is one less, <TT>u</TT>
no longer appears in the vertex set of the graph and it
is no longer a valid vertex descriptor.
</TD>
</TR>
</TABLE>
<P>
</LI>
</UL>
<P>
<H3>Complexity Guarantees</H3>
<P>
<UL>
<LI>Edge insertion must be either amortized constant time or it
can be <i>O(log(E/V))</i> if the insertion also checks to
prevent the addition of parallel edges (which is a ``feature'' of
some graph types).
</LI>
<LI>Edge removal is guaranteed to be <i>O(E)</i>.</LI>
<LI>Vertex insertion is guaranteed to be amortized constant time.</LI>
<LI>Clearing a vertex is <i>O(E + V)</i>.</LI>
<LI>Vertex removal is <i>O(E + V)</i>.</LI>
</UL>
<H3>Models</H3>
<UL>
<LI><TT>adjacency_list</TT>
</LI>
</UL>
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class G&gt;
struct MutableGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
v = add_vertex(g);
clear_vertex(v, g);
remove_vertex(v, g);
e_b = add_edge(u, v, g);
remove_edge(u, v, g);
remove_edge(e, g);
}
G g;
edge_descriptor e;
std::pair&lt;edge_descriptor, bool&gt; e_b;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
typename boost::graph_traits&lt;G&gt;::out_edge_iterator iter;
};
template &lt;class edge_descriptor&gt;
struct dummy_edge_predicate {
bool operator()(const edge_descriptor& e) const {
return false;
}
};
template &lt;class G&gt;
struct MutableIncidenceGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
remove_edge(iter, g);
remove_out_edge_if(u, p, g);
}
G g;
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
dummy_edge_predicate&lt;edge_descriptor&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u;
typename boost::graph_traits&lt;G&gt;::out_edge_iterator iter;
};
template &lt;class G&gt;
struct MutableBidirectionalGraphConcept
{
void constraints() {
function_requires&lt; MutableIncidenceGraph&lt;G&gt; &gt;();
remove_in_edge_if(u, p, g);
}
G g;
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
dummy_edge_predicate&lt;edge_descriptor&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u;
};
template &lt;class G&gt;
struct MutableEdgeListGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
remove_edge_if(p, g);
}
G g;
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
dummy_edge_predicate&lt;edge_descriptor&gt; p;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,154 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>MutablePropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2>
<A NAME="sec:MutablePropertyGraph"></A>
MutablePropertyGraph
</H2>
A MutablePropertyGraph is a <a
href="./MutableGraph.html">MutableGraph</a> with properties attached
internally to the vertices and edges. When adding vertices and edges
the value of the properties can be given.
<H3>Refinement of</H3>
<a href="./MutableGraph.html">MutableGraph</a> and
<a href="./PropertyGraph.html">PropertyGraph</a>
<H3>Notation</H3>
<TABLE>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>u,v</tt></TD>
<TD>are objects of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
<TR>
<TD><TT>ep</TT></TD><TD>is an object of type <TT>G::edge_property_type</TT></TD>
</TR>
<TR>
<TD><TT>vp</TT></TD><TD>is an object of type <TT>G::vertex_property_type</TT></TD>
</TR>
</TABLE>
<P>
<H3>Associated Types</H3>
<table border>
<tr>
<td>Edge Property Type </td>
<td><TT>graph_traits&lt;G&gt;::edge_property_type</TT></td>
</tr>
<tr>
<td>Vertex Property Type </td>
<td><TT>graph_traits&lt;G&gt;::vertex_property_type</TT> </td>
</tr>
</table>
<H3>Valid Expressions</h3>
<table border>
<tr>
<TD><TT>add_edge(u,&nbsp;v,&nbsp;ep,&nbsp;g)</TT></TD>
<TD>Inserts the edge <i>(u,v)</i> into the graph, and
copies object <TT>ep</TT> into the property property for that edge.<br>
Return type: <TT>std::pair&lt;edge_descriptor, bool&gt;</TT></TD>
</TR>
<tr>
<TD><TT>add_vertex(vp,&nbsp;g)</TT></TD>
<TD>
Add a new vertex to the graph and copy <TT>vp</TT> into the property
property for the new vertex. The <TT>vertex_descriptor</TT> for the new
vertex is returned.<br>
Return type: <TT>vertex_descriptor</TT>
</TD>
</TR>
</TABLE>
<H3>Models</H3>
<UL>
<LI><TT>adjacency_list</TT></LI>
</UL>
<H3>Concept Checking Class</H3>
<P>
<PRE>
template &lt;class G&gt;
struct MutablePropertyGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
function_requires&lt; MutableGraphConcept&lt;G&gt; &gt;();
v = add_vertex(vp, g);
p = add_edge(u, v, ep, g);
}
G g;
std::pair&lt;edge_descriptor, bool&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor u, v;
typename boost::graph_traits&lt;G&gt;::vertex_property_type vp;
typename boost::graph_traits&lt;G&gt;::edge_property_type ep;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,105 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Property</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:Property"></A>
Property
</H2>
A Property type is a type used to name or identify properties that are
attached to the vertices and edges of a graph. A Property type is not
the type of the actual property values. Objects of the Property type
are not used except to carry the type information which specifies the
property.
<h3>Associated Types</h3>
<table border>
<tr>
<td>Property Kind </td>
<td><TT>property_kind&lt;Property&gt;::type</TT> </td>
<td>
This specifies whether the property is a <a
name="VertexProperty">VertexProperty</a>
(<tt>vertex_property_tag</tt>), an <a
name="EdgeProperty">EdgeProperty</a> (<tt>edge_property_tag</tt>), or
a <a name="GraphProperty">GraphProperty</a> which is attached to the
graph object itself (<tt>graph_property_tag</tt>). The tags are
defined in <a
href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></a>
</td>
</tr>
</table>
<h3>Refinement of</h3>
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
<h3>Models</h3>
The following models of the Property concept are defined
in <a
href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></a>.
<ul>
<li><tt>vertex_index_t</tt></li>
<li><tt>edge_index_t</tt></li>
<li><tt>graph_name_t</tt></li>
<li><tt>vertex_name_t</tt></li>
<li><tt>edge_name_t</tt></li>
<li><tt>edge_weight_t</tt></li>
<li><tt>vertex_distance_t</tt></li>
<li><tt>vertex_color_t</tt></li>
<li><tt>vertex_degree_t</tt></li>
<li><tt>vertex_out_degree_t</tt></li>
<li><tt>vertex_in_degree_t</tt></li>
<li><tt>vertex_discover_time_t</tt></li>
<li><tt>vertex_finish_time_t</tt></li>
</ul>
<h3>See Also</h3>
<a href="./PropertyGraph.html">PropertyGraph</a>
and
<a href="../../property_map/property_map.html">Property Map Concepts</a>
<h3>Notes</h3>
On compilers that do not support partial specialization, each Property
type is also required to specialize
<tt>property_num&lt;Property&gt;</tt> to contain an enum named
<tt>value</tt> which uniquely identifies the property type.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,213 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>PropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:PropertyGraph"></A>
PropertyGraph
</H2>
A PropertyGraph is a graph that has some property associated with each
of the vertices or edges in the graph. As a given graph may have
several properties associated with each vertex or edge, a tag is used
to identity which property is being accessed. The graph provides a
function which returns a property map object.
<P>
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of PropertyGraph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>X</tt></TD>
<TD>Either the vertex or edge descriptor type for <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>x</tt></TD>
<TD>An object of type <tt>X</tt>.</TD>
</TR>
<TR>
<TD><tt>Map</tt></TD>
<TD>The type <tt>boost::property_map&lt;G, Property&gt;::const_type</tt>.</TD>
</TR>
<TR>
<TD><tt>v</tt></TD>
<TD>An object of type <tt>boost::property_traits&lt;Map&gt;::value_type</tt>.</TD>
</TR>
<TR>
<TD><tt>Property</tt></TD>
<TD>A type that models the <a href="./Property.html">Property</a> concept.</TD>
</TR>
<TR>
<TD><tt>p</tt></TD>
<TD>An object of type <tt>Property</tt>.</td>
</TR>
<TR>
<TD><tt>pmap</tt></TD>
<TD>An object of type <tt>Map</tt>.</td>
</TR>
</table>
<H3>Associated types</H3>
<table border>
<tr>
<td><pre>boost::property_map&lt;G, Property&gt;::type</pre>
The type of the property map for the property specified by
<TT>Property</TT>. This type must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a> with a key type the same as the graph's vertex or descriptor type.
</td>
</tr>
<tr>
<td><pre>boost::property_map&lt;G, Property&gt;::const_type</pre>
The type of the const property map for the property specified by
<TT>Property</TT>. This type must be a model of <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>
with a key type the same as the graph's vertex or edge descriptor type.
</td>
</tr>
</table>
<h3>Valid Expressions</h3>
<table border>
<tr>
<td> <TT>get(p,&nbsp;g)</TT> </td>
<td>
Returns the property map for the property specified by the
<tt>Property</tt> type. The object <tt>p</tt> is only used to
carry the type.<br>
Return type: <TT>boost::property_map&lt;G,&nbsp;Property&gt;::type</TT> if <TT>g</TT> is mutable and <br><TT>boost::property_map&lt;G,&nbsp;Property&gt;::const_type</TT> otherwise.
</td>
</TR>
<tr>
<td> <TT>get(p,&nbsp;g,&nbsp;x)</TT> </td>
<td>
Returns the property value (specified by the <tt>Property</tt> type)
associated with object <tt>x</tt> (a vertex or edge).
The object <tt>p</tt> is only used to carry the type.
This function is equivalent to:<br>
<tt>get(get(p, g), x)</tt><br>
Return type: <tt>boost::property_traits&lt;Map&gt;::value_type</tt>
</td>
</TR>
<tr>
<td> <TT>put(p,&nbsp;g,&nbsp;x,&nbsp;v)</TT> </td>
<td>
Set the property (specified by the <tt>Property</tt> type)
associated with object <tt>x</tt> (a vertex or edge) to
the value <tt>v</tt>. The object <tt>p</tt> is only used to carry the type.
This function is equivalent to:<br>
<tt>
pmap = get(p, g);<br>
put(pmap, x, v)
</tt><br>
Return type: <TT>void</TT>
</td>
</TR>
</TABLE>
<H3>Complexity</H3>
The <tt>get()</tt> property map function must be constant time.
<H3>Models</H3>
<UL>
<LI><tt>adjacency_list</tt> with <tt>VertexProperty=property&lt;vertex_distance_t,int,property&lt;vertex_in_degree_t,int&gt; &gt;</tt> and <tt>Property=vertex_distance_t</tt>.</li>
<li><tt>adjacency_list</tt> with <tt>VertexProperty=property&lt;vertex_distance_t,int,property&lt;vertex_in_degree_t,int&gt; &gt;</TT> and <tt>Property=vertex_in_degree_t</tt>.</li>
</UL>
<H3>Concept Checking Class</H3>
<PRE>
template &lt;class Graph, class X, class Property&gt;
struct PropertyGraphConcept
{
typedef typename property_map&lt;G, Property&gt;::type Map;
typedef typename property_map&lt;G, Property&gt;::const_type const_Map;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Map, X&gt; &gt;();
function_requires&lt; ReadablePropertyMapConcept&lt;const_Map, X&gt; &gt;();
Map pmap = get(Property(), g);
pval = get(Property(), g, x);
put(Property(), g, x, pval);
ignore_unused_variable_warning(pmap);
}
void const_constraints(const G&amp; g) {
const_Map pmap = get(Property(), g);
pval = get(Property(), g, x);
ignore_unused_variable_warning(pmap);
}
G g;
X x;
typename property_traits&lt;Map&gt;::value_type pval;
};
</PRE>
<h3>See Also</h3>
<a href="./property_map.html"><tt>property_map</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,199 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: UniformCostVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>UniformCostVisitor Concept</H1>
This concept defines the visitor interface for <a
href="./uniform_cost_search.html"><tt>uniform_cost_search()</tt></a>
and related algorithms. The user can create a class that matches this
interface, and then pass objects of the class into
<tt>uniform_cost_search()</tt> to augment the actions taken during the
search.
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of UniformCostVisitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>s,u,v</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>DistanceMap</tt></TD>
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>.</TD>
</TR>
<TR>
<TD><tt>d</tt></TD>
<TD>An object of type <tt>DistanceMap</tt>.</TD>
</TR>
<TR>
<TD><tt>WeightMap</tt></TD>
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">ReadablePropertyMap</a>.</TD>
</TR>
<TR>
<TD><tt>w</tt></TD>
<TD>An object of type <tt>DistanceMap</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked one each vertex of the graph when it is initialized.
</td>
</tr>
<tr>
<td>Start Vertex</td>
<td><tt>vis.start_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the source vertex at the beginning of the algorithm.
</td>
</tr>
<tr>
<td>Discover Vertex</td>
<td><tt>vis.discover_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex is encountered for the first time.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every out-edge of each vertex after it is discovered.
</td>
</tr>
<tr>
<td>Edge Relaxed</td>
<td><tt>vis.edge_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if the following condition holds then the edge
is relaxed (its distance is reduced), and this method is invoked.<br>
<tt>
tie(u,v) = incident(e, g);<br>
D d_u = get(d, u), d_v = get(d, v);<br>
W w_e = get(w, e);<br>
assert(compare(combine(d_u, w_e), d_v));<br>
</tt>
</td>
</tr>
<tr>
<td>Edge Not Relaxed</td>
<td><tt>vis.edge_not_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if the edge is not relaxed (see above) then
this method is invoked.
</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This invoked on a vertex after all of its out edges have been added to the
search tree and all of the adjacent vertices have been discovered
(but before their out-edges have been examined).
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./ucs_visitor.html"><tt>ucs_visitor</tt></a>
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,74 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>VertexAndEdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:VertexAndEdgeListGraph"></A>
VertexAndEdgeListGraph
</H2>
The VertexAndEdgeListGraph concept refines the <a
href="./VertexListGraph.html">VertexListGraph</a> and the <a
href="./EdgeListGraph.html">EdgeListGraph</a> concepts. No further
requirements are added.
<H3>Refinement of</H3>
<a href="./VertexListGraph.html">VertexListGraph</a>,
<a href="./EdgeListGraph.html">EdgeListGraph</a>
<H3>Models</H3>
<UL>
<LI><TT>adjacency_list</TT></LI>
</UL>
<P>
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Concept Checking Class</H3>
<P>
<PRE>
template &lt;class G&gt;
struct VertexAndEdgeListGraph
{
void constraints() {
function_requires&lt; VertexListGraphConcept&lt;G&gt; &gt;();
function_requires&lt; EdgeListGraphConcept&lt;G&gt; &gt;();
}
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,153 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>VertexListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="concept:VertexListGraph">
VertexListGraph
</H2>
The VertexListGraph</I> concept refines the <a
href="./AdjacencyGraph.html">AdjacencyGraph</a> concept, and adds the
requirement for efficient traversal of all the vertices in the graph.
<H3>Refinement of</H3>
<a href="./IncidenceGraph.html">IncidenceGraph</a>
and <a href="./AdjacencyGraph.html">AdjacencyGraph</a>
<H3>Associated Types</H3>
<Table border>
<TR>
<TD><tt>boost::graph_traits&lt;G&gt;::vertex_iterator</tt><br><br>
A vertex iterator (obtained via <TT>vertices(g)</TT>) provides access
to all of the vertices in a graph. A vertex iterator type must meet
the requirements of <a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>. The
value type of the vertex iterator must be the vertex descriptor of the
graph.
</TD>
</TR>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::vertices_size_type</tt><br><br>
The unsigned integer type used to represent the number of vertices
in the graph.
</td>
</tr>
</table>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Vertex Set of the Graph</td>
<td><a name="sec:vertices"><TT>vertices(g)</TT></a></TD>
<TD><TT>std::pair&lt;vertex_iterator,&nbsp;vertex_iterator&gt;</TT></TD>
<TD>
Returns an iterator-range providing access to all the vertices in the
graph<TT>g</TT>.
</TD>
</TR>
<tr>
<td>Number of Vertices in the Graph </td>
<td><TT>num_vertices(g)</TT></TD>
<TD><TT>vertices_size_type</TT></TD>
<TD>Returns the number of vertices in the graph <TT>g</TT>.</TD>
</TR>
</TABLE>
<H3>Complexity guarantees</H3>
<P>
The <TT>vertices()</TT> function must return in constant time.
<H3>See Also</H3>
<a href="./graph_concepts.html">Graph concepts</a>
<H3>Design Rationale</H3>
One issue in the design of this concept is whether to include the
refinement from the <a href="./IncidenceGraph.html">IncidenceGraph</a>
and <a href="./AdjacencyGraph.html">AdjacencyGraph</a> concepts. The
ability to traverse the vertices of a graph is orthogonal to
traversing out-edges, so it would make sense to have a VertexListGraph
concept that only includes vertex traversal. However, such a concept
would no longer really be a graph, but would just be a set, and the
STL already has concepts for dealing with such things. However, there
are many BGL algorithms that need to traverse the vertices and
out-edges of a graph, so for convenience a concept is needed that
groups these requirements together, hence the VertexListGraph concept.
<H3>Concept Checking Class</H3>
<P>
<PRE>
template &lt;class G&gt;
struct VertexListGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator
vertex_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; AdjacencyGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;vertex_iterator&gt; &gt;();
p = vertices(g);
V = num_vertices(g);
v = *p.first;
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = vertices(g);
V = num_vertices(g);
v = *p.first;
}
std::pair&lt;vertex_iterator, vertex_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
typename boost::graph_traits&lt;G&gt;::vertices_size_type V;
G g;
};
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,80 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Acknowledgements</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h1>Acknowledgements</h1>
We owe many debts of thanks to a number of individuals who both
inspired and encouraged us in developing the Boost Graph Library.
<p>
A most profound thanks goes to Alexander Stepanov for his pioneering
work in generic programming, for his encouragement, and for his
algorithm contributions to the BGL. We thank Matthew Austern for his
work on documenting the concepts of STL which provided a foundation
for creating the concepts in the BGL. We thank Dietmar K&uuml;hl for
his work on generic graph algorithms and design patterns; especially
for the property map abstraction.
<p>
Dave Abrahams, Jens Maurer, Beman Dawes, Gary Powell, Greg Colvin,
Valentin Bonnard, and the rest of the group at Boost provided valuable
input to the BGL interface, numerous suggestions for improvement,
proof reads of the documentation, and help with polishing the code. A
special thanks to Dave Abrahams for managing the formal review.
<p>
We also thank the following BGL users whose questions helped to
improve the BGL: Gordon Woodhull, Dave Longhorn, Joel Phillips, and
Edward Luke.
<p>
A special thanks to Jeffrey Squyres for editing and proof reading
of the documentation.
<p>
Our original work on the Boost Graph Library was supported in part by
NSF grant ACI-9982205 and by the Director, Office of Science, Division
of Mathematical, Information, and Computational Sciences of the U.S.
Department of Energy under contract number DE-AC03-76SF00098.
<p>
In our work we also used resources of the National Energy Research
Scientific Computing Center, which is supported by the Office of
Science of the U.S. Department of Energy.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@@ -1,162 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Graph Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME=""></A>
<pre>
adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;
</pre>
</H1>
This class provides an alternate method for accessing some of the
associated types of the <tt>adjacency_list</tt> class. The main reason
for this class is that sometimes one would like to create graph
properties whose values are vertex or edge descriptors. If you try to
use <tt>graph_traits</tt> for this you will run into a problem with
mutually recursive types. To get around this problem, the
<tt>adjacency_list_traits</tt> class is provided, which gives the user
access to the vertex and edge descriptor types without requiring the
user to provide the property types for the graph.
<pre>
template &lt;class EdgeList, class VertexList, class Directed&gt;
struct adjacency_list_traits {
typedef ... vertex_descriptor;
typedef ... edge_descriptor;
typedef ... directed_category;
typedef ... edge_parallel_category;
};
</pre>
<h3>Where Defined</h3>
<a href="../../../boost/graph/adjacency_list.hpp"><tt>boost/graph/adjacency_list.hpp</tt></a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EdgeList</TT></TD>
<TD>
The selector type for the edge container implementation.
</TD>
<td><tt>vecS</tt></td>
</TR>
<TR><TD><TT>VertexList</TT></TD>
<TD>
The selector type for the vertex container implementation.
</TD>
<td><tt>vecS</tt></td>
</TR>
<TR><TD><TT>Directed</TT></TD>
<TD>
The selector type whether the graph is directed or undirected.
</TD>
<td><tt>directedS</tt></td>
</TR>
</table>
<h3>Model of</h3>
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a> and
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>
<h3>Type Requirements</h3>
Under construction.
<H2>Members</H2>
<p>
<table border>
<tr>
<th>Member</th><th>Description</th>
</tr>
<tr>
<td><tt>
vertex_descriptor
</tt></td>
<td>
The type for the objects used to identify vertices in the graph.
</td>
</tr>
<tr>
<td><tt>
edge_descriptor
</tt></td>
<td>
The type for the objects used to identify edges in the graph.
</td>
</tr>
<tr>
<td><tt>
directed_category
</tt></td>
<td>
This says whether the graph is undirected (<tt>undirected_tag</tt>)
or directed (<tt>directed_tag</tt>).
</td>
</tr>
<tr>
<td><tt>
edge_parallel_category
</tt></td>
<td>
This says whether the graph allows parallel edges to be inserted
(<tt>allow_parallel_edge_tag</tt>) or if it automatically removes
parallel edges (<tt>disallow_parallel_edge_tag</tt>).
</td>
</tr>
</table>
<h3>See Also</h3>
<a href="./adjacency_list.html"><tt>adjacency_list</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,97 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Bandwidth</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:bandwidth">
<TT>bandwidth</TT>
</H1>
<pre>
(1)
template &lt;typename Graph&gt;
typename graph_traits&lt;Graph&gt;::vertices_size_type
bandwidth(const Graph& g)
(2)
template &lt;typename Graph, typename VertexIndexMap&gt;
typename graph_traits&lt;Graph&gt;::vertices_size_type
bandwidth(const Graph& g, VertexIndexMap index_map)
</pre>
The <b><i>bandwidth</i></b> of an undirected graph is the maximum
distance between two adjacent vertices, with distance measured on a
line upon which the vertices have been placed at unit intervals. To
put it another way, if the vertices of an undirected graph
<i>G=(V,E)</i> are each assigned an index from zero to <i>|V| - 1</i>
given by <i>index[v]</i>, then the bandwidth of <i>G</i> is<br>
<br>
<i>B(G) = max { |index[u] - index[v]|&nbsp;&nbsp;| (u,v) in E }</i><br>
<h3>Defined in</h3>
<a href="../../../boost/graph/bandwidth.hpp"><tt>boost/graph/bandwidth.hpp</tt></a>
<hr>
<H1><A NAME="sec:ith-bandwidth">
<TT>ith_bandwidth</TT>
</H1>
<pre>
(1)
template &lt;typename Graph&gt;
typename graph_traits&lt;Graph&gt;::vertices_size_type
ith_bandwidth(typename graph_traits&lt;Graph&gt;::vertex_descriptor i,
const Graph&amp; g)
(2)
template &lt;typename Graph, typename VertexIndexMap&gt;
typename graph_traits&lt;Graph&gt;::vertices_size_type
ith_bandwidth(typename graph_traits&lt;Graph&gt;::vertex_descriptor i,
const Graph&amp; g,
VertexIndexMap index)
</pre>
The <b><i>i-th bandwidth</i></b> a graph is the maximum distance
between the <i>i-th</i> vertex and any of its neighbors.<br>
<br>
<i>B<sub>i</sub>(G) = max { |index[i] - index[j]|&nbsp;&nbsp;| (i,j) in E }</i><br>
<br>
So the bandwidth <i>B(G)</i> can be expressed as the maximum
of the i-th bandwidths <i>B<sub>i</sub>(G)</i>.<br>
<br>
<i>B(G) = max { B<sub>i</sub>(G) &nbsp;&nbsp;| i=0...|V|-1 }</i><br>
<h3>Defined in</h3>
<a href="../../../boost/graph/bandwidth.hpp"><tt>boost/graph/bandwidth.hpp</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,180 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Bellman Ford Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:bellman-ford"></A>
<TT>bellman_ford_shortest_paths</TT>
</H1>
<P>
<DIV ALIGN="left">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed or undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">distance, weight</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT"><i>O(V E)</i></TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
<TD ALIGN="LEFT">
<a href="../../../boost/graph/bellman_ford_shortest_paths.hpp"><TT>boost/graph/bellman_ford_shortest_paths.hpp</TT></a>
</TD>
</TR></TABLE>
</DIV>
<P>
<PRE>
(1)
template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class WeightMap, class DistanceMap&gt;
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N,
WeightMap w, DistanceMap d)
(2)
template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class WeightMap, class DistanceMap,
class <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>&gt;
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N, WeightMap w,
DistanceMap d, BellmanFordVisitor visit)
</PRE>
<P>
The Bellman-Ford algorithm&nbsp;[<A
HREF="bibliography.html#bellman58">4</A>,<A
HREF="bibliography.html#ford62:_flows">11</A>,<A
HREF="bibliography.html#lawler76:_comb_opt">20</A>,<A
HREF="bibliography.html#clr90">8</A>] solves the single-source
shortest paths problem for a graph with both positive and negative
edge weights. See Section <A
HREF="./graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A> for a description of the single-source shortest paths
problem. If a cycle with negative length is detected, the algorithm
returns <TT>false</TT>. The argument <TT>N</TT> should be the number
of vertices in the graph. The source vertex is indicated by
initializing the distance of the source vertex to zero and the
distances of the rest of the vertices to
<TT>std::numeric_limits&lt;T&gt;::max()</TT>.
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The type <TT>EdgeListGraph</TT> must be a model of
<a href="./EdgeListGraph.html">EdgeListGraph</a>.
</LI>
<LI>The type <TT>Distance</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
vertex descriptor type of the graph needs to be usable as the key
type of the distance map. The value type of the distance
map must be <a
href="http://www.sgi.com/tech/stl/LessThanComparable.html">LessThanComparable</a>.
</LI>
<LI>The <TT>Weight</TT> type must be a model of
<a href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>.
The edge descriptor of the graph needs to be usable as the key
type for the weight map. The value type for the
weight map must be <I>Addable</I> with the
distance map's value type.
</LI>
<LI>The <TT>Parent</TT> type must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
value type and key type should be the graph's vertex descriptor
type.
</LI>
<LI>The type <TT>BellmanFordVisitor</TT> must be a model of <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>.
</LI>
</UL>
<P>
<H3>Complexity</H3>
<P>
The time complexity is <i>O(V E)</i>.
<P>
<H3>Example</H3>
<P>
The source code for this example is in <a
href="../example/bellman_ford.cpp"><TT>examples/bellman_ford.cpp</TT></a>.
<P>
<PRE>
enum { u, v, x, y, z, N };
char name[] = { 'u', 'v', 'x', 'y', 'z' };
typedef std::pair&lt;int,int&gt; E;
E edges[] = { E(u,y), E(u,x), E(u,v),
E(v,u),
E(x,y), E(x,v),
E(y,v), E(y,z),
E(z,u), E(z,x) };
int weight[] = { -4, 8, 5,
-2,
9, -3,
7, 2,
6, 7 };
typedef edge_list&lt;E*,E,ptrdiff_t&gt; Graph;
Graph g(edges, edges + sizeof(edges)/sizeof(E));
vector&lt;int&gt; distance(N,std::numeric_limits&lt;short&gt;::max());
vector&lt;int&gt; parent(N,-1);
distance[z] = 0;
parent[z] = z;
bool r = bellman_ford_shortest_paths(g, int(N), weight,
distance.begin(),
parent.begin());
if (r)
for (int i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[i] &lt;&lt; ": " &lt;&lt; distance[i]
&lt;&lt; " " &lt;&lt; name[parent[i]] &lt;&lt; std::endl;
else
std::cout &lt;&lt; "negative cycle" &lt;&lt; std::endl;
</PRE>
The distance and predecessor for each vertex is:
<PRE>
u: 2 v
v: 4 x
x: 7 z
y: -2 u
z: 0 z
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,115 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: bellman_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
bellman_visitor&lt;EventVisitorList&gt;
</pre>
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
<tt>std::pair</tt>) into a <a
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>.
<h3>Example</h3>
<h3>Model of</h3>
<a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EventVisitorList</TT></TD>
<TD>
A list of <a href="./EventVisitor.html">EventVisitor</a>'s created
with <tt>std::pair</tt>.
</TD>
<TD><TT><a href="./null_visitor.html"><tt>null_visitor</tt></a></TT></TD>
</TR>
</table>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/bellman_ford_shortest_paths.hpp">
<TT>boost/graph/bellman_ford_shortest_paths.hpp</TT></a>
<h3>Member Functions</h3>
This class implements all of the member functions required by <a
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class EventVisitorList&gt;<br>
bellman_visitor&lt;EventVisitorList&gt;<br>
make_bellman_visitor(EventVisitorList ev_list);
</tt></td><td>
Returns the event visitor list adapted to be a BellmanFordVisitor.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are event visitors: <a
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,132 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: bfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
bfs_visitor&lt;EventVisitorList&gt;
</pre>
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
<tt>std::pair</tt>) into a <a href="./BFSVisitor.html">BFSVisitor</a>.
<h3>Example</h3>
This is an excerpt from <a
href="../example/bfs.cpp"><tt>examples/bfs.cpp</tt></a> where three
event-visitors are combined to make a BFS visitor. The functions
<tt>boost::record_distances</tt>, <tt>boost::record_predecessors</tt>,
and <tt>copy_graph</tt> are all functions that create an event
visitor.
<pre>
// Construct graph G and obtain the source vertex s ...
boost::breadth_first_search(G, s,
make_bfs_visitor(
std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
std::make_pair(boost::record_predecessors(p.begin(),
boost::on_tree_edge()),
copy_graph(G_copy, boost::on_examine_edge())))) );
</pre>
<h3>Model of</h3>
<a href="./BFSVisitor.html">BFSVisitor</a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EventVisitorList</TT></TD>
<TD>
A list of <a href="./EventVisitor.html">EventVisitor</a>'s created
with <tt>std::pair</tt>.
</TD>
<TD><a href="./null_visitor.html"><tt>null_visitor</tt></a></TD>
</TR>
</table>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/breadth_first_search.hpp">
<TT>boost/graph/breadth_first_search.hpp</TT></a>
<h3>Member Functions</h3>
This class implements all of the member functions required by <a
href="./BFSVisitor.html">BFSVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class EventVisitorList&gt;<br>
bfs_visitor&lt;EventVisitorList&gt;<br>
make_bfs_visitor(EventVisitorList ev_list);
</tt></td><td>
Returns the event visitor list adapted to be a BFS visitor.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are event visitors: <a
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,302 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Bibliography</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2>Bibliography</H2>
<DL COMMapCT><DD><P></P><DT><A NAME="aho83:_data_struct_algo">1</A>
<DD>
A.&nbsp;V. Aho, J.&nbsp;E. Hopcroft, and J.&nbsp;D. Ullman.
<BR><EM>Data Structures and Algorithms</EM>.
<BR>Addison-Wesley, 1983.
<P></P><DT><A NAME="austern99:_gener_progr_stl">2</A>
<DD>
M.&nbsp;H. Austern.
<BR><EM>Generic Programming and the STL</EM>.
<BR>Professional computing series. Addison-Wesley, 1999.
<P></P><DT><A NAME="baumgartner95:_signatures">3</A>
<DD>
G.&nbsp;Baumgartner and V.&nbsp;F. Russo.
<BR>Signatures: A language extension for improving type abstraction and
subtype polymorphism in C++.
<BR><EM>Software-Practice and Experience</EM>, 25(8):863-889, August 1995.
<P></P><DT><A NAME="bellman58">4</A>
<DD>
R.&nbsp;Bellman.
<BR>On a routing problem.
<BR><EM>Quarterly of Applied Mathematics</EM>, 16(1):87-90, 1958.
<P></P><DT><A NAME="bruce95">5</A>
<DD>
K.&nbsp;B. Bruce, L.&nbsp;Cardelli, G.&nbsp;Castagna, the Hopkins Objects&nbsp;Group, G.&nbsp;T.
Leavens, and B.&nbsp;Pierce.
<BR>On binary methods.
<BR><EM>Theory and Practice of Object Systems</EM>, 1:221-242, 1995.
<P></P><DT><A NAME="coleman85:_algor">6</A>
<DD>
T.&nbsp;F. Coleman, B.&nbsp;S. Garbow, and J.&nbsp;J. Mor'e.
<BR>Algorithm 649: Fortran subroutines for estimating sparse hessian
matrices.
<BR><EM>ACM Transactions on Mathematical Software</EM>, 11(4):378, December
1985.
<P></P><DT><A NAME="coleman84:_estim_jacob">7</A>
<DD>
T.&nbsp;F. Coleman and J.&nbsp;J. Mor'e.
<BR>Estimation of sparse jacobian matrices and graph coloring problems.
<BR><EM>SIAM Journal on Numerical Analysis</EM>, 20:187-209,, 1984.
<P></P><DT><A NAME="clr90">8</A>
<DD>
T.&nbsp;Cormen, C.&nbsp;Leiserson, and R.&nbsp;Rivest.
<BR><EM>Introduction to Algorithms</EM>.
<BR>McGraw-Hill, 1990.
<P></P><DT><A NAME="curtis74:_jacob">9</A>
<DD>
A.&nbsp;Curtis, M.&nbsp;Powell, and J.&nbsp;Reid.
<BR>On the estimation of sparse jacobian matrices.
<BR><EM>Journal of the Institute of Mathematics and its Applications</EM>,
13:117-119, 1974.
<P></P><DT><A NAME="dijkstra59">10</A>
<DD>
E.&nbsp;Dijkstra.
<BR>A note on two problems in connexion with graphs.
<BR><EM>Numerische Mathematik</EM>, 1:269-271, 1959.
<P></P><DT><A NAME="ford62:_flows">11</A>
<DD>
L.&nbsp;R. Ford and D.&nbsp;R. Fulkerson.
<BR><EM>Flows in networks</EM>.
<BR>Princeton University Press, 1962.
<P></P><DT><A NAME="gamma95:_design_patterns">12</A>
<DD>
E.&nbsp;Gamma, R.&nbsp;Helm, R.&nbsp;Johnson, and J.&nbsp;Vlissides.
<BR><EM>Design Patterns: Elements of Reusable Object-Oriented Software</EM>.
<BR>Professional Computing. Addison-Welsey, 1995.
<P></P><DT><A NAME="george93:graphtheory">13</A>
<DD>
A.&nbsp;George, J.&nbsp;R. Gilbert, and J.&nbsp;W. Liu, editors.
<BR><EM>Graph Theory and Sparse Matrix Computation</EM>.
<BR>Springer-Verlag New York, Inc, 1993.
<P></P><DT><A NAME="george81:__sparse_pos_def">14</A>
<DD>
A.&nbsp;George and J.&nbsp;W.-H. Liu.
<BR><EM>Computer Solution of Large Sparse Positive Definite Systems</EM>.
<BR>Computational Mathematics. Prentice-Hall, 1981.
<P></P><DT><A NAME="graham85">15</A>
<DD>
R.&nbsp;Graham and P.&nbsp;Hell.
<BR>On the history of the minimum spanning tree problem.
<BR><EM>Annals of the History of Computing</EM>, 7(1):43-57, 1985.
<P></P><DT><A NAME="hart68">16</A>
<DD>
P.&nbsp;E. Hart, N.&nbsp;J. Nilsson, and B.&nbsp;Raphael.
<BR>A formal basis for the heuristic determination of minimum cost paths.
<BR><EM>IEEE Transactions on Systems Science and Cybernetics</EM>,
4(2):100-107, 1968.
<P></P><DT><A NAME="kruskal56">18</A>
<DD>
J.&nbsp;B. Kruskal.
<BR>On the shortest spanning subtree of a graph and the traveling
salesman problem.
<BR>In <EM>Proceedings of the American Mathematical Sofiety</EM>, volume&nbsp;7,
pages 48-50, 1956.
<P></P><DT><A NAME="kuehl96:_design_patterns_for_graph_algo">19</A>
<DD>
D.&nbsp;K&#252;hl.
<BR>Design patterns for the implementation of graph algorithms.
<BR>Master's thesis, Technische Universit&#228;t Berlin, July 1996.
<P></P><DT><A NAME="lawler76:_comb_opt">20</A>
<DD>
E.&nbsp;L. Lawler.
<BR><EM>Combinatorial Opimization: Networks and Matroids</EM>.
<BR>Holt, Rinehart, and Winston, 1976.
<P></P><DT><A NAME="LIU:MMD">21</A>
<DD>
J.&nbsp;W.&nbsp;H. Liu.
<BR>Modification of the minimum-degree algorithm by multiple elimination.
<BR><EM>ACM Transaction on Mathematical Software</EM>, 11(2):141-153, 1985.
<P></P><DT><A NAME="mehlhorn99:_leda">22</A>
<DD>
K.&nbsp;Mehlhorn and S.&nbsp;Näher.
<BR><EM>The LEDA Platform of Combinatorial and Geometric Computing</EM>.
<BR>Cambridge University Press, 1999.
<P></P><DT><A NAME="meyer88:_object_soft_const">23</A>
<DD>
B.&nbsp;Meyer.
<BR><EM>Object-oriented Software Construction</EM>.
<BR>Prentice Hall International Series in Computer Science. Prentice
Hall, 1988.
<P></P><DT><A NAME="myers95:_trait">24</A>
<DD>
N.&nbsp;C. Myers.
<BR>Traits: a new and useful template technique.
<BR><EM>C++ Report</EM>, June 1995.
<P></P><DT><A NAME="prim57:_short">25</A>
<DD>
R.&nbsp;Prim.
<BR>Shortest connection networks and some generalizations.
<BR><EM>Bell System Technical Journal</EM>, 36:1389-1401, 1957.
<P></P><DT><A NAME="saad96:imsms">26</A>
<DD>
Y.&nbsp;Saad.
<BR><EM>Iterative Methods for Sparse Minear System</EM>.
<BR>PWS Publishing Company, 1996.
<P></P><DT><A NAME="tarjan83:_data_struct_network_algo">27</A>
<DD>
R.&nbsp;E. Tarjan.
<BR><EM>Data Structures and Network Algorithms</EM>.
<BR>Society for Industrial and Applied Mathematics, 1983.
<P></P><DT><A NAME="parter61:_gauss">28</A>
<DD>
Seymour Parter.
<BR><EM>The use of linear graphs in Gauss elimination</EM>.
<BR>SIAM Review, 1961 3:119-130.
<P></P><DT><A NAME="matula72:_graph_theory_computing">29</A>
<DD>
D. Matula, G. Marble, and J. Isaacson
<BR><EM>Graph coloring algorithms in Graph Theory and
Computing</EM>.<BR>
Academic Press, pp.104-122, 1972.
<P></P><DT><A NAME="garey79:computers-and-intractability">30</a>
<DD>
M.R. Garey and D.S. Johnson<BR>
<EM>Computers and Intractibility: A Guide to the Theory of
NP-Completeness</EM><BR>
W.H. Freeman, New York, 1979.
<P></P><DT><A NAME="welsch67">31</a>
<DD>D. Welsch and M. B. Powel<BR>
<EM>An upper bound for the chromatic number of a graph and its
application to timetabling problems</EM>
Computer Journal, 10:85-86, 1967.
<P></P><DT><A NAME="brelaz79:_new">32</a>
<DD>D. Br'elaz<BR>
<EM>New methods to color the vertices of a graph</EM><br>
Communications of the ACM, vol. 22, 1979, pp. 251-256.
<P></P><DT><A NAME="heber99:_saw">33</a>
<DD>G. Heber, R. Biswas, G.R. Gao<BR>
<EM>Self-Avoiding Walks over Adaptive Unstructured Grids</EM><br>
Parallel and Distributed Processing, LNCS 1586,
Springer-Verlag, 1999, pp. 968-977
<P></P><DT><A NAME="ng-raghavan">34</a>
<DD>Esmond G. Ng amd Padma Raghavan<BR>
<EM>Performance of greedy ordering heuristics for sparse {C}holesky factorization</EM><br>
SIAM Journal on Matrix Analysis and Applications (To appear)
<P></P><DT><A NAME="George:evolution">35</a>
<DD>Alan George and Joseph W. H. Liu<BR>
<EM>The Evolution of the Minimum Degree Ordering Algorithm</EM><br>
SIAM Review, March 1989, vol. 31, num. 1, pp. 1-19.
<P></P><DT><A NAME="ford56:_maxim">36</a>
<DD>L. R. Ford and D. R. Fulkerson<BR>
<EM>Maximal flow through a network.</EM><br>
Can. Journal of Mathematics 1956 pp.399-404
<P></P><DT><A NAME="goldberg85:_new_max_flow_algor">37</a>
<DD>A. V. Goldberg<BR>
<EM>A New Max-Flow Algorithm.</EM><br>
MIT Tehnical report MIT/LCS/TM-291, 1985.
<P></P><DT><A NAME="karzanov74:_deter">38</a>
<DD>A. V. Karzanov<BR>
<EM>Determining the maximal flow in a network by the method of preflows.</EM><br>
Sov. Math. Dokl. 1974
<P></P><DT><A NAME="ahuja93:_network_flows">39</a>
<DD>Ravindra K. Ahuja and Thomas L. Magnanti and James B. Orlin<BR>
<EM>Network Flows: Theory, Algorithms, and Applications.</EM><br>
Prentice Hall, 1993.
<P></P><DT><A NAME="edmonds72:_improvements_netflow">40</a>
<DD>Jack Edmonds and Richard M. Karp<BR>
<EM>Theoretical improvements in the algorithmic efficiency for network flow problems.</EM><br>
Journal of the ACM, 1972 19:248-264
<P></P><DT><A NAME="tarjan72:dfs_and_linear_algo">41</a>
<DD>Robert E. Tarjan<BR>
<EM>Depth first search and linear graph algorithms.</EM><br>
SIAM Journal on Computing, 1(2):146-160, 1972
<P></P><DT><A NAME="eppstein97:dynamic_graph">42</a>
<DD>David Eppstein, Zvi Galil, and Giuseppe F. Italiano<BR>
<EM>Dynamic Graph Algorithms.</EM><br>
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
<P></P><DT><A NAME="cuthill69:reducing_bandwith">43</a>
<DD>E. Cuthill and J. McKee<BR>
<EM>Reducing the bandwidth of sparse symmetric matrices.</EM><br>
Proceedings of the 24th National Conference of the ACM, 1969.
<P></P><DT><A NAME="liu75:anal_cm_rcm">44</a>
<DD>J. Liu and A. Sherman<BR>
<EM>Comparative analysis of the Cuthill-Mckee and the reverse
Cuthill-Mckee ordering algorithms for sparse matrices.</EM><br>
SIAM Journal of Numerical Analysis. 13 (1975), pp. 198-213.
<P></P><DT><A NAME="george71:fem">45</a>
<DD>Alan George<BR>
<EM>Computer implementation of the finite element method</EM><br>
Technical Report STAN-CS-208, Stanford University (1971).
</DL>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,246 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Breadth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:bfs">
<TT>breadth_first_search</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed and undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(V + E)</i></TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
(1)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>&gt;
void breadth_first_search(VertexListGraph& G,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
BFSVisitor vis);
(2)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>, class <a href="#ColorMap">ColorMap</a>&gt;
void breadth_first_search(const VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
BFSVisitor vis, ColorMap color);
(3)
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./Buffer.html">Buffer</a>, <a href="./BFSVisitor.html">BFSVisitor</a>, class <a href="#ColorMap">ColorMap</a>&gt;
void breadth_first_search(const VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
Buffer& Q, BFSVisitor vis, ColorMap color)
</PRE>
<P>
The breadth-first search (BFS) algorithm is not really an algorithm in
the sense that it has a particular purpose. Instead BFS is more like
an algorithm <I>pattern</I>. One can do many different things with
BFS. For example, the BFS pattern is used in the BGL to build several
other algorithms: Dijkstra's shortest paths, Prim's Minimum Spanning
Tree and best-first search. The definition of a <I>breadth-first
search</I> is given in Section <A
HREF="./graph_theory_review.html#sec:bfs-algorithm">Breadth-First
Search</A>.
<P>
The BGL BFS functions are highly parameterized so that they can be
used in a wide variety of places. The way to customize the BFS
algorithm to perform different operations is to supply a visitor,
which is a function object with multiple functions. Each member
function of the visitor gets invoked at special times during the
algorithm as specified by <a
href="./BFSVisitor.html">BFSVisitor</a>. Also, visitors can be layered
on top of each other so that one can do lots of things during a single
run of BFS. See the <a href="./bfs_visitor.html">bfs_visitor</a> class
and the <A HREF="./EventVisitor.html">EventVisitor</A> concept for
more details.
<P>
Another way to customize the BFS algorithm is change the type of queue
used. For instance, <TT>dijkstra_shortest_paths()</TT> uses a priority
queue.
<p>
The <tt>ColorMap</tt> is used by BFS to keep track of which vertices
have been visited. At the beginning of the algorithm all vertices are
white. As the algorithm proceeds, vertices are colored gray as they
are inserted into the queue, and then colored black when they are
finished and removed from queue.
<P>
Version 1 of the algorithm takes only three arguments: the graph
object, the source vertex, and a visitor to specify the actions to be
taken during the graph search. The algorithm will need to use a color
property which must be provided by the graph object (through a vertex
color property).
<P>
Version 2 of the algorithm adds a color property argument to
accommodate the use of an external property map.
<P>
Version 3 of the algorithm is the most generalized. It adds a
parameter for the queue. This version does not initialize the color of
all the vertices to white at the start of the algorithm or invoke the
<tt>initialize_vertex()</tt> visitor method, so that must be taken
care of before calling this versin of <tt>breadth_first_search()</tt>.
<P>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/breadth_first_search.hpp"><TT>boost/graph/breadth_first_search.hpp</TT></a>
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The type <TT>IncidenceGraph</TT> must be a model of <a href="./IncidenceGraph.html">IncidenceGraph</a>.
</LI>
<LI>The type <TT>VertexListGraph</TT> must be a model of <a href="./VertexListGraph.html">VertexListGraph</a>.
</LI>
<LI>The type <TT>BFSVisitor</TT> must be a model of <a href="./BFSVisitor.html">BFSVisitor</a>.
</LI>
<LI>In version (1) of the algorithm the graph must be a model
of <a href="./PropertyGraph.html">PropertyGraph</a> for
<TT>vertex_color_t</TT> and
the color property map for the graph must meet the
same requirements as <TT>ColorMap</TT>.
</LI>
<LI><a name="ColorMap">The type <TT>ColorMap</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>.
A vertex descriptor must be usable as the key type of the map,
and the value type of the map must be a model of <a
href="./ColorValue.html">ColorValue</a>.</a>
</LI>
<LI>The type <TT>Buffer</TT> must be a model of <a href="./Buffer.html">Buffer</a>.
</LI>
</UL>
<P>
<H3><A NAME="SECTION001330300000000000000">
Complexity</A>
</H3>
<P>
The time complexity is <i>O(E + V)</i>.
<P>
<H3><A NAME="SECTION001330400000000000000">
Example</A>
</H3>
<P>
This example demonstrates using the BGL Breadth-first search algorithm
on the graph from <A
HREF="./graph_theory_review.html#fig:bfs-example">Figure 5</A>. The
source code for this example is in <a
href="../example/bfs_basics.cpp"><TT>examples/bfs_basics.cpp</TT></a>.
<P>
<PRE>
// Select the graph type we wish to use
typedef adjacency_list&lt;vecS, undirectedS&gt; Graph;
// Set up the vertex ID's and names
enum { r, s, t, u, v, w, x, y, N };
char name[] = { 'r', 's', 't', 'u', 'v', 'w', 'x', 'y' };
// Specify the edges in the graph
typedef pair&lt;int,int&gt; E;
E edge_array[] = { E(r,s), E(r,v), E(s,w), E(w,r), E(w,t),
E(w,x), E(x,t), E(t,u), E(x,y), E(u,y) };
// Create the graph object
Graph G(N, edge_array, edge_array + sizeof(edge_array)/sizeof(E));
// Some typedef's to save a little typing
typedef Graph::vertex_descriptor Vertex;
typedef std::vector&lt;Vertex&gt;::iterator Piter;
typedef std::vector&lt;Graph::size_type&gt;::iterator Iiter;
// vectors to hold color, discover time, and finish time properties
std::vector&lt;default_color_type&gt; color(num_vertices(G));
std::vector&lt;Graph::size_type&gt; dtime(num_vertices(G));
std::vector&lt;Graph::size_type&gt; ftime(num_vertices(G));
breadth_first_search(G, vertex(s,G),
visit_timestamp(dtime.begin(), ftime.begin()),
color.begin());
// Use std::sort to order the vertices by their discover time
vector&lt;Graph::size_type&gt; discover_order(N);
iota(discover_order.begin(), discover_order.end(), 0);
std::sort(discover_order.begin(), discover_order.end(),
indirect_cmp&lt;Iiter, std::less&lt;Graph::size_type&gt; &gt;(dtime.begin()));
cout &lt;&lt; "order of discovery: ";
for (int i = 0; i &lt; N; ++i)
cout &lt;&lt; name[ discover_order[i] ] &lt;&lt; " ";
vector&lt;Graph::size_type&gt; finish_order(N);
iota(finish_order.begin(), finish_order.end(), 0);
std::sort(finish_order.begin(), finish_order.end(),
indirect_cmp&lt;Iiter, std::less&lt;Graph::size_type&gt; &gt;(ftime.begin()));
cout &lt;&lt; endl &lt;&lt; "order of finish: ";
for (int i = 0; i &lt; N; ++i)
cout &lt;&lt; name[ finish_order[i] ] &lt;&lt; " ";
cout &lt;&lt; endl;
</PRE>
The output is:
<PRE>
order of discovery: s r w v t x u y
order of finish: s r w v t x u y
</PRE>
<P>
<h3>See Also</h3>
<a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a> and
<a href="./depth_first_search.html"><tt>depth_first_search()</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,108 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Challenge</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h2>Boost Graph Library Challenge and To-Do Items</h2>
<ul>
<li>Polish up code/docs for pending items and champion the formal
review. The pending items are:</li>
<ul>
<li><tt>container_traits.hpp</tt> (this should also include
the work Matt Austern is doing on this topic)</li>
<li><tt>property.hpp</tt></li>
<li>The queues and heaps: <tt>queue.hpp</tt>,
<tt>mutable_queue.hpp</tt>, <tt>fibonacci_heap.hpp</tt>.
Somehow merge implementation with Dietmer's heaps and queues.</li>
<li><tt>disjoint_sets</tt> </li>
</ul>
<li>Port the graph library to Borland C++</li>
<li>Construct a set of planar graph algorithms.</li>
<ul>
<li> Is the graph planar?</li>
<li> &quot;Walk around the block&quot; and similar open and closed neighborhood
traversals. Note that edge traversals need to resolve to particular ends
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.
Again, edges are viewed as having left and right sides.</li>
<li> Given a line segment, find intersecting vertices, edges, or bounded
polygons.</li>
<li> Given a polygon, find intersecting whatever...</li>
<li> Various minimum bounding rectangle and clipping problems.</li>
<li> Construct a planar embedding of a planar graph.</li>
<li> Find a balanced separator of a graph.</li>
<li> Modify adjacency_list so that the out-edges can be ordered
according to a user defined comparison object.</li>
</ul>
<li>Floyd-Warshall algorithm.</li>
<li>Rewrite the Qhull algorithm using the Boost Graph Library.</li>
<li>Explore the use of Algorithm Objects as an alternative to
the current approach with visitors.</li>
<li>Analyze the algorithms that do not yet have visitors, and
come up with visitor interfaces for them.</li>
<li>Add a check in the adjacency_list class to make sure
all the vertex property template arguments have kind=vertex_property_tag
and all edge property template arguments have kind=edge_property_tag.</li>
<li>Clean up the output functions in graph_utility.hpp to
use streams, and document all the utility functions. Replace
the random number stuff with calls to the boost random number generator.</li>
<li>Modularize the tests in test/graph.cpp to apply to particular
concepts. Make sure there are run-time tests for every BGL concept.</li>
<li>Write tests for the BGL algorithms. Currently the examples
are used as a sanity check, but they do not constitute a real test. </li>
<li>Write up the examples from Knuth's <i>Stanford GraphBase</i> using
the BGL. The file <a
href="../example/miles_span.cpp"><tt>examples/miles_span.cpp</tt></a>
is a start.
<li>Create a class to support sub-graph views of a graph, where a
sub-graph behaves just like a graph, but shares vertex and edge
properties with the original graph. Perhaps even support sub-graphs
of sub-graphs, etc.
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,193 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Connected Components</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<A NAME="sec:connected-components"></A><A NAME="sec:strongly-connected-components"></A>
<TT>connected_components</TT>
</H1>
<P>
<DIV ALIGN="left">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">see below</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">components, color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT"><i>O(V + E)</i></TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
(2)
template &lt;class VertexListGraph, class ComponentMap, class ColorMap&gt;
typename property_traits&lt;ComponentMap&gt;::value_type
connected_components(VertexListGraph&amp; G, ComponentMap comp, ColorMap color);
(2)
template &lt;class VertexListGraph,
class ComponentMap, class ColorMap, class DFSVisitor&gt;
typename property_traits&lt;ComponentMap&gt;::value_type
connected_components(VertexListGraph&amp; G, ComponentMap comp, ColorMap color,
DFSVisitor v);
</PRE>
<P>
The <TT>connected_components()</TT> functions compute the connected
components of an undirected graph using a DFS-based approach. If the
connected-components are to be calculated over and over while a graph
is changing the disjoint-set based approach of function
<TT>dynamic_connected_components()</TT> is faster. For ``static''
graphs this DFS-based approach is faster&nbsp;[<A
HREF="bibliography.html#clr90">8</A>].
</LI>
</UL>
<P>
The output of the algorithm is recorded in the component property
map <TT>comp</TT>, which will contain numbers giving the component ID
assigned to each vertex. The number of components is the return value
of the function.
<P>
The algorithm requires the use of several property maps: color,
discover time, and finish time. There are several versions of this
algorithm to accommodate whether you wish to use interior or exterior
property maps.
<P>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/connected_components.hpp"><TT>boost/graph/connected_components.hpp</TT></a>
<P>
<H3>Definitions</H3>
<P>
A <b><I>connected component</I></b> of an undirected graph is a set of
vertices that are all reachable from each other.
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The graph type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>.
</LI>
<LI>The <TT>ComponentMap</TT> type must be a model of <a
href="../../property_map/WritablePropertyMap.html">WritablePropertyMap</a>. The
value type of the <TT>ComponentMap</TT> property map should be
an integer type, preferably the same as the <TT>size_type</TT> of
the graph. The key type should be the graph's vertex descriptor
type.
</LI>
<LI>The <TT>ColorMap</TT> map must be a <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
and the graph's vertex descriptor type should be usable as the
map's key type. The value type of the map must be a
model of <I>ColorValue</I>.
</LI>
</UL>
<P>
<H3>Complexity</H3>
<P>
The time complexity for the connected components algorithm is also
<i>O(V + E)</i>.
<P>
<h3>See Also</h3>
<a href="./strong_components.html"><tt>strong_components()</tt></a>
and <a href="./dynamic_components.html"><tt>dynamic_components()</tt></a>
<H3>Example</H3>
<P>
Calculating the connected components of an undirected graph. The
complete source is in file <a
href="../example/connected_components.cpp"><tt>examples/connected_components.cpp</tt></a>.
<P>
<PRE>
typedef discover_time_property&lt; finish_time_property
&lt; color_property&lt;&gt; &gt; &gt; VertexProperty;
typedef adjacency_list &lt;vecS, vecS, undirectedS, VertexProperty&gt; Graph;
typedef graph_traits&lt;Graph&gt;::vertex_descriptor Vertex;
const int N = 6;
Graph G(N);
add_edge(0, 1, G);
add_edge(1, 4, G);
add_edge(4, 0, G);
add_edge(2, 5, G);
std::vector&lt;int&gt; c(num_vertices(G));
int num = connected_components(G, c.begin(),
get_color_map(G), null_visitor());
cout &lt;&lt; endl;
std::vector&lt;int&gt;::iterator i;
cout &lt;&lt; "Total number of components: " &lt;&lt; num &lt;&lt; endl;
for (i = c.begin(); i != c.end(); ++i)
cout &lt;&lt; "Vertex " &lt;&lt; i - c.begin()
&lt;&lt; " is in component " &lt;&lt; *i &lt;&lt; endl;
cout &lt;&lt; endl;
</PRE>
The output is:
<PRE>
Total number of components: 3
Vertex 0 is in component 1
Vertex 1 is in component 1
Vertex 2 is in component 2
Vertex 3 is in component 3
Vertex 4 is in component 1
Vertex 5 is in component 2
</PRE>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,187 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Constructing Graph Algorithms</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>Constructing graph algorithms with BGL</H1>
<P>
The <I>main</I> goal of BGL is not to provide a nice graph class, or
to provide a comprehensive set of reusable graph algorithms (though
these are goals). The main goal of BGL is to encourage others to
write reusable graph algorithms. By reusable we mean maximally
reusable. Generic programming is a methodology for making algorithms
maximally reusable, and in this section we will discuss how to apply
generic programming to constructing graph algorithms.
<P>
To illustrate the generic programming process we will step though the
construction of a graph coloring algorithm. The graph coloring problem
(or more specifically, the vertex coloring problem) is to label each
vertex in a graph <i>G</i> with a color such that no two adjacent
vertices are labeled with the same color and such that the minimum
number of colors are used. In general, the graph coloring problem is
NP-complete, and therefore it is impossible to find an optimal
solution in a reasonable amount of time. However, there are many
algorithms that use heuristics to find colorings that are close to the
minimum.
<P>
The particular algorithm we present here is based on the linear time
<TT>SEQ</TT> subroutine that is used in the estimation of sparse
Jacobian and Hessian matrices&nbsp;[<A
HREF="bibliography.html#curtis74:_jacob">9</A>,<A
HREF="bibliography.html#coleman84:_estim_jacob">7</A>,<A
HREF="bibliography.html#coleman85:_algor">6</A>]. This algorithm
visits all of the vertices in the graph according to the order defined
by the input order. At each vertex the algorithm marks the colors of
the adjacent vertices, and then chooses the smallest unmarked color
for the color of the current vertex. If all of the colors are already
marked, a new color is created. A color is considered marked if its
mark number is equal to the current vertex number. This saves the
trouble of having to reset the marks for each vertex. The
effectiveness of this algorithm is highly dependent on the input
vertex order. There are several ordering algorithms, including the
<I>largest-first</I>&nbsp;[<A HREF="bibliography.html#welsch67">31</A>],
<I>smallest-last</I>&nbsp;[<a
href="bibliography.html#matula72:_graph_theory_computing">29</a>], and
<I>incidence degree</I>&nbsp;[<a
href="bibliography.html#brelaz79:_new">32</a>] algorithms, which
improve the effectiveness of this coloring algorithm.
<P>
The first decision to make when constructing a generic graph algorithm
is to decide what graph operations are necessary for implementing the
algorithm, and which graph concepts the operations map to. In this
algorithm we will need to traverse through all of the vertices to
intialize the vertex colors. We also need to access the adjacent
vertices. Therefore, we will choose the <a
href="./VertexListGraph.html">VertexListGraph</a> concept because it
is the minimum concept that includes these operations. The graph type
will be parameterized in the template function for this algorithm. We
do not restrict the graph type to a particular graph class, such as
the BGL <a href="./adjacency_list.html"><TT>adjacency_list</TT></a>,
for this would drastically limit the reusability of the algorithm (as
most algorithms written to date are). We do restrict the graph type to
those types that model <a
href="./VertexListGraph.html">VertexListGraph</a>. This is enforced by
the use of those graph operations in the algorithm, and furthermore by
our explicit requirement added as a concept check with
<TT>function_requires()</TT> (see Section <A
HREF="../../concept_check/concept_check.htm">Concept
Checking</A> for more details about concept checking).
<P>
Next we need to think about what vertex or edge properties will be
used in the algorithm. In this case, the only property is vertex
color. The most flexible way to specify access to vertex color is to
use the propery map interface. This gives the user of the
algorithm the ability to decide how they want to store the properties.
Since we will need to both read and write the colors we specify the
requirements as <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
<TT>key_type</TT> of the color map must be the
<TT>vertex_descriptor</TT> from the graph, and the <TT>value_type</TT>
must be some kind of integer. We also specify the interface for the
<TT>order</TT> parameter as a property map, in this case a <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>. For
order, the <TT>key_type</TT> is an integer offset and the
<TT>value_type</TT> is a <TT>vertex_descriptor</TT>. Again we enforce
these requirements with concept checks. The return value of this
algorithm is the number of colors that were needed to color the graph,
hence the return type of the function is the graph's
<TT>vertices_size_type</TT>. The following code shows the interface for our
graph algorithm as a template function, the concept checks, and some
typedefs. The implementation is straightforward, the only step not
discussed above is the color initialization step, where we set the
color of all the vertices to ``uncolored''.
<P>
<PRE>
namespace boost {
template &lt;class VertexListGraph, class Order, class Color&gt;
typename graph_traits&lt;VertexListGraph&gt;::vertices_size_type
sequential_vertex_color_ting(const VertexListGraph&amp; G,
Order order, Color color)
{
typedef graph_traits&lt;VertexListGraph&gt; GraphTraits;
typedef typename GraphTraits::vertex_descriptor vertex_descriptor;
typedef typename GraphTraits::vertices_size_type size_type;
typedef typename property_traits&lt;Color&gt;::value_type ColorType;
typedef typename property_traits&lt;Order&gt;::value_type OrderType;
function_requires&lt; VertexListGraphConcept&lt;VertexListGraph&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Color, vertex_descriptor&gt; &gt;();
function_requires&lt; IntegerConcept&lt;ColorType&gt; &gt;();
function_requires&lt; size_type, ReadablePropertyMapConcept&lt;Order&gt; &gt;();
typedef typename same_type&lt;OrderType, vertex_descriptor&gt;::type req_same;
size_type max_color = 0;
const size_type V = num_vertices(G);
std::vector&lt;size_type&gt;
mark(V, numeric_limits_max(max_color));
typename GraphTraits::vertex_iterator v, vend;
for (tie(v, vend) = vertices(G); v != vend; ++v)
color[*v] = V - 1; // which means "not colored"
for (size_type i = 0; i &lt; V; i++) {
vertex_descriptor current = order[i];
// mark all the colors of the adjacent vertices
typename GraphTraits::adjacency_iterator ai, aend;
for (tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
mark[color[*ai]] = i;
// find the smallest color unused by the adjacent vertices
size_type smallest_color = 0;
while (smallest_color &lt; max_color &amp;&amp; mark[smallest_color] == i)
++smallest_color;
// if all the colors are used up, increase the number of colors
if (smallest_color == max_color)
++max_color;
color[current] = smallest_color;
}
return max_color;
}
} // namespace boost
</PRE>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,182 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Cuthill-Mckee Ordering</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:bfs">
<TT>cuthill_mckee_ordering</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color, degree</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(log(m)|E|)</i> where <i>m = max { degree(v) | v in V }</i> </TD>
</TR>
</TABLE>
</DIV>
<pre>
(1)
template &lt;class IncidenceGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
void
cuthill_mckee_ordering(IncidenceGraph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
(2)
template &lt;class VertexListGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
void
cuthill_mckee_ordering(VertexListGraph&amp; G, OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
</pre>
The goal of the Cuthill-Mckee (and reverse Cuthill-Mckee) ordering
algorithm[<A
HREF="bibliography.html#george81:__sparse_pos_def">14</A>, <A
HREF="bibliography.html#cuthill69:reducing_bandwith">43</A>, <a
href="bibliography.html#liu75:rcm">44</a>, <a
href="bibliography.html#george71:fem">45</a> ] is to reduce the <a
href="./bandwidth.html">bandwidth</a> of a graph by reordering the
indices assigned to each vertex. The Cuthill-Mckee ordering algorithm
works by a local minimization of the i-th bandwidths. The vertices are
basically assigned a breadth-first search order, except that at each
step, the adjacent vertices are placed in the queue in order of
increasing degree.
<p>
Version 1 of the algorithm lets the user choose the ``starting
vertex'' whereas version 2 finds a good starting vertex using the
pseudo-peripheral pair heuristic. The choice of the ``starting
vertex'' can have a significant effect on the quality of the ordering.
<p>
The output of the algorithm are the vertices in the new ordering.
Depending on what kind of output iterator you use, you can get either
the Cuthill-Mckee ordering or the reverse Cuthill-McKee ordering. For
example, if you store the output into a vector using the vector's
reverse iterator, then you get the reverse Cuthill-McKee ordering.
<pre>
std::vector&lt;vertex_descriptor&gt; inv_perm(num_vertices(G));
cuthill_mckee_ordering(G, inv_perm.rbegin());
</pre>
<p>
Either way, storing the output into a vector gives you the
permutation from the new ordering to the old ordering.
<pre>
inv_perm[new_index[u]] == old_index[u]
</pre>
<p>
Often times, it is the opposite permutation that you want, the
permutation from the old index to the new index. This can easily be
computed in the following way.
<pre>
for (size_type i = 0; i != inv_perm.size(); ++i)
perm[inv_perm[i]] = i;
</pre>
<h3>Parameters</h3>
For version 1:
<ul>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a
href="./IncidenceGraph.html">IncidenceGraph</a>.
<li> <tt>vertex_descriptor s</tt> &nbsp(IN) <br>
The starting vertex.
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the <a
href="http://www.sgi.com/tech/stl/OutputIterator.html">output
iterator</a> in their new order.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).
<li> <tt>DegreeMap degree_map</tt> &nbsp(IN) <br>
This must map vertices to their degree.
</ul>
For version 2:
<ul>
<li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>.
<li> <tt><a href="http://www.sgi.com/tech/stl/OutputIterator.html">
OutputIterator</a> inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the
output iterator in their new order.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).
<li> <tt>DegreeMap degree_map</tt> &nbsp(IN) <br>
This must map vertices to their degree.
</ul>
<h3>Example</h3>
See <a
href="../example/cuthill_mckee_ordering.cpp"><tt>example/cuthill_mckee_ordering.cpp</tt></a>.
<h3>See Also</h3>
<a href="./bandwidth.html">bandwidth</tt></a>,
and <tt>degree_property_map</tt> in <tt>boost/graph/properties.hpp</tt>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,223 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Depth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:depth-first-search"></A>
<TT>depth_first_search</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed and undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(V + E)</i></TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
<TD ALIGN="LEFT">
<a href="../../../boost/graph/depth_first_search.hpp"><TT>boost/graph/depth_first_search.hpp</TT></a>
</TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
(1)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>&gt;
void depth_first_search(VertexListGraph&amp; G, DFSVisitor v);
(2)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class <a href="#ColorMap">ColorMap</a>&gt;
void depth_first_search(VertexListGraph&amp; G, DFSVisitor v, ColorMap c);
</PRE>
<P>
The <TT>depth_first_search()</TT> algorithm performs a depth-first
search (DFS) on a graph, invoking the methods of the graph search
visitor at the appropriate event-points. A depth-first search visits
all the vertices in a graph, starting with some arbitrary vertex and
then always choosing the next adjacent unvisited vertex. Once the DFS
reaches a vertex with no unvisited neighbors it backtracks to one of
the previous vertices and continues from there. Once all of the
vertices in the same connected component have been visited, another
arbitrary unvisited vertex is choosen and the depth-first search
resumes. A more detailed explanation of DFS is given in Section <A
HREF="./graph_theory_review.html#sec:dfs-algorithm">Depth-First
Search</A>. The depth-first exploration of each connected component is
implemented by the function <a
href="./depth_first_visit.html"><tt>depth_first_visit()</tt></a>.
<p>
The <tt>DFSVisitor</tt> supplied by the user determines what
actions are taken at each event-point within the algorithm.
<p>
The <tt>ColorMap</tt> is used by the algorithm to keep track
of which vertices have been visited.
<P>
DFS is used as the kernel for several other graph algorithms,
including <a
href="./topological_sort.html"><tt>topological_sort</tt></a> and two
of the connected component algorithms.
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The type <TT>VertexListGraph</TT> must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>.
</LI>
<LI>In version (1) of the algorithm the graph must be a model of <a
href="./PropertyGraph.html">PropertyGraph</a> for
<TT>vertex_color_t</TT> and the color property map for the graph
must meet the same requirements as <TT>ColorMap</TT>.
</LI>
<LI><a name="ColorMap">The type <TT>ColorMap</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The key type of <tt>ColorMap</tt> must be the vertex descriptor type for the graph and the value type of <TT>ColorMap</TT> must be a model of
<a href="./ColorValue.html">ColorValue</a>.</a>
</LI>
<LI>The <tt>DFSVisitor</tt> type must be a model of <a
href="./DFSVisitor.html">DFSVisitor</a>.
</LI>
</UL>
<P>
<H3><A NAME="SECTION001340300000000000000">
Complexity</A>
</H3>
<P>
The time complexity is <i>O(E + V)</i>.
<P>
<H3>Example</H3>
<P>
This example shows DFS applied to the graph in <A
HREF="./graph_theory_review.html#fig:dfs-example">Figure 1</A>. The
source code for this example is in <a
href="../example/dfs_basics.cpp"><TT>examples/dfs_basics.cpp</TT></a>.
<P>
<p></p>
<DIV ALIGN="CENTER"><A NAME="fig:dfs-example"></A></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG>
Depth-first search spreading through a graph.
</CAPTION>
<TR><TD><IMG SRC="./figs/dfs_example.gif" width="166" height="91"></TD></TR>
</TABLE>
</DIV>
<p></p>
<P>
<PRE>
// Select the graph type we wish to use
typedef boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::directedS&gt; Graph;
// Set up the vertex names
enum { u, v, w, x, y, z, N };
char name[] = { 'u', 'v', 'w', 'x', 'y', 'z' };
// Specify the edges in the graph
typedef std::pair&lt;int,int&gt; E;
E edge_array[] = { E(u,v), E(u,x), E(x,v), E(y,x),
E(v,y), E(w,y), E(w,z), E(z,z) };
Graph G(N, edge_array, edge_array + sizeof(edge_array)/sizeof(E));
// Some typedef's to save a little typing
typedef boost::graph_traits&lt;Graph&gt;::vertex_descriptor Vertex;
typedef boost::graph_traits&lt;Graph&gt;::vertices_size_type size_type;
typedef std::vector&lt;Vertex&gt;::iterator Piter;
typedef std::vector&lt;size_type&gt;::iterator Iiter;
// color, discover time, and finish time properties
std::vector&lt;default_color_type&gt; color(num_vertices(G));
std::vector&lt;size_type&gt; dtime(num_vertices(G));
std::vector&lt;size_type&gt; ftime(num_vertices(G));
boost::depth_first_search(G, boost::visit_timestamp(dtime.begin(), ftime.begin()),
color.begin());
// use std::sort to order the vertices by their discover time
std::vector&lt;size_type&gt; discover_order(N);
boost::iota(discover_order.begin(), discover_order.end(), 0);
std::sort(discover_order.begin(), discover_order.end(),
boost::indirect_cmp&lt;Iiter, std::less&lt;size_type&gt; &gt;(dtime.begin()));
std::cout &lt;&lt; "order of discovery: ";
for (int i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[ discover_order[i] ] &lt;&lt; " ";
std::vector&lt;size_type&gt; finish_order(N);
boost::iota(finish_order.begin(), finish_order.end(), 0);
std::sort(finish_order.begin(), finish_order.end(),
boost::indirect_cmp&lt;Iiter, std::less&lt;size_type&gt; &gt;(ftime.begin()));
std::cout &lt;&lt; endl &lt;&lt; "order of finish: ";
for (size_type i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[ finish_order[i] ] &lt;&lt; " ";
std::cout &lt;&lt; std::endl;
</PRE>
The output is:
<PRE>
order of discovery: u v y x w z
order of finish: x y v u z w
</PRE>
<P>
<h3>See Also</h3>
<a href="./depth_first_visit.html"><tt>depth_first_visit</tt></a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,107 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Depth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H2><A NAME="sec:dfs"></A>
<TT>depth_first_visit</TT>
</H2>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed and undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(E)</i></TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
<TD ALIGN="LEFT">
<a href="../../../boost/graph/depth_first_search.hpp"><TT>boost/graph/depth_first_search.hpp</TT></a>
</TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class <a href="#ColorMap">ColorMap</a>&gt;
void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color)
</PRE>
<P>
This function visits all of the vertices in the same connected
component as the source vertex <tt>s</tt>, using the <a
href="./graph_theory_review.html#sec:dfs-algorithm">depth-first
pattern</a>. The main purpose of the function is for the
implementation of <TT>depth_first_search()</TT> though sometimes it is
useful on its own.
<p>
The <tt>DFSVisitor</tt> supplied by the user determines what
actions are taken at each event-point within the algorithm.
<p>
The <tt>ColorMap</tt> is used by the algorithm to keep track
of which vertices have been visited.
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The type <TT>IncidenceGraph</TT> must be a model of
<a href="./IncidenceGraph.html">IncidenceGraph</a>.
</LI>
<LI>The type <TT>DFSVisitor</TT> must be a model of <a
href="./DFSVisitor.html">DFSVisitor</a>.
</LI>
<LI><a name="ColorMap">The type <TT>ColorMap</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The key type of <tt>ColorMap</tt> must be the vertex descriptor type for the graph and the value type of <TT>ColorMap</TT> must be a model of
<a href="./ColorValue.html">ColorValue</a>.</a>
</LI>
</UL>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,115 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: dfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
dfs_visitor&lt;EventVisitorList&gt;
</pre>
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
<tt>std::pair</tt>) into a <a href="./DFSVisitor.html">DFSVisitor</a>.
<h3>Example</h3>
See the example for <a href="./EventVisitor.html">EventVisitor</a>.
<h3>Model of</h3>
<a href="./DFSVisitor.html">DFSVisitor</a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EventVisitorList</TT></TD>
<TD>
A list of <a href="./EventVisitor.html">EventVisitor</a>'s created
with <tt>std::pair</tt>.
</TD>
<TD><TT><a href="./null_visitor.html"><tt>null_visitor</tt></a></TT></TD>
</TR>
</table>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/depth_first_search.hpp">
<TT>boost/graph/depth_first_search.hpp</TT></a>
<h3>Member Functions</h3>
This class implements all of the member functions required by <a
href="./DFSVisitor.html">DFSVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class EventVisitorList&gt;<br>
dfs_visitor&lt;EventVisitorList&gt;<br>
make_dfs_visitor(EventVisitorList ev_list);
</tt></td><td>
Returns the event visitor list adapted to be a DFS visitor.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are event visitors: <a
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,236 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Dijkstra's Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:dijkstra"></A>
<TT>dijkstra_shortest_paths</TT>
</H1>
<P>
<DIV ALIGN="left">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed and undirected</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color, distance, weight, vertex index</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT"><i>O((V + E) log V)</i>
</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
<TD ALIGN="LEFT">
<a href="../../../boost/graph/dijkstra_shortest_paths.hpp"><TT>boost/graph/dijkstra_shortest_paths.hpp</TT></a>
</TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
(1)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>&gt;
void
dijkstra_shortest_paths(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s);
(2)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="#DistanceMap">DistanceMap</a>&gt;
void
dijkstra_shortest_paths(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
DistanceMap d);
(3)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="#DistanceMap">DistanceMap</a>, class <a href="./UniformCostVisitor.html">UniformCostVisitor</a>&gt;
void
dijkstra_shortest_paths(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
DistanceMap d, UniformCostVisitor visit);
(4)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./UniformCostVisitor.html">UniformCostVisitor</a>,
class <a href="#DistanceMap">DistanceMap</a>, class <a href="#WeightMap">WeightMap</a>, class <a href="#ColorMap">ColorMap</a>, class <a href="#VertexIndexMap">VertexIndexMap</a>&gt;
void
dijkstra_shortest_paths(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
DistanceMap distance, WeightMap weight, ColorMap color, VertexIndexMap id,
UniformCostVisitor vis);
</PRE>
<P>
This is the modified Dijkstra algorithm&nbsp;[<A
HREF="bibliography.html#dijkstra59">10</A>,<A
HREF="bibliography.html#clr90">8</A>] which solves the single-source
shortest-paths problem on a weighted, directed graph for the case
where all edge weights are nonnegative. See Section <A
HREF="graph_theory_review.html#sec:shortest-path-algorithms">Shortest-Paths Algorithms</A>
for some background to the shortest-path problem. The priority queue
used inside the algorithm is implemented with a heap for efficiency.
<P>
There are four versions of the algorithm to accommodate whether the
necessary graph properties will be supplied by the graph object or
externally via a argument to this function. The properties needed by
the algorithm are distance, weight, color, and vertex index. Version 3
and 4 of the algorithm also include a visitor argument for added
extensibility.
<P>
<H3>Requirements on Types</H3>
<P>
<UL>
<LI>The type <TT>VertexListGraph</TT> must be a model of <a href="./VertexListGraph.html">VertexListGraph</a>.
</LI>
<li>In version (1) of the algorithm, the graph must be a <a href="./PropertyGraph.html">PropertyGraph</a> with respect to <tt>vertex_color_t</tt>,
<tt>vertex_distance_t</tt>, <tt>edge_weight_t</tt>, and <tt>vertex_index_t</tt></li>
<li>In version (2) of the algorithm, the graph must be a <a href="./PropertyGraph.html">PropertyGraph</a> with respect to <tt>vertex_color_t</tt>,
<tt>edge_weight_t</tt>, and <tt>vertex_index_t</tt></li>
<li>In version (3) of the algorithm, the graph must be a <a href="./PropertyGraph.html">PropertyGraph</a> with respect to <tt>vertex_color_t</tt>,
<tt>edge_weight_t</tt>, and <tt>vertex_index_t</tt></li>
<LI>The type <TT>UniformCostVisitor</TT> must be a model of <a href="./UniformCostVisitor.html">UniformCostVisitor</a>.
</LI>
<LI><a name="DistanceMap">The type <TT>DistanceMap</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
vertex descriptor type of the graph needs to be usable as the key
type of the distance map. The value type of the distance
map must be <a href="http://www.sgi.com/tech/stl/LessThanComparable.html">LessThanComparable</a>.</a>
</LI>
<LI><a name="WeightMap">The type <TT>WeightMap</TT> must be a model of <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>. The
edge descriptor type of the graph needs to be usable as the key
type for the weight map. The value type for the map
must be <I>Addable</I> with the value type of the distance
map.</a>
</LI>
<LI><a name="ColorMap">The type <TT>ColorMap</TT> must be a model of
<a href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. A vertex descriptor must be
usable as the key type of the map, and the value type of the
map must be a model of <a href="./ColorValue.html">ColorValue</a>.</a>
</LI>
<LI><a name="VertexIndexMap">The type <TT>VertexIndexMap</TT> must be a model of <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>. The
value type of <TT>VertexIndexMap</TT> must be an integer type. The
integers must map vertex descriptors to the integers zero through
<tt>num_vertices(g) - 1</tt>. The vertex
descriptor type of the graph needs to be usable as the key type
of the vertex index map.</a>
</LI>
</UL>
<P>
<H3>Complexity</H3>
<P>
The time complexity is <i>O((V + E) log V)</i>, or just <i>O(E log V)</i>
if all vertices are reachable from the source.
<H3>Example</H3>
<P>
The source code for this example is in <a
href="../example/dijkstra.cpp"><TT>examples/dijkstra.cpp</TT></a>.
<P>
<PRE>
int
main(int , char* [])
{
using namespace boost;
typedef property&lt;edge_weight_t, int&gt; weightp;
typedef adjacency_list&lt; listS, vecS, directedS,
property&lt;vertex_color_t,default_color_type&gt;, weightp &gt; Graph;
typedef graph_traits&lt;Graph&gt;::vertex_descriptor Vertex;
typedef std::pair&lt;int,int&gt; E;
const int num_nodes = 5;
E edges[] = { E(0,2),
E(1,1), E(1,3), E(1,4),
E(2,1), E(2,3),
E(3,4),
E(4,0), E(4,1) };
int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1};
Graph G(num_nodes, edges, edges + sizeof(edges)/sizeof(E), weights);
std::vector&lt;Vertex&gt; p(num_vertices(G));
std::vector&lt;int&gt; d(num_vertices(G));
Vertex s = *(vertices(G).first);
p[s] = s;
dijkstra_shortest_paths(G, s, &d[0],
make_ucs_visitor(record_predecessors(&p[0], on_edge_relaxed())));
std::cout &lt;&lt; "distances from start vertex:" &lt;&lt; std::endl;
graph_traits&lt;Graph&gt;::vertex_iterator vi, vend;
for(tie(vi,vend) = vertices(G); vi != vend; ++vi)
std::cout &lt;&lt; "distance(" &lt;&lt; *vi &lt;&lt; ") = " &lt;&lt; d[*vi] &lt;&lt; std::endl;
std::cout &lt;&lt; std::endl;
std::cout &lt;&lt; "shortest paths tree" &lt;&lt; std::endl;
adjacency_list&lt;&gt; tree(num_nodes);
for(tie(vi,vend) = vertices(G); vi != vend; ++vi)
if (*vi != p[*vi])
add_edge(p[*vi], *vi, tree);
print_graph(tree);
return 0;
}
</PRE>
The output is:
<PRE>
distances from start vertex:
distance(0) = 0
distance(1) = 6
distance(2) = 1
distance(3) = 4
distance(4) = 5
shortest paths tree
0 --> 2
1 -->
2 --> 3
3 --> 4
4 --> 1
</PRE>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,186 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: distance_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
distance_recorder&lt;DistanceMap, EventTag&gt;
</pre>
</H1>
This is an <a href="./EventVisitor.html">EventVisitor</a> that records
the distance of a vertex (using a <a
href="property_map.html">property map</a>) from some
source vertex during a graph search. When applied to edge <i>e =
(u,v)</i>, the distance of <i>v</i> is recorded to be one more than
the distance of <i>u</i>. The distance recorder is typically used with
the <tt>on_tree_edge</tt> or <tt>on_relax_edge</tt> events, and
cannot be used with vertex events.
<p>
<tt>distance_recorder</tt> can be used with graph algorithms by
wrapping it with the algorithm specific adaptor, such as <a
href="./bfs_visitor.html"><tt>bfs_visitor</tt></a> and <a
href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>. Also, this event
visitor can be combined with other event visitors using
<tt>std::pair</tt> to form an EventVisitorList.
<h3>Example</h3>
See the example for <a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>.
<h3>Model of</h3>
<a href="./EventVisitor.html">EventVisitor</a>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/visitors.hpp">
<TT>boost/graph/visitors.hpp</TT></a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>DistanceMap</TT></TD>
<TD>
A <a
href="../../property_map/WritablePropertyMap.html">WritablePropertyMap</a>,
where the key type and the value type are the vertex descriptor type
of the graph.
</TD>
<TD>&nbsp;</TD>
</TR>
<TR><TD><TT>EventTag</TT></TD>
<TD>
The tag to specify when the <tt>distance_recorder</tt> should be
applied during the graph algorithm. <tt>EventTag</tt> must be an
edge event.
</TD>
<TD>&nbsp;</TD>
</TR>
</table>
<H2>Associated Types</H2>
<table border>
<tr>
<th>Type</th><th>Description</th>
</tr>
<tr>
<td><tt>distance_recorder::event_filter</tt></td>
<td>
This will be the same type as the template parameter <tt>EventTag</tt>.
</td>
</tr>
</table>
<h3>Member Functions</h3>
<p>
<table border>
<tr>
<th>Member</th><th>Description</th>
</tr>
<tr>
<td><tt>
distance_recorder(DistanceMap pa);
</tt></td>
<td>
Construct a distance recorder object with distance property map
<tt>pa</tt>.
</td>
</tr>
<tr>
<td><tt>
template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
one plus the distance of <i>u</i>.
</td>
</tr>
</table>
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class DistanceMap, class Tag&gt;<br>
distance_recorder&lt;DistanceMap, Tag&gt; <br>
record_distances(DistanceMap pa, Tag);
</tt></td><td>
A convenient way to create a <tt>distance_recorder</tt>.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are other event visitors: <a
href="./distance_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: DistanceMap EventTag EventVisitor map bfs dfs const Siek
-->
<!-- LocalWords: EventVisitorList WritablePropertyMap Univ Quan
-->
<!-- LocalWords: Lumsdaine
-->

View File

@@ -1,225 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Edge List Class</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:edge-list-class"></A>
<PRE>
edge_list&lt;EdgeIterator, ValueType, DiffType&gt;
</PRE>
</H1>
<P>
The <TT>edge_list</TT> class is an adaptor that turns a pair of edge
iterators into a class that models <TT>EdgeListGraph</TT>. The
<TT>value_type</TT> of the edge iterator must be a <TT>std::pair</TT> (or
at least have <TT>first</TT> and <TT>second</TT> members). The
<TT>first_type</TT> and <TT>second_type</TT> of the pair must be the
same and they will be used for the graph's <TT>vertex_descriptor</TT>.
The <TT>ValueType</TT> and <TT>DiffType</TT> template parameters are only
needed if your compiler does not support partial
specialization. Otherwise they default to the correct types.
<P>
<H3>Example</H3>
<P>
Applying the Bellman-Ford shortest paths algorithm to an
<TT>edge_list</TT>.
<P>
<PRE>
enum { u, v, x, y, z, N };
char name[] = { 'u', 'v', 'x', 'y', 'z' };
typedef std::pair&lt;int,int&gt; E;
E edges[] = { E(u,y), E(u,x), E(u,v),
E(v,u),
E(x,y), E(x,v),
E(y,v), E(y,z),
E(z,u), E(z,x) };
int weight[] = { -4, 8, 5,
-2,
9, -3,
7, 2,
6, 7 };
typedef boost::edge_list&lt;E*&gt; Graph;
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; parent(N,-1);
distance[z] = 0;
parent[z] = z;
bool r = boost::bellman_ford_shortest_paths(g, int(N), weight,
distance.begin(),
parent.begin());
if (r)
for (int i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[i] &lt;&lt; ": " &lt;&lt; distance[i]
&lt;&lt; " " &lt;&lt; name[parent[i]] &lt;&lt; std::endl;
else
std::cout &lt;&lt; "negative cycle" &lt;&lt; std::endl;
</PRE>
The output is the distance from the root and the parent
of each vertex in the shortest paths tree.
<PRE>
u: 2 v
v: 4 x
x: 7 z
y: -2 u
z: 0 z
</PRE>
<P>
<p>
<H3>Where Defined</H3>
<a href="../../../boost/graph/edge_list.hpp"><TT>boost/graph/edge_list.hpp</TT></a>
<P>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th>
</tr>
<TR><TD><TT>EdgeIterator</TT></TD> <TD>Must be model of <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
who's <TT>value_type</TT> must be a pair of vertex descriptors.</TD>
</TR>
<TR><TD><TT>ValueType</TT></TD>
<TD>The <TT>value_type</TT> of the <TT>EdgeIterator</TT>.<br>
Default: <TT>std::iterator_traits&lt;EdgeIterator&gt;::value_type</TT></TD>
</TR>
<TR><TD><TT>DiffType</TT></TD>
<TD>The <TT>difference_type</TT> of the <TT>EdgeIterator</TT>.<br>
Default: <TT>std::iterator_traits&lt;EdgeIterator&gt;::difference_type</TT></TD>
</TR>
</TABLE>
<P>
<H3>Model of</H3>
<a href="./EdgeListGraph.html">EdgeListGraph</a>
<P>
<H3>Associated Types</H3>
<hr>
<tt>boost::graph_traits&lt;edge_list&gt;::vertex_descriptor</tt>
<br><br>
The type for the vertex descriptors associated with the
<TT>edge_list</TT>. This will be the same type as
<TT>std::iterator_traits&lt;EdgeIterator&gt;::value_type::first_type</TT>.
<hr>
<tt>
boost::graph_traits&lt;edge_list&gt;::edge_descriptor
</tt>
<br><br>
The type for the edge descriptors associated with the
<TT>edge_list</TT>.
<hr>
<tt>
boost::graph_traits&lt;edge_list&gt;::edge_iterator
</tt>
<br><br>
The type for the iterators returned by <TT>edges()</TT>. The iterator
category of the <TT>edge_iterator</TT> will be the same as that of the
<TT>EdgeIterator</TT>.
<hr>
<h3>Member Functions</h3>
<hr>
<tt>
edge_list(EdgeIterator first, EdgeIterator last)
</tt>
<br><br>
Creates a graph object with <TT>n</TT> vertices and with the
edges specified in the edge list given by the range <TT>[first,last)</TT>.
<hr>
<H3>Non-Member Functions</H3>
<hr>
<tt>
std::pair&lt;edge_iterator, edge_iterator&gt;<br>
edges(const edge_list&amp; g)
</tt>
<br><br>
Returns an iterator-range providing access to the edge set of graph <TT>g</TT>.
<hr>
<tt>
vertex_descriptor<br>
source(edge_descriptor e, const edge_list&amp; g)
</tt>
<br><br>
Returns the source vertex of edge <TT>e</TT>.
<hr>
<tt>
vertex_descriptor<br>
target(edge_descriptor e, const edge_list&amp; g)
</tt>
<br><br>
Returns the target vertex of edge <TT>e</TT>.
<hr>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
<A HREF=http://www.lsc.nd.edu/~lums>Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>

View File

@@ -1,306 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: Edmunds-Karp Maximum Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:edmunds_karp_max_flow">
<TT>edmunds_karp_max_flow</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">directed</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">edge capacity, edge residual capacity, reverse edge,
(vertex index | edge predecessor of vertex, vertex color)</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(V E<sup>2</sup>)</i> or <i>O(V E U)</i> if capacity values are integers bounded by <i>U</i></TD>
</TR>
</TABLE>
</DIV>
<P>
<PRE>
(1)
template &lt;typename VertexListGraph,
typename CapacityEdgeMap, typename ResidualCapacityEdgeMap,
typename ReverseEdgeMap, typename VertexIndexMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type
edmunds_karp_max_flow
(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor src,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor sink,
CapacityEdgeMap cap,
ResidualCapacityEdgeMap res,
ReverseEdgeMap rev,
VertexIndexMap index_map)
(2)
template &lt;typename VertexListGraph,
typename CapacityEdgeMap, typename ResidualCapacityEdgeMap,
typename ReverseEdgeMap, typename ColorMap, typename PredEdgeMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type
edmunds_karp_max_flow
(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor src,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor sink,
CapacityEdgeMap cap,
ResidualCapacityEdgeMap res,
ReverseEdgeMap rev,
ColorMap color,
PredEdgeMap pred)
</PRE>
<P>
The <tt>edmunds_karp_max_flow()</tt> function calculates the maximum flow
of a network. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow. The calculated
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
<i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<p>
There are several special requirements on the input graph and property
map parameters for this algorithm. First, the directed graph
<i>G=(V,E)</i> that represents the network must be augmented to
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
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
<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>. The
<tt>CapacityEdgeMap</tt> argument <tt>cap</tt> must map each edge in
<i>E</i> to a positive number, and each edge in <i>E<sup>T</sup></i>
to 0.
<p>
The algorithm is due to <a
href="./bibliography.html#edmonds72:_improvements_netflow">Edmonds and
Karp</a>, though we are using the variation called the ``labeling
algorithm'' described in <a
href="./bibliography.html#ahuja93:_network_flows">Network Flows</a>.
<p>
This algorithm provides a very simple an easy to implement solution to
the maximum flow problem. However, there are several reasons why this
algorithm is not as good as the <a
href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>
algorithm.
<ul>
<li>In the non-integer capacity case, the time complexity is <i>O(V
E<sup>2</sup>)</i> which is worse than the time complexity of the
push-relabel algorithm <i>O(V<sup>2</sup>E<sup>1/2</sup>)</i>
for all but the sparsest of graphs.</li>
<li>In the integer capacity case, if the capacity bound <i>U</i> is
very large then the algorithm will take a long time.</li>
</ul>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/edmunds_karp_max_flow.hpp"><TT>boost/graph/edmunds_karp_max_flow.hpp</TT></a>
<P>
<h3>Parameters</h3>
<p>
For version 1:
<ul>
<li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br>
A directed graph. The
graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>. For each edge
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph.
<li> <tt>vertex_descriptor src</tt> &nbsp(IN) <br>
The source vertex for the flow network graph.
<li> <tt>vertex_descriptor sink</tt> &nbsp(IN) <br>
The sink vertex for the flow network graph.
<li> <tt>CapacityEdgeMap cap</tt> &nbsp(IN) <br>
The edge capacity property map. The type must be a model of a
constant <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>. The
key type of the map must be the graph's edge descriptor type.
<li> <tt>ResidualCapacityEdgeMap res</tt> &nbsp;(OUT) <br>
The edge residual capacity property map. The type must be a model of
a mutable <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>. The
key type of the map must be the graph's edge descriptor type.
<li> <tt>ReverseEdgeMap rev</tt> &nbsp;(OUT) <br>
An edge property map that maps every edge <i>(u,v)</i> in the graph
to the reverse edge <i>(v,u)</i>. The map must be a model of
constant <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>. The
key type of the map must be the graph's edge descriptor type.
<li> <tt>VertexIndexMap index_map</tt> &nbsp(IN) <br>
Maps each vertex of the graph to a unique integer in the range
<tt>[0, num_vertices(g))</tt>. The map must be a model of constant <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>. The
key type of the map must be the graph's vertex descriptor type.
</ul>
<p>
For version 2 (all of the above, minus the vertex index map, plus the
following):
<ul>
<li> <tt>ColorMap color</tt> &nbsp;(WORK) <br>
Used by the algorithm to keep track of progress during the
breadth-first search stage. At the end of the algorithm, the white
vertices define the minimum cut set. The map must be a model of
mutable <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>.
The key type of the map should be the graph's vertex descriptor type, and
the value type must be a model of <a
href="./ColorValue.html">ColorValue</a>.</li>
<li> <tt>PredEdgeMap pred</tt> &nbsp;(WORK) <br>
Use by the algorithm to store augmenting paths. The map must be a
model of mutable <a
href="../../property_map/LvaluePropertyMap.html">LvaluePropertyMap</a>.
The key type must be the graph's vertex descriptor type and the
value type must be the graph's edge descriptor type.
</ul>
<h3>Example</h3>
This reads in an example maximum flow problem (a graph with edge
capacities) from a file in the DIMACS format. The source for this
example can be found in <a
href="../example/edmunds_karp_max_flow.cpp"><tt>example/edmunds_karp_max_flow.cpp</tt></a>.
<pre>
#include &lt;boost/config.hpp&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;boost/graph/edmunds_karp_map_flow.hpp&gt;
#include &lt;boost/graph/adjacency_list.hpp&gt;
#include &lt;boost/graph/read_dimacs.hpp&gt;
int
main()
{
using namespace boost;
typedef adjacency_list_traits&lt;vecS, vecS, directedS&gt; Traits;
typedef adjacency_list&lt;vecS, vecS, directedS,
property&lt;vertex_name_t, std::string&gt;,
property&lt;edge_capacity_t, long,
property&lt;edge_residual_capacity_t, long,
property&lt;edge_reverse_t, Traits::edge_descriptor&gt; &gt; &gt;
&gt; Graph;
Graph g;
long flow;
property_map&lt;Graph, edge_capacity_t&gt;::type
capacity = get(edge_capacity, g);
property_map&lt;Graph, edge_residual_capacity_t&gt;::type
residual_capacity = get(edge_residual_capacity, g);
property_map&lt;Graph, edge_reverse_t&gt;::type
reverse_edge = get(edge_reverse, g);
Traits::vertex_descriptor s, t;
read_dimacs_max_flow(g, capacity, residual_capacity, reverse_edge, s, t);
flow = edmunds_karp_max_flow(g, s, t, capacity, residual_capacity,
reverse_edge, get(vertex_index, g));
std::cout &lt;&lt; "c The total flow:" &lt;&lt; std::endl;
std::cout &lt;&lt; "s " &lt;&lt; flow &lt;&lt; std::endl &lt;&lt; std::endl;
std::cout &lt;&lt; "c flow values:" &lt;&lt; std::endl;
graph_traits&lt;Graph&gt;::vertex_iterator u_iter, u_end;
graph_traits&lt;Graph&gt;::out_edge_iterator ei, e_end;
for (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
if (capacity[*ei] &gt; 0)
std::cout &lt;&lt; "f " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; target(*ei, g) &lt;&lt; " "
&lt;&lt; (capacity[*ei] - residual_capacity[*ei]) &lt;&lt; std::endl;
return 0;
}
</pre>
The output is:
<pre>
c The total flow:
s 4
c flow values:
f 0 1 4
f 1 2 4
f 2 3 2
f 2 4 2
f 3 1 0
f 3 6 2
f 4 5 3
f 5 6 0
f 5 7 3
f 6 4 1
f 6 7 1
</pre>
<h3>See Also</h3>
<a href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Univ.of Notre Dame (<A HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: HTML Siek Edmunds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
-->
<!-- LocalWords: gif ALT BR sec edmunds karp TT DIV CELLPADDING TR TD PRE lt
-->
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
-->
<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
-->
<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
-->
<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
-->
<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
-->
<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
p -->

View File

@@ -1,78 +0,0 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: FAQ</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h1>Frequently Asked Questions</h1>
<ol>
<li>Why does the algorithm X work with <tt>adjacency_list</tt> where
<tt>VertexList=vecS</tt> but not when <tt>VertexList=listS</tt>? <br><br>
Often the reason is that the algorithm expects to find the
<tt>vertex_index</tt> property stored in the graph. When
<tt>VertexList=vecS</tt>, the <tt>adjacency_list</tt> automatically
has a <tt>vertex_index</tt> property. However, when <tt>VertexList=listS</tt>
this is not the case, and the <tt>vertex_index</tt> property must be
explicitly added, and initialized. For example,
<pre>
// specify the graph type
typedef adjacency_list&lt;listS, listS, undirectedS,
property&lt;vertex_index_t, std::size_t&gt;,
no_property
&gt; graph_t;
// construct a graph object
graph_t G(num_nodes);
// obtain a property map for the vertex_index property
property_map&lt;graph_t, vertex_index_t&gt;::type
index = get(vertex_index, G);
// initialize the vertex_index property values
graph_traits&lt;graph_t&gt;::vertex_iterator vi, vend;
graph_traits&lt;graph_t&gt;::vertices_size_type cnt = 0;
for(tie(vi,vend) = vertices(G); vi != vend; ++vi)
put(index, *vi, cnt++);
</pre>
</li>
<li>When using algorithm X, why do I get an error about a property
not being found, such as:
<pre>
../../../boost/concept_check.hpp:209: no match for
`boost::detail::error_property_not_found & ==
boost::detail::error_property_not_found &'
</pre>
or a message such as:
<pre>
../../..\boost/graph/depth_first_search.hpp(78) : error C2664: 'white'
: cannot convert parameter 1 from
'struct boost::detail::error_property_not_found'
to 'enum boost::default_color_type'
</pre>
The reason is that the algorithm expected to find some property (like color or
weight) attached to the vertices or edges of the graph, but didn't
find it. You need to either add an interior property to the graph, or
create an exterior property map for the property and pass it as an
argument to the algorithm.</li>
</ol>

View File

@@ -1,40 +0,0 @@
# -*- makefile -*-
.SUFFIXES: .fig .gif .tif .jpeg
.fig.gif:
fig2dev -L gif $*.fig > $*.gif
.fig.tif:
fig2dev -L tiff $*.fig > $*.tif
.fig.jpeg:
fig2dev -L jpeg $*.fig > $*.jpg
FIG = \
analogy.fig dfs_example.fig quick_start.fig \
back_edges.fig dfs_family.fig stl_iter.fig \
bfs_example.fig dfs_visitor.fig tree_edges.fig \
bfs_family.fig disjoint_set_family.fig visitor.fig \
bfs_visitor.fig file_dep.fig \
concepts.fig forward_or_cross_edges.fig digraph.fig \
undigraph.fig adj_matrix.fig adj_list.fig \
edge_list.fig dfs.fig knights_tour.fig \
search_states.fig graph_search.fig
GIF = $(FIG:.fig=.gif)
TIFF = $(FIG:.fig=.tif)
JPEG = $(FIG:.fig=.jpg)
gifs: $(GIF)
tiffs: $(TIFF)
jpegs: $(JPEG)
clean:
/bin/rm -f *.gif *.tif *.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

View File

@@ -1,59 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1156 2519 150 150 1156 2519 1306 2519
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1598 2541 150 150 1598 2541 1748 2541
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1148 2841 150 150 1148 2841 1298 2841
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1148 3141 150 150 1148 3141 1298 3141
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1150 3442 150 150 1150 3442 1300 3442
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1143 3746 150 150 1143 3746 1293 3746
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1592 2844 150 150 1592 2844 1742 2844
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2048 2541 150 150 2048 2541 2198 2541
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
600 2100 900 2100 900 3900 600 3900 600 2100
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
600 2400 900 2400
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
600 2700 900 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
600 3000 900 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
600 3300 900 3300
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
600 3600 900 3600
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
900 2550 975 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1350 2550 1425 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
900 2850 975 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1275 2850 1425 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
900 3150 975 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
900 3450 975 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
900 3750 975 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1770 2565 1890 2565
4 0 0 100 0 0 12 0.0000 4 90 90 675 2325 v\001
4 0 0 100 0 0 12 0.0000 4 135 90 675 2625 b\001
4 0 0 100 0 0 12 0.0000 4 90 90 675 2925 x\001
4 0 0 100 0 0 12 0.0000 4 90 75 675 3225 z\001
4 0 0 100 0 0 12 0.0000 4 90 75 675 3525 a\001
4 0 0 100 0 0 12 0.0000 4 135 90 675 3825 y\001
4 0 0 100 0 0 12 0.0000 4 135 90 1125 2625 y\001
4 0 0 100 0 0 12 0.0000 4 90 90 1575 2625 x\001
4 0 0 100 0 0 12 0.0000 4 90 90 1125 2925 v\001
4 0 0 100 0 0 12 0.0000 4 90 90 1575 2925 x\001
4 0 0 100 0 0 12 0.0000 4 90 75 1125 3525 z\001
4 0 0 100 0 0 12 0.0000 4 90 75 1125 3225 a\001
4 0 0 100 0 0 12 0.0000 4 90 90 1125 3825 v\001
4 0 0 100 0 0 12 0.0000 4 135 90 2025 2625 y\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

View File

@@ -1,31 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
900 2100 2700 2100 2700 3900 900 3900 900 2100
4 0 0 100 0 0 12 0.0000 4 90 90 675 2325 v\001
4 0 0 100 0 0 12 0.0000 4 135 90 675 2625 b\001
4 0 0 100 0 0 12 0.0000 4 90 90 675 2925 x\001
4 0 0 100 0 0 12 0.0000 4 90 90 675 3225 z\001
4 0 0 100 0 0 12 0.0000 4 90 90 675 3525 a\001
4 0 0 100 0 0 12 0.0000 4 135 90 675 3825 y\001
4 0 0 100 0 0 12 0.0000 4 180 1620 975 2025 v b x z a y\001
4 0 0 100 0 0 12 0.0000 4 135 90 2475 2625 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 975 3825 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 2175 3225 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2925 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2625 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 975 2925 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 1875 3525 1\001
4 0 0 100 0 0 12 0.0000 4 135 1575 975 2325 0 0 0 0 0 0\001
4 0 0 100 0 0 12 0.0000 4 135 1350 975 2625 0 0 0 0\001
4 0 0 100 0 0 12 0.0000 4 135 1305 1275 2925 0 0 0 0\001
4 0 0 100 0 0 12 0.0000 4 135 1575 975 3225 0 0 0 0 0\001
4 0 0 100 0 0 12 0.0000 4 135 1575 975 3525 0 0 0 0 0\001
4 0 0 100 0 0 12 0.0000 4 135 1305 1275 3825 0 0 0 0 0\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 B

View File

@@ -1,35 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 1 0 1 0 7 0 0 -1 0.000 1 0.0000 2400 1200 1200 675 2400 1200 1200 1875
1 1 0 1 0 7 0 0 -1 0.000 1 0.0000 2320 4269 1200 675 2320 4269 1120 4944
1 1 0 1 0 7 0 0 -1 0.000 1 0.0000 6000 1200 1200 675 6000 1200 4800 1875
1 1 0 1 0 7 0 0 -1 0.000 1 0.0000 6000 4350 1200 675 6000 4350 4800 5025
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
2325 1875 2325 3600
2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
5700 1875 5700 3675
2 1 2 1 0 7 0 0 -1 3.000 0 0 -1 0 0 2
4200 600 4200 4875
4 0 0 0 0 0 18 0.0000 4 240 1770 1575 4350 STL Algorithms\001
4 0 0 0 0 0 18 0.0000 4 210 1710 1650 1275 STL Containers\001
4 0 0 0 0 0 18 0.0000 4 225 300 2025 5475 (a)\001
4 0 0 0 0 0 18 0.0000 4 225 315 5700 5550 (b)\001
4 0 0 0 0 0 18 0.0000 4 240 1965 5100 4425 Graph Algorithms\001
4 0 0 0 0 0 18 0.0000 4 240 675 5700 1050 Graph\001
4 0 0 0 0 0 18 0.0000 4 210 1665 5175 1350 Data Structures\001
4 0 0 0 0 0 18 0.0000 4 180 795 2475 2700 Iterator\001
4 0 0 0 0 0 18 0.0000 4 180 840 2475 3000 Functor\001
4 0 0 0 0 0 18 0.0000 4 210 1590 5850 2475 Vertex Iterator\001
4 0 0 100 0 0 18 0.0000 4 240 2010 5850 2850 Adjacency Iterator\001
4 0 0 0 0 0 18 0.0000 4 240 2355 5850 3225 Visitor, Property Map\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,45 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 6
1 1 1.00 60.00 120.00
1650 2925 1575 3150 1275 3225 1200 2775 1425 2550 1650 2775
0.000 1.000 1.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3000 3750 2550 3600 2100 3300 1950 2925
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3300 2700 3300 2400 3000 2100 2700 2100
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 2700 2775 2550 2175 2550 1875 2700
0.000 1.000 1.000 0.000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

View File

@@ -1,72 +0,0 @@
#FIG 3.2
Portrait
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1057 3147 168 168 1057 3147 1207 3222
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1057 4046 168 168 1057 4046 1207 4121
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1963 3144 168 168 1963 3144 2113 3219
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1964 4033 168 168 1964 4033 2114 4108
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2850 3150 168 168 2850 3150 3000 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2850 4050 168 168 2850 4050 3000 4125
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3750 3150 168 168 3750 3150 3900 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3750 4050 168 168 3750 4050 3900 4125
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1050 3300 1050 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1200 3150 1800 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1950 3300 1950 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2700 3300 2100 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2175 4050 2700 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2850 3900 2850 3300
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3000 3150 3600 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3750 3300 3750 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3600 4050 3000 4050
3 1 1 1 0 7 100 0 -1 4.000 0 0 0 13
2250 3000 2100 2775 1950 2925 1725 2775 1725 3000 1500 3075
1725 3300 1725 3525 2250 3450 2175 3375 2625 3300 2175 3150
2325 3075
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000
3 1 1 1 0 7 100 0 -1 4.000 0 0 0 18
1875 2625 1500 2850 1050 2700 750 2925 750 3450 975 3450
1275 3750 1500 3525 1650 3900 1650 4200 1950 4425 2475 4650
2325 4125 2550 3975 2325 3675 2700 3450 2550 2925 2250 2700
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000
3 1 1 1 0 7 100 0 -1 4.000 0 0 0 20
2325 2625 1500 2625 900 2700 675 3000 675 3525 825 3750
675 4050 900 4500 1125 4275 1500 4650 1725 4500 2400 4650
2925 4350 3300 4350 3075 3900 3225 3600 3000 3450 3150 3000
2625 2850 2625 2625
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000
3 1 1 1 0 7 100 0 -1 4.000 0 0 0 19
1800 2550 900 2625 675 2925 525 3525 675 4275 1050 4575
1800 4725 3375 4500 4050 4275 4275 3900 3900 3675 4050 3450
4050 3075 4050 2700 3600 2775 3300 2925 3075 2775 3000 2550
2175 2550
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000
4 0 0 100 0 0 12 0.0000 4 90 105 975 3225 r\001
4 0 0 100 0 0 12 0.0000 4 90 135 975 4125 v\001
4 0 0 100 0 0 12 0.0000 4 90 135 1875 3225 s\001
4 0 0 100 0 0 12 0.0000 4 90 225 1875 4125 w \001
4 0 0 100 0 0 12 0.0000 4 105 105 2775 3225 t\001
4 0 0 100 0 0 12 0.0000 4 90 135 2775 4125 x\001
4 0 0 100 0 0 12 0.0000 4 90 135 3675 3225 u\001
4 0 0 100 0 0 12 0.0000 4 135 135 3675 4125 y\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,50 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3600 2550 4500 2100
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4800 3750 3750 3300
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4950 3750 3450 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4800 1950 4800 1500
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6000 2550 5100 2100
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3900 1425 2025 1425
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3975 2025 3000 2025
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3975 2025 3000 1800
4 0 0 100 0 14 12 0.0000 4 165 2100 3900 1500 breadth_first_search\001
4 0 0 100 0 14 12 0.0000 4 165 1785 4050 2100 best_first_search\001
4 0 0 100 0 14 12 0.0000 4 180 2730 5100 2700 prim_minimum_spanning_tree\001
4 0 0 100 0 14 12 0.0000 4 180 2415 2400 2700 dijkstra_shortest_paths\001
4 0 0 100 0 14 12 0.0000 4 180 2835 900 3300 bellman_ford_shortest_paths\001
4 0 0 100 0 14 12 0.0000 4 180 1470 1500 2100 fibonacci_heap\001
4 0 0 100 0 14 12 0.0000 4 135 525 1500 1500 queue\001
4 0 0 100 0 14 12 0.0000 4 180 3360 3300 3900 johnson_all_pairs_shortest_paths\001
4 0 0 100 0 -1 10 0.0000 4 75 555 4350 3225 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 3600 3600 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 5700 2400 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 4875 1800 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 3000 1350 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 3450 1875 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 3975 2475 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 3225 2250 <<uses>>\001
4 0 0 100 0 14 12 0.0000 4 180 1365 1650 1800 mutable_queue\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,73 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1500 4425 2025 4425
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1500 4650 2025 4650
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2550 2250 2550 2850 2400 3375 2100 3675
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 6
1 1 1.00 60.00 120.00
1650 2925 1575 3150 1275 3225 1200 2775 1425 2550 1650 2775
0.000 1.000 1.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1950 2775 2400 2850 2925 3225 3150 3600
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1875 3600 1650 3450 1650 3225 1725 3000
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2100 3825 2400 4050 2850 4050 3075 3900
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3000 3750 2550 3600 2100 3300 1950 2925
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 3600 3450 3450 3525 3225 3375 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3300 2700 3300 2400 3000 2100 2700 2100
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 2700 2775 2550 2175 2550 1875 2700
0.000 1.000 1.000 0.000
4 0 0 100 0 0 12 0.0000 4 180 780 2100 4500 Tree Edge\001
4 0 0 100 0 0 12 0.0000 4 180 1515 2100 4725 Back or Cross Edge\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,44 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6975 3150 7500 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6525 3825 7650 3075
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6975 2175 7575 2775
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3300 2025 5100 2025
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6975 2625 7575 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4350 2625 4800 2625
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4350 2550 5175 2100
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 3075 2850 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3900 3225 4875 3225
4 0 0 100 0 19 18 0.0000 4 255 2070 4350 3900 AdacencyMatrix\001
4 0 0 100 0 19 18 0.0000 4 255 2040 5175 2100 IncidenceGraph\001
4 0 0 100 0 19 18 0.0000 4 255 2430 900 2100 BidirectionalGraph\001
4 0 0 100 0 19 18 0.0000 4 255 1935 4950 3300 EdgeListGraph\001
4 0 0 100 0 19 18 0.0000 4 255 795 7575 3000 Graph\001
4 0 0 100 0 19 18 0.0000 4 255 2145 4800 2700 AdjacencyGraph\001
4 0 0 100 0 19 18 0.0000 4 255 2100 2175 2700 VertexListGraph\001
4 0 0 100 0 19 18 0.0000 4 255 3285 600 3300 VertexAndEdgeListGraph\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,77 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2100 150 150 1800 2100 1800 2250
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 2100 150 150 2700 2100 2700 2250
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 3000 150 150 1800 3000 1800 3150
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 3000 150 150 2700 3000 2700 3150
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3600 2100 150 150 3600 2100 3600 2250
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3600 3000 150 150 3600 3000 3600 3150
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 3900 150 150 1800 3900 1800 4050
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 3900 150 150 2700 3900 2700 4050
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 4800 150 150 2700 4800 2700 4950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1950 2100 2550 2100
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1875 2250 2625 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1800 2250 1800 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1950 3000 2550 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2700 2250 2700 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2775 2850 3450 2175
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3600 2250 3600 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3450 3000 2850 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1950 3900 2550 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2625 4650 1950 3975
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2700 4050 2700 4650
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
1950 2100 2550 2100
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
2700 2250 2700 2850
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
2550 3000 1950 3000
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
2775 2850 3450 2175
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
3600 2250 3600 2850
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
1950 3900 2550 3900
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 3.00 90.00 150.00
2700 4050 2700 4650
4 0 0 100 0 0 12 0.0000 4 90 120 1725 2175 a\001
4 0 0 100 0 0 12 0.0000 4 135 90 2625 2175 b\001
4 0 0 100 0 0 12 0.0000 4 90 120 3525 2175 c\001
4 0 0 100 0 0 12 0.0000 4 135 90 1725 3075 d\001
4 0 0 100 0 0 12 0.0000 4 90 75 2625 3075 e\001
4 0 0 100 0 0 12 0.0000 4 135 105 3525 3075 f\001
4 0 0 100 0 0 12 0.0000 4 135 90 1800 3975 g\001
4 0 0 100 0 0 12 0.0000 4 135 135 2625 3975 h\001
4 0 0 100 0 0 12 0.0000 4 135 90 2625 4875 i\001
4 0 0 100 0 0 12 0.0000 4 135 90 2100 2025 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 2550 2550 2\001
4 0 0 100 0 0 12 0.0000 4 135 90 2250 2925 3\001
4 0 0 100 0 0 12 0.0000 4 135 90 2925 2550 4\001
4 0 0 100 0 0 12 0.0000 4 135 90 3375 2625 5\001
4 0 0 100 0 0 12 0.0000 4 135 90 2100 3825 6\001
4 0 0 100 0 0 12 0.0000 4 135 90 2775 4275 7\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,46 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3150 168 168 1950 3150 2025 3300
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2850 3132 168 168 2850 3132 2925 3282
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3750 3132 168 168 3750 3132 3825 3282
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1932 4050 168 168 1932 4050 2007 4200
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2832 4050 168 168 2832 4050 2907 4200
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3732 4050 168 168 3732 4050 3807 4200
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3300 1950 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2025 3975 2775 3225
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
2700 4050 2100 4050
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
2850 3300 2850 3900
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3600 3225 2925 3900
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
3750 3300 3750 3900
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
2100 3150 2700 3150
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 5
1 1 1.00 60.00 120.00
3825 4200 4050 4350 4275 4275 4200 3975 3900 4050
0.000 1.000 1.000 1.000 0.000
4 0 0 100 0 0 12 0.0000 4 90 180 1800 3225 u\001
4 0 0 100 0 0 12 0.0000 4 90 180 2700 3225 v\001
4 0 0 100 0 0 12 0.0000 4 90 225 3600 3225 w\001
4 0 0 100 0 0 12 0.0000 4 90 90 1875 4125 x\001
4 0 0 100 0 0 12 0.0000 4 135 90 2775 4125 y\001
4 0 0 100 0 0 12 0.0000 4 90 90 3675 4125 z\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

View File

@@ -1,30 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 2250 4050 1800
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6000 2250 4950 1800
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2400 2700 3300 1875
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2400 2700 2100 2325
4 0 0 100 0 14 12 0.0000 4 180 1890 3000 1800 depth_first_search\001
4 0 0 100 0 14 12 0.0000 4 180 3255 1500 2925 connected_components (strongly)\001
4 0 0 100 0 14 12 0.0000 4 165 945 1500 2325 transpose\001
4 0 0 100 0 14 12 0.0000 4 180 2100 3075 2400 connected_components\001
4 0 0 100 0 14 12 0.0000 4 180 1680 5400 2400 topological_sort\001
4 0 0 100 0 -1 10 0.0000 4 75 555 1725 2625 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 2625 2625 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 4125 2100 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 5550 2025 <<uses>>\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,77 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4500 1800 4500
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4725 1800 4725
2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4950 1800 4950
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 6
1 1 1.00 60.00 120.00
1650 2925 1575 3150 1275 3225 1200 2775 1425 2550 1650 2775
0.000 1.000 1.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1950 2775 2400 2850 2925 3225 3150 3600
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1875 3600 1650 3450 1650 3225 1725 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3000 3750 2550 3600 2100 3300 1950 2925
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 3600 3450 3450 3525 3225 3375 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3300 2700 3300 2400 3000 2100 2700 2100
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 2700 2775 2550 2175 2550 1875 2700
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2550 2250 2550 2850 2400 3375 2100 3675
0.000 1.000 1.000 0.000
3 0 1 1 0 7 100 0 -1 4.000 0 1 0 4
1 1 1.00 60.00 120.00
2100 3825 2400 4050 2850 4050 3075 3900
0.000 1.000 1.000 0.000
4 0 0 100 0 0 12 0.0000 4 180 780 2025 4575 Tree Edge\001
4 0 0 100 0 0 12 0.0000 4 180 825 2025 4800 Back Edge\001
4 0 0 100 0 0 12 0.0000 4 180 1755 2025 5025 Forward or Cross Edge\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,53 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1650 2250 168 168 1650 2250 1800 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2232 1650 168 168 2232 1650 2382 1725
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2832 2250 168 168 2832 2250 2982 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2832 3150 168 168 2832 3150 2982 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1632 3150 168 168 1632 3150 1782 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2232 3750 168 168 2232 3750 2382 3825
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2700 3075 2325 2475 2250 1800
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2700 2175 2250 2100 1800 2175
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
1650 2100 1725 1725 2100 1725
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 5
1 1 1.00 60.00 120.00
2925 3000 3225 2925 3300 3225 3150 3375 2925 3300
0.000 -1.000 -1.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2250 3600 2100 3225 1800 3150
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2775 2400 2700 2700 2775 3000
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
1650 3300 1725 3600 2100 3750
0.000 -1.000 0.000
3 2 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2700 2325 2250 2250 1800 2325
0.000 -1.000 0.000
4 0 0 100 0 0 12 0.0000 4 90 90 2175 1725 v\001
4 0 0 100 0 0 12 0.0000 4 135 90 2775 2325 b\001
4 0 0 100 0 0 12 0.0000 4 90 90 2775 3225 x\001
4 0 0 100 0 0 12 0.0000 4 90 90 2175 3825 z\001
4 0 0 100 0 0 12 0.0000 4 90 90 1575 3225 a\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2325 y\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

View File

@@ -1,20 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2925 2250 4275 1575
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6150 2250 4875 1575
4 0 0 100 0 14 12 0.0000 4 180 2940 1500 2400 dynamic_connected_components\001
4 0 0 100 0 14 12 0.0000 4 180 3045 4800 2400 kruskal_minimum_spanning_tree\001
4 0 0 100 0 14 12 0.0000 4 180 1365 3975 1500 disjoint_sets\001
4 0 0 100 0 -1 10 0.0000 4 75 555 2925 1950 <<uses>>\001
4 0 0 100 0 -1 10 0.0000 4 75 555 5700 1950 <<uses>>\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 988 B

View File

@@ -1,26 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
600 2400 4800 2400 4800 2700 600 2700 600 2400
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1200 2400 1200 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1800 2400 1800 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2400 2400 2400 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3000 2400 3000 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
3600 2400 3600 2700
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
4200 2400 4200 2700
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
4800 2400 5400 2400 5400 2700 4800 2700 4800 2400
4 0 0 100 0 0 12 0.0000 4 180 4545 720 2625 (b, y) (b, y) (y, v) (z, a) (x, x) (b, x) (x, v) (a, z)\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

View File

@@ -1,130 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 2100 3450 3000 3900
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 3675 450 225 2550 3675 3000 3900
4 0 0 100 0 0 12 0.0000 4 180 555 2250 3750 foo.cpp\001
-6
6 2100 4200 3075 4725
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 2551 4428 450 225 2551 4428 3001 4653
4 0 0 100 0 0 12 0.0000 4 135 375 2400 4500 foo.o\001
-6
6 3600 3450 4575 3975
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4051 3678 450 225 4051 3678 4501 3903
4 0 0 100 0 0 12 0.0000 4 180 555 3750 3750 bar.cpp\001
-6
6 3600 4200 4575 4650
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4051 4425 450 225 4051 4425 4501 4650
4 0 0 100 0 0 12 0.0000 4 135 375 3825 4500 bar.o\001
-6
6 2700 4950 3900 5400
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 5175 600 225 3300 5175 3900 5400
4 0 0 100 0 0 12 0.0000 4 135 795 2925 5250 libfoobar.a\001
-6
6 4500 2250 5250 2700
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4875 2475 375 225 4875 2475 5250 2700
4 0 0 100 0 0 12 0.0000 4 180 450 4650 2550 yow.h\001
-6
6 2175 2250 2925 2700
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2475 375 225 2550 2475 2925 2700
4 0 0 100 0 0 12 0.0000 4 135 450 2325 2550 zow.h\001
-6
6 3300 1650 4050 2100
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 3675 1875 375 225 3675 1875 4050 2100
4 0 0 100 0 0 12 0.0000 4 135 405 3450 1950 dax.h\001
-6
6 4800 4200 5700 4650
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 5250 4425 450 225 5250 4425 5700 4650
4 0 0 100 0 0 12 0.0000 4 180 540 5025 4500 zig.cpp\001
-6
6 4800 4950 5700 5400
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 5250 5175 450 225 5250 5175 5700 5400
4 0 0 100 0 0 12 0.0000 4 180 360 5025 5250 zig.o\001
-6
6 6150 4200 7050 4650
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 6600 4425 450 225 6600 4425 7050 4650
4 0 0 100 0 0 12 0.0000 4 135 585 6375 4500 zag.cpp\001
-6
6 6150 4950 7050 5400
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 6600 5175 450 225 6600 5175 7050 5400
4 0 0 100 0 0 12 0.0000 4 135 405 6375 5250 zag.o\001
-6
6 4500 5850 5550 6300
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 5025 6075 525 225 5025 6075 5550 6300
4 0 0 100 0 0 12 0.0000 4 180 810 4650 6150 libzigzag.a\001
-6
6 3000 6450 3900 6900
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 3450 6675 450 225 3450 6675 3900 6900
4 0 0 100 0 0 12 0.0000 4 180 645 3150 6750 killerapp\001
-6
6 6000 2550 6750 3000
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 6375 2775 375 225 6375 2775 6750 3000
4 0 0 100 0 0 12 0.0000 4 135 405 6150 2850 boz.h\001
-6
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 2700 2550 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 3900 2550 4200
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 3900 4050 4200
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2700 4650 3000 4950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3975 4650 3675 4950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3825 5325 4650 5925
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4575 6150 3825 6525
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
5250 5400 5100 5850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6525 5400 5400 5925
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6600 4650 6600 4950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
5250 4650 5250 4950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 2025 2775 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3975 2025 4575 2400
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6075 2850 4425 3525
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6225 3000 5400 4200
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
6450 3000 6600 4200
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4725 2700 4200 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
5025 2700 6375 4275
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 2100 3975 3450
3 0 1 1 0 7 100 0 -1 4.000 0 1 0 4
1 1 1.00 60.00 120.00
3825 3450 3675 3150 3525 2550 3600 2100
0.000 1.000 1.000 0.000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,33 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2100 3825 2400 4050 2850 4050 3075 3900
0.000 1.000 1.000 0.000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

View File

@@ -1,32 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3675 5100 3675 6150
2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 3450 3750 4350
2 1 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
1800 4500 5700 4500
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
1800 2700 5700 2700 5700 6900 1800 6900 1800 2700
3 3 2 1 0 7 50 0 -1 4.000 0 0 0 24
2625 4350 3075 4125 3375 4275 3825 4050 4200 4200 4425 4425
4725 4200 5100 4125 5475 4350 5625 4725 5475 5100 4725 5400
4125 5400 3975 5175 3525 5475 3075 5475 3000 5175 2625 5250
2250 5475 1950 5175 1950 4350 2175 4425 2325 4200 2550 4125
-1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
-1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
-1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
4 0 0 50 0 19 18 0.0000 4 195 1275 3075 6600 Examined\001
4 0 0 50 0 19 18 0.0000 4 255 3225 2175 4800 Target-To-Be-Examined\001
4 0 0 50 0 14 14 0.0000 4 195 2970 2400 5775 p.examine_vertex(u, g)\001
4 0 0 50 0 14 14 0.0000 4 195 2700 2475 3900 p.examine_edge(e, g)\001
4 0 0 50 0 19 18 0.0000 4 195 1605 2925 3225 Unexamined\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,211 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 0 0.000 1 0.0000 1950 1950 75 75 1950 1950 1950 2025
1 3 0 1 0 7 100 0 0 0.000 1 0.0000 2850 3150 75 75 2850 3150 2850 3225
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
1800 1800 4200 1800 4200 4200 1800 4200 1800 1800
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 1950 2250 2625
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 2625 1950 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3150 2250 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 3750 2850 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 4050 3450 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 3750 4050 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 4050 3750 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 3450 4050 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 2850 3750 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 2250 3150 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 1950 2550 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 2250 1950 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 2550 2250 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 1950 2850 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 2250 3450 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 1950 4050 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 2250 3450 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 2550 3750 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 1950 4050 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 2550 3750 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 3150 4050 3825
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 3825 3450 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 4050 3150 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 3450 3825 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3825 3750 4050 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 3150 3450 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 2850 3150 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 2250 2550 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 1950 1950 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2025 2250 2250 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 2850 1950 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3450 2250 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 4050 2850 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 3750 2550 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 3150 1950 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 2850 2250 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 2325 2850 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 2550 3150 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 3150 2550 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 3450 1950 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3750 2550 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 4050 3225 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3225 3750 3750 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 4050 4050 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 3525 3750 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 2850 3450 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3525 2325 4050 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
4050 1950 3750 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3750 2550 3150 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 2850 3450 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 3450 3150 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 4050 2775 3375
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 3375 3450 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3450 3150 2850 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 2850 2250 3150
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 3150 2550 3750
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 3675 1950 4050
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3975 2250 3450
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2250 3525 2550 2850
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 2925 3150 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3150 2625 2850 1950
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2850 1950 2550 2550
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
2550 2550 2850 3150
4 0 0 100 0 0 12 0.0000 4 135 2205 1875 1725 0 1 2 3 4 5 6 7\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2025 0\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2325 1\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2700 2\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2925 3\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 3225 4\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 3525 5\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 3825 6\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 4125 7\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,72 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1932 2832 2268 3168
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2100 3000 168 168 2100 3000 2250 3075
4 0 0 100 0 0 12 0.0000 4 135 90 2070 3075 0\001
-6
6 1350 4314 1686 4650
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1518 4482 168 168 1518 4482 1668 4557
4 0 0 100 0 0 12 0.0000 4 135 90 1473 4557 4\001
-6
6 1350 3414 1686 3750
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1518 3582 168 168 1518 3582 1668 3657
4 0 0 100 0 0 12 0.0000 4 135 90 1503 3657 1\001
-6
6 2550 3414 2886 3750
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2718 3582 168 168 2718 3582 2868 3657
4 0 0 100 0 0 12 0.0000 4 135 90 2718 3657 2\001
-6
6 2550 4314 2886 4650
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2718 4482 168 168 2718 4482 2868 4557
4 0 0 100 0 0 12 0.0000 4 135 90 2703 4557 3\001
-6
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1950 3150 1650 3450
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2145 3180 2205 3900 2550 4365
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2640 4335 2520 3705 2220 3180
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2250 3090 2430 3420 2580 3450
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2670 3420 2580 3120 2280 3030
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2610 3690 2235 4140 1680 4455
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2535 4455 1905 4125 1635 3780
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2595 4560 2115 4710 1635 4635
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
1515 4290 1320 4020 1485 3765
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
2010 3150 1725 3705 1545 4335
0.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
1 1 1.00 60.00 120.00
1635 4365 2055 3765 2070 3135
0.000 1.000 0.000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

View File

@@ -1,60 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3000 3300 3300 3300
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3000 3600 3300 3600
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3000 3900 3300 3900
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
3000 4200 3300 4200
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
3300 2700 5400 2700 5400 3600 3300 3600 3300 2700
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
5400 2700 7800 2700 7800 3300 5400 3300 5400 2700
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
5400 3300 7800 3300 7800 3900 5400 3900 5400 3300
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
7800 2700 10200 2700 10200 3600 7800 3600 7800 2700
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
7800 3600 10200 3600 10200 4200 7800 4200 7800 3600
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
7800 4200 10200 4200 10200 4800 7800 4800 7800 4200
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
5400 3900 7800 3900 7800 4800 5400 4800 5400 3900
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
3300 3600 5400 3600 5400 4800 3300 4800 3300 3600
3 0 2 1 0 7 50 0 -1 3.000 0 0 0 18
3495 3705 3390 3510 3495 3315 3735 3390 3855 3240 4485 3360
4845 3315 5160 3210 5340 3480 5295 4080 5070 4095 4785 3930
4545 4110 3990 4185 3885 4035 3630 4200 3495 4140 3510 3705
0.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 0.000
4 0 0 50 0 14 14 0.0000 4 195 2295 690 3345 examine_edge(u,v)\001
4 0 0 50 0 19 14 0.0000 4 165 585 6270 3075 White\001
4 0 0 50 0 19 14 0.0000 4 210 480 6315 3675 Gray\001
4 0 0 50 0 19 14 0.0000 4 165 570 6300 4425 Black\001
4 0 0 50 0 19 14 0.0000 4 165 585 8760 3240 White\001
4 0 0 50 0 19 14 0.0000 4 210 480 8760 3975 Gray\001
4 0 0 50 0 19 14 0.0000 4 165 570 8730 4560 Black\001
4 0 0 50 0 14 14 0.0000 4 180 2295 690 3645 examine_vertex(v)\001
4 0 0 50 0 14 14 0.0000 4 195 2835 150 3960 out_edges_examined(v)\001
4 0 0 50 0 14 14 0.0000 4 195 2970 30 4260 previously_examined(v)\001
4 0 0 50 0 18 14 0.0000 4 210 1395 3615 2505 Graph Search\001
4 0 0 50 0 18 14 0.0000 4 165 1395 5880 2490 Breadth-First\001
4 0 0 50 0 18 14 0.0000 4 210 1200 8370 2475 Depth-First\001
4 0 0 50 0 19 14 0.0000 4 165 1275 3750 3075 Unexamined\001
4 0 0 50 0 19 14 0.0000 4 165 1005 3825 4425 Examined\001
4 0 0 50 0 19 14 0.0000 4 165 1740 3525 3675 To Be Processed\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,14 +0,0 @@
#FIG 3.1
Landscape
Center
Inches
1200 2
1 3 0 3 -1 -1 0 0 0 0.000 1 0.0000 2250 1350 1045 1045 2250 1350 3295 2395
1 3 0 3 -1 -1 0 0 0 0.000 1 0.0000 6179 1370 1045 1045 6179 1370 7224 2415
2 1 0 3 -1 7 0 0 0 0.000 0 0 -1 1 1 2
1 1 3.00 180.00 360.00
1 1 3.00 180.00 360.00
3375 1350 5025 1350
4 0 -1 0 0 18 24 0.0000 4 255 1875 1275 1500 Containers\001
4 0 -1 0 0 18 24 0.0000 4 255 1425 3450 825 Iterators\001
4 0 -1 0 0 18 24 0.0000 4 330 1905 5250 1425 Algorithms\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -1,45 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2550 2250 2550 2850 2400 3375 2100 3675
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1950 2775 2400 2850 2925 3225 3150 3600
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1875 3600 1650 3450 1650 3225 1725 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 3600 3450 3450 3525 3225 3375 3000
0.000 1.000 1.000 0.000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

View File

@@ -1,31 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1650 2250 168 168 1650 2250 1800 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2232 1650 168 168 2232 1650 2382 1725
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2832 2250 168 168 2832 2250 2982 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2832 3150 168 168 2832 3150 2982 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1632 3150 168 168 1632 3150 1782 3225
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2232 3750 168 168 2232 3750 2382 3825
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
1725 3300 2100 3675
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2325 1800 2775 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2850 2400 2850 3000
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2700 2250 1800 2250
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
2100 1725 1800 2100
4 0 0 100 0 0 12 0.0000 4 90 90 2175 1725 v\001
4 0 0 100 0 0 12 0.0000 4 135 90 2775 2325 b\001
4 0 0 100 0 0 12 0.0000 4 90 90 2775 3225 x\001
4 0 0 100 0 0 12 0.0000 4 90 90 2175 3825 z\001
4 0 0 100 0 0 12 0.0000 4 90 90 1575 3225 a\001
4 0 0 100 0 0 12 0.0000 4 135 90 1575 2325 y\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

View File

@@ -1,77 +0,0 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 1725 3525 2175 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1950 3732 168 168 1950 3732 2100 3807
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 2\001
-6
6 2925 3525 3375 3900
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3150 3732 168 168 3150 3732 3300 3807
4 0 0 100 0 0 12 0.0000 4 135 135 3075 3825 3\001
-6
6 2325 1875 2775 2325
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2550 2100 168 168 2550 2100 2700 2175
4 0 0 100 0 0 12 0.0000 4 135 135 2475 2175 0\001
-6
6 1575 2625 2025 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1800 2832 168 168 1800 2832 1950 2907
4 0 0 100 0 0 12 0.0000 4 135 135 1725 2925 1\001
-6
6 3075 2625 3525 3000
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 3300 2832 168 168 3300 2832 3450 2907
4 0 0 100 0 0 12 0.0000 4 135 135 3225 2925 4\001
-6
2 1 0 3 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4500 1800 4500
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4725 1800 4725
2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2
1 1 1.00 60.00 120.00
1350 4950 1800 4950
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 6
1 1 1.00 60.00 120.00
1650 2925 1575 3150 1275 3225 1200 2775 1425 2550 1650 2775
0.000 1.000 1.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1950 2775 2400 2850 2925 3225 3150 3600
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
1875 3600 1650 3450 1650 3225 1725 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3000 3750 2550 3600 2100 3300 1950 2925
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 3600 3450 3450 3525 3225 3375 3000
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3300 2700 3300 2400 3000 2100 2700 2100
0.000 1.000 1.000 0.000
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
3225 2700 2775 2550 2175 2550 1875 2700
0.000 1.000 1.000 0.000
3 0 0 3 0 7 100 0 -1 0.000 0 1 0 4
1 1 1.00 60.00 120.00
2550 2250 2550 2850 2400 3375 2100 3675
0.000 1.000 1.000 0.000
3 0 1 1 0 7 100 0 -1 4.000 0 1 0 4
1 1 1.00 60.00 120.00
2100 3825 2400 4050 2850 4050 3075 3900
0.000 1.000 1.000 0.000
4 0 0 100 0 0 12 0.0000 4 180 780 2025 4575 Tree Edge\001
4 0 0 100 0 0 12 0.0000 4 180 825 2025 4800 Back Edge\001
4 0 0 100 0 0 12 0.0000 4 180 1755 2025 5025 Forward or Cross Edge\001

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

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