The Edge Mutable Graph concept defines the interface for a
graph that supports the addition and removal of edges.
Refinement of
Graph
Associated
Types
No additional associated types.
Valid
Expressions
- add_edge(u, v, g)
returns std::pair<edge_descriptor, bool>
Semantics: Try to insert the edge (u,v) into the graph,
returning the inserted edge or a parallel edge and a flag that
specifies whether an edge was inserted. This operation must not
invalidate vertex descriptors or vertex iterators of the graph, though
it may invalidate edge descriptors or edge iterators.
Preconditions: u and v are vertices in the
graph.
Postconditions:
(u,v) is in the edge set of the graph. The returned edge descriptor will have u in the
source position and v in the target position. If the graph
allows parallel edges, then the returned flag is always
true. If the graph does not allow parallel edges, if
(u,v) was already in the graph then the returned flag is
false. If (u,v) was not in the graph then the returned
flag is true.
- remove_edge(u, v, g)
returns void
Semantics:
Remove the
edge (u,v)
from the
graph. If the
graph allows parallel edges this removes all occurrences of (u,v).
Precondition:
(u,v) is
in the
edge set
of the
graph.
Postcondition:
(u,v) is
no longer
in the
edge set
of the
graph.
-
remove_edge(e, g)
returns void
Semantics: Remove
the edge
e from
the graph.
Precondition:
e is
an edge
in the
graph.
Postcondition:
e is
no longer
in the
edge set
for g.
-
clear_vertex(u, g)
returns void
Semantics: Remove
all edges
to and
from vertex
u from the
graph.
Precondition:
u is a valid vertex descriptor of
g.
Postconditions:
u does not appear as a
source or target of any edge in g.
Complexity
guarantees
For further details refer
http://www.boost.org/libs/graph/doc/EdgeMutableGraph.html .