|
Boost : |
From: Petr Ovchenkov (ptr_at_[hidden])
Date: 2001-11-06 13:08:59
Dear Lee,
Great thanks for you answer.
Can I clarify one more thing?
How much memory require
boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>?
Say, I have 2899233 vertexes, so for vector<int> it will be about
2899233 * 4 = 11M
But I see allocation of ~65M. So we have 5 integers (or pointers) per
vertex.
Then I begin to add edges, my heap grow up to 380M, and I see that
this is not enough. The number of edges is less then twice number
of vertexes (65M * 3 = 195M + 65M = 260M ???).
I am not expected such numbers.
What estimation of required memory we should use for V vertexes,
E edges with object size S?
The metacode I write:
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> Graph;
int n = 2899233;
Graph *g = new Graph( n );
int va, vb;
while (.....) {
// read va, vb
add_edge( va, vb, *G );
}
va, vb are less then n.
A lot of thanks for you attention,
- Petr
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk