[Lemon-commits] [lemon_svn] deba: r1199 - in hugo/trunk/src: hugo test

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:43:49 CET 2006


Author: deba
Date: Tue Sep 21 00:57:48 2004
New Revision: 1199

Modified:
   hugo/trunk/src/hugo/array_map.h
   hugo/trunk/src/hugo/default_map.h
   hugo/trunk/src/hugo/graph_wrapper.h
   hugo/trunk/src/hugo/list_graph.h
   hugo/trunk/src/hugo/map_defines.h
   hugo/trunk/src/hugo/map_registry.h
   hugo/trunk/src/hugo/smart_graph.h
   hugo/trunk/src/hugo/sym_map.h
   hugo/trunk/src/hugo/vector_map.h
   hugo/trunk/src/test/graph_test.h
   hugo/trunk/src/test/graph_wrapper_test.cc

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


Modified: hugo/trunk/src/hugo/array_map.h
==============================================================================
--- hugo/trunk/src/hugo/array_map.h	(original)
+++ hugo/trunk/src/hugo/array_map.h	Tue Sep 21 00:57:48 2004
@@ -65,7 +65,7 @@
 	
     /** Default constructor for the map.
      */
-    ArrayMap() : values(0), capacity(0) {}
+    ArrayMap() : capacity(0), values(0) {}
 			
     /** Graph and Registry initialized map constructor.
      */
@@ -90,7 +90,7 @@
 
     /** Constructor to copy a map of the same map type.
      */
-    ArrayMap(const ArrayMap& copy) : MapBase(*copy.graph, *copy.registry) {
+    ArrayMap(const ArrayMap& copy) : MapBase(copy) {
       capacity = copy.capacity;
       if (capacity == 0) return;
       values = allocator.allocate(capacity);
@@ -102,13 +102,15 @@
 
     /** Constructor to copy a map of an other map type.
      */
-    template <typename CMap> ArrayMap(const CMap& copy) 
-      : MapBase(copy), capacity(0), values(0) {
-      if (MapBase::getGraph()) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    template <typename TT>
+    ArrayMap(const ArrayMap<MapRegistry, TT>& copy) 
+      : MapBase(copy) {
+      capacity = copy.capacity;
+      if (capacity == 0) return;
+      values = allocator.allocate(capacity);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	allocator.construct(&(values[id]), copy.values[id]);
       }
     }
 
@@ -116,34 +118,46 @@
      */
     ArrayMap& operator=(const ArrayMap& copy) {
       if (&copy == this) return *this;
+
       if (capacity != 0) {
 	MapBase::destroy();
 	allocator.deallocate(values, capacity);
       }
+
+      MapBase::operator=(copy);
+
       capacity = copy.capacity;
       if (capacity == 0) return *this;
       values = allocator.allocate(capacity);
+
       for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
 	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
 	allocator.construct(&(values[id]), copy.values[id]);
       }
+
       return *this;
     }
 
-    /** Assign operator to copy a map an other map type.
+    /** Assign operator to copy a map of an other map type.
      */
-    template <typename CMap> ArrayMap& operator=(const CMap& copy) {
+    template <typename TT>
+    ArrayMap& operator=(const ArrayMap<MapRegistry, TT>& copy) {
       if (capacity != 0) {
 	MapBase::destroy();
 	allocator.deallocate(values, capacity);
       }
+
       MapBase::operator=(copy);
-      if (MapBase::getGraph()) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+
+      capacity = copy.capacity;
+      if (capacity == 0) return *this;
+      values = allocator.allocate(capacity);
+
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	allocator.construct(&(values[id]), copy.values[id]);
       }
+
       return *this;
     }
 				

Modified: hugo/trunk/src/hugo/default_map.h
==============================================================================
--- hugo/trunk/src/hugo/default_map.h	(original)
+++ hugo/trunk/src/hugo/default_map.h	Tue Sep 21 00:57:48 2004
@@ -29,36 +29,48 @@
   /** Macro to implement the DefaultMap.
    */
 #define DEFAULT_MAP_BODY(DynMap, Value) \
-  { \
-    typedef DynMap<MapRegistry, Value> MapImpl; \
-  \
-  public: \
-  \
-    typedef typename MapRegistry::Graph Graph; \
-  \
-    DefaultMap() : MapImpl() {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
-      : MapImpl(g, r, v) {} \
-  \
-    DefaultMap(const DefaultMap& copy) \
-      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-  \
-    template <typename CMap> DefaultMap(const CMap& copy) : MapImpl(copy) {} \
-  \
-    DefaultMap& operator=(const DefaultMap& copy) { \
-      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-      return *this; \
+{ \
+\
+public: \
+\
+typedef DynMap<MapRegistry, Value> Parent; \
+\
+typedef typename MapRegistry::Graph Graph; \
+\
+DefaultMap() : Parent() {} \
+DefaultMap(const Graph& g, MapRegistry& r) : Parent(g, r) {} \
+DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
+  : Parent(g, r, v) {} \
+DefaultMap(const DefaultMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+DefaultMap(const DefaultMap<MapRegistry, TT>& copy) { \
+  Parent::MapBase::operator= \
+    (static_cast<const typename Parent::MapBase&>(copy)); \
+  if (Parent::getGraph()) { \
+    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
+      Parent::add(it); \
+      Parent::operator[](it) = copy[it]; \
     } \
-  \
-    template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
-      MapImpl::operator=(copy); \
-      return *this; \
+  } \
+} \
+DefaultMap& operator=(const DefaultMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+DefaultMap& operator=(const DefaultMap<MapRegistry, TT>& copy) { \
+  Parent::clear(); \
+  Parent::MapBase::operator=(copy); \
+  if (Parent::getGraph()) { \
+    for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
+      Parent::add(it); \
+      Parent::operator[](it) = copy[it]; \
     } \
-  \
-  };
+  } \
+  return *this; \
+} \
+};
 
 
   template <typename MapRegistry, typename Type>

Modified: hugo/trunk/src/hugo/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/hugo/graph_wrapper.h	(original)
+++ hugo/trunk/src/hugo/graph_wrapper.h	Tue Sep 21 00:57:48 2004
@@ -286,7 +286,7 @@
     Node head(const Edge& e) const { 
       return GraphWrapper<Graph>::tail(e); }
 
-    KEEP_MAPS(Parent, RevGraphWrapper);
+    //    KEEP_MAPS(Parent, RevGraphWrapper);
 
   };
 
@@ -493,7 +493,7 @@
       return i; 
     }
 
-    KEEP_MAPS(Parent, SubGraphWrapper);
+    //    KEEP_MAPS(Parent, SubGraphWrapper);
   };
 
 
