-
June 23rd, 2012, 04:38 PM
#1
Measuring the memory used by a graph
I code in C++ on Windows, using codeblocks with g++. I have a graph defined as follow (using boost):
Code:
struct NodeData{ /*...*/ };
struct EdgeData{ /*...*/ };
typedef adjacency_list<setS, setS, undirectedS, NodeData, EdgeData> MyGraph;
MyGraph G;
This graph is updated iteratively (by adding/deleting some edges/vertices). At each iteration, I want to evaluate the memory space occupied by this graph G. How can I do that ? And what if I compute V = "the size of NodeData" and E = "the size of EdgeData" and at each iteration the memory used by the graph will be proportional to: nbr_vertices * V + nbr_edges * E ?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|