COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
02/16/04 17:15:58 (21 years ago)
Author:
jacint
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@101
Message:

modern valtozat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/preflow_push_hl.h

    r72 r78  
    3030#include <stack>
    3131
    32 #include <reverse_bfs.hh>
     32#include <reverse_bfs.h>
    3333
    3434namespace marci {
    3535
    36   template <typename Graph, typename T, typename FlowMap, typename CapacityMap>
     36  template <typename Graph, typename T>
    3737  class preflow_push_hl {
    3838   
     
    4848    NodeIt s;
    4949    NodeIt t;
    50     Graph::EdgeMap<T> flow;
    51     Graph::EdgeMap<T> capacity;
     50    typename Graph::EdgeMap<T> flow;
     51    typename Graph::EdgeMap<T> capacity;
    5252    T value;
    53     Graph::NodeMap<bool> mincutvector;
     53    typename Graph::NodeMap<bool> mincutvector;
    5454
    5555   
     
    5757
    5858    preflow_push_hl(Graph& _G, NodeIt _s, NodeIt _t,
    59                     Graph::EdgeMap<T>& _capacity) :
     59                    typename Graph::EdgeMap<T>& _capacity) :
    6060      G(_G), s(_s), t(_t), flow(_G, 0), capacity(_capacity), mincutvector(_G, true) { }
    6161
     
    6969    void run() {
    7070 
    71       Graph::NodeMap<int> level(G);         //level of Node
    72       Graph::NodeMap<T> excess(G);          //excess of Node
     71      typename Graph::NodeMap<int> level(G);         //level of Node
     72      typename Graph::NodeMap<T> excess(G);          //excess of Node
    7373           
    7474      int n=G.nodeNum();                        //number of Nodes
     
    8383      /*Reverse_bfs from t, to find the starting level.*/
    8484
    85       reverse_bfs<list_graph> bfs(G, t);
     85      reverse_bfs<Graph> bfs(G, t);
    8686      bfs.run();
    8787      for(EachNodeIt v=G.template first<EachNodeIt>(); v.valid(); ++v) {
     
    269269    */
    270270
    271     EdgeMap<graph_type, T> allflow() {
     271    typename Graph::EdgeMap<T> allflow() {
    272272      return flow;
    273273    }
     
    279279    */
    280280   
    281     NodeMap<graph_type, bool> mincut() {
     281    typename Graph::NodeMap<bool> mincut() {
    282282   
    283283      std::queue<NodeIt> queue;
     
    311311   
    312312    }
    313 
    314 
    315313  };
    316314}//namespace marci
Note: See TracChangeset for help on using the changeset viewer.