]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/graph/doc/inv_adjacency_iterator.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / graph / doc / inv_adjacency_iterator.html
CommitLineData
7c673cae
FG
1<html>
2<!--
3 Copyright (c) 2000 Jeremy Siek
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
10<head>
11<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
12<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
13<meta name="ProgId" content="FrontPage.Editor.Document">
14<title>Inverse Adjacency Iterator Adaptor Documentation</title>
15</head>
16
17<body bgcolor="#FFFFFF" text="#000000">
18
19<img src="../../../boost.png" alt="boost.png (6897 bytes)"
20align="center" width="277" height="86">
21
22<h1>Inverse Adjacency Iterator Adaptor</h1>
23
24Defined in header
25<a href="../../../boost/graph/adjacency_iterator.hpp">boost/graph/adjacency_iterator.hpp</a>
26
27<p>
28The inverse adjacency iterator adaptor transforms an
29<tt>in_edge_iterator</tt> into an inverse adjacency iterator. That is, it
30takes an iterator that traverses over edges, and creates an iterator
31that traverses over the <b><i>source</i></b> vertices of those edges.
32
33<!--
34With this adaptor it is trivial to take a graph type that models <a
35href="IncidenceGraph.html">Incidence Graph</a> and add the
36capabilities required of <a href="AdjacencyGraph.html">Adjacency
37Graph</a>. -->
38
39
40<h2>Synopsis</h2>
41
42<pre>
43namespace boost {
44 template &lt;class Graph, class VertexDescriptor, class InEdgeIter&gt;
45 class inv_adjacency_iterator_generator {
46 public:
47 typedef <a href="../../iterator/doc/iterator_adaptor.html">iterator_adaptor</a>&lt;...&gt; type;
48 };
49}
50</pre>
51
52<hr>
53
54<h3>Example</h3>
55
56<p>
57The following is an example of how to use the
58<tt>inv_adjacency_iterator_generator</tt> class.
59
60<p>
61<PRE>
62#include &lt;boost/graph/adjacency_iterator.hpp&gt;
63
64class my_graph {
65 // ...
66 typedef ... in_edge_iterator;
67 typedef ... vertex_descriptor;
68 typedef boost::inv_adjacency_iterator_generator&lt;my_graph, vertex_descriptor, in_edge_iterator&gt;::type inv_adjacency_iterator;
69 // ...
70};
71
72</PRE>
73
74<h3>Template Parameters</h3>
75
76<Table border>
77<TR>
78<TH>Parameter</TH><TH>Description</TH>
79</TR>
80
81<TR>
82<TD><tt>Graph</tt></TD>
83<TD>The graph type, which must model <a
84href="./IncidenceGraph.html">Incidence Graph</a>.</TD>
85</TR>
86
87<TR>
88<TD><tt>VertexDescriptor</tt></TD>
89<TD>This must be the same type as
90<tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt>. The reason why
91this is a template parameter is that the primary use of
92<tt>inv_adjacency_iterator_generator</tt> is <b><i>inside</i></b> the
93definition of the graph class, and in that context we can not use
94<tt>graph_traits</tt> on the not yet fully defined graph class.<br>
95<b>Default:</b> <tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt></TD>
96</TR>
97
98<TR>
99<TD><tt>InEdgeIter</tt></TD>
100<TD>This must be the same type as
101<tt>graph_traits&lt;Graph&gt;::in_edge_iterator</tt>.<br>
102<b>Default:</b> <tt>graph_traits&lt;Graph&gt;::in_edge_iterator
103</TD>
104</TR>
105
106</Table>
107
108<h3>Model of</h3>
109
110The inverse adjacency iterator adaptor (the type
111<tt>inv_adjacency_iterator_generator<...>::type</tt>) is a model of <a
112href="../../utility/MultiPassInputIterator.html">Multi-Pass Input Iterator</a>
113</a>.
114
115
116<h3>Members</h3>
117
118The inverse adjacency iterator type implements the member functions and
119operators required of the <a
120href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random Access Iterator</a>
121concept, except that the <tt>reference</tt> type is the same as the <tt>value_type</tt>
122so <tt>operator*()</tt> returns by-value. In addition it has the following constructor:
123
124<pre>
125inv_adjacency_iterator_generator::type(const InEdgeIter&amp; it, const Graph* g)
126</pre>
127
128<hr>
129<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->19 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14767" --></p>
130