@@ -558,14 +558,14 @@
       if (e.out_or_in) return this->graph->head(e); else 
 	return this->graph->tail(e); }
 
-    KEEP_MAPS(Parent, UndirGraphWrapper);
+    //    KEEP_MAPS(Parent, UndirGraphWrapper);
 
   };
   
   /// \brief An undirected graph template.
   ///
   ///\warning Graph wrappers are in even more experimental state than the other
-  ///parts of the lib. Use them at you own risk.
+  ///parts of the lib. Use them at your own risk.
   ///
   /// An undirected graph template.
   /// This class works as an undirected graph and a directed graph of 
@@ -581,7 +581,7 @@
       Parent::setGraph(gr); 
     }
 
-    KEEP_MAPS(Parent, UndirGraph);
+    //    KEEP_MAPS(Parent, UndirGraph);
   };
 
 
@@ -894,28 +894,54 @@
     /// Graph::EdgeMap one for the forward edges and 
     /// one for the backward edges.
     class EdgeMap {
+      template <typename TT> friend class EdgeMap;
       typename Graph::template EdgeMap<T> forward_map, backward_map; 
     public:
       typedef T ValueType;
       typedef Edge KeyType;
+
       EdgeMap(const SubBidirGraphWrapper<Graph, 
 	      ForwardFilterMap, BackwardFilterMap>& g) : 
 	forward_map(*(g.graph)), backward_map(*(g.graph)) { }
+
       EdgeMap(const SubBidirGraphWrapper<Graph, 
 	      ForwardFilterMap, BackwardFilterMap>& g, T a) : 
 	forward_map(*(g.graph), a), backward_map(*(g.graph), a) { }
+
+      template <typename TT>
+      EdgeMap(const EdgeMap<TT>& copy) 
+	: forward_map(copy.forward_map), backward_map(copy.backward_map) {}
+
+      template <typename TT>
+      EdgeMap& operator=(const EdgeMap<TT>& copy) {
+	forward_map = copy.forward_map;
+	backward_map = copy.backward_map;
+	return *this;
+      }
+      
       void set(Edge e, T a) { 
 	if (!e.backward) 
 	  forward_map.set(e, a); 
 	else 
 	  backward_map.set(e, a); 
       }
-      T operator[](Edge e) const { 
+
+      typename Graph::template EdgeMap<T>::ConstReferenceType 
+      operator[](Edge e) const { 
+	if (!e.backward) 
+	  return forward_map[e]; 
+	else 
+	  return backward_map[e]; 
+      }
+
+      typename Graph::template EdgeMap<T>::ReferenceType 
+      operator[](Edge e) { 
 	if (!e.backward) 
 	  return forward_map[e]; 
 	else 
 	  return backward_map[e]; 
       }
+
       void update() { 
 	forward_map.update(); 
 	backward_map.update();
@@ -923,7 +949,7 @@
     };
 
 
-    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
+    //    KEEP_NODE_MAP(Parent, SubBidirGraphWrapper);
 
   };
 
@@ -965,7 +991,7 @@
     int edgeNum() const { 
       return 2*this->graph->edgeNum();
     }
-    KEEP_MAPS(Parent, BidirGraphWrapper);
+    //    KEEP_MAPS(Parent, BidirGraphWrapper);
   };
 
 
@@ -991,7 +1017,7 @@
     BidirGraph() : BidirGraphWrapper<Graph>() { 
       Parent::setGraph(gr); 
     }
-    KEEP_MAPS(Parent, BidirGraph);
+    //    KEEP_MAPS(Parent, BidirGraph);
   };
 
 
@@ -1106,7 +1132,7 @@
       }
     };
 
-    KEEP_MAPS(Parent, ResGraphWrapper);
+    //    KEEP_MAPS(Parent, ResGraphWrapper);
   };
 
 
@@ -1168,7 +1194,7 @@
       first_out_edges->set(n, f);
     }
 
-    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
+    //    KEEP_MAPS(Parent, ErasingFirstGraphWrapper);
   };
 
   ///@}

Modified: hugo/trunk/src/hugo/list_graph.h
==============================================================================
--- hugo/trunk/src/hugo/list_graph.h	(original)
+++ hugo/trunk/src/hugo/list_graph.h	Tue Sep 21 00:57:48 2004
@@ -442,9 +442,6 @@
 
     typedef SymListGraph Graph;
 
-    /// Importing maps from the base class ListGraph.
-    KEEP_MAPS(ListGraph, SymListGraph);
-
     /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
     /// Creating symmetric edge map.

