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...
participants (1)
-
Nouf M.