COIN-OR::LEMON - Graph Library

Changeset 891:74589d20dbc3 in lemon-0.x


Ignore:
Timestamp:
09/21/04 00:57:48 (20 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1199
Message:

template<typename CMap> Map(const CMap&) like constructors and
assigns are removed.

Location:
src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/array_map.h

    r844 r891  
    6666    /** Default constructor for the map.
    6767     */
    68     ArrayMap() : values(0), capacity(0) {}
     68    ArrayMap() : capacity(0), values(0) {}
    6969                       
    7070    /** Graph and Registry initialized map constructor.
     
    9191    /** Constructor to copy a map of the same map type.
    9292     */
    93     ArrayMap(const ArrayMap& copy) : MapBase(*copy.graph, *copy.registry) {
     93    ArrayMap(const ArrayMap& copy) : MapBase(copy) {
    9494      capacity = copy.capacity;
    9595      if (capacity == 0) return;
     
    103103    /** Constructor to copy a map of an other map type.
    104104     */
    105     template <typename CMap> ArrayMap(const CMap& copy)
    106       : MapBase(copy), capacity(0), values(0) {
    107       if (MapBase::getGraph()) {
    108         allocate_memory();
    109         for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    110           set(it, copy[it]);
    111         }
     105    template <typename TT>
     106    ArrayMap(const ArrayMap<MapRegistry, TT>& copy)
     107      : MapBase(copy) {
     108      capacity = copy.capacity;
     109      if (capacity == 0) return;
     110      values = allocator.allocate(capacity);
     111      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
     112        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
     113        allocator.construct(&(values[id]), copy.values[id]);
    112114      }
    113115    }
     
    117119    ArrayMap& operator=(const ArrayMap& copy) {
    118120      if (&copy == this) return *this;
     121
    119122      if (capacity != 0) {
    120123        MapBase::destroy();
    121124        allocator.deallocate(values, capacity);
    122125      }
     126
     127      MapBase::operator=(copy);
     128
    123129      capacity = copy.capacity;
    124130      if (capacity == 0) return *this;
    125131      values = allocator.allocate(capacity);
     132
    126133      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    127134        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
    128135        allocator.construct(&(values[id]), copy.values[id]);
    129136      }
     137
    130138      return *this;
    131139    }
    132140
    133     /** Assign operator to copy a map an other map type.
    134      */
    135     template <typename CMap> ArrayMap& operator=(const CMap& copy) {
     141    /** Assign operator to copy a map of an other map type.
     142     */
     143    template <typename TT>
     144    ArrayMap& operator=(const ArrayMap<MapRegistry, TT>& copy) {
    136145      if (capacity != 0) {
    137146        MapBase::destroy();
    138147        allocator.deallocate(values, capacity);
    139148      }
     149
    140150      MapBase::operator=(copy);
    141       if (MapBase::getGraph()) {
    142         allocate_memory();
    143         for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    144           set(it, copy[it]);
    145         }
    146       }
     151
     152      capacity = copy.capacity;
     153      if (capacity == 0) return *this;
     154      values = allocator.allocate(capacity);
     155
     156      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
     157        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
     158        allocator.construct(&(values[id]), copy.values[id]);
     159      }
     160
    147161      return *this;
    148162    }
  • src/hugo/default_map.h

    r822 r891  
    3030   */
    3131#define DEFAULT_MAP_BODY(DynMap, Value) \
    32   { \
    33     typedef DynMap<MapRegistry, Value> MapImpl; \
    34   \
    35   public: \
    36   \
    37     typedef typename MapRegistry::Graph Graph; \
    38   \
    39     DefaultMap() : MapImpl() {} \
    40   \
    41     DefaultMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {} \
    42   \
    43     DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
    44       : MapImpl(g, r, v) {} \
    45   \
    46     DefaultMap(const DefaultMap& copy) \
    47       : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    48   \
    49     template <typename CMap> DefaultMap(const CMap& copy) : MapImpl(copy) {} \
    50   \
    51     DefaultMap& operator=(const DefaultMap& copy) { \
    52       MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
    53       return *this; \
     32{ \
     33\
     34public: \
     35\
     36typedef DynMap<MapRegistry, Value> Parent; \
     37\
     38typedef typename MapRegistry::Graph Graph; \
     39\
     40DefaultMap() : Parent() {} \
     41DefaultMap(const Graph& g, MapRegistry& r) : Parent(g, r) {} \
     42DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
     43  : Parent(g, r, v) {} \
     44DefaultMap(const DefaultMap& copy) \
     45  : Parent(static_cast<const Parent&>(copy)) {} \
     46template <typename TT> \
     47DefaultMap(const DefaultMap<MapRegistry, TT>& copy) { \
     48  Parent::MapBase::operator= \
     49    (static_cast<const typename Parent::MapBase&>(copy)); \
     50  if (Parent::getGraph()) { \
     51    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
     52      Parent::add(it); \
     53      Parent::operator[](it) = copy[it]; \
    5454    } \
    55   \
    56     template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
    57       MapImpl::operator=(copy); \
    58       return *this; \
     55  } \
     56} \
     57DefaultMap& operator=(const DefaultMap& copy) { \
     58  Parent::operator=(static_cast<const Parent&>(copy)); \
     59  return *this; \
     60} \
     61template <typename TT> \
     62DefaultMap& operator=(const DefaultMap<MapRegistry, TT>& copy) { \
     63  Parent::clear(); \
     64  Parent::MapBase::operator=(copy); \
     65  if (Parent::getGraph()) { \
     66    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
     67      Parent::add(it); \
     68      Parent::operator[](it) = copy[it]; \
    5969    } \
    60   \
    61   };
     70  } \
     71  return *this; \
     72} \
     73};
    6274
    6375
  • src/hugo/graph_wrapper.h

    r888 r891  
    287287      return GraphWrapper<Graph>::tail(e); }
    288288
    289     KEEP_MAPS(Parent, RevGraphWrapper);
     289    //    KEEP_MAPS(Parent, RevGraphWrapper);
    290290
    291291  };
     
    494494    }
    495495
    496     KEEP_MAPS(Parent, SubGraphWrapper);
     496    //    KEEP_MAPS(Parent, SubGraphWrapper);
    497497  };
    498498
     
    559559        return this->graph->tail(e); }
    560560
    561     KEEP_MAPS(Parent, UndirGraphWrapper);
     561    //    KEEP_MAPS(Parent, UndirGraphWrapper);
    562562
    563563  };
     
    566566  ///
    567567  ///\warning Graph wrappers are in even more experimental state than the other
    568   ///parts of the lib. Use them at you own risk.
     568  ///parts of the lib. Use them at your own risk.
    569569  ///
    570570  /// An undirected graph template.
     
    582582    }
    583583
    584     KEEP_MAPS(Parent, UndirGraph);
     584    //    KEEP_MAPS(Parent, UndirGraph);
    585585  };
    586586
     
    895895    /// one for the backward edges.
    896896    class EdgeMap {
     897      template <typename TT> friend class EdgeMap;
    897898      typename Graph::template EdgeMap<T> forward_map, backward_map;
    898899    public:
    899900      typedef T ValueType;
    900901      typedef Edge KeyType;
     902
    901903      EdgeMap(const SubBidirGraphWrapper<Graph,
    902904              ForwardFilterMap, BackwardFilterMap>& g) :
    903905        forward_map(*(g.graph)), backward_map(*(g.graph)) { }
     906
    904907      EdgeMap(const SubBidirGraphWrapper<Graph,
    905908              ForwardFilterMap, BackwardFilterMap>& g, T a) :
    906909        forward_map(*(g.graph), a), backward_map(*(g.graph), a) { }
     910
     911      template <typename TT>
     912      EdgeMap(const EdgeMap<TT>& copy)
     913        : forward_map(copy.forward_map), backward_map(copy.backward_map) {}
     914
     915      template <typename TT>
     916      EdgeMap& operator=(const EdgeMap<TT>& copy) {
     917        forward_map = copy.forward_map;
     918        backward_map = copy.backward_map;
     919        return *this;
     920      }
     921     
    907922      void set(Edge e, T a) {
    908923        if (!e.backward)
     
    911926          backward_map.set(e, a);
    912927      }
    913       T operator[](Edge e) const {
     928
     929      typename Graph::template EdgeMap<T>::ConstReferenceType
     930      operator[](Edge e) const {
    914931        if (!e.backward)
    915932          return forward_map[e];
     
    917934          return backward_map[e];
    918935      }
     936
     937      typename Graph::template EdgeMap<T>::ReferenceType
     938      operator[](Edge e) {
     939        if (!e.backward)
     940          return forward_map[e];
     941        else
     942          return backward_map[e];
     943      }
     944
    919945      void update() {
    920946        forward_map.update();
     
    924950
    925951
    926     KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
     952    //    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
    927953
    928954  };
     
    966992      return 2*this->graph->edgeNum();
    967993    }
    968     KEEP_MAPS(Parent, BidirGraphWrapper);
     994    //    KEEP_MAPS(Parent, BidirGraphWrapper);
    969995  };
    970996
     
    9921018      Parent::setGraph(gr);
    9931019    }
    994     KEEP_MAPS(Parent, BidirGraph);
     1020    //    KEEP_MAPS(Parent, BidirGraph);
    9951021  };
    9961022
     
    11071133    };
    11081134
    1109     KEEP_MAPS(Parent, ResGraphWrapper);
     1135    //    KEEP_MAPS(Parent, ResGraphWrapper);
    11101136  };
    11111137
     
    11691195    }
    11701196
    1171     KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
     1197    //    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
    11721198  };
    11731199
  • src/hugo/list_graph.h

    r880 r891  
    443443    typedef SymListGraph Graph;
    444444
    445     /// Importing maps from the base class ListGraph.
    446     KEEP_MAPS(ListGraph, SymListGraph);
    447 
    448445    /// Creating symmetric map registry.
    449446    CREATE_SYM_EDGE_MAP_REGISTRY;
  • src/hugo/map_defines.h

    r877 r891  
    3939template <typename Value> \
    4040class NodeMap : public DynMap<NodeMapRegistry, Value> { \
    41 typedef DynMap<NodeMapRegistry, Value> MapImpl; \
    42 public: \
     41public: \
     42typedef DynMap<NodeMapRegistry, Value> Parent; \
    4343NodeMap() {} \
    44 NodeMap(const typename MapImpl::Graph& g) \
    45   : MapImpl(g, g.node_maps) {} \
    46 NodeMap(const typename MapImpl::Graph& g, const Value& v) \
    47   : MapImpl(g, g.node_maps, v) {} \
    48 NodeMap(const NodeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    49 template <typename CMap> NodeMap(const CMap& copy) : MapImpl(copy) {} \
     44NodeMap(const typename Parent::Graph& g) \
     45  : Parent(g, g.node_maps) {} \
     46NodeMap(const typename Parent::Graph& g, const Value& v) \
     47  : Parent(g, g.node_maps, v) {} \
     48NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
     49template <typename TT> \
     50NodeMap(const NodeMap<TT>& copy) \
     51  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
    5052NodeMap& operator=(const NodeMap& copy) { \
    51   MapImpl::operator=(static_cast<const MapImpl&>(copy));\
    52   return *this; \
    53 } \
    54 template <typename CMap> NodeMap& operator=(const CMap& copy) { \
    55   MapImpl::operator=(copy);\
     53  Parent::operator=(static_cast<const Parent&>(copy));\
     54  return *this; \
     55} \
     56template <typename TT> \
     57NodeMap& operator=(const NodeMap<TT>& copy) { \
     58  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
    5659  return *this; \
    5760} \
     
    6770template <typename Value> \
    6871class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
    69 typedef DynMap<EdgeMapRegistry, Value> MapImpl; \
    70 public: \
     72public: \
     73typedef DynMap<EdgeMapRegistry, Value> Parent; \
     74\
    7175EdgeMap() {} \
    72 EdgeMap(const typename MapImpl::Graph& g) \
    73   : MapImpl(g, g.edge_maps) {} \
    74 EdgeMap(const typename MapImpl::Graph& g, const Value& v) \
    75   : MapImpl(g, g.edge_maps, v) {} \
    76 EdgeMap(const EdgeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    77 template <typename CMap> EdgeMap(const CMap& copy) : MapImpl(copy) {} \
     76EdgeMap(const typename Parent::Graph& g) \
     77  : Parent(g, g.edge_maps) {} \
     78EdgeMap(const typename Parent::Graph& g, const Value& v) \
     79  : Parent(g, g.edge_maps, v) {} \
     80EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
     81template <typename TT> \
     82EdgeMap(const EdgeMap<TT>& copy) \
     83  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
    7884EdgeMap& operator=(const EdgeMap& copy) { \
    79   MapImpl::operator=(static_cast<const MapImpl&>(copy));\
    80   return *this; \
    81 } \
    82 template <typename CMap> EdgeMap& operator=(const CMap& copy) { \
    83   MapImpl::operator=(copy);\
     85  Parent::operator=(static_cast<const Parent&>(copy));\
     86  return *this; \
     87} \
     88template <typename TT> \
     89EdgeMap& operator=(const EdgeMap<TT>& copy) { \
     90  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
    8491  return *this; \
    8592} \
     
    109116template <typename Value> \
    110117class SymEdgeMap : public SymMap<DynMap, SymEdgeMapRegistry, Value> { \
    111   typedef SymMap<DynMap, SymEdgeMapRegistry, Value> MapImpl; \
    112  public: \
    113 \
    114   SymEdgeMap() {} \
    115 \
    116   SymEdgeMap(const typename MapImpl::Graph& g) \
    117     : MapImpl(g, g.sym_edge_maps) {} \
    118 \
    119   SymEdgeMap(const typename MapImpl::Graph& g, const Value& v) \
    120     : MapImpl(g, g.sym_edge_maps, v) {} \
    121 \
    122   SymEdgeMap(const SymEdgeMap& copy) \
    123     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    124 \
    125   template <typename CMap> SymEdgeMap(const CMap& copy) : MapImpl(copy) {} \
    126   SymEdgeMap& operator=(const SymEdgeMap& copy) { \
    127     MapImpl::operator=(static_cast<const MapImpl&>(copy));\
    128     return *this; \
    129   } \
    130 \
    131   template <typename CMap> SymEdgeMap& operator=(const CMap& copy) { \
    132     MapImpl::operator=(copy);\
    133     return *this; \
    134   } \
    135 };
    136 
     118public: \
     119typedef SymMap<DynMap, SymEdgeMapRegistry, Value> Parent; \
     120\
     121SymEdgeMap() {} \
     122SymEdgeMap(const typename Parent::Graph& g) \
     123  : Parent(g, g.sym_edge_maps) {} \
     124SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
     125  : Parent(g, g.sym_edge_maps, v) {} \
     126SymEdgeMap(const SymEdgeMap& copy) \
     127  : Parent(static_cast<const Parent&>(copy)) {} \
     128template <typename TT> \
     129SymEdgeMap(const NodeMap<TT>& copy) \
     130  : Parent(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy)) {} \
     131SymEdgeMap& operator=(const SymEdgeMap& copy) { \
     132  Parent::operator=(static_cast<const Parent&>(copy));\
     133  return *this; \
     134} \
     135template <typename TT> \
     136SymEdgeMap& operator=(const SymEdgeMap<TT>& copy) { \
     137  Parent::operator=(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy));\
     138  return *this; \
     139} \
     140};
    137141
    138142/** This is a macro to import an node map into a graph class.
     
    140144#define IMPORT_NODE_MAP(From, from, To, to) \
    141145template <typename Value> \
    142 class NodeMap \
    143   : public From::template NodeMap<Value> { \
    144   typedef typename From::template NodeMap<Value> MapImpl; \
    145  public: \
    146    NodeMap() : MapImpl() {} \
    147 \
    148    NodeMap(const To& to) \
    149      : MapImpl(static_cast<const From&>(from)) { } \
    150 \
    151    NodeMap(const To& to, const Value& value) \
    152      : MapImpl(static_cast<const From&>(from), value) { } \
    153 \
    154    NodeMap(const NodeMap& copy) \
    155      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    156 \
    157    template<typename CMap> \
    158    NodeMap(const CMap& copy) \
    159      : MapImpl(copy) {} \
    160 \
    161    NodeMap& operator=(const NodeMap& copy) { \
    162      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
    163      return *this; \
    164    } \
    165 \
    166    template <typename CMap> \
    167    NodeMap& operator=(const CMap& copy) { \
    168      MapImpl::operator=(copy); \
    169      return *this; \
    170    } \
     146class NodeMap : public From::template NodeMap<Value> { \
     147\
     148public: \
     149typedef typename From::template NodeMap<Value> Parent; \
     150\
     151NodeMap() : Parent() {} \
     152NodeMap(const To& to) \
     153  : Parent(static_cast<const From&>(from)) { } \
     154NodeMap(const To& to, const Value& value) \
     155  : Parent(static_cast<const From&>(from), value) { } \
     156NodeMap(const NodeMap& copy) \
     157  : Parent(static_cast<const Parent&>(copy)) {} \
     158template <typename TT> \
     159NodeMap(const NodeMap<TT>& copy) \
     160  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
     161NodeMap& operator=(const NodeMap& copy) { \
     162  Parent::operator=(static_cast<const Parent&>(copy)); \
     163  return *this; \
     164} \
     165template <typename TT> \
     166NodeMap& operator=(const NodeMap<TT>& copy) { \
     167  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
     168  return *this; \
     169} \
    171170};
    172171
     
    175174#define IMPORT_EDGE_MAP(From, from, To, to) \
    176175template <typename Value> \
    177 class EdgeMap \
    178   : public From::template EdgeMap<Value> { \
    179   typedef typename From::template EdgeMap<Value> MapImpl; \
    180  public: \
    181    EdgeMap() : MapImpl() {} \
    182 \
    183    EdgeMap(const To& to) \
    184      : MapImpl(static_cast<const From&>(from)) { } \
    185 \
    186    EdgeMap(const To& to, const Value& value) \
    187      : MapImpl(static_cast<const From&>(from), value) { } \
    188 \
    189    EdgeMap(const EdgeMap& copy) \
    190      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
    191 \
    192    template<typename CMap> \
    193    EdgeMap(const CMap& copy) \
    194      : MapImpl(copy) {} \
    195 \
    196    EdgeMap& operator=(const EdgeMap& copy) { \
    197      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
    198      return *this; \
    199    } \
    200 \
    201    template <typename CMap> \
    202    EdgeMap& operator=(const CMap& copy) { \
    203      MapImpl::operator=(copy); \
    204      return *this; \
    205    } \
     176class EdgeMap : public From::template EdgeMap<Value> { \
     177\
     178public: \
     179typedef typename From::template EdgeMap<Value> Parent; \
     180\
     181EdgeMap() : Parent() {} \
     182EdgeMap(const To& to) \
     183  : Parent(static_cast<const From&>(from)) { } \
     184EdgeMap(const To& to, const Value& value) \
     185  : Parent(static_cast<const From&>(from), value) { } \
     186EdgeMap(const EdgeMap& copy) \
     187  : Parent(static_cast<const Parent&>(copy)) {} \
     188template <typename TT> \
     189EdgeMap(const EdgeMap<TT>& copy) \
     190  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
     191EdgeMap& operator=(const EdgeMap& copy) { \
     192  Parent::operator=(static_cast<const Parent&>(copy)); \
     193  return *this; \
     194} \
     195template <typename TT> \
     196EdgeMap& operator=(const EdgeMap<TT>& copy) { \
     197  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
     198  return *this; \
     199} \
    206200};
    207201
  • src/hugo/map_registry.h

    r822 r891  
    7171       * Assign operator.
    7272      */       
    73 
    7473      const MapBase& operator=(const MapBase& copy) {
    7574        if (registry) {
  • src/hugo/smart_graph.h

    r880 r891  
    318318    typedef SymSmartGraph Graph;
    319319
    320     /// Importing maps from the base class ListGraph.
    321     KEEP_MAPS(SmartGraph, SymSmartGraph);
    322 
    323320    /// Creating symmetric map registry.
    324321    CREATE_SYM_EDGE_MAP_REGISTRY;
  • src/hugo/sym_map.h

    r844 r891  
    104104      : MapImpl(static_cast<const MapImpl&>(copy)) {}
    105105
    106     /** Constructor to copy a map of an other map type.
    107      */
    108     template <typename CMap> SymMap(const CMap& copy)
    109       : MapImpl(copy) {}
    110 
    111106    /** Assign operator to copy a map of the same map type.
    112107     */
     
    116111    }
    117112
    118     /** Assign operator to copy a map of an other map type.
    119      */
    120     template <typename CMap> SymMap& operator=(const CMap& copy) {
    121       MapImpl::operator=(copy);
    122       return *this;
    123     }
    124    
    125113    /** Add a new key to the map. It called by the map registry.
    126114     */
  • src/hugo/vector_map.h

    r844 r891  
    3333  template <typename MapRegistry, typename Value>
    3434  class VectorMap : public MapRegistry::MapBase {
     35    template <typename MR, typename T> friend class VectorMap;
    3536  public:
    3637               
     
    8384      : MapBase(g, r), container(KeyInfo<Graph, KeyIt>::maxId(g)+1, v) {}
    8485
    85     /** Constructor to copy a map of an other map type.
    86      */
    87     template <typename CMap> VectorMap(const CMap& copy) : MapBase(copy) {
    88       if (MapBase::getGraph()) {
    89         container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
    90         for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    91           set(it, copy[it]);
    92         }
     86    /** Assign operator to copy a map of an other map type.
     87     */
     88    template <typename TT>
     89    VectorMap(const VectorMap<MapRegistry, TT>& c)
     90      : MapBase(c), container(c.container.size()) {
     91      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
     92        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
     93        container[id] = c.container[id];
    9394      }
    9495    }
    9596
    96     /** Assign operator to copy a map an other map type.
    97      */
    98     template <typename CMap> VectorMap& operator=(const CMap& copy) {
    99       container.clear();
    100       this->MapBase::operator=(copy);
    101       if (MapBase::getGraph()) {
    102         container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
    103         for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
    104           set(it, copy[it]);
    105         }
     97    /** Assign operator to copy a map of an other map type.
     98     */
     99    template <typename TT>
     100    VectorMap& operator=(const VectorMap<MapRegistry, TT>& c) {
     101      container.resize(c.container.size());
     102      MapBase::operator=(c);
     103      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
     104        int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
     105        container[id] = c.container[id];
    106106      }
    107107      return *this;
    108108    }
    109 
    110     /** The destructor of the map.
    111      */
    112     virtual ~VectorMap() {
    113     }
    114                
    115109    /**
    116110     * The subscript operator. The map can be subscripted by the
  • src/test/graph_test.h

    r856 r891  
     1// -*- c++ -*-
    12#ifndef HUGO_TEST_GRAPH_TEST_H
    23#define HUGO_TEST_GRAPH_TEST_H
     
    1011namespace hugo {
    1112
    12 
    13 template<class Graph> void checkCompileStaticGraph(Graph &G)
    14 {
    15   typedef typename Graph::Node Node;
    16   typedef typename Graph::NodeIt NodeIt;
    17   typedef typename Graph::Edge Edge;
    18   typedef typename Graph::EdgeIt EdgeIt;
    19   typedef typename Graph::InEdgeIt InEdgeIt;
    20   typedef typename Graph::OutEdgeIt OutEdgeIt;
     13  struct DummyType {
     14    int value;
     15    DummyType() {}
     16    DummyType(int p) : value(p) {}
     17    DummyType& operator=(int p) { value = p; return *this;}
     18  };
     19
     20
     21  template<class Graph> void checkCompileStaticGraph(Graph &G)
     22    {
     23      typedef typename Graph::Node Node;
     24      typedef typename Graph::NodeIt NodeIt;
     25      typedef typename Graph::Edge Edge;
     26      typedef typename Graph::EdgeIt EdgeIt;
     27      typedef typename Graph::InEdgeIt InEdgeIt;
     28      typedef typename Graph::OutEdgeIt OutEdgeIt;
    2129 
    22   {
    23     Node i; Node j(i); Node k(INVALID);
    24     i=j;
    25     bool b; b=true;
    26     b=(i==INVALID); b=(i!=INVALID);
    27     b=(i==j); b=(i!=j); b=(i<j);
    28   }
    29   {
    30     NodeIt i; NodeIt j(i); NodeIt k(INVALID); NodeIt l(G);
    31     i=j;
    32     j=G.first(i);
    33     j=++i;
    34     bool b; b=true;
    35     b=(i==INVALID); b=(i!=INVALID);
    36     Node n(i);
    37     n=i;
    38     b=(i==j); b=(i!=j); b=(i<j);
    39     //Node ->NodeIt conversion
    40     NodeIt ni(G,n);
    41   }
    42   {
    43     Edge i; Edge j(i); Edge k(INVALID);
    44     i=j;
    45     bool b; b=true;
    46     b=(i==INVALID); b=(i!=INVALID);
    47     b=(i==j); b=(i!=j); b=(i<j);
    48   }
    49   {
    50     EdgeIt i; EdgeIt j(i); EdgeIt k(INVALID); EdgeIt l(G);
    51     i=j;
    52     j=G.first(i);
    53     j=++i;
    54     bool b; b=true;
    55     b=(i==INVALID); b=(i!=INVALID);
    56     Edge e(i);
    57     e=i;
    58     b=(i==j); b=(i!=j); b=(i<j);
    59     //Edge ->EdgeIt conversion
    60     EdgeIt ei(G,e);
    61   }
    62   {
    63     Node n;
    64     InEdgeIt i; InEdgeIt j(i); InEdgeIt k(INVALID); InEdgeIt l(G,n);
    65     i=j;
    66     j=G.first(i,n);
    67     j=++i;
    68     bool b; b=true;
    69     b=(i==INVALID); b=(i!=INVALID);
    70     Edge e(i);
    71     e=i;
    72     b=(i==j); b=(i!=j); b=(i<j);
    73     //Edge ->InEdgeIt conversion
    74     InEdgeIt ei(G,e);
    75   }
    76   {
    77     Node n;
    78     OutEdgeIt i; OutEdgeIt j(i); OutEdgeIt k(INVALID); OutEdgeIt l(G,n);
    79     i=j;
    80     j=G.first(i,n);
    81     j=++i;
    82     bool b; b=true;
    83     b=(i==INVALID); b=(i!=INVALID);
    84     Edge e(i);
    85     e=i;
    86     b=(i==j); b=(i!=j); b=(i<j);
    87     //Edge ->OutEdgeIt conversion
    88     OutEdgeIt ei(G,e);
    89   }
    90   {
    91     Node n,m;
    92     n=m=INVALID;
    93     Edge e;
    94     e=INVALID;
    95     n=G.tail(e);
    96     n=G.head(e);
    97   }
    98   // id tests
    99   { Node n; int i=G.id(n); i=i; }
    100   { Edge e; int i=G.id(e); i=i; }
    101   //NodeMap tests
    102   {
    103     Node k;
    104     typename Graph::template NodeMap<int> m(G);
    105     //Const map
    106     typename Graph::template NodeMap<int> const &cm = m;
    107     //Inicialize with default value
    108     typename Graph::template NodeMap<int> mdef(G,12);
    109     //Copy
    110     typename Graph::template NodeMap<int> mm(cm);
    111     //Copy from another type
    112     typename Graph::template NodeMap<double> dm(cm);
    113     int v;
    114     v=m[k]; m[k]=v; m.set(k,v);
    115     v=cm[k];
     30      {
     31        Node i; Node j(i); Node k(INVALID);
     32        i=j;
     33        bool b; b=true;
     34        b=(i==INVALID); b=(i!=INVALID);
     35        b=(i==j); b=(i!=j); b=(i<j);
     36      }
     37      {
     38        NodeIt i; NodeIt j(i); NodeIt k(INVALID); NodeIt l(G);
     39        i=j;
     40        j=G.first(i);
     41        j=++i;
     42        bool b; b=true;
     43        b=(i==INVALID); b=(i!=INVALID);
     44        Node n(i);
     45        n=i;
     46        b=(i==j); b=(i!=j); b=(i<j);
     47        //Node ->NodeIt conversion
     48        NodeIt ni(G,n);
     49      }
     50      {
     51        Edge i; Edge j(i); Edge k(INVALID);
     52        i=j;
     53        bool b; b=true;
     54        b=(i==INVALID); b=(i!=INVALID);
     55        b=(i==j); b=(i!=j); b=(i<j);
     56      }
     57      {
     58        EdgeIt i; EdgeIt j(i); EdgeIt k(INVALID); EdgeIt l(G);
     59        i=j;
     60        j=G.first(i);
     61        j=++i;
     62        bool b; b=true;
     63        b=(i==INVALID); b=(i!=INVALID);
     64        Edge e(i);
     65        e=i;
     66        b=(i==j); b=(i!=j); b=(i<j);
     67        //Edge ->EdgeIt conversion
     68        EdgeIt ei(G,e);
     69      }
     70      {
     71        Node n;
     72        InEdgeIt i; InEdgeIt j(i); InEdgeIt k(INVALID); InEdgeIt l(G,n);
     73        i=j;
     74        j=G.first(i,n);
     75        j=++i;
     76        bool b; b=true;
     77        b=(i==INVALID); b=(i!=INVALID);
     78        Edge e(i);
     79        e=i;
     80        b=(i==j); b=(i!=j); b=(i<j);
     81        //Edge ->InEdgeIt conversion
     82        InEdgeIt ei(G,e);
     83      }
     84      {
     85        Node n;
     86        OutEdgeIt i; OutEdgeIt j(i); OutEdgeIt k(INVALID); OutEdgeIt l(G,n);
     87        i=j;
     88        j=G.first(i,n);
     89        j=++i;
     90        bool b; b=true;
     91        b=(i==INVALID); b=(i!=INVALID);
     92        Edge e(i);
     93        e=i;
     94        b=(i==j); b=(i!=j); b=(i<j);
     95        //Edge ->OutEdgeIt conversion
     96        OutEdgeIt ei(G,e);
     97      }
     98      {
     99        Node n,m;
     100        n=m=INVALID;
     101        Edge e;
     102        e=INVALID;
     103        n=G.tail(e);
     104        n=G.head(e);
     105      }
     106      // id tests
     107      { Node n; int i=G.id(n); i=i; }
     108      { Edge e; int i=G.id(e); i=i; }
     109      //NodeMap tests
     110      {
     111        Node k;
     112        typename Graph::template NodeMap<int> m(G);
     113        //Const map
     114        typename Graph::template NodeMap<int> const &cm = m;
     115        //Inicialize with default value
     116        typename Graph::template NodeMap<int> mdef(G,12);
     117        //Copy
     118        typename Graph::template NodeMap<int> mm(cm);
     119        //Copy from another type
     120        typename Graph::template NodeMap<double> dm(cm);
     121        //Copy to more complex type
     122        typename Graph::template NodeMap<DummyType> em(cm);
     123        int v;
     124        v=m[k]; m[k]=v; m.set(k,v);
     125        v=cm[k];
    116126   
    117     m=cm; 
    118     dm=cm; //Copy from another type
    119     {
    120       //Check the typedef's
    121       typename Graph::template NodeMap<int>::ValueType val;
    122       val=1;
    123       typename Graph::template NodeMap<int>::KeyType key;
    124       key = typename Graph::NodeIt(G);
    125     }
    126   } 
    127   { //bool NodeMap
    128     Node k;
    129     typename Graph::template NodeMap<bool> m(G);
    130     typename Graph::template NodeMap<bool> const &cm = m;  //Const map
    131     //Inicialize with default value
    132     typename Graph::template NodeMap<bool> mdef(G,12);
    133     typename Graph::template NodeMap<bool> mm(cm);   //Copy
    134     typename Graph::template NodeMap<int> dm(cm); //Copy from another type
    135     bool v;
    136     v=m[k]; m[k]=v; m.set(k,v);
    137     v=cm[k];
     127        m=cm; 
     128        dm=cm; //Copy from another type 
     129        em=cm; //Copy to more complex type
     130        {
     131          //Check the typedef's
     132          typename Graph::template NodeMap<int>::ValueType val;
     133          val=1;
     134          typename Graph::template NodeMap<int>::KeyType key;
     135          key = typename Graph::NodeIt(G);
     136        }
     137      } 
     138      { //bool NodeMap
     139        Node k;
     140        typename Graph::template NodeMap<bool> m(G);
     141        typename Graph::template NodeMap<bool> const &cm = m;  //Const map
     142        //Inicialize with default value
     143        typename Graph::template NodeMap<bool> mdef(G,12);
     144        typename Graph::template NodeMap<bool> mm(cm);   //Copy
     145        typename Graph::template NodeMap<int> dm(cm); //Copy from another type
     146        bool v;
     147        v=m[k]; m[k]=v; m.set(k,v);
     148        v=cm[k];
    138149   
    139     m=cm; 
    140     dm=cm; //Copy from another type
    141     m=dm; //Copy to another type
    142 
    143     {
    144       //Check the typedef's
    145       typename Graph::template NodeMap<bool>::ValueType val;
    146       val=true;
    147       typename Graph::template NodeMap<bool>::KeyType key;
    148       key= typename Graph::NodeIt(G);
    149     }
    150   }
    151   //EdgeMap tests
    152   {
    153     Edge k;
    154     typename Graph::template EdgeMap<int> m(G);
    155     typename Graph::template EdgeMap<int> const &cm = m;  //Const map
    156     //Inicialize with default value
    157     typename Graph::template EdgeMap<int> mdef(G,12);
    158     typename Graph::template EdgeMap<int> mm(cm);   //Copy
    159     typename Graph::template EdgeMap<double> dm(cm); //Copy from another type
    160     int v;
    161     v=m[k]; m[k]=v; m.set(k,v);
    162     v=cm[k];
     150        m=cm; 
     151        dm=cm; //Copy from another type
     152        m=dm; //Copy to another type
     153
     154        {
     155          //Check the typedef's
     156          typename Graph::template NodeMap<bool>::ValueType val;
     157          val=true;
     158          typename Graph::template NodeMap<bool>::KeyType key;
     159          key= typename Graph::NodeIt(G);
     160        }
     161      }
     162      //EdgeMap tests
     163      {
     164        Edge k;
     165        typename Graph::template EdgeMap<int> m(G);
     166        typename Graph::template EdgeMap<int> const &cm = m;  //Const map
     167        //Inicialize with default value
     168        typename Graph::template EdgeMap<int> mdef(G,12);
     169        typename Graph::template EdgeMap<int> mm(cm);   //Copy
     170        typename Graph::template EdgeMap<double> dm(cm); //Copy from another type
     171        int v;
     172        v=m[k]; m[k]=v; m.set(k,v);
     173        v=cm[k];
    163174   
    164     m=cm; 
    165     dm=cm; //Copy from another type
    166     {
    167       //Check the typedef's
    168       typename Graph::template EdgeMap<int>::ValueType val;
    169       val=1;
    170       typename Graph::template EdgeMap<int>::KeyType key;
    171       key= typename Graph::EdgeIt(G);
    172     }
    173  
    174   { //bool EdgeMap
    175     Edge k;
    176     typename Graph::template EdgeMap<bool> m(G);
    177     typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
    178     //Inicialize with default value
    179     typename Graph::template EdgeMap<bool> mdef(G,12);
    180     typename Graph::template EdgeMap<bool> mm(cm);   //Copy
    181     typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
    182     bool v;
    183     v=m[k]; m[k]=v; m.set(k,v);
    184     v=cm[k];
     175        m=cm; 
     176        dm=cm; //Copy from another type
     177        {
     178          //Check the typedef's
     179          typename Graph::template EdgeMap<int>::ValueType val;
     180          val=1;
     181          typename Graph::template EdgeMap<int>::KeyType key;
     182          key= typename Graph::EdgeIt(G);
     183        }
     184     
     185      { //bool EdgeMap
     186        Edge k;
     187        typename Graph::template EdgeMap<bool> m(G);
     188        typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
     189        //Inicialize with default value
     190        typename Graph::template EdgeMap<bool> mdef(G,12);
     191        typename Graph::template EdgeMap<bool> mm(cm);   //Copy
     192        typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
     193        bool v;
     194        v=m[k]; m[k]=v; m.set(k,v);
     195        v=cm[k];
    185196   
    186     m=cm; 
    187     dm=cm; //Copy from another type
    188     m=dm; //Copy to another type
    189     {
    190       //Check the typedef's
    191       typename Graph::template EdgeMap<bool>::ValueType val;
    192       val=true;
    193       typename Graph::template EdgeMap<bool>::KeyType key;
    194       key= typename Graph::EdgeIt(G);
    195     }
    196   }
    197 }
    198 
    199 template<class Graph> void checkCompileGraph(Graph &G)
    200 {
    201   checkCompileStaticGraph(G);
    202 
    203   typedef typename Graph::Node Node;
    204   typedef typename Graph::NodeIt NodeIt;
    205   typedef typename Graph::Edge Edge;
    206   typedef typename Graph::EdgeIt EdgeIt;
    207   typedef typename Graph::InEdgeIt InEdgeIt;
    208   typedef typename Graph::OutEdgeIt OutEdgeIt;
     197        m=cm; 
     198        dm=cm; //Copy from another type
     199        m=dm; //Copy to another type
     200        {
     201          //Check the typedef's
     202          typename Graph::template EdgeMap<bool>::ValueType val;
     203          val=true;
     204          typename Graph::template EdgeMap<bool>::KeyType key;
     205          key= typename Graph::EdgeIt(G);
     206        }
     207      }
     208    }
     209
     210  template<class Graph> void checkCompileGraph(Graph &G)
     211    {
     212      checkCompileStaticGraph(G);
     213
     214      typedef typename Graph::Node Node;
     215      typedef typename Graph::NodeIt NodeIt;
     216      typedef typename Graph::Edge Edge;
     217      typedef typename Graph::EdgeIt EdgeIt;
     218      typedef typename Graph::InEdgeIt InEdgeIt;
     219      typedef typename Graph::OutEdgeIt OutEdgeIt;
    209220 
    210   Node n,m;
    211   n=G.addNode();
    212   m=G.addNode();
    213   Edge e;
    214   e=G.addEdge(n,m);
     221      Node n,m;
     222      n=G.addNode();
     223      m=G.addNode();
     224      Edge e;
     225      e=G.addEdge(n,m);
    215226 
    216   //  G.clear();
    217 }
    218 
    219 template<class Graph> void checkCompileGraphEraseEdge(Graph &G)
    220 {
    221   typename Graph::Edge e;
    222   G.erase(e);
    223 }
    224 
    225 template<class Graph> void checkCompileGraphEraseNode(Graph &G)
    226 {
    227   typename Graph::Node n;
    228   G.erase(n);
    229 }
    230 
    231 template<class Graph> void checkCompileErasableGraph(Graph &G)
    232 {
    233   checkCompileGraph(G);
    234   checkCompileGraphEraseNode(G);
    235   checkCompileGraphEraseEdge(G);
    236 }
    237 
    238 template<class Graph> void checkCompileGraphFindEdge(Graph &G)
    239 {
    240   typedef typename Graph::NodeIt Node;
    241   typedef typename Graph::NodeIt NodeIt;
    242 
    243   G.findEdge(NodeIt(G),++NodeIt(G),G.findEdge(NodeIt(G),++NodeIt(G)));
    244   G.findEdge(Node(),Node(),G.findEdge(Node(),Node())); 
    245 }
    246 
    247 template<class Graph> void checkGraphNodeList(Graph &G, int nn)
    248 {
    249   typename Graph::NodeIt n(G);
    250   for(int i=0;i<nn;i++) {
    251     check(n!=INVALID,"Wrong Node list linking.");
    252     ++n;
    253   }
    254   check(n==INVALID,"Wrong Node list linking.");
    255 }
    256 
    257 template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
    258 {
    259   typedef typename Graph::EdgeIt EdgeIt;
    260 
    261   EdgeIt e(G);
    262   for(int i=0;i<nn;i++) {
    263     check(e!=INVALID,"Wrong Edge list linking.");
    264     ++e;
    265   }
    266   check(e==INVALID,"Wrong Edge list linking.");
    267 }
    268 
    269 template<class Graph> void checkGraphOutEdgeList(Graph &G,
    270                                                  typename Graph::Node n,
    271                                                  int nn)
    272 {
    273   typename Graph::OutEdgeIt e(G,n);
    274   for(int i=0;i<nn;i++) {
    275     check(e!=INVALID,"Wrong OutEdge list linking.");
    276     ++e;
    277   }
    278   check(e==INVALID,"Wrong OutEdge list linking.");
    279 }
    280 
    281 template<class Graph> void checkGraphInEdgeList(Graph &G,
    282                                                 typename Graph::Node n,
    283                                                 int nn)
    284 {
    285   typename Graph::InEdgeIt e(G,n);
    286   for(int i=0;i<nn;i++) {
    287     check(e!=INVALID,"Wrong InEdge list linking.");
    288     ++e;
    289   }
    290   check(e==INVALID,"Wrong InEdge list linking.");
    291 }
    292 
    293 ///\file
    294 ///\todo Check head(), tail() as well;
     227      //  G.clear();
     228    }
     229
     230  template<class Graph> void checkCompileGraphEraseEdge(Graph &G)
     231    {
     232      typename Graph::Edge e;
     233      G.erase(e);
     234    }
     235
     236  template<class Graph> void checkCompileGraphEraseNode(Graph &G)
     237    {
     238      typename Graph::Node n;
     239      G.erase(n);
     240    }
     241
     242  template<class Graph> void checkCompileErasableGraph(Graph &G)
     243    {
     244      checkCompileGraph(G);
     245      checkCompileGraphEraseNode(G);
     246      checkCompileGraphEraseEdge(G);
     247    }
     248
     249  template<class Graph> void checkCompileGraphFindEdge(Graph &G)
     250    {
     251      typedef typename Graph::NodeIt Node;
     252      typedef typename Graph::NodeIt NodeIt;
     253
     254      G.findEdge(NodeIt(G),++NodeIt(G),G.findEdge(NodeIt(G),++NodeIt(G)));
     255      G.findEdge(Node(),Node(),G.findEdge(Node(),Node())); 
     256    }
     257
     258  template<class Graph> void checkGraphNodeList(Graph &G, int nn)
     259    {
     260      typename Graph::NodeIt n(G);
     261      for(int i=0;i<nn;i++) {
     262        check(n!=INVALID,"Wrong Node list linking.");
     263        ++n;
     264      }
     265      check(n==INVALID,"Wrong Node list linking.");
     266    }
     267
     268  template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
     269    {
     270      typedef typename Graph::EdgeIt EdgeIt;
     271
     272      EdgeIt e(G);
     273      for(int i=0;i<nn;i++) {
     274        check(e!=INVALID,"Wrong Edge list linking.");
     275        ++e;
     276      }
     277      check(e==INVALID,"Wrong Edge list linking.");
     278    }
     279
     280  template<class Graph> void checkGraphOutEdgeList(Graph &G,
     281                                                   typename Graph::Node n,
     282                                                   int nn)
     283    {
     284      typename Graph::OutEdgeIt e(G,n);
     285      for(int i=0;i<nn;i++) {
     286        check(e!=INVALID,"Wrong OutEdge list linking.");
     287        ++e;
     288      }
     289      check(e==INVALID,"Wrong OutEdge list linking.");
     290    }
     291
     292  template<class Graph> void checkGraphInEdgeList(Graph &G,
     293                                                  typename Graph::Node n,
     294                                                  int nn)
     295    {
     296      typename Graph::InEdgeIt e(G,n);
     297      for(int i=0;i<nn;i++) {
     298        check(e!=INVALID,"Wrong InEdge list linking.");
     299        ++e;
     300      }
     301      check(e==INVALID,"Wrong InEdge list linking.");
     302    }
     303
     304  ///\file
     305  ///\todo Check head(), tail() as well;
    295306
    296307 
  • src/test/graph_wrapper_test.cc

    r878 r891  
    1919
    2020
    21 //Compile SmartGraph
    2221typedef SmartGraph Graph;
     22
     23//Compile GraphWrapper
    2324typedef GraphWrapper<Graph> GW;
    2425template void checkCompileStaticGraph<GW>(GW &);
    25 //template void checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
    2626
    27 //Compile SymSmartGraph
     27//Compile RevGraphWrapper
    2828typedef RevGraphWrapper<Graph> RevGW;
    2929template void checkCompileStaticGraph<RevGW>(RevGW &);
    30 //template void checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
     30
     31//Compile SubGraphWrapper
     32typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>,
     33                        Graph::EdgeMap<bool> > SubGW;
     34template void checkCompileStaticGraph<SubGW>(SubGW &);
     35
     36//Compile UndirGraphWrapper
     37/// \bug UndirGraphWrapper cannot pass the StaticGraph test
     38//typedef UndirGraphWrapper<Graph> UndirGW;
     39//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
     40
     41//Compile UndirGraph
     42//typedef UndirGraph<Graph> UndirG;
     43//template void checkCompileStaticGraph<UndirG>(UndirG &);
     44
     45//typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>,
     46/// \bug SubBidirGraphWrapper cannot pass the StaticGraph test
     47//                           Graph::EdgeMap<bool> > SubBDGW;
     48//template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
     49
     50//Compile BidirGraphWrapper
     51//typedef BidirGraphWrapper<Graph> BidirGW;
     52//template void checkCompileStaticGraph<BidirGW>(BidirGW &);
     53
     54//Compile BidirGraph
     55//typedef BidirGraph<Graph> BidirG;
     56//template void checkCompileStaticGraph<BidirG>(BidirG &);
     57
     58//Compile ResGraphWrapper
     59//typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>,
     60//                      Graph::EdgeMap<int> > ResGW;
     61//template void checkCompileStaticGraph<ResGW>(ResGW &);
     62
     63//Compile ErasingFirstGraphWrapper
     64typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
     65template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
    3166
    3267
Note: See TracChangeset for help on using the changeset viewer.