lemon/list_graph.h
changeset 2107 e1055232c670
parent 2102 eb73ab0e4c74
child 2111 ea1fa1bc3f6d
equal deleted inserted replaced
26:cfbc7bf2d835 27:26adcc205ec8
   356       Node t=target(e);
   356       Node t=target(e);
   357       _changeTarget(e,source(e));
   357       _changeTarget(e,source(e));
   358       _changeSource(e,t);
   358       _changeSource(e,t);
   359     }
   359     }
   360 
   360 
   361     ///Using this it is possible to avoid the superfluous memory allocation.
   361     ///Using this it is possible to avoid the superfluous memory
   362 
   362     ///allocation.
   363     ///Using this it is possible to avoid the superfluous memory allocation.
   363 
   364     ///\todo more docs...
   364     ///Using this it is possible to avoid the superfluous memory
       
   365     ///allocation: if you know that the graph you want to build will
       
   366     ///contain at least 10 million nodes then it is worth to reserve
       
   367     ///space for this amount before starting to build the graph.
       
   368     void reserveNode(int n) { nodes.reserve(n); };
       
   369 
       
   370     ///Using this it is possible to avoid the superfluous memory
       
   371     ///allocation.
       
   372 
       
   373     ///Using this it is possible to avoid the superfluous memory
       
   374     ///allocation: see the \ref reserveNode function.
   365     void reserveEdge(int n) { edges.reserve(n); };
   375     void reserveEdge(int n) { edges.reserve(n); };
       
   376 
   366 
   377 
   367     ///Contract two nodes.
   378     ///Contract two nodes.
   368 
   379 
   369     ///This function contracts two nodes.
   380     ///This function contracts two nodes.
   370     ///
   381     ///