src/work/jacint/preflowproba.h
changeset 376 5c12f3515452
parent 374 0fc9cd9b854a
equal deleted inserted replaced
2:6a0c3f990a26 3:6e14a6ee8f11
    38 
    38 
    39 FIXME reset
    39 FIXME reset
    40 
    40 
    41 */
    41 */
    42 
    42 
    43 #ifndef HUGO_PREFLOW_H
    43 #ifndef HUGO_PREFLOW_PROBA_H
    44 #define HUGO_PREFLOW_H
    44 #define HUGO_PREFLOW_PROBA_H
    45 
    45 
    46 #define H0 20
    46 #define H0 20
    47 #define H1 1
    47 #define H1 1
    48 
    48 
    49 #include <vector>
    49 #include <vector>
    53 namespace hugo {
    53 namespace hugo {
    54 
    54 
    55   template <typename Graph, typename T, 
    55   template <typename Graph, typename T, 
    56 	    typename CapMap=typename Graph::EdgeMap<T>, 
    56 	    typename CapMap=typename Graph::EdgeMap<T>, 
    57             typename FlowMap=typename Graph::EdgeMap<T> >
    57             typename FlowMap=typename Graph::EdgeMap<T> >
    58   class Preflow {
    58   class PreflowProba {
    59     
    59     
    60     typedef typename Graph::Node Node;
    60     typedef typename Graph::Node Node;
    61     typedef typename Graph::Edge Edge;
    61     typedef typename Graph::Edge Edge;
    62     typedef typename Graph::NodeIt NodeIt;
    62     typedef typename Graph::NodeIt NodeIt;
    63     typedef typename Graph::OutEdgeIt OutEdgeIt;
    63     typedef typename Graph::OutEdgeIt OutEdgeIt;
    76     typedef typename ResGW::OutEdgeIt ResOutEdgeIt;
    76     typedef typename ResGW::OutEdgeIt ResOutEdgeIt;
    77     typedef typename ResGW::InEdgeIt ResInEdgeIt;
    77     typedef typename ResGW::InEdgeIt ResInEdgeIt;
    78     typedef typename ResGW::Edge ResEdge;
    78     typedef typename ResGW::Edge ResEdge;
    79  
    79  
    80   public:
    80   public:
    81     Preflow(Graph& _G, Node _s, Node _t, CapMap& _capacity, 
    81     PreflowProba(Graph& _G, Node _s, Node _t, CapMap& _capacity, 
    82 	    FlowMap& _flow, bool _constzero, bool _res ) :
    82 	    FlowMap& _flow, bool _constzero, bool _res ) :
    83       G(_G), s(_s), t(_t), capacity(_capacity), flow(_flow), constzero(_constzero), res(_res) {}
    83       G(_G), s(_s), t(_t), capacity(_capacity), flow(_flow), constzero(_constzero), res(_res) {}
    84     
    84     
    85     
    85     
    86     void run() {
    86     void run() {
   680 
   680 
   681   };
   681   };
   682 
   682 
   683 } //namespace hugo
   683 } //namespace hugo
   684 
   684 
   685 #endif //PREFLOW_H
   685 #endif //PREFLOW_PROBA_H
   686 
   686 
   687 
   687 
   688 
   688 
   689 
   689