lemon/bits/traits.h
changeset 1019 4c89e925cfe2
parent 616 f2d6d3446adf
child 1026 699c7eac2c6d
equal deleted inserted replaced
9:5bddaa99fc9a 10:c74e225068ab
   146 
   146 
   147       Map(const GR& _digraph) : Parent(_digraph) {}
   147       Map(const GR& _digraph) : Parent(_digraph) {}
   148       Map(const GR& _digraph, const Value& _value)
   148       Map(const GR& _digraph, const Value& _value)
   149         : Parent(_digraph, _value) {}
   149         : Parent(_digraph, _value) {}
   150     };
   150     };
       
   151 
       
   152   };
       
   153 
       
   154   template <typename GR, typename Enable = void>
       
   155   struct RedNodeNotifierIndicator {
       
   156     typedef InvalidType Type;
       
   157   };
       
   158   template <typename GR>
       
   159   struct RedNodeNotifierIndicator<
       
   160     GR,
       
   161     typename enable_if<typename GR::RedNodeNotifier::Notifier, void>::type
       
   162   > {
       
   163     typedef typename GR::RedNodeNotifier Type;
       
   164   };
       
   165 
       
   166   template <typename GR>
       
   167   class ItemSetTraits<GR, typename GR::RedNode> {
       
   168   public:
       
   169 
       
   170     typedef GR BpGraph;
       
   171     typedef GR Graph;
       
   172     typedef GR Digraph;
       
   173 
       
   174     typedef typename GR::RedNode Item;
       
   175     typedef typename GR::RedIt ItemIt;
       
   176 
       
   177     typedef typename RedNodeNotifierIndicator<GR>::Type ItemNotifier;
       
   178 
       
   179     template <typename V>
       
   180     class Map : public GR::template RedMap<V> {
       
   181       typedef typename GR::template RedMap<V> Parent;
       
   182 
       
   183     public:
       
   184       typedef typename GR::template RedMap<V> Type;
       
   185       typedef typename Parent::Value Value;
       
   186 
       
   187       Map(const GR& _bpgraph) : Parent(_bpgraph) {}
       
   188       Map(const GR& _bpgraph, const Value& _value)
       
   189         : Parent(_bpgraph, _value) {}
       
   190 
       
   191      };
       
   192 
       
   193   };
       
   194 
       
   195   template <typename GR, typename Enable = void>
       
   196   struct BlueNodeNotifierIndicator {
       
   197     typedef InvalidType Type;
       
   198   };
       
   199   template <typename GR>
       
   200   struct BlueNodeNotifierIndicator<
       
   201     GR,
       
   202     typename enable_if<typename GR::BlueNodeNotifier::Notifier, void>::type
       
   203   > {
       
   204     typedef typename GR::BlueNodeNotifier Type;
       
   205   };
       
   206 
       
   207   template <typename GR>
       
   208   class ItemSetTraits<GR, typename GR::BlueNode> {
       
   209   public:
       
   210 
       
   211     typedef GR BpGraph;
       
   212     typedef GR Graph;
       
   213     typedef GR Digraph;
       
   214 
       
   215     typedef typename GR::BlueNode Item;
       
   216     typedef typename GR::BlueIt ItemIt;
       
   217 
       
   218     typedef typename BlueNodeNotifierIndicator<GR>::Type ItemNotifier;
       
   219 
       
   220     template <typename V>
       
   221     class Map : public GR::template BlueMap<V> {
       
   222       typedef typename GR::template BlueMap<V> Parent;
       
   223 
       
   224     public:
       
   225       typedef typename GR::template BlueMap<V> Type;
       
   226       typedef typename Parent::Value Value;
       
   227 
       
   228       Map(const GR& _bpgraph) : Parent(_bpgraph) {}
       
   229       Map(const GR& _bpgraph, const Value& _value)
       
   230         : Parent(_bpgraph, _value) {}
       
   231 
       
   232      };
   151 
   233 
   152   };
   234   };
   153 
   235 
   154   template <typename Map, typename Enable = void>
   236   template <typename Map, typename Enable = void>
   155   struct MapTraits {
   237   struct MapTraits {