COIN-OR::LEMON - Graph Library

Changeset 695:887c551fb0aa in lemon-0.x for src/hugo


Ignore:
Timestamp:
07/06/04 13:27:36 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@946
Message:
  • Bugfix in erase()
  • reserveEdge() added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/list_graph.h

    r681 r695  
    115115    int edgeNum() const { return edges.size(); }  //FIXME: What is this?
    116116
     117    ///Set the expected number of edges
     118
     119    ///With this function, it is possible to set the expected number of edges.
     120    ///The use of this fasten the building of the graph and makes
     121    ///it possible to avoid the superfluous memory allocation.
     122    void reserveEdge(int n) { edges.reserve(n); };
     123   
    117124    ///\bug This function does something different than
    118125    ///its name would suggests...
     
    261268     
    262269      edges[n].next_in = first_free_edge;
    263       first_free_edge = -1;     
     270      first_free_edge = n;     
    264271
    265272      //Update dynamic maps
Note: See TracChangeset for help on using the changeset viewer.