2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 20:42:11 +00:00
Files
graph/docs/depth_first_visit.html
2000-09-21 18:34:54 +00:00

97 lines
2.5 KiB
HTML

<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">
<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 IncidenceGraph, class DFSVisitor, class ColorPMap&gt;
void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor u,
DFSVisitor&amp; vis, ColorPMap color)
</PRE>
<P>
This function is the recursive part of the depth-first search. 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>
<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>The type <TT>ColorPMap</TT> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>, and the value type of <TT>Color</TT> must be a model of
<a href="./ColorValue.html">ColorValue</a>.
</LI>
</UL>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000</TD><TD>
<A HREF=http://www.boost.org/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>