Re ducing adjacency_list's memory usage
Hi, I wanted to ask if anybody knows how I can reduce memory usage of adj_list graph, even by eliminating some of it's features. Any help is greatly appreciated. -- View this message in context: http://www.nabble.com/Reducing-adjacency_list%27s-memory-usage-tp23363864p23... Sent from the Boost - Users mailing list archive at Nabble.com.
On Sun, 3 May 2009, behzad wrote:
I wanted to ask if anybody knows how I can reduce memory usage of adj_list graph, even by eliminating some of it's features.
Any help is greatly appreciated.
Which vertex list and out-edge list types are you using? If you do not need stable vertex numbers after deletion, and don't need stable vertex iterators, try switching VertexList to vecS. If you do not need stable edge iterators, try switching OutEdgeList to vecS. Are you mutating your graph at all? If you have a directed graph that is not being mutated, with all edges known up front, you can use compressed_sparse_row_graph to save even more memory; note that, as of SVN head, you don't need to pre-sort the edges if you can accept having two passes performed over the input edge range. I can back-port that code to 1.39 if you want to go that way. The options I presented all assume you can tolerate parallel edges; you are more limited if you need automatic detection of those. -- Jeremiah Willcock
participants (2)
-
behzad
-
Jeremiah Willcock