lemon/cycle_canceling.h
changeset 863 a93f1a27d831
parent 830 75c97c3786d6
parent 839 f3bc4e9b5f3a
child 864 d3ea191c3412
equal deleted inserted replaced
4:34e7b2595781 6:3b10d9ecaf4c
   142   private:
   142   private:
   143 
   143 
   144     TEMPLATE_DIGRAPH_TYPEDEFS(GR);
   144     TEMPLATE_DIGRAPH_TYPEDEFS(GR);
   145     
   145     
   146     typedef std::vector<int> IntVector;
   146     typedef std::vector<int> IntVector;
   147     typedef std::vector<char> CharVector;
       
   148     typedef std::vector<double> DoubleVector;
   147     typedef std::vector<double> DoubleVector;
   149     typedef std::vector<Value> ValueVector;
   148     typedef std::vector<Value> ValueVector;
   150     typedef std::vector<Cost> CostVector;
   149     typedef std::vector<Cost> CostVector;
       
   150     typedef std::vector<char> BoolVector;
       
   151     // Note: vector<char> is used instead of vector<bool> for efficiency reasons
   151 
   152 
   152   private:
   153   private:
   153   
   154   
   154     template <typename KT, typename VT>
   155     template <typename KT, typename VT>
   155     class StaticVectorMap {
   156     class StaticVectorMap {
   196     // Data structures for storing the digraph
   197     // Data structures for storing the digraph
   197     IntNodeMap _node_id;
   198     IntNodeMap _node_id;
   198     IntArcMap _arc_idf;
   199     IntArcMap _arc_idf;
   199     IntArcMap _arc_idb;
   200     IntArcMap _arc_idb;
   200     IntVector _first_out;
   201     IntVector _first_out;
   201     CharVector _forward;
   202     BoolVector _forward;
   202     IntVector _source;
   203     IntVector _source;
   203     IntVector _target;
   204     IntVector _target;
   204     IntVector _reverse;
   205     IntVector _reverse;
   205 
   206 
   206     // Node and arc data
   207     // Node and arc data
   960       const int MIN_LIMIT = 5;
   961       const int MIN_LIMIT = 5;
   961 
   962 
   962       // Contruct auxiliary data vectors
   963       // Contruct auxiliary data vectors
   963       DoubleVector pi(_res_node_num, 0.0);
   964       DoubleVector pi(_res_node_num, 0.0);
   964       IntVector level(_res_node_num);
   965       IntVector level(_res_node_num);
   965       CharVector reached(_res_node_num);
   966       BoolVector reached(_res_node_num);
   966       CharVector processed(_res_node_num);
   967       BoolVector processed(_res_node_num);
   967       IntVector pred_node(_res_node_num);
   968       IntVector pred_node(_res_node_num);
   968       IntVector pred_arc(_res_node_num);
   969       IntVector pred_arc(_res_node_num);
   969       std::vector<int> stack(_res_node_num);
   970       std::vector<int> stack(_res_node_num);
   970       std::vector<int> proc_vector(_res_node_num);
   971       std::vector<int> proc_vector(_res_node_num);
   971 
   972