Boost logo

Boost Users :

Subject: Re: [Boost-users] Storing a Huge Graph
From: Nick Edmonds (ngedmond_at_[hidden])
Date: 2011-10-17 08:16:58


On Oct 15, 2011, at 2:28 AM, Nouf M. wrote:

> Hi,
> Regarding the Boost Graph Library, Will I be able to convert a huge text file to a graph with millions of nodes and edges? Can I store the graph somewhere in the hard disk and then upload it whenever I test my code (i.e. I don't have to convert the text file into a graph each time I run my program).

"millions" of nodes and edges really isn't all that large (unless you're talking 100's of millions), if your graph is in a halfway sensible format you can probably get away with using one of the existing graph readers or slightly modifying one of them to read your data. If your data is ordered in some way there are CSR constructors that will respect the ordering, and in some cases construct the graph in-place with regard to the memory utilized by the raw graph data once you load it from disk. The adjacency list class is less compact/efficient in this respect. Using Boost.Serialization to convert your text file to a binary format may improve your load times by making your data more compact on disk however.

Cheers,
Nick



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