3 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
10 <Title>Boost Graph Library: incident</Title>
11 <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
13 <IMG SRC="../../../boost.png"
14 ALT="C++ Boost" width="277" height="86">
18 <H1><A NAME="sec:incident"></A>
24 <TABLE CELLPADDING=3 border>
26 <TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
27 <TD ALIGN="LEFT"><i>O(1)</i>
31 <TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
33 <a href="../../../boost/graph/graph_utility.hpp"><TT>boost/graph/graph_utility.hpp</TT></a>
41 template <class Graph>
42 std::pair<typename graph_traits<Graph>::vertex_descriptor,
43 typename graph_traits<Graph>::vertex_descriptor>
44 incident(typename graph_traits<Graph>::edge_descriptor e, Graph& g)
47 This function takes and edge descriptor and returns the pair of
48 vertices that are <i>incident</i> to the edge. For directed graphs,
49 the <tt>first</tt> vertex is the source and the <tt>second</tt> vertex
50 is the target. This function is equivalent to the expression
51 <tt>std::make_pair(source(e, g), target(e, g))</tt>.
58 vertex_descriptor u, v;
60 boost::tie(u, v) = incident(e, g);
68 <TD nowrap>Copyright © 2000-2001</TD><TD>
69 <A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
70 Indiana University (<A
71 HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
72 <A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
73 <A HREF="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
74 Indiana University (<A
75 HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)