Hi Alejandro,
On 1/14/07, Alejandro Marcos Aragón wrote:
I was wondering if the library handles the edge removal for graphs that
use the vecS as a container for the vertices and the setS for the edges.
I've been trying to use the function and I have a segmentation fault.
I cannot reproduce this here with 1.33.1. What version of Boost are you using?
Additionally a compilabe test-case would be very helpful.
Here's what I've tried:
#include <iostream>
#include
int main(){
using namespace boost;
typedef adjacency_list
tGraph;
tGraph g;
tGraph::vertex_descriptor u,v;
u = add_vertex(g);
v = add_vertex(g);
bool success; tGraph::edge_descriptor e;
tie(e,success) = add_edge(u,v,g);
if(!success){
std::cout << "Could not add edge to graph! \n";
}
else{
std::cout << "num_edges before remove: " << num_edges(g) << "\n";
remove_edge(u,v,g);
std::cout << "num_edges after remove: " << num_edges(g) << "\n";
}
}
Cheers,
Stephan