Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/graph/doc/subgraph.html @ 14

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

added boost

File size: 21.7 KB
Line 
1<HTML>
2<!--
3  -- Copyright (c) Jeremy Siek 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.  Jeremy Siek makes 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: Subgraph</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:subgraph-class"></A>
23<pre>
24subgraph&lt;Graph&gt;
25</pre>
26</h1>
27
28<!--The space consumption of the <tt>subgraph</tt> is quite high.
29We should change subgraph from representing induced subgraphs to just
30normal subgraphs (from talk with Steven North). -->
31
32<p>
33The subgraph class provides a mechanism for keeping track of a graph
34and its subgraphs. A graph <i>G'</i> is a <i>subgraph</i> of a graph
35<i>G</i> if the vertex set of <i>G'</i> is a subset of the vertex set
36of <i>G</i> and if the edge set of <i>G'</i> is a subset of the edge
37set of <i>G</i>. That is, if <i>G'=(V',E')</i> and <i>G=(V,E)</i>,
38then <i>G'</i> is a subgraph of <i>G</i> if <i>V'</i> is a subset of
39<i>V</i> and <i>E</i> is a subset of <i>E'</i>. An <i>induced
40subgraph</i> is a subgraph formed by specifying a set of vertices
41<i>V'</i> and then selecting all of the edges from the original graph
42that connect two vertices in <i>V'</i>. So in this case <i>E' = {(u,v)
43in E: u,v in V'}</i>.  Figure 1 shows a graph <i>G<sub>0</sub></i> and
44two subgraphs <i>G<sub>1</sub></i> and <i>G<sub>2</sub></i>. The edge
45set for <i>G<sub>1</sub></i> is <i>E<sub>1</sub> = { (E,F), (C,F)
46}</i> and the edge set for <i>G<sub>2</sub></i> is <i>E<sub>2</sub> =
47{ (A,B) }</i>. Edges such as <i>(E,B)</i> and <i>(F,D)</i> that cross
48out of a subgraph are not in the edge set of the subgraph.
49</p>
50
51<P></P>
52<DIV ALIGN="center"><A NAME="fig:subgraph-tree"></A>
53<TABLE>
54<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> A graph with nested subgraphs, maintained in a tree structure.</CAPTION>
55<TR><TD><IMG SRC="./figs/subgraph.gif"></TD>
56<TD><IMG SRC="./figs/subgraph-tree.gif"></TD></TR>
57</TABLE>
58</DIV><P></P>
59
60<p>The <tt>subgraph</tt> class implements induced subgraphs. The main graph
61and its subgraphs are maintained in a tree data structure. The main
62graph is the root, and subgraphs are either children of the root or of
63other subgraphs. All of the nodes in this tree, including the root
64graph, are instances of the <tt>subgraph</tt> class.  The
65<tt>subgraph</tt> implementation ensures that each node in the tree is
66an induced subgraph of its parent. The <tt>subgraph</tt> class
67implements the BGL graph interface, so each subgraph object can be
68treated as a graph.</p>
69
70<h3>Example</h3>
71
72The full source code for this example is in
73<tt>example/subgraph.cpp</tt>. To create a graph and subgraphs, first
74create the root graph object.  Here we use <tt>adjacency_list</tt> as
75the underlying graph implementation. The underlying graph type is
76required to have <tt>vertex_index</tt> and <tt>edge_index</tt>
77internal properties, so we add an edge index property to the adjacency
78list. We do not need to add a vertex index properety because that is
79built in to the <tt>adjacency_list</tt>. We will be building the graph
80and subgraphs in Figure 1, so we will need a total of six vertices.
81
82<pre>
83typedef adjacency_list_traits<vecS, vecS, directedS> Traits;
84typedef subgraph< adjacency_list<vecS, vecS, directedS,
85  no_property, property<edge_index_t, int> > > Graph;
86
87const int N = 6;
88Graph G0(N);
89
90enum { A, B, C, D, E, F};  // for conveniently refering to vertices in G0
91</pre>
92
93Next we create two empty subgraph objects, specifying <tt>G0</tt> as
94their parent.
95
96<pre>
97Graph& G1 = G0.create_subgraph(), G2 = G0.create_subgraph();
98enum { A1, B1, C2 }; // for conveniently refering to vertices in G1
99enum { A2, B2 };     // for conveniently refering to vertices in G2
100</pre>
101
102We can add vertices from the root graph to the subgraphs using the
103<tt>add_vertex</tt> function. Since the graph implementation is
104<tt>adjacency_list</tt> with <tt>VertexList=vecS</tt>, we can use the
105integers (or in this case enums) in the range <i>[0,6)</i> as vertex
106descriptors.
107
108<pre>
109add_vertex(C, G1); // global vertex C becomes local A1 for G1
110add_vertex(E, G1); // global vertex E becomes local B1 for G1
111add_vertex(F, G1); // global vertex F becomes local C1 for G1
112
113add_vertex(A, G2); // global vertex A becomes local A2 for G2
114add_vertex(B, G2); // global vertex B becomes local B2 for G2
115</pre>
116
117Next we can add edges to the main graph using the usual
118<tt>add_edge</tt> function.
119
120<pre>
121add_edge(A, B, G0);
122add_edge(B, C, G0);
123add_edge(B, D, G0);
124add_edge(E, B, G0);
125add_edge(E, F, G0);
126add_edge(F, D, G0);
127</pre>
128
129We can also add edges to subgraphs such as <tt>G1</tt> using the
130<tt>add_edge</tt> function. Each subgraph has its own vertex and edge
131descriptors, which we call <i>local</i> descriptors. We refer to root
132graph's vertex and edge descriptors as the <i>global</i>
133descriptors. Above, we used global vertex descriptors to add vertices
134to the graph. However, most <tt>subgraph</tt> functions work with
135local descriptors. So in the following call to <tt>add_edge</tt> we
136add the edge <tt>(A1,C1)</tt> (or numerically <tt>(0,2)</tt>) which is
137the local version (for subgraph <tt>G1</tt>) of the global edge
138<tt>(C,F)</tt> (or numerically <tt>(2,5)</tt>).  Adding an edge to a
139subgraph causes the edge to also be added to all of its ancestors in
140the subgraph tree to ensure that the subgraph property is maintained.
141
142<pre>
143add_edge(A1, C1, G1); // (A1,C1) is subgraph G1 local indices
144                      // for the global edge (C,F).
145</pre>
146
147<!----------------------------->
148<h3>Where Defined</h3>
149
150<tt>boost/graph/subgraph.hpp</tt>
151
152<!----------------------------->
153<h3>Template Parameters</h3>
154
155<P>
156<TABLE border>
157<TR>
158<th>Parameter</th><th>Description</th>
159</tr>
160<tr><td><tt>Graph</tt> </td>
161<td> A graph type modeling <a href="VertexMutableGraph.html">VertexMutableGraph</a>
162  and <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>. Also
163  the graph must have internal <tt>vertex_index</tt> and
164  <tt>edge_index</tt> properties. The vertex indices must be maintained
165  automatically by the graph, whereas the edge indices will be
166  assigned by the <tt>subgraph</tt> class implementation. </td>
167</tr>
168</table>
169
170
171<!----------------------------->
172<h3>Model Of</h3>
173
174<tt>subgraph</tt> is a model of <a href="VertexMutableGraph.html">VertexMutableGraph</a>. Also, if
175the <tt>Graph</tt> type models <a href="VertexListGraph.html">VertexListGraph</a>,
176<a href="EdgeListGraph.html">EdgeListGraph</a> and/or <a href="BidirectionalGraph.html">BidirectionalGraph</a>, then
177<tt>subgraph&lt;Graph&gt;</tt> will also models these concepts.
178
179<!----------------------------->
180<h3>Associates Types</h3>
181
182If the graph is the root of the subgraph tree, then the vertex and
183edge descriptors are both the local descriptors for the root graph,
184and they are the global descriptors. If the graph is not the root,
185then the descriptors are local descriptors for the subgraph.
186The subgraph iterators are the same iterator types as the iterators of
187the underlying <tt>Graph</tt> type.
188
189<hr>
190
191<pre>
192graph_traits&lt;subgraph&gt;::vertex_descriptor
193</pre>
194    The type for the vertex descriptors.
195 (Required by <a href="Graph.html">Graph</a>.)
196
197<hr>
198
199<pre>
200graph_traits&lt;subgraph&gt;::edge_descriptor
201</pre>
202    The type for the edge descriptors.
203    (Required by <a href="Graph.html">Graph</a>.)
204
205<hr>
206
207<pre>
208graph_traits&lt;subgraph&gt;::vertex_iterator
209</pre>
210    The type for the iterators returned by <tt>vertices</tt>.
211    (Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
212
213<hr>
214
215<pre>
216graph_traits&lt;subgraph&gt;::edge_iterator
217</pre>
218    The type for the iterators returned by <tt>edges</tt>.
219    (Required by <a href="EdgeListGraph.html">EdgeListGraph</a>.)
220
221<hr>
222<pre>
223graph_traits&lt;subgraph&gt;::out_edge_iterator
224</pre>
225    The type for the iterators returned by <tt>out_edges</tt>.
226    (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
227
228<hr>
229<pre>
230graph_traits&lt;subgraph&gt;::in_edge_iterator
231</pre>
232    The <tt>in_edge_iterator</tt> is the
233    iterator type returned by the <tt>in_edges</tt> function.
234    (Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
235
236<hr>
237<pre>
238graph_traits&lt;subgraph&gt;::adjacency_iterator
239</pre>
240    The type for the iterators returned by <tt>adjacent_vertices</tt>.
241    (Required by <a href="AdjacencyGraph.html">AdjacencyGraph</a>.)
242
243<hr>
244<pre>
245graph_traits&lt;subgraph&gt;::directed_category
246</pre>
247    Provides information about whether the graph is directed
248    (<tt>directed_tag</tt>) or undirected (<tt>undirected_tag</tt>).
249    (Required by <a href="Graph.html">Graph</a>.)
250
251<hr>
252<pre>
253graph_traits&lt;subgraph&gt;::edge_parallel_category
254</pre>
255    This describes whether the graph class allows the insertion of
256    parallel edges (edges with the same source and target), which
257    depends on the underlying <tt>Graph</tt> class. The two tags are
258    <tt>allow_parallel_edge_tag</tt> and
259    <tt>disallow_parallel_edge_tag</tt>.
260    (Required by <a href="Graph.html">Graph</a>.)
261
262<hr>
263<pre>
264graph_traits&lt;subgraph&gt;::vertices_size_type
265</pre>
266  The type used for dealing with the number of vertices in
267  the graph.
268  (Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
269
270<hr>
271<pre>
272graph_traits&lt;subgraph&gt;::edges_size_type
273</pre>
274  The type used for dealing with the number of edges in the graph.
275  (Required by <a href="EdgeListGraph.html">EdgeListGraph</a>.)
276
277<hr>
278<pre>
279graph_traits&lt;subgraph&gt;::degree_size_type
280</pre>
281  The type used for dealing with the number of out-edges of a vertex.
282  (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
283
284<hr>
285<pre>
286property_map&lt;subgraph, PropertyTag&gt;::type
287property_map&lt;subgraph, PropertyTag&gt;::const_type
288</pre>
289  The map type for vertex or edge properties in the graph. The
290  specific property is specified by the <tt>PropertyTag</tt> template
291  argument, and must match one of the properties specified in the
292  <tt>VertexProperty</tt> or <tt>EdgeProperty</tt> for the graph.
293  (Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
294
295<hr>
296<pre>
297subgraph::children_iterator
298</pre>
299  The iterator type for accessing the children subgraphs of the graph.
300
301
302
303<!----------------------------->
304<h3>Member Functions</h3>
305
306
307
308<hr>
309<pre>
310subgraph(vertices_size_type n, const GraphProperty&amp; p = GraphProperty())
311</pre>
312    Creates the root graph object with <tt>n</tt> vertices and zero edges.
313
314<hr>
315<pre>
316subgraph&lt;Graph&gt;& create_subgraph();
317</pre>
318    Creates an empty subgraph object whose parent is <i>this</i>
319    graph.
320
321<hr>
322<pre>
323template &lt;typename VertexIterator&gt;
324subgraph&lt;Graph&gt;&amp;
325create_subgraph(VertexIterator first, VertexIterator last)
326</pre>
327    Creates a subgraph object with the specified vertex set.  The
328    edges of the subgraph are induced by the vertex set. That is,
329    every edge in the parent graph (which is <i>this</i> graph) that
330    connects two vertices in the subgraph will be added to the
331    subgraph.
332
333<hr>
334<pre>
335vertex_descriptor local_to_global(vertex_descriptor u_local) const
336</pre>
337    Converts a local vertex descriptor to the corresponding global
338    vertex descriptor.
339
340<hr>
341<pre>
342vertex_descriptor global_to_local(vertex_descriptor u_global) const
343</pre>
344    Converts a global vertex descriptor to the corresponding local
345    vertex descriptor.
346
347<hr>
348<pre>
349edge_descriptor local_to_global(edge_descriptor e_local) const
350</pre>
351    Converts a local edge descriptor to the corresponding global edge
352    descriptor.
353
354<hr>
355<pre>
356edge_descriptor global_to_local(edge_descriptor u_global) const
357</pre>
358    Converts a global edge descriptor to the corresponding local edge
359    descriptor.
360
361<hr>
362<pre>
363std::pair&lt;vertex_descriptor, bool&gt; find_vertex(vertex_descriptor u_global) const
364</pre>
365    If vertex <i>u</i> is in this subgraph, the function returns the local
366    vertex descriptor that corresponds to the global vertex descriptor
367    <tt>u_global</tt> as the first part of the pair and <tt>true</tt> for
368    the second part of the pair. If vertex <i>u</i> is not in the subgraph
369    then this function returns false in the second part of the
370    pair.
371
372<hr>
373<pre>
374subgraph& root()
375</pre>
376    Returns the root graph of the subgraph tree.
377
378<hr>
379<pre>
380bool is_root() const
381</pre>
382    Return <tt>true</tt> if the graph is the root of the subgraph tree,
383    and returns <tt>false</tt> otherwise.
384
385<hr>
386<pre>
387subgraph& parent()
388</pre>
389    Returns the parent graph.
390
391<hr>
392<pre>
393std::pair&lt;children_iterator, children_iterator&gt; children() const
394</pre>
395Return an iterator pair for accessing the children subgraphs.
396
397
398<!----------------------------->
399<h3>Nonmember Functions</h3>
400
401The functionality of <tt>subgraph</tt> depends on the
402<tt>Graph</tt> type. For example, if <tt>Graph</tt> in a
403<a href="BidirectionalGraph.html">BidirectionalGraph</a> and supports <tt>in_edges</tt>, then so
404does <tt>subgraph</tt>. Here we list all the functions that
405<tt>subgraph</tt> could possibly support given a <tt>Graph</tt>
406type that is a model of <a href="VertexListGraph.html">VertexListGraph</a>, <a href="EdgeListGraph.html">EdgeListGraph</a> and
407<a href="BidirectionalGraph.html">BidirectionalGraph</a>. If the <tt>Graph</tt> type that you use
408with <tt>subgraph</tt> does not model these concepts and supports
409fewer functions, then the <tt>subgraph</tt> will also support
410fewer functions and some of the functions listed below will not be
411implemented.
412
413
414<hr>
415<pre>
416std::pair&lt;vertex_iterator, vertex_iterator&gt;
417vertices(const subgraph&amp; g)
418</pre>
419    Returns an iterator range providing access to the vertex set of subgraph <i>g</i>.
420    (Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
421
422<hr>
423<pre>
424std::pair&lt;edge_iterator, edge_iterator&gt;
425edges(const subgraph&amp; g)
426</pre>
427    Returns an iterator range providing access to the edge set of subgraph <i>g</i>.
428    (Required by <a href="EdgeListGraph.html">EdgeListGraph</a>.)
429
430<hr>
431<pre>
432std::pair&lt;adjacency_iterator, adjacency_iterator&gt;
433adjacent_vertices(vertex_descriptor u_local, const subgraph&amp; g)
434</pre>
435    Returns an iterator range providing access to the vertices
436    adjacent to
437    vertex <i>u</i> in subgraph <i>g</i>.
438    (Required by <a href="AdjacencyGraph.html">AdjacencyGraph</a>.)
439
440<hr>
441<pre>
442std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
443out_edges(vertex_descriptor u_local, const subgraph&amp; g)
444</pre>
445    Returns an iterator range providing access to the out-edges of
446    vertex <i>u</i> in subgraph <i>g</i>. If the graph is undirected, this
447    iterator range provides access to all edge incident on
448    vertex <i>u</i>.
449    (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
450
451<hr>
452<pre>
453std::pair&lt;in_edge_iterator, in_edge_iterator&gt;
454in_edges(vertex_descriptor v_local, const subgraph&amp; g)
455</pre>
456    Returns an iterator range providing access to the in-edges of
457    vertex
458    <i>v</i> in subgraph <i>g</i>.
459    (Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
460
461<hr>
462<pre>
463vertex_descriptor
464source(edge_descriptor e_local, const subgraph&amp; g)
465</pre>
466    Returns the source vertex of edge <i>e</i> in subgraph <i>g</i>.
467    (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
468
469<hr>
470<pre>
471vertex_descriptor
472target(edge_descriptor e_local, const subgraph&amp; g)
473</pre>
474    Returns the target vertex of edge <i>e</i> in subgraph <i>g</i>.
475    (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
476
477<hr>
478<pre>
479degree_size_type
480out_degree(vertex_descriptor u_local, const subgraph&amp; g)
481</pre>
482    Returns the number of edges leaving vertex <i>u</i> in subgraph <i>g</i>.
483    (Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
484
485<hr>
486<pre>
487degree_size_type in_degree(vertex_descriptor u_local, const subgraph&amp; g)
488</pre>
489    Returns the number of edges entering vertex <i>u</i> in subgraph <i>g</i>.
490    (Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
491
492<hr>
493<pre>
494vertices_size_type num_vertices(const subgraph&amp; g)
495</pre>
496    Returns the number of vertices in the subgraph <i>g</i>.
497    (Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
498
499<hr>
500<pre>
501edges_size_type num_edges(const subgraph&amp; g)
502</pre>
503    Returns the number of edges in the subgraph <i>g</i>.  (Required by
504    <a href="EdgeListGraph.html">EdgeListGraph</a>.)
505
506<hr>
507<pre>
508vertex_descriptor vertex(vertices_size_type n, const subgraph&amp; g)
509</pre>
510    Returns the <i>n</i>th vertex in the subgraph's vertex list.
511
512<hr>
513<pre>
514std::pair&lt;edge_descriptor, bool&gt;
515edge(vertex_descriptor u_local, vertex_descriptor v_local, const subgraph&amp; g)
516</pre>
517    Returns the edge connecting vertex <i>u</i> to vertex <i>v</i> in subgraph <i>g</i>.
518    (Required by <a href="AdjacencyMatrix.html">AdjacencyMatrix</a>.)
519
520
521
522<hr>
523<pre>
524std::pair&lt;edge_descriptor, bool&gt;
525add_edge(vertex_descriptor u_local, vertex_descriptor v_local, subgraph&amp; g)
526</pre>
527    Adds edge <i>(u,v)</i> to the subgraph <i>g</i> and to all of the subgraph's
528    ancestors in the subgraph tree. This function returns the edge
529    descriptor for the new edge. If the edge is already in the graph
530    then a duplicate will not be added and the Boolean flag will be
531    false.
532    (Required by <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>.)
533
534<hr>
535<pre>
536std::pair&lt;edge_descriptor, bool&gt;
537add_edge(vertex_descriptor u_local, vertex_descriptor v_local,
538         const EdgeProperty&amp; p, subgraph&amp; g)
539</pre>
540    Adds edge <i>(u,v)</i> to the graph and attaches <tt>p</tt> as the value
541    of the edge's internal property storage.  Also see the previous
542    <tt>add_edge</tt> member function for more details.
543
544<hr>
545<pre>
546void remove_edge(vertex_descriptor u_local, vertex_descriptor v_local,
547                 subgraph&amp; g)
548</pre>
549    Removes the edge <i>(u,v)</i> from the subgraph and from all of the
550    ancestors of <tt>g</tt> in the subgraph tree. 
551    (Required by <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>.)
552
553<hr>
554<pre>
555void remove_edge(edge_descriptor e_local, subgraph&amp; g)
556</pre>
557    Removes the edge <tt>e</tt> from the subgraph and from all of the
558    ancestors of <tt>g</tt> in the subgraph tree.
559    (Required by <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>.)
560
561<hr>
562<pre>
563vertex_descriptor
564add_vertex(subgraph&amp; g)
565</pre>
566    Adds a vertex to the subgraph and returns the vertex descriptor
567    for the new vertex. The vertex is also added to all ancestors of
568    <tt>g</tt> in the subgraph tree to maintain the subgraph property.
569    (Required by <a href="VertexMutableGraph.html">VertexMutableGraph</a>.)
570
571<hr>
572<pre>
573vertex_descriptor
574add_vertex(vertex_descriptor u_global, subgraph&amp; g)
575</pre>
576Adds the vertex <i>u</i> from the root graph to the subgraph <tt>g</tt>.
577(Required by <a href="VertexMutableGraph.html">VertexMutableGraph</a>.)
578
579
580<hr>
581<pre>
582template &lt;class PropertyTag&gt;
583property_map&lt;subgraph, PropertyTag&gt;::type
584get(PropertyTag, subgraph&amp; g)
585
586template &lt;class PropertyTag&gt;
587property_map&lt;subgraph, PropertyTag&gt;::const_type
588get(PropertyTag, const subgraph&amp; g)
589</pre>
590    Returns the property map object for the vertex or edge property
591    specified by <tt>PropertyTag</tt>. The <tt>PropertyTag</tt> must match one
592    of the properties specified in the graph's <tt>PropertyTag</tt>
593    template argument.  Vertex and edge properties are shared by all
594    subgraphs, so changes to a property through a local vertex
595    descriptor for one subgraph will change the property for the
596    global vertex descriptor, and therefore for all other subgraphs.
597    However, the key type for a subgraph's property map is a subgraph-local
598    vertex or  edge descriptor.
599    (Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
600
601<hr>
602<pre>
603template &lt;class PropertyTag, class Key&gt;
604typename property_traits&lt;
605  typename property_map&lt;subgraph, PropertyTag&gt;::const_type
606&gt;::value_type
607get(PropertyTag, const subgraph&amp; g, Key k_local)
608</pre>
609    This returns the property value for the key <tt>k_local</tt>, which
610    is either a local vertex or local edge descriptor. See the above
611    <tt>get</tt> function
612    for more information about the propert maps.
613    (Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
614
615<hr>
616<pre>
617template &lt;class PropertyTag, class Key, class Value&gt;
618void
619put(PropertyTag, const subgraph&amp; g, Key k_local, const Value& value)
620</pre>
621    This sets the property value for the key <tt>k_local</tt> to
622    <tt>value</tt><tt>k_local</tt> is either a local vertex or local
623    edge descriptor.  <tt>Value</tt> must be convertible to
624    <tt>typename
625      property_traits&lt;property_map&lt;adjacency_matrix,
626      PropertyTag&gt;::type&gt;::value_type</tt>.
627    (Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
628
629<hr>
630<pre>
631template &lt;class GraphProperties, class GraphPropertyTag&gt;
632typename property_value&lt;GraphProperties, GraphPropertyTag&gt;::type&amp;
633get_property(subgraph&amp; g, GraphPropertyTag);
634</pre>
635Return the property specified by <tt>GraphPropertyTag</tt> that is attached
636to the subgraph object <tt>g</tt>. The <tt>property_value</tt> traits class
637is defined in <tt>boost/pending/property.hpp</tt>.
638
639
640<hr>
641<pre>
642template &lt;class GraphProperties, class GraphPropertyTag&gt;
643const typename property_value&lt;GraphProperties, GraphPropertyTag&gt;::type&amp;
644get_property(const subgraph&amp; g, GraphPropertyTag);
645</pre>
646Return the property specified by <tt>GraphPropertyTag</tt> that is
647attached to the subgraph object <tt>g</tt>.  The <tt>property_value</tt>
648traits class is defined in <tt>boost/pending/property.hpp</tt>.
649
650<hr>
Note: See TracBrowser for help on using the repository browser.