|
Boost Users : |
Subject: [Boost-users] Remove edge
From: Gianni Loiacono (giannix82_at_[hidden])
Date: 2009-02-16 12:14:07
Hi all,
I have defined my graph like this:
typedef adjacency_list<vecS, vecS, undirectedS,NodoProperty, ArcoProperty> Graph2;
And also:
graph_traits < Graph2 >::edge_iterator ei, ei_end;
Now, I want to delete all edges where the capacity is less than 10. Than I have write this code:
for (tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
if (capacity2[*ei] < 10)
{
remove_edge(source(*ei,g),target(*ei,g),g);
}
}
But the program after 2 cicles....it crashs :(....Why?
Thanks a lot
Passa a Yahoo! Mail.
La webmail che ti offre GRATIS spazio illimitato,
antispam e messenger integrato.
http://it.mail.yahoo.com/%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net