lemon/bits/traits.h
changeset 2544 5143b01bf1d5
parent 2391 14a343be7a5a
child 2553 bfced05fa852
equal deleted inserted replaced
5:97c8dce5c424 6:7068c82928bd
       
     1 
     1 /* -*- C++ -*-
     2 /* -*- C++ -*-
     2  *
     3  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     4  * This file is a part of LEMON, a generic C++ optimization library
     4  *
     5  *
     5  * Copyright (C) 2003-2007
     6  * Copyright (C) 2003-2007
    55 
    56 
    56     template <typename _Value>
    57     template <typename _Value>
    57     class Map : public Graph::template NodeMap<_Value> {
    58     class Map : public Graph::template NodeMap<_Value> {
    58     public:
    59     public:
    59       typedef typename Graph::template NodeMap<_Value> Parent; 
    60       typedef typename Graph::template NodeMap<_Value> Parent; 
       
    61       typedef typename Graph::template NodeMap<_Value> Type; 
    60       typedef typename Parent::Value Value;
    62       typedef typename Parent::Value Value;
    61 
    63 
    62       Map(const Graph& _graph) : Parent(_graph) {}
    64       Map(const Graph& _graph) : Parent(_graph) {}
    63       Map(const Graph& _graph, const Value& _value) 
    65       Map(const Graph& _graph, const Value& _value) 
    64 	: Parent(_graph, _value) {}
    66 	: Parent(_graph, _value) {}
    92 
    94 
    93     template <typename _Value>
    95     template <typename _Value>
    94     class Map : public Graph::template EdgeMap<_Value> {
    96     class Map : public Graph::template EdgeMap<_Value> {
    95     public:
    97     public:
    96       typedef typename Graph::template EdgeMap<_Value> Parent; 
    98       typedef typename Graph::template EdgeMap<_Value> Parent; 
       
    99       typedef typename Graph::template EdgeMap<_Value> Type; 
    97       typedef typename Parent::Value Value;
   100       typedef typename Parent::Value Value;
    98 
   101 
    99       Map(const Graph& _graph) : Parent(_graph) {}
   102       Map(const Graph& _graph) : Parent(_graph) {}
   100       Map(const Graph& _graph, const Value& _value) 
   103       Map(const Graph& _graph, const Value& _value) 
   101 	: Parent(_graph, _value) {}
   104 	: Parent(_graph, _value) {}
   128 
   131 
   129     template <typename _Value>
   132     template <typename _Value>
   130     class Map : public Graph::template UEdgeMap<_Value> {
   133     class Map : public Graph::template UEdgeMap<_Value> {
   131     public:
   134     public:
   132       typedef typename Graph::template UEdgeMap<_Value> Parent; 
   135       typedef typename Graph::template UEdgeMap<_Value> Parent; 
       
   136       typedef typename Graph::template UEdgeMap<_Value> Type; 
   133       typedef typename Parent::Value Value;
   137       typedef typename Parent::Value Value;
   134 
   138 
   135       Map(const Graph& _graph) : Parent(_graph) {}
   139       Map(const Graph& _graph) : Parent(_graph) {}
   136       Map(const Graph& _graph, const Value& _value) 
   140       Map(const Graph& _graph, const Value& _value) 
   137 	: Parent(_graph, _value) {}
   141 	: Parent(_graph, _value) {}
   164 
   168 
   165     template <typename _Value>
   169     template <typename _Value>
   166     class Map : public Graph::template ANodeMap<_Value> {
   170     class Map : public Graph::template ANodeMap<_Value> {
   167     public:
   171     public:
   168       typedef typename Graph::template ANodeMap<_Value> Parent; 
   172       typedef typename Graph::template ANodeMap<_Value> Parent; 
       
   173       typedef typename Graph::template ANodeMap<_Value> Type; 
   169       typedef typename Parent::Value Value;
   174       typedef typename Parent::Value Value;
   170 
   175 
   171       Map(const Graph& _graph) : Parent(_graph) {}
   176       Map(const Graph& _graph) : Parent(_graph) {}
   172       Map(const Graph& _graph, const Value& _value) 
   177       Map(const Graph& _graph, const Value& _value) 
   173 	: Parent(_graph, _value) {}
   178 	: Parent(_graph, _value) {}
   200 
   205 
   201     template <typename _Value>
   206     template <typename _Value>
   202     class Map : public Graph::template BNodeMap<_Value> {
   207     class Map : public Graph::template BNodeMap<_Value> {
   203     public:
   208     public:
   204       typedef typename Graph::template BNodeMap<_Value> Parent; 
   209       typedef typename Graph::template BNodeMap<_Value> Parent; 
       
   210       typedef typename Graph::template BNodeMap<_Value> Type; 
   205       typedef typename Parent::Value Value;
   211       typedef typename Parent::Value Value;
   206 
   212 
   207       Map(const Graph& _graph) : Parent(_graph) {}
   213       Map(const Graph& _graph) : Parent(_graph) {}
   208       Map(const Graph& _graph, const Value& _value) 
   214       Map(const Graph& _graph, const Value& _value) 
   209 	: Parent(_graph, _value) {}
   215 	: Parent(_graph, _value) {}