# HG changeset patch # User deba # Date 1150989371 0 # Node ID e1055232c670854d84d77372fd83ad08e0234bdd # Parent de35c02326510b681052eb78f5fbfd6e8439c944 Added reserveNode function. diff -r de35c0232651 -r e1055232c670 lemon/list_graph.h --- a/lemon/list_graph.h Wed Jun 21 11:15:01 2006 +0000 +++ b/lemon/list_graph.h Thu Jun 22 15:16:11 2006 +0000 @@ -358,12 +358,23 @@ _changeSource(e,t); } - ///Using this it is possible to avoid the superfluous memory allocation. + ///Using this it is possible to avoid the superfluous memory + ///allocation. - ///Using this it is possible to avoid the superfluous memory allocation. - ///\todo more docs... + ///Using this it is possible to avoid the superfluous memory + ///allocation: if you know that the graph you want to build will + ///contain at least 10 million nodes then it is worth to reserve + ///space for this amount before starting to build the graph. + void reserveNode(int n) { nodes.reserve(n); }; + + ///Using this it is possible to avoid the superfluous memory + ///allocation. + + ///Using this it is possible to avoid the superfluous memory + ///allocation: see the \ref reserveNode function. void reserveEdge(int n) { edges.reserve(n); }; + ///Contract two nodes. ///This function contracts two nodes.