[BGL] Get all properties for edge
Hi,
I have the following description of graph:
///////////////////////////code///////////////////////////////////
struct EdgeProperties {
EdgeProperties(size_t ew = 0, size_t key = -1) : edge_weight(ew),
edge_index(key)
{
edge_color = std::string("black");
}
size_t edge_weight;
std::string edge_color;
size_t edge_index; //Key for distinguishing all input edges
};
typedef adjacency_list<
listS, /// Graph; //////////////////////////////////////////////////////////////////////////////
I have edge descriptor. I would like to get EdgeProperties structure for
this edge.
Many thanks in advance for help.
Regards,
--dima
P. S.
Special thanks to Douglas Gregor for previous answer it was really
usefull for me
On 12/14/05, Dmitry Bufistov
[snip]
I have edge descriptor. I would like to get EdgeProperties structure for this edge.
Just use (if you have a Graph g and an edge_descriptor e): const EdgeProperties& ep = g[e];
Many thanks in advance for help.
Welcome. -- Johan
participants (2)
-
Dmitry Bufistov
-
Johan Oudinet