class Node{
public:
string id;
};
class EdgeProperties {
public:
int targetI;// Terminal No. interms of target node
int sourceI;// Terminal No. interms of source node
EdgeProperties(int s,int t):sourceI(s-1),targetI(t-1) { }
};
Graph g;
typedef graphtraits<Graph>::vertex_descriptor Vertex;
for(boost::tie(iedge_s,iedge_
end) = boost::in_edges(v,g); iedge_s!=iedge_end; ++iedge_s)
{
Vertex src = boost::source(*iedge_s,g);
Vertex target = boost::target(*iedge_s,g);
cout << g[src]->id << "-->" << g[target]->id << endl;
EdgeProperties *ep = g[*iedge_s]; // <==== Line 10; g[*iedge_s] is returning null
cout << ep->sourceI << endl; // <==== This is giving segmentation fault;
}
**here g[*iedge_s] is returning null**
is it the problem because iam using (*iedge_s) as (edge_descriptor) or
the problem somewhere in my code where in i had not properly assigned the property object
to that specific edge.
i just wanted to know whether both of these are same
graphtraits<Graph>::in_edge_iterator *iedge_iter;
graphtraits<Graph>::edge_iterator *edge_iter;
(*edge_iter) -> this becomes edge_descriptor
(*iedge_iter) -> **whether this will also become edge_descriptor**
pardon me if iam really missing any basic concept in here.