I am not able to comprehend the documentation for this function, I have seen several times the following
tie (ei,ei_end) = out_edges(*(vi+a),g);
**g**<-graph
**vi**<-beginning vertex of graph
**a**<- a node
**ei and ei_end** <- edge iterators
What does the function return,and what does it do,when could I use?
Can I find all edges from a node for example?
Provides iterators to iterate over the out-going edges of node
u
from graphg
, e.g.:where
Graph
is your type definition of the graph ang
is an instance of that. However,out_edges
is only applicable for graphs with directed edges. The opposite ofout_edges
isin_edges
that provides you iterators to compute in-coming edges of a node.In an undirected graph both
out_edges
andin_edges
will return all the edges connecting to the node in question.However, more information can be easily found on http://www.boost.org/doc/libs/1_55_0/libs/graph/doc/graph_concepts.html or just in the Boost.Graph examples/tests.