Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/graph/doc/incident.html @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.1 KB
Line 
1<HTML>
2<!--
3  -- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
4  --
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)
8  -->
9<Head>
10<Title>Boost Graph Library: incident</Title>
11<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" 
12        ALINK="#ff0000"> 
13<IMG SRC="../../../boost.png" 
14     ALT="C++ Boost" width="277" height="86"> 
15
16<BR Clear>
17
18<H1><A NAME="sec:incident"></A>
19<TT>incident</TT>
20</H1>
21
22<P>
23<DIV ALIGN="left">
24<TABLE CELLPADDING=3 border>
25
26<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
27<TD ALIGN="LEFT"><i>O(1)</i>
28</TD>
29</TR>
30
31<TR><TH ALIGN="LEFT"><B>Where Defined:</B></TH>
32<TD ALIGN="LEFT">
33<a href="../../../boost/graph/graph_utility.hpp"><TT>boost/graph/graph_utility.hpp</TT></a>
34</TD>
35
36</TABLE>
37</DIV>
38
39<P>
40<PRE>
41  template &lt;class Graph&gt;
42  std::pair&lt;typename graph_traits&lt;Graph&gt;::vertex_descriptor,
43            typename graph_traits&lt;Graph&gt;::vertex_descriptor&gt;
44  incident(typename graph_traits&lt;Graph&gt;::edge_descriptor e, Graph& g)
45</pre>
46
47This function takes and edge descriptor and returns the pair of
48vertices that are <i>incident</i> to the edge. For directed graphs,
49the <tt>first</tt> vertex is the source and the <tt>second</tt> vertex
50is the target. This function is equivalent to the expression
51<tt>std::make_pair(source(e, g), target(e, g))</tt>.
52
53
54<h3>Example</h3>
55
56<pre>
57  edge_descriptor e;
58  vertex_descriptor u, v;
59  ...
60  tie(u, v) = incident(e, g);
61</pre>
62
63
64<br>
65<HR>
66<TABLE>
67<TR valign=top>
68<TD nowrap>Copyright &copy 2000-2001</TD><TD>
69<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
70Indiana University (<A
71HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
72<A HREF="../../../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>,
74Indiana University (<A
75HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
76</TD></TR></TABLE>
77
78</BODY>
79</HTML> 
Note: See TracBrowser for help on using the repository browser.