3rdParty/boost/1.78.0/libs/graph/doc/property_put.html
property_put<PropertyMap, EventTag>This is an EventVisitor that can be used to write a fixed value to a property map when a vertex or edge is visited at some event-point within an algorithm. For example, this visitor can be used as an alternative to a loop to initialize a property map, or it can be used to mark only back edges with a property.
property_put can be used with graph algorithms by wrapping it with the algorithm-specific adaptor, such as bfs_visitor and dfs_visitor. Also, this event visitor can be combined with other event visitors using std::pair to form an EventVisitorList.
boost::depth_first_search
(G, boost::visitor(
boost::make_dfs_visitor(
boost::put_property(is_back_edge, boost::on_back_edge()))));
| Parameter | Description | Default |
|---|---|---|
| PropertyMap | A WritablePropertyMap, where the key_type is the vertex descriptor type or edge descriptor of the graph (depending on the kind of event tag). | |
| EventTag | The tag to specify when the property_put should be applied during the graph algorithm. |
| Type | Description |
|---|---|
| property_put::event_filter | This will be the same type as the template parameter EventTag. |
| Member | Description |
|---|---|
| property_put(PropertyMap pa, property_traits::value_type val); | Construct a property put object with the property map pa and constant value val. |
| template <class X, class Graph> | |
| void operator()(X x, const Graph& g); | This puts the value val into the property map for the vertex or edge x. |
| Function | Description |
|---|---|
| template <class PropertyMap, class EventTag> | |
| property_put<PropertyMap, EventTag> | |
| put_property(PropertyMap pa, typename property_traits::value_type val, EventTag); | A convenient way to create a property_put. |
The following are other event visitors: distance_recorder, predecessor_recorder, and time_stamper.
| Copyright © 2000-2001 | Jeremy Siek, Indiana University ([email protected])
Lie-Quan Lee, Indiana University ([email protected])
Andrew Lumsdaine, Indiana University ([email protected]) |
| Copyright © 2010 | Matthias Walter ([email protected]) |
| | Trustees of Indiana University |