|
ADS
Algorithms and Data Structures
|
A graph of Boost.Graph as a graph of ADS, beyond the book, compiled only with ADS_WITH_BOOST: FromBGL< BG , WeightMap > is a view of a graph of Boost.Graph that is an IncidenceGraph and a VertexListGraph with a vertex_index, which models the concept Graph of Graph.h, with forEachEdge() reading the weights from a property map, so that the algorithms of ADS (the visits, the shortest paths, the spanning trees, the reoptimizing observers) run on it with no copy of the graph. More...
Go to the source code of this file.
A graph of Boost.Graph as a graph of ADS, beyond the book, compiled only with ADS_WITH_BOOST: FromBGL< BG , WeightMap > is a view of a graph of Boost.Graph that is an IncidenceGraph and a VertexListGraph with a vertex_index, which models the concept Graph of Graph.h, with forEachEdge() reading the weights from a property map, so that the algorithms of ADS (the visits, the shortest paths, the spanning trees, the reoptimizing observers) run on it with no copy of the graph.
The names of the nodes are the vertex indices.
On a MutableGraph whose vertex descriptors are the indices (boost::adjacency_list on vecS) the view is also a DynamicGraph: insertNode(), insertEdge(), deleteEdge() and deleteNode() call add_vertex(), add_edge() (and put() of the weight), remove_edge() and clear_vertex(), so that an ObservedGraph on the view sends the events of Observable.h for the changes made through it. A deleted node keeps its vertex, isolated and marked as not a node, since remove_vertex() on vecS renumbers the vertices after it, which the stable names of ADS forbid.
The contracts [see Contract.h] are those of the graphs of ADS [see Graph.h]: insertEdge() of an edge already there replaces its weight, deleteEdge() of one not there does nothing; the graph must change only through the view while the view lives.