Modified: hugo/trunk/src/hugo/map_defines.h
==============================================================================
--- hugo/trunk/src/hugo/map_defines.h	(original)
+++ hugo/trunk/src/hugo/map_defines.h	Tue Sep 21 00:57:48 2004
@@ -38,21 +38,24 @@
 #define CREATE_NODE_MAP(DynMap) \
 template <typename Value> \
 class NodeMap : public DynMap<NodeMapRegistry, Value> { \
-typedef DynMap<NodeMapRegistry, Value> MapImpl; \
 public: \
+typedef DynMap<NodeMapRegistry, Value> Parent; \
 NodeMap() {} \
-NodeMap(const typename MapImpl::Graph& g) \
-  : MapImpl(g, g.node_maps) {} \
-NodeMap(const typename MapImpl::Graph& g, const Value& v) \
-  : MapImpl(g, g.node_maps, v) {} \
-NodeMap(const NodeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-template <typename CMap> NodeMap(const CMap& copy) : MapImpl(copy) {} \
+NodeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.node_maps) {} \
+NodeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.node_maps, v) {} \
+NodeMap(const NodeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+NodeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
 NodeMap& operator=(const NodeMap& copy) { \
-  MapImpl::operator=(static_cast<const MapImpl&>(copy));\
+  Parent::operator=(static_cast<const Parent&>(copy));\
   return *this; \
 } \
-template <typename CMap> NodeMap& operator=(const CMap& copy) { \
-  MapImpl::operator=(copy);\
+template <typename TT> \
+NodeMap& operator=(const NodeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
   return *this; \
 } \
 };
@@ -66,21 +69,25 @@
 #define CREATE_EDGE_MAP(DynMap) \
 template <typename Value> \
 class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
-typedef DynMap<EdgeMapRegistry, Value> MapImpl; \
 public: \
+typedef DynMap<EdgeMapRegistry, Value> Parent; \
+\
 EdgeMap() {} \
-EdgeMap(const typename MapImpl::Graph& g) \
-  : MapImpl(g, g.edge_maps) {} \
-EdgeMap(const typename MapImpl::Graph& g, const Value& v) \
-  : MapImpl(g, g.edge_maps, v) {} \
-EdgeMap(const EdgeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-template <typename CMap> EdgeMap(const CMap& copy) : MapImpl(copy) {} \
+EdgeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.edge_maps) {} \
+EdgeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.edge_maps, v) {} \
+EdgeMap(const EdgeMap& copy) : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+EdgeMap(const EdgeMap<TT>& copy) \
+  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
 EdgeMap& operator=(const EdgeMap& copy) { \
-  MapImpl::operator=(static_cast<const MapImpl&>(copy));\
+  Parent::operator=(static_cast<const Parent&>(copy));\
   return *this; \
 } \
-template <typename CMap> EdgeMap& operator=(const CMap& copy) { \
-  MapImpl::operator=(copy);\
+template <typename TT> \
+EdgeMap& operator=(const EdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
   return *this; \
 } \
 };
@@ -108,101 +115,88 @@
 #define CREATE_SYM_EDGE_MAP(DynMap) \
 template <typename Value> \
 class SymEdgeMap : public SymMap<DynMap, SymEdgeMapRegistry, Value> { \
-  typedef SymMap<DynMap, SymEdgeMapRegistry, Value> MapImpl; \
- public: \
-\
-  SymEdgeMap() {} \
-\
-  SymEdgeMap(const typename MapImpl::Graph& g) \
-    : MapImpl(g, g.sym_edge_maps) {} \
+public: \
+typedef SymMap<DynMap, SymEdgeMapRegistry, Value> Parent; \
 \
-  SymEdgeMap(const typename MapImpl::Graph& g, const Value& v) \
-    : MapImpl(g, g.sym_edge_maps, v) {} \
-\
-  SymEdgeMap(const SymEdgeMap& copy) \
-    : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-  template <typename CMap> SymEdgeMap(const CMap& copy) : MapImpl(copy) {} \
-  SymEdgeMap& operator=(const SymEdgeMap& copy) { \
-    MapImpl::operator=(static_cast<const MapImpl&>(copy));\
-    return *this; \
-  } \
-\
-  template <typename CMap> SymEdgeMap& operator=(const CMap& copy) { \
-    MapImpl::operator=(copy);\
-    return *this; \
-  } \
+SymEdgeMap() {} \
+SymEdgeMap(const typename Parent::Graph& g) \
+  : Parent(g, g.sym_edge_maps) {} \
+SymEdgeMap(const typename Parent::Graph& g, const Value& v) \
+  : Parent(g, g.sym_edge_maps, v) {} \
+SymEdgeMap(const SymEdgeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+SymEdgeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy)) {} \
+SymEdgeMap& operator=(const SymEdgeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy));\
+  return *this; \
+} \
+template <typename TT> \
+SymEdgeMap& operator=(const SymEdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename SymEdgeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
 };
 
-
 /** This is a macro to import an node map into a graph class.
  */
 #define IMPORT_NODE_MAP(From, from, To, to) \
 template <typename Value> \
-class NodeMap \
-  : public From::template NodeMap<Value> { \
-  typedef typename From::template NodeMap<Value> MapImpl; \
- public: \
-   NodeMap() : MapImpl() {} \
-\
-   NodeMap(const To& to) \
-     : MapImpl(static_cast<const From&>(from)) { } \
-\
-   NodeMap(const To& to, const Value& value) \
-     : MapImpl(static_cast<const From&>(from), value) { } \
-\
-   NodeMap(const NodeMap& copy) \
-     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-   template<typename CMap> \
-   NodeMap(const CMap& copy) \
-     : MapImpl(copy) {} \
-\
-   NodeMap& operator=(const NodeMap& copy) { \
-     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-     return *this; \
-   } \
-\
-   template <typename CMap> \
-   NodeMap& operator=(const CMap& copy) { \
-     MapImpl::operator=(copy); \
-     return *this; \
-   } \
+class NodeMap : public From::template NodeMap<Value> { \
+\
+public: \
+typedef typename From::template NodeMap<Value> Parent; \
+\
+NodeMap() : Parent() {} \
+NodeMap(const To& to) \
+  : Parent(static_cast<const From&>(from)) { } \
+NodeMap(const To& to, const Value& value) \
+  : Parent(static_cast<const From&>(from), value) { } \
+NodeMap(const NodeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+NodeMap(const NodeMap<TT>& copy) \
+  : Parent(static_cast<const typename NodeMap<TT>::Parent&>(copy)) {} \
+NodeMap& operator=(const NodeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+NodeMap& operator=(const NodeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename NodeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
 };
 
 /** This is a macro to import an edge map into a graph class.
  */
 #define IMPORT_EDGE_MAP(From, from, To, to) \
 template <typename Value> \
-class EdgeMap \
-  : public From::template EdgeMap<Value> { \
-  typedef typename From::template EdgeMap<Value> MapImpl; \
- public: \
-   EdgeMap() : MapImpl() {} \
-\
-   EdgeMap(const To& to) \
-     : MapImpl(static_cast<const From&>(from)) { } \
-\
-   EdgeMap(const To& to, const Value& value) \
-     : MapImpl(static_cast<const From&>(from), value) { } \
-\
-   EdgeMap(const EdgeMap& copy) \
-     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-   template<typename CMap> \
-   EdgeMap(const CMap& copy) \
-     : MapImpl(copy) {} \
-\
-   EdgeMap& operator=(const EdgeMap& copy) { \
-     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-     return *this; \
-   } \
-\
-   template <typename CMap> \
-   EdgeMap& operator=(const CMap& copy) { \
-     MapImpl::operator=(copy); \
-     return *this; \
-   } \
+class EdgeMap : public From::template EdgeMap<Value> { \
+\
+public: \
+typedef typename From::template EdgeMap<Value> Parent; \
+\
+EdgeMap() : Parent() {} \
+EdgeMap(const To& to) \
+  : Parent(static_cast<const From&>(from)) { } \
+EdgeMap(const To& to, const Value& value) \
+  : Parent(static_cast<const From&>(from), value) { } \
+EdgeMap(const EdgeMap& copy) \
+  : Parent(static_cast<const Parent&>(copy)) {} \
+template <typename TT> \
+EdgeMap(const EdgeMap<TT>& copy) \
+  : Parent(static_cast<const typename EdgeMap<TT>::Parent&>(copy)) {} \
+EdgeMap& operator=(const EdgeMap& copy) { \
+  Parent::operator=(static_cast<const Parent&>(copy)); \
+  return *this; \
+} \
+template <typename TT> \
+EdgeMap& operator=(const EdgeMap<TT>& copy) { \
+  Parent::operator=(static_cast<const typename EdgeMap<TT>::Parent&>(copy));\
+  return *this; \
+} \
 };
 
 #define KEEP_EDGE_MAP(From, To) \

Modified: hugo/trunk/src/hugo/map_registry.h
==============================================================================
--- hugo/trunk/src/hugo/map_registry.h	(original)
+++ hugo/trunk/src/hugo/map_registry.h	Tue Sep 21 00:57:48 2004
@@ -70,7 +70,6 @@
       /** 
        * Assign operator.
       */	
-
       const MapBase& operator=(const MapBase& copy) {
 	if (registry) {
 	  registry->detach(*this);

Modified: hugo/trunk/src/hugo/smart_graph.h
==============================================================================
--- hugo/trunk/src/hugo/smart_graph.h	(original)
+++ hugo/trunk/src/hugo/smart_graph.h	Tue Sep 21 00:57:48 2004
@@ -317,9 +317,6 @@
   public:
     typedef SymSmartGraph Graph;
 
-    /// Importing maps from the base class ListGraph.
-    KEEP_MAPS(SmartGraph, SymSmartGraph);
-
     /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
     /// Creating symmetric edge map.

Modified: hugo/trunk/src/hugo/sym_map.h
==============================================================================
--- hugo/trunk/src/hugo/sym_map.h	(original)
+++ hugo/trunk/src/hugo/sym_map.h	Tue Sep 21 00:57:48 2004
@@ -103,11 +103,6 @@
     SymMap(const SymMap& copy) 
       : MapImpl(static_cast<const MapImpl&>(copy)) {}
 
-    /** Constructor to copy a map of an other map type.
-     */
-    template <typename CMap> SymMap(const CMap& copy) 
-      : MapImpl(copy) {}
-
     /** Assign operator to copy a map of the same map type.
      */
     SymMap& operator=(const SymMap& copy) {
@@ -115,13 +110,6 @@
       return *this;
     }
 
-    /** Assign operator to copy a map of an other map type.
-     */
-    template <typename CMap> SymMap& operator=(const CMap& copy) {
-      MapImpl::operator=(copy);
-      return *this;
-    }
-   
     /** Add a new key to the map. It called by the map registry.
      */
     void add(const KeyType& key) {

Modified: hugo/trunk/src/hugo/vector_map.h
==============================================================================
--- hugo/trunk/src/hugo/vector_map.h	(original)
+++ hugo/trunk/src/hugo/vector_map.h	Tue Sep 21 00:57:48 2004
@@ -32,6 +32,7 @@
 	
   template <typename MapRegistry, typename Value>
   class VectorMap : public MapRegistry::MapBase {
+    template <typename MR, typename T> friend class VectorMap;
   public:
 		
     /// The graph type of the maps. 
@@ -82,36 +83,29 @@
     VectorMap(const Graph& g, MapRegistry& r, const Value& v) 
       : MapBase(g, r), container(KeyInfo<Graph, KeyIt>::maxId(g)+1, v) {}
 
-    /** Constructor to copy a map of an other map type.
+    /** Assign operator to copy a map of an other map type.
      */
-    template <typename CMap> VectorMap(const CMap& copy) : MapBase(copy) {
-      if (MapBase::getGraph()) {
-	container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    template <typename TT>
+    VectorMap(const VectorMap<MapRegistry, TT>& c) 
+      : MapBase(c), container(c.container.size()) {
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	container[id] = c.container[id];
       }
     }
 
-    /** Assign operator to copy a map an other map type.
+    /** Assign operator to copy a map of an other map type.
      */
-    template <typename CMap> VectorMap& operator=(const CMap& copy) {
-      container.clear();
-      this->MapBase::operator=(copy);
-      if (MapBase::getGraph()) {
-	container.resize(KeyInfo<Graph, KeyIt>::maxId(*MapBase::getGraph())+1);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  set(it, copy[it]);
-	}
+    template <typename TT>
+    VectorMap& operator=(const VectorMap<MapRegistry, TT>& c) {
+      container.resize(c.container.size());
+      MapBase::operator=(c);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = KeyInfo<Graph, KeyIt>::id(*MapBase::getGraph(), it);
+	container[id] = c.container[id];
       }
       return *this;
     }
-
-    /** The destructor of the map.
-     */
-    virtual ~VectorMap() {
-    }
-		
     /**
      * The subscript operator. The map can be subscripted by the
      * actual keys of the graph. 

Modified: hugo/trunk/src/test/graph_test.h
==============================================================================
--- hugo/trunk/src/test/graph_test.h	(original)
+++ hugo/trunk/src/test/graph_test.h	Tue Sep 21 00:57:48 2004
@@ -1,3 +1,4 @@
+// -*- c++ -*-
 #ifndef HUGO_TEST_GRAPH_TEST_H
 #define HUGO_TEST_GRAPH_TEST_H
 
@@ -9,289 +10,299 @@
 //! \brief Some utility to  test graph classes.
 namespace hugo {
 
+  struct DummyType {
+    int value;
+    DummyType() {}
+    DummyType(int p) : value(p) {}
+    DummyType& operator=(int p) { value = p; return *this;}
+  };
 
-template<class Graph> void checkCompileStaticGraph(Graph &G) 
-{
-  typedef typename Graph::Node Node;
-  typedef typename Graph::NodeIt NodeIt;
-  typedef typename Graph::Edge Edge;
-  typedef typename Graph::EdgeIt EdgeIt;
-  typedef typename Graph::InEdgeIt InEdgeIt;
-  typedef typename Graph::OutEdgeIt OutEdgeIt;
+
+  template<class Graph> void checkCompileStaticGraph(Graph &G) 
+    {
+      typedef typename Graph::Node Node;
+      typedef typename Graph::NodeIt NodeIt;
+      typedef typename Graph::Edge Edge;
+      typedef typename Graph::EdgeIt EdgeIt;
+      typedef typename Graph::InEdgeIt InEdgeIt;
+      typedef typename Graph::OutEdgeIt OutEdgeIt;
   
-  {
-    Node i; Node j(i); Node k(INVALID);
-    i=j;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    b=(i==j); b=(i!=j); b=(i<j);
-  }
-  {
-    NodeIt i; NodeIt j(i); NodeIt k(INVALID); NodeIt l(G);
-    i=j;
-    j=G.first(i);
-    j=++i;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    Node n(i);
-    n=i;
-    b=(i==j); b=(i!=j); b=(i<j);
-    //Node ->NodeIt conversion
-    NodeIt ni(G,n);
-  }
-  {
-    Edge i; Edge j(i); Edge k(INVALID);
-    i=j;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    b=(i==j); b=(i!=j); b=(i<j);
-  }
-  {
-    EdgeIt i; EdgeIt j(i); EdgeIt k(INVALID); EdgeIt l(G);
-    i=j;
-    j=G.first(i);
-    j=++i;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    Edge e(i);
-    e=i;
-    b=(i==j); b=(i!=j); b=(i<j);
-    //Edge ->EdgeIt conversion
-    EdgeIt ei(G,e);
-  }
-  {
-    Node n;
-    InEdgeIt i; InEdgeIt j(i); InEdgeIt k(INVALID); InEdgeIt l(G,n);
-    i=j;
-    j=G.first(i,n);
-    j=++i;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    Edge e(i);
-    e=i;
-    b=(i==j); b=(i!=j); b=(i<j);
-    //Edge ->InEdgeIt conversion
-    InEdgeIt ei(G,e);
-  }
-  {
-    Node n;
-    OutEdgeIt i; OutEdgeIt j(i); OutEdgeIt k(INVALID); OutEdgeIt l(G,n);
-    i=j;
-    j=G.first(i,n);
-    j=++i;
-    bool b; b=true;
-    b=(i==INVALID); b=(i!=INVALID);
-    Edge e(i);
-    e=i;
-    b=(i==j); b=(i!=j); b=(i<j);
-    //Edge ->OutEdgeIt conversion
-    OutEdgeIt ei(G,e);
-  }
-  {
-    Node n,m;
-    n=m=INVALID;
-    Edge e;
-    e=INVALID;
-    n=G.tail(e);
-    n=G.head(e);
-  }
-  // id tests
-  { Node n; int i=G.id(n); i=i; }
-  { Edge e; int i=G.id(e); i=i; }
-  //NodeMap tests
-  {
-    Node k;
-    typename Graph::template NodeMap<int> m(G);
-    //Const map
-    typename Graph::template NodeMap<int> const &cm = m;
-    //Inicialize with default value
-    typename Graph::template NodeMap<int> mdef(G,12);
-    //Copy
-    typename Graph::template NodeMap<int> mm(cm);
-    //Copy from another type
-    typename Graph::template NodeMap<double> dm(cm);
-    int v;
-    v=m[k]; m[k]=v; m.set(k,v);
-    v=cm[k];
+      {
+	Node i; Node j(i); Node k(INVALID);
+	i=j;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	b=(i==j); b=(i!=j); b=(i<j);
+      }
+      {
+	NodeIt i; NodeIt j(i); NodeIt k(INVALID); NodeIt l(G);
+	i=j;
+	j=G.first(i);
+	j=++i;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	Node n(i);
+	n=i;
+	b=(i==j); b=(i!=j); b=(i<j);
+	//Node ->NodeIt conversion
+	NodeIt ni(G,n);
+      }
+      {
+	Edge i; Edge j(i); Edge k(INVALID);
+	i=j;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	b=(i==j); b=(i!=j); b=(i<j);
+      }
+      {
+	EdgeIt i; EdgeIt j(i); EdgeIt k(INVALID); EdgeIt l(G);
+	i=j;
+	j=G.first(i);
+	j=++i;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	Edge e(i);
+	e=i;
+	b=(i==j); b=(i!=j); b=(i<j);
+	//Edge ->EdgeIt conversion
+	EdgeIt ei(G,e);
+      }
+      {
+	Node n;
+	InEdgeIt i; InEdgeIt j(i); InEdgeIt k(INVALID); InEdgeIt l(G,n);
+	i=j;
+	j=G.first(i,n);
+	j=++i;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	Edge e(i);
+	e=i;
+	b=(i==j); b=(i!=j); b=(i<j);
+	//Edge ->InEdgeIt conversion
+	InEdgeIt ei(G,e);
+      }
+      {
+	Node n;
+	OutEdgeIt i; OutEdgeIt j(i); OutEdgeIt k(INVALID); OutEdgeIt l(G,n);
+	i=j;
+	j=G.first(i,n);
+	j=++i;
+	bool b; b=true;
+	b=(i==INVALID); b=(i!=INVALID);
+	Edge e(i);
+	e=i;
+	b=(i==j); b=(i!=j); b=(i<j);
+	//Edge ->OutEdgeIt conversion
+	OutEdgeIt ei(G,e);
+      }
+      {
+	Node n,m;
+	n=m=INVALID;
+	Edge e;
+	e=INVALID;
+	n=G.tail(e);
+	n=G.head(e);
+      }
+      // id tests
+      { Node n; int i=G.id(n); i=i; }
+      { Edge e; int i=G.id(e); i=i; }
+      //NodeMap tests
+      {
+	Node k;
+	typename Graph::template NodeMap<int> m(G);
+	//Const map
+	typename Graph::template NodeMap<int> const &cm = m;
+	//Inicialize with default value
+	typename Graph::template NodeMap<int> mdef(G,12);
+	//Copy
+	typename Graph::template NodeMap<int> mm(cm);
+	//Copy from another type
+	typename Graph::template NodeMap<double> dm(cm);
+	//Copy to more complex type
+	typename Graph::template NodeMap<DummyType> em(cm);
+	int v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
+    
+	m=cm;  
+	dm=cm; //Copy from another type  
+	em=cm; //Copy to more complex type
+	{
+	  //Check the typedef's
+	  typename Graph::template NodeMap<int>::ValueType val;
+	  val=1;
+	  typename Graph::template NodeMap<int>::KeyType key;
+	  key = typename Graph::NodeIt(G);
+	}
+      }  
+      { //bool NodeMap
+	Node k;
+	typename Graph::template NodeMap<bool> m(G);
+	typename Graph::template NodeMap<bool> const &cm = m;  //Const map
+	//Inicialize with default value
+	typename Graph::template NodeMap<bool> mdef(G,12);
+	typename Graph::template NodeMap<bool> mm(cm);   //Copy
+	typename Graph::template NodeMap<int> dm(cm); //Copy from another type
+	bool v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
+    
+	m=cm;  
+	dm=cm; //Copy from another type
+	m=dm; //Copy to another type
+
+	{
+	  //Check the typedef's
+	  typename Graph::template NodeMap<bool>::ValueType val;
+	  val=true;
+	  typename Graph::template NodeMap<bool>::KeyType key;
+	  key= typename Graph::NodeIt(G);
+	}
+      }
+      //EdgeMap tests
+      {
+	Edge k;
+	typename Graph::template EdgeMap<int> m(G);
+	typename Graph::template EdgeMap<int> const &cm = m;  //Const map
+	//Inicialize with default value
+	typename Graph::template EdgeMap<int> mdef(G,12);
+	typename Graph::template EdgeMap<int> mm(cm);   //Copy
+	typename Graph::template EdgeMap<double> dm(cm); //Copy from another type
+	int v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
     
-    m=cm;  
-    dm=cm; //Copy from another type
+	m=cm;  
+	dm=cm; //Copy from another type
+	{
+	  //Check the typedef's
+	  typename Graph::template EdgeMap<int>::ValueType val;
+	  val=1;
+	  typename Graph::template EdgeMap<int>::KeyType key;
+	  key= typename Graph::EdgeIt(G);
+	}
+      }  
+      { //bool EdgeMap
+	Edge k;
+	typename Graph::template EdgeMap<bool> m(G);
+	typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
+	//Inicialize with default value
+	typename Graph::template EdgeMap<bool> mdef(G,12);
+	typename Graph::template EdgeMap<bool> mm(cm);   //Copy
+	typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
+	bool v;
+	v=m[k]; m[k]=v; m.set(k,v);
+	v=cm[k];
+    
+	m=cm;  
+	dm=cm; //Copy from another type
+	m=dm; //Copy to another type
+	{
+	  //Check the typedef's
+	  typename Graph::template EdgeMap<bool>::ValueType val;
+	  val=true;
+	  typename Graph::template EdgeMap<bool>::KeyType key;
+	  key= typename Graph::EdgeIt(G);
+	}
+      }
+    }
+
+  template<class Graph> void checkCompileGraph(Graph &G) 
     {
-      //Check the typedef's
-      typename Graph::template NodeMap<int>::ValueType val;
-      val=1;
-      typename Graph::template NodeMap<int>::KeyType key;
-      key = typename Graph::NodeIt(G);
+      checkCompileStaticGraph(G);
+
+      typedef typename Graph::Node Node;
+      typedef typename Graph::NodeIt NodeIt;
+      typedef typename Graph::Edge Edge;
+      typedef typename Graph::EdgeIt EdgeIt;
+      typedef typename Graph::InEdgeIt InEdgeIt;
+      typedef typename Graph::OutEdgeIt OutEdgeIt;
+  
+      Node n,m;
+      n=G.addNode();
+      m=G.addNode();
+      Edge e;
+      e=G.addEdge(n,m); 
+  
+      //  G.clear();
     }
-  }  
-  { //bool NodeMap
-    Node k;
-    typename Graph::template NodeMap<bool> m(G);
-    typename Graph::template NodeMap<bool> const &cm = m;  //Const map
-    //Inicialize with default value
-    typename Graph::template NodeMap<bool> mdef(G,12);
-    typename Graph::template NodeMap<bool> mm(cm);   //Copy
-    typename Graph::template NodeMap<int> dm(cm); //Copy from another type
-    bool v;
-    v=m[k]; m[k]=v; m.set(k,v);
-    v=cm[k];
-    
-    m=cm;  
-    dm=cm; //Copy from another type
-    m=dm; //Copy to another type
 
+  template<class Graph> void checkCompileGraphEraseEdge(Graph &G) 
     {
-      //Check the typedef's
-      typename Graph::template NodeMap<bool>::ValueType val;
-      val=true;
-      typename Graph::template NodeMap<bool>::KeyType key;
-      key= typename Graph::NodeIt(G);
+      typename Graph::Edge e;
+      G.erase(e);
     }
-  }
-  //EdgeMap tests
-  {
-    Edge k;
-    typename Graph::template EdgeMap<int> m(G);
-    typename Graph::template EdgeMap<int> const &cm = m;  //Const map
-    //Inicialize with default value
-    typename Graph::template EdgeMap<int> mdef(G,12);
-    typename Graph::template EdgeMap<int> mm(cm);   //Copy
-    typename Graph::template EdgeMap<double> dm(cm); //Copy from another type
-    int v;
-    v=m[k]; m[k]=v; m.set(k,v);
-    v=cm[k];
-    
-    m=cm;  
-    dm=cm; //Copy from another type
+
+  template<class Graph> void checkCompileGraphEraseNode(Graph &G) 
     {
-      //Check the typedef's
-      typename Graph::template EdgeMap<int>::ValueType val;
-      val=1;
-      typename Graph::template EdgeMap<int>::KeyType key;
-      key= typename Graph::EdgeIt(G);
+      typename Graph::Node n;
+      G.erase(n);
     }
-  }  
-  { //bool EdgeMap
-    Edge k;
-    typename Graph::template EdgeMap<bool> m(G);
-    typename Graph::template EdgeMap<bool> const &cm = m;  //Const map
-    //Inicialize with default value
-    typename Graph::template EdgeMap<bool> mdef(G,12);
-    typename Graph::template EdgeMap<bool> mm(cm);   //Copy
-    typename Graph::template EdgeMap<int> dm(cm); //Copy from another type
-    bool v;
-    v=m[k]; m[k]=v; m.set(k,v);
-    v=cm[k];
-    
-    m=cm;  
-    dm=cm; //Copy from another type
-    m=dm; //Copy to another type
+
+  template<class Graph> void checkCompileErasableGraph(Graph &G) 
     {
-      //Check the typedef's
-      typename Graph::template EdgeMap<bool>::ValueType val;
-      val=true;
-      typename Graph::template EdgeMap<bool>::KeyType key;
-      key= typename Graph::EdgeIt(G);
+      checkCompileGraph(G);
+      checkCompileGraphEraseNode(G);
+      checkCompileGraphEraseEdge(G);
     }
-  }
-}
 
-template<class Graph> void checkCompileGraph(Graph &G) 
-{
-  checkCompileStaticGraph(G);
-
-  typedef typename Graph::Node Node;
-  typedef typename Graph::NodeIt NodeIt;
-  typedef typename Graph::Edge Edge;
-  typedef typename Graph::EdgeIt EdgeIt;
-  typedef typename Graph::InEdgeIt InEdgeIt;
-  typedef typename Graph::OutEdgeIt OutEdgeIt;
-  
-  Node n,m;
-  n=G.addNode();
-  m=G.addNode();
-  Edge e;
-  e=G.addEdge(n,m); 
-  
-  //  G.clear();
-}
+  template<class Graph> void checkCompileGraphFindEdge(Graph &G) 
+    {
+      typedef typename Graph::NodeIt Node;
+      typedef typename Graph::NodeIt NodeIt;
+
+      G.findEdge(NodeIt(G),++NodeIt(G),G.findEdge(NodeIt(G),++NodeIt(G)));
+      G.findEdge(Node(),Node(),G.findEdge(Node(),Node()));  
+    }
+
+  template<class Graph> void checkGraphNodeList(Graph &G, int nn)
+    {
+      typename Graph::NodeIt n(G);
+      for(int i=0;i<nn;i++) {
+	check(n!=INVALID,"Wrong Node list linking.");
+	++n;
+      }
+      check(n==INVALID,"Wrong Node list linking.");
+    }
+
+  template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
+    {
+      typedef typename Graph::EdgeIt EdgeIt;
+
+      EdgeIt e(G);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong Edge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong Edge list linking.");
+    }
+
+  template<class Graph> void checkGraphOutEdgeList(Graph &G,
+						   typename Graph::Node n,
+						   int nn)
+    {
+      typename Graph::OutEdgeIt e(G,n);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong OutEdge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong OutEdge list linking.");
+    }
 
-template<class Graph> void checkCompileGraphEraseEdge(Graph &G) 
-{
-  typename Graph::Edge e;
-  G.erase(e);
-}
-
-template<class Graph> void checkCompileGraphEraseNode(Graph &G) 
-{
-  typename Graph::Node n;
-  G.erase(n);
-}
-
-template<class Graph> void checkCompileErasableGraph(Graph &G) 
-{
-  checkCompileGraph(G);
-  checkCompileGraphEraseNode(G);
-  checkCompileGraphEraseEdge(G);
-}
-
-template<class Graph> void checkCompileGraphFindEdge(Graph &G) 
-{
-  typedef typename Graph::NodeIt Node;
-  typedef typename Graph::NodeIt NodeIt;
-
-  G.findEdge(NodeIt(G),++NodeIt(G),G.findEdge(NodeIt(G),++NodeIt(G)));
-  G.findEdge(Node(),Node(),G.findEdge(Node(),Node()));  
-}
-
-template<class Graph> void checkGraphNodeList(Graph &G, int nn)
-{
-  typename Graph::NodeIt n(G);
-  for(int i=0;i<nn;i++) {
-    check(n!=INVALID,"Wrong Node list linking.");
-    ++n;
-  }
-  check(n==INVALID,"Wrong Node list linking.");
-}
-
-template<class Graph> void checkGraphEdgeList(Graph &G, int nn)
-{
-  typedef typename Graph::EdgeIt EdgeIt;
-
-  EdgeIt e(G);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong Edge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong Edge list linking.");
-}
-
-template<class Graph> void checkGraphOutEdgeList(Graph &G,
-						 typename Graph::Node n,
-						 int nn)
-{
-  typename Graph::OutEdgeIt e(G,n);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong OutEdge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong OutEdge list linking.");
-}
-
-template<class Graph> void checkGraphInEdgeList(Graph &G,
-						typename Graph::Node n,
-						int nn)
-{
-  typename Graph::InEdgeIt e(G,n);
-  for(int i=0;i<nn;i++) {
-    check(e!=INVALID,"Wrong InEdge list linking.");
-    ++e;
-  }
-  check(e==INVALID,"Wrong InEdge list linking.");
-}
+  template<class Graph> void checkGraphInEdgeList(Graph &G,
+						  typename Graph::Node n,
+						  int nn)
+    {
+      typename Graph::InEdgeIt e(G,n);
+      for(int i=0;i<nn;i++) {
+	check(e!=INVALID,"Wrong InEdge list linking.");
+	++e;
+      }
+      check(e==INVALID,"Wrong InEdge list linking.");
+    }
 
-///\file
-///\todo Check head(), tail() as well;
+  ///\file
+  ///\todo Check head(), tail() as well;
 
   
 } //namespace hugo

Modified: hugo/trunk/src/test/graph_wrapper_test.cc
==============================================================================
--- hugo/trunk/src/test/graph_wrapper_test.cc	(original)
+++ hugo/trunk/src/test/graph_wrapper_test.cc	Tue Sep 21 00:57:48 2004
@@ -18,16 +18,51 @@
 using namespace hugo;
 
 
-//Compile SmartGraph
 typedef SmartGraph Graph;
+
+//Compile GraphWrapper
 typedef GraphWrapper<Graph> GW;
 template void checkCompileStaticGraph<GW>(GW &);
-//template void checkCompileGraphFindEdge<SmartGraph>(SmartGraph &);
 
-//Compile SymSmartGraph
+//Compile RevGraphWrapper
 typedef RevGraphWrapper<Graph> RevGW;
 template void checkCompileStaticGraph<RevGW>(RevGW &);
-//template void checkCompileGraphFindEdge<SymSmartGraph>(SymSmartGraph &);
+
+//Compile SubGraphWrapper
+typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, 
+			Graph::EdgeMap<bool> > SubGW;
+template void checkCompileStaticGraph<SubGW>(SubGW &);
+
+//Compile UndirGraphWrapper
+/// \bug UndirGraphWrapper cannot pass the StaticGraph test
+//typedef UndirGraphWrapper<Graph> UndirGW;
+//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
+
+//Compile UndirGraph
+//typedef UndirGraph<Graph> UndirG;
+//template void checkCompileStaticGraph<UndirG>(UndirG &);
+
+//typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, 
+/// \bug SubBidirGraphWrapper cannot pass the StaticGraph test
+//			     Graph::EdgeMap<bool> > SubBDGW;
+//template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
+
+//Compile BidirGraphWrapper
+//typedef BidirGraphWrapper<Graph> BidirGW;
+//template void checkCompileStaticGraph<BidirGW>(BidirGW &);
+
+//Compile BidirGraph
+//typedef BidirGraph<Graph> BidirG;
+//template void checkCompileStaticGraph<BidirG>(BidirG &);
+
+//Compile ResGraphWrapper
+//typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, 
+//			Graph::EdgeMap<int> > ResGW;
+//template void checkCompileStaticGraph<ResGW>(ResGW &);
+
+//Compile ErasingFirstGraphWrapper
+typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
+template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
 
 
 int main() 



More information about the Lemon-commits mailing list