|
Boost : |
Subject: [boost] Adjacency lists
From: Nouf M. (noufmks_at_[hidden])
Date: 2013-11-24 08:12:58
Hi,
I have two *huge* text file with graph data.. the format of the files are
as follows:
File 1(vertices): Two field in each line (name + weight)
e.g.
Dan 5
David 7
Jack 3
File 2(edges): Three fields in each line (name name weight)
e.g.
Dan David 3
Jack David 1
I would like to store the data in an adjacency list using boost. I have
wrote the following code:
struct VertexProperties {
//std::size_t index;
std::string name;
int weight;
};
struct EdgeProperties {
EdgeProperties(const int& w) : weight(w) { }
int weight;
};
My question, is the above code correct? should I include an index in the
VertexProperties (I don't have an index in my graph data)? What is more
efficient in the searching (latter on) with or without an index?
Thank you...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk