COIN-OR::LEMON - Graph Library

Changeset 2457:8c791ee69a45 in lemon-0.x for lemon/network_simplex.h


Ignore:
Timestamp:
06/15/07 16:36:24 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3294
Message:

Improvments in min cost flow algorithms

  • improved cycle cancelling
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/network_simplex.h

    r2444 r2457  
    276276
    277277      // Copying graph_ref to graph
     278      graph.reserveNode(countNodes(graph_ref) + 1);
     279      graph.reserveEdge(countEdges(graph_ref) + countNodes(graph_ref));
    278280      copyGraph(graph, graph_ref)
    279281        .edgeMap(cost, _cost)
     
    478480      parent[root] = INVALID;
    479481      pred_edge[root] = INVALID;
    480       depth[root] = supply[root] = potential[root] = 0;
     482      depth[root] = 0;
     483      supply[root] = 0;
     484      potential[root] = 0;
    481485
    482486      // Adding artificial edges to the graph and initializing the node
     
    514518      // Initializing block_size for the edge block pivot rule
    515519      int edge_num = countEdges(graph);
    516       block_size = edge_num >= BLOCK_NUM * MIN_BLOCK_SIZE ? 
     520      block_size = edge_num >= BLOCK_NUM * MIN_BLOCK_SIZE ?
    517521                   edge_num / BLOCK_NUM : MIN_BLOCK_SIZE;
    518522#endif
Note: See TracChangeset for help on using the changeset viewer.