COIN-OR::LEMON - Graph Library

Changeset 2107:e1055232c670 in lemon-0.x


Ignore:
Timestamp:
06/22/06 17:16:11 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2801
Message:

Added reserveNode function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r2102 r2107  
    359359    }
    360360
    361     ///Using this it is possible to avoid the superfluous memory allocation.
    362 
    363     ///Using this it is possible to avoid the superfluous memory allocation.
    364     ///\todo more docs...
     361    ///Using this it is possible to avoid the superfluous memory
     362    ///allocation.
     363
     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.
    365375    void reserveEdge(int n) { edges.reserve(n); };
     376
    366377
    367378    ///Contract two nodes.
Note: See TracChangeset for help on using the changeset viewer.