src/work/jacint/preflow_res.h
changeset 437 9853b743d830
parent 390 8dc830d3f9ef
child 444 618c5d6f36b9
equal deleted inserted replaced
1:41eb17e44263 2:7ba1bb27af42
    13 #include<iostream>
    13 #include<iostream>
    14 
    14 
    15 namespace hugo {
    15 namespace hugo {
    16 
    16 
    17   template <typename Graph, typename T, 
    17   template <typename Graph, typename T, 
    18 	    typename CapMap=typename Graph::EdgeMap<T>, 
    18 	    typename CapMap=typename Graph::template EdgeMap<T>, 
    19             typename FlowMap=typename Graph::EdgeMap<T> >
    19             typename FlowMap=typename Graph::template EdgeMap<T> >
    20   class PreflowRes {
    20   class PreflowRes {
    21     
    21     
    22     typedef typename Graph::Node Node;
    22     typedef typename Graph::Node Node;
    23     typedef typename Graph::Edge Edge;
    23     typedef typename Graph::Edge Edge;
    24     typedef typename Graph::NodeIt NodeIt;
    24     typedef typename Graph::NodeIt NodeIt;
    67       */
    67       */
    68       int relabel=0;
    68       int relabel=0;
    69       int k=n-2;  //bound on the highest level under n containing a node
    69       int k=n-2;  //bound on the highest level under n containing a node
    70       int b=k;    //bound on the highest level under n of an active node
    70       int b=k;    //bound on the highest level under n of an active node
    71       
    71       
    72       typename Graph::NodeMap<int> level(G,n);      
    72       typename Graph::template NodeMap<int> level(G,n);      
    73       typename Graph::NodeMap<T> excess(G); 
    73       typename Graph::template NodeMap<T> excess(G); 
    74 
    74 
    75       std::vector<Node> active(n-1,INVALID);
    75       std::vector<Node> active(n-1,INVALID);
    76       typename Graph::NodeMap<Node> next(G,INVALID);
    76       typename Graph::template NodeMap<Node> next(G,INVALID);
    77       //Stack of the active nodes in level i < n.
    77       //Stack of the active nodes in level i < n.
    78       //We use it in both phases.
    78       //We use it in both phases.
    79 
    79 
    80       typename Graph::NodeMap<Node> left(G,INVALID);
    80       typename Graph::template NodeMap<Node> left(G,INVALID);
    81       typename Graph::NodeMap<Node> right(G,INVALID);
    81       typename Graph::template NodeMap<Node> right(G,INVALID);
    82       std::vector<Node> level_list(n,INVALID);
    82       std::vector<Node> level_list(n,INVALID);
    83       /*
    83       /*
    84 	List of the nodes in level i<n.
    84 	List of the nodes in level i<n.
    85       */
    85       */
    86 
    86