3 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
4 Copyright (c) 2010 Matthias Walter (xammy@xammy.homelinux.net)
5 Copyright (c) 2010 Trustees of Indiana University
7 Distributed under the Boost Software License, Version 1.0.
8 (See accompanying file LICENSE_1_0.txt or copy at
9 http://www.boost.org/LICENSE_1_0.txt)
12 <Title>Boost Graph Library: property_put
</Title>
13 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
15 <IMG SRC=
"../../../boost.png"
16 ALT=
"C++ Boost" width=
"277" height=
"86">
22 property_put
<PropertyMap, EventTag
>
26 This is an
<a href=
"./EventVisitor.html">EventVisitor
</a> that can be
27 used to write a fixed value to a property map when a vertex or edge is
28 visited at some event-point within an algorithm. For example, this
29 visitor can be used as an alternative to a loop to initialize a
30 property map, or it can be used to mark only back edges with a
34 <tt>property_put
</tt> can be used with graph algorithms by
35 wrapping it with the algorithm-specific adaptor, such as
<a
36 href=
"./bfs_visitor.html"><tt>bfs_visitor
</tt></a> and
<a
37 href=
"./dfs_visitor.html"><tt>dfs_visitor
</tt></a>. Also, this event
38 visitor can be combined with other event visitors using
39 <tt>std::pair
</tt> to form an EventVisitorList.
44 boost::depth_first_search
46 boost::make_dfs_visitor(
47 boost::put_property(is_back_edge, boost::on_back_edge()))));
52 <a href=
"./EventVisitor.html">EventVisitor
</a>
55 <H3>Where Defined
</H3>
58 <a href=
"../../../boost/graph/visitors.hpp">
59 <TT>boost/graph/visitors.hpp
</TT></a>
61 <H3>Template Parameters
</H3>
66 <th>Parameter
</th><th>Description
</th><th>Default
</th>
69 <TR><TD><TT>PropertyMap
</TT></TD>
72 href=
"../../property_map/doc/WritablePropertyMap.html">WritablePropertyMap
</a>,
73 where the
<tt>key_type
</tt> is the vertex descriptor type or edge
74 descriptor of the graph (depending on the kind of event tag).
79 <TR><TD><TT>EventTag
</TT></TD>
81 The tag to specify when the
<tt>property_put
</tt> should be
82 applied during the graph algorithm.
89 <H2>Associated Types
</H2>
94 <th>Type
</th><th>Description
</th>
98 <td><tt>property_put::event_filter
</tt></td>
100 This will be the same type as the template parameter
<tt>EventTag
</tt>.
106 <h3>Member Functions
</h3>
112 <th>Member
</th><th>Description
</th>
117 property_put(PropertyMap pa, property_traits
<PropertyMap>::value_type val);
120 Construct a property put object with the property map
121 <tt>pa
</tt> and constant value
<tt>val
</tt>.
127 template
<class X, class Graph
><br>
128 void operator()(X x, const Graph& g);
131 This puts the value
<tt>val
</tt> into the property map for the vertex
132 or edge
<tt>x
</tt>.
<br>
138 <h3>Non-Member Functions
</h3>
142 <th>Function
</th><th>Description
</th>
146 template
<class PropertyMap, class EventTag
><br>
147 property_put
<PropertyMap, EventTag
><br>
148 put_property(PropertyMap pa,
149 typename property_traits
<PropertyMap>::value_type val,
152 A convenient way to create a
<tt>property_put
</tt>.
159 <a href=
"./visitor_concepts.html">Visitor concepts
</a>
161 The following are other event visitors:
<a
162 <a href=
"./distance_recorder.html"><tt>distance_recorder
</tt></a>,
163 <a href=
"./predecessor_recorder.html"><tt>predecessor_recorder
</tt></a>,
164 and
<a href=
"./time_stamper.html"><tt>time_stamper
</tt></a>.
170 <TD nowrap
>Copyright
© 2000-
2001</TD><TD>
171 <A HREF=
"http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek
</A>,
172 Indiana University (
<A
173 HREF=
"mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu
</A>)
<br>
174 <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>
175 <A HREF=
"http://www.osl.iu.edu/~lums">Andrew Lumsdaine
</A>,
176 Indiana University (
<A
177 HREF=
"mailto:lums@osl.iu.edu">lums@osl.iu.edu
</A>)
179 <tr><td>Copyright
© 2010</td><td>Matthias Walter (
<a href=
"mailto:xammy@xammy.homelinux.net">xammy@xammy.homelinux.net
</a>)
</td></tr>
180 <tr><td></td><td>Trustees of Indiana University
</td></tr>
185 <!-- LocalWords: PropertyMap OutputIterator EventTag EventVisitor bfs dfs EventVisitorList
187 <!-- LocalWords: cpp num dtime ftime int WritablePropertyMap map adaptor
189 <!-- LocalWords: const Siek Univ Quan Lumsdaine typename