Creating a large graph with Boost Graph Library
807575Jan 17 2010 — edited Jan 17 2010Hello,
I will very appreciate if you could help me with this one
.
I am trying to create a graph with Boost using adjacency_list
..
The graph is representing real road network (junctions and streets) and have ~150000 vertices and ~300000 edges
I have a txt file containing this network connections
It look like this:
1,2 (means 1 connected with 2)
2,3 (means 2 connected with 3)
2,4 etc
3,5
so I read it line by line and in parallel add edge , with add_edge function
while (not EOF)
{
add_edge(i,j)
}
The problem is that it takes more than two days (48 hours !) just to build this graph
Obviously, it is not reasonable, especially if I want to make some minor change and re-run my application again
Can you please suggest me, is it any other faster way to create such large graph ?
What am I doing wrong ?
Or may be it just works this way
. ?
Thanks in advance,
Arik