Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/graph/doc/incident.html @ 12

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

added boost

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