|
Boost Users : |
Subject: [Boost-users] [Graph] Problem with the add_edge() function
From: Willard Mapurisa (wmapurisa_at_[hidden])
Date: 2009-07-30 04:17:14
Hi All
I am having problem with the add_edge function.
I have a graph that has more than 3 million edges from a
triangulation. When I try to fill the graph with these edges
the program terminates. I have filled the graph with approximately 1 500
000 successfully but it will not take in more. Sample code is below
//Code
typedef adjacency_list < listS, vecS, undirectedS, VertexProperty,
EdgeProperty > sGraph m_graph;
m_graph = sGraph(m_scan.size()); // scan size is 2 500 000
pair<graph_traits<sGraph>::edge_descriptor, bool> e;
typedef graph_traits < sGraph >::vertex_descriptor Vertex u, v;
//Filling the graph
FORALLfacets
{
if(!facet->upperdelaunay)
{
qh_makeridges(facet);
FOREACHridge_(facet->ridges)
{
if(!ridge->seen)
{
int i = 0;
v_id.clear();
FOREACHvertex_(ridge->vertices)
{
v_id.push_back(qh_pointid (vertex->point)); i++;
}
//add edges to the graph
u = v_id[0]; v = v_id[1];
e = add_edge(u, v , m_graph);//terminates after
filling the graph with approximately 2 000 000 edges
ridge->seen = 1;
float d = m_scan[u].distance3D(m_scan[v]);
//put(edge_length_t(), m_graph, e.first, d);
}
}
}
}
I have recently started using Boost Graph Libraries and would like yo
know if I am doing something wrong.
Thanks
WTM
-- -------------------------------------------- Willard Mapurisa, ComputaMaps Private Bag X20, Constantia 7848, South Africa tel: +27.21.700 8140, fax: +27.21.701 9520, cell: +27.79.8045714 e-mail: wmapurisa_at_[hidden] Manufacturers of digital maps and imagery http://www.computamaps.com --------------------------------------------
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