Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

AddEdgeVisitor Concept

The AddEdgeVisitor concept exists to allow for some indirection in algorithms that modify graphs by adding edges. In such algorithms, it may be convenient to perform additional operations (such as updating an edge index map) at points in the algorithm where an edge addition occurs. Replacing calls to to add_edge with calls to AddEdgeVisitor::visit_vertex_pair allows for such operations to be defined independently from the algorithm.

Notation

Visitor is a type that models the AddEdgeVisitor concept
vis is an object of type Visitor
Graph is the type of a graph
u,v are objects of type graph_traits<Graph>::vertex_descriptor
e is an object of type graph_traits<Graph>::edge_descriptor
v is an object of type graph_traits<Graph>::vertex_descriptor

Associated Types

None

Valid Expressions

NameExpressionReturn Type Description
Add an Edge vis.visit_vertex_pair(u, v, g) void Invoked every time an edge between vertices u and v should be added to the graph g.

Models

Two models of this concept are defined in the file add_edge_visitors.hpp:



Copyright © 2007 Aaron Windsor ( aaron.windsor@gmail.com)