Index: src/hugo/default_map_factory.h
===================================================================
--- src/hugo/default_map_factory.h	(revision 798)
+++ src/hugo/default_map_factory.h	(revision 798)
@@ -0,0 +1,143 @@
+// -*- c++ -*-
+#ifndef DEFAULT_MAP_FACTORY_H
+#define DEFAULT_MAP_FACTORY_H
+
+
+#include <hugo/array_map_factory.h>
+#include <hugo/vector_map_factory.h>
+
+namespace hugo {
+
+#define DEFAULT_MAP_BODY(Factory, Val) \
+  { \
+    typedef typename Factory<MapRegistry>::template Map<Val> MapImpl; \
+  \
+  public: \
+  \
+    typedef typename MapRegistry::Graph Graph; \
+    typedef typename MapRegistry::Key Key; \
+    typedef typename MapRegistry::KeyIt KeyIt; \
+    typedef Val Value; \
+  \
+    typedef typename MapRegistry::MapBase MapBase; \
+  \
+    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; \
+    } \
+  \
+    template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
+      MapImpl::operator=(copy); \
+      return *this; \
+    } \
+  \
+  };
+
+
+  template <typename MapRegistry, typename Type>
+  class DefaultMap : public ArrayMapFactory<MapRegistry>::template Map<Type> 
+  DEFAULT_MAP_BODY(ArrayMapFactory, Type);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, bool> 
+    : public VectorMapFactory<MapRegistry>::template Map<bool> 
+  DEFAULT_MAP_BODY(VectorMapFactory, bool);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, char> 
+    : public VectorMapFactory<MapRegistry>::template Map<char> 
+  DEFAULT_MAP_BODY(VectorMapFactory, char);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, int> 
+    : public VectorMapFactory<MapRegistry>::template Map<int> 
+  DEFAULT_MAP_BODY(VectorMapFactory, int);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, short> 
+    : public VectorMapFactory<MapRegistry>::template Map<short> 
+  DEFAULT_MAP_BODY(VectorMapFactory, short);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, long> 
+    : public VectorMapFactory<MapRegistry>::template Map<long> 
+  DEFAULT_MAP_BODY(VectorMapFactory, long);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, float> 
+    : public VectorMapFactory<MapRegistry>::template Map<float> 
+  DEFAULT_MAP_BODY(VectorMapFactory, float);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, double> 
+    : public VectorMapFactory<MapRegistry>::template Map<double> 
+  DEFAULT_MAP_BODY(VectorMapFactory, double);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, long double> 
+    : public VectorMapFactory<MapRegistry>::template Map<long double> 
+  DEFAULT_MAP_BODY(VectorMapFactory, long double);
+
+  template <typename MapRegistry, typename Type>
+  class DefaultMap<MapRegistry, Type*>
+    : public VectorMapFactory<MapRegistry>::template Map<Type*> 
+  DEFAULT_MAP_BODY(VectorMapFactory, Type*);
+
+  template <typename MapRegistry>
+  class DefaultMapFactory {
+		
+  public:
+		
+    typedef typename MapRegistry::Graph Graph;
+    typedef typename MapRegistry::Key Key;
+    typedef typename MapRegistry::KeyIt KeyIt;
+
+    typedef typename MapRegistry::MapBase MapBase;
+
+    template <typename V> 
+    class Map : public DefaultMap<MapRegistry, V> {
+
+      typedef DefaultMap<MapRegistry, V> MapImpl;
+
+    public:
+      
+      typedef V Value;
+
+      Map() : MapImpl() {}
+
+      Map(const Graph& g, MapRegistry& r) : MapImpl(g, r) {}
+
+      Map(const Graph& g, MapRegistry& r, const Value& v) : MapImpl(g, r, v) {}
+
+      Map(const Map& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {}
+
+      template <typename CMap> Map(const CMap& copy) : MapImpl(copy) {}
+
+      Map& operator=(const Map& copy) {
+	MapImpl::operator=(static_cast<const MapImpl&>(copy));
+	return *this;
+      }
+
+      template <typename CMap> Map& operator=(const CMap& copy) {
+	MapImpl::operator=(copy);
+	return *this;
+      }
+
+    };
+
+  };
+}
+
+#endif
Index: src/hugo/full_graph.h
===================================================================
--- src/hugo/full_graph.h	(revision 782)
+++ src/hugo/full_graph.h	(revision 798)
@@ -14,5 +14,5 @@
 
 #include <hugo/map_registry.h>
-#include <hugo/array_map_factory.h>
+#include <hugo/default_map_factory.h>
 
 namespace hugo {
@@ -49,5 +49,5 @@
     
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(ArrayMapFactory);
+    CREATE_MAPS(DefaultMapFactory);
     
   public:
Index: src/hugo/list_graph.h
===================================================================
--- src/hugo/list_graph.h	(revision 782)
+++ src/hugo/list_graph.h	(revision 798)
@@ -14,5 +14,5 @@
 
 #include <hugo/map_registry.h>
-#include <hugo/array_map_factory.h>
+#include <hugo/default_map_factory.h>
 
 #include <hugo/sym_map_factory.h>
@@ -81,5 +81,5 @@
 
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(ArrayMapFactory);
+    CREATE_MAPS(DefaultMapFactory);
 
   public:
@@ -426,5 +426,5 @@
 
     CREATE_SYM_EDGE_MAP_REGISTRY;
-    CREATE_SYM_EDGE_MAP_FACTORY(ArrayMapFactory);
+    CREATE_SYM_EDGE_MAP_FACTORY(DefaultMapFactory);
     IMPORT_SYM_EDGE_MAP(SymEdgeMapFactory);
 
@@ -509,5 +509,5 @@
     
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(ArrayMapFactory);
+    CREATE_MAPS(DefaultMapFactory);
     
   public:
@@ -806,5 +806,5 @@
 
     CREATE_EDGE_MAP_REGISTRY;
-    CREATE_EDGE_MAP_FACTORY(ArrayMapFactory);
+    CREATE_EDGE_MAP_FACTORY(DefaultMapFactory);
     IMPORT_EDGE_MAP(EdgeMapFactory);
     
Index: src/hugo/smart_graph.h
===================================================================
--- src/hugo/smart_graph.h	(revision 782)
+++ src/hugo/smart_graph.h	(revision 798)
@@ -13,5 +13,5 @@
 #include <hugo/invalid.h>
 
-#include <hugo/array_map_factory.h>
+#include <hugo/default_map_factory.h>
 #include <hugo/sym_map_factory.h>
 #include <hugo/map_registry.h>
@@ -74,5 +74,5 @@
     
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(ArrayMapFactory);
+    CREATE_MAPS(DefaultMapFactory);
     
   public:
@@ -297,5 +297,5 @@
 
     CREATE_SYM_EDGE_MAP_REGISTRY;
-    CREATE_SYM_EDGE_MAP_FACTORY(ArrayMapFactory);
+    CREATE_SYM_EDGE_MAP_FACTORY(DefaultMapFactory);
     IMPORT_SYM_EDGE_MAP(SymEdgeMapFactory);
 
@@ -306,5 +306,7 @@
     {
       Edge e = SmartGraph::addEdge(u,v);
-      SmartGraph::addEdge(v,u);
+      Edge f = SmartGraph::addEdge(v,u);
+      sym_edge_maps.add(e);
+      sym_edge_maps.add(f);
       return e;
     }
Index: src/hugo/sym_map_factory.h
===================================================================
--- src/hugo/sym_map_factory.h	(revision 786)
+++ src/hugo/sym_map_factory.h	(revision 798)
@@ -13,5 +13,9 @@
 
     SymEdgeIt(const Graph& graph) 
-      : EdgeIt(graph) {}
+      : EdgeIt(graph) {
+      while ( n != -1 && (n & 1)) {
+	EdgeIt::operator++();
+      }
+    }
 
     SymEdgeIt(Invalid invalid) 
@@ -53,5 +57,6 @@
       Map(const Graph& g, MapRegistry& r) : MapImpl(g, r) {}
 
-      Map(const Graph& g, MapRegistry& r, const Value& v) : MapImpl(g, r, v) {}
+      Map(const Graph& g, MapRegistry& r, const Value& v) 
+	: MapImpl(g, r, v) {}
 
       Map(const Map& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {}
Index: src/hugo/vector_map_factory.h
===================================================================
--- src/hugo/vector_map_factory.h	(revision 786)
+++ src/hugo/vector_map_factory.h	(revision 798)
@@ -18,5 +18,5 @@
   /** The VectorMapFactory template class is a factory class
    *  to create maps for the edge and nodes. This map factory
-   *  use the std::vector to implement the container function.
+   *  uses the std::vector to implement the container function.
    *
    *  The template parameter is the MapRegistry that the maps
@@ -43,10 +43,25 @@
     template <typename V> 
     class Map : public MapBase {
+
+      typedef std::vector<V> Container;	
+
     public:
+
+      /// The value type of the map.
+      typedef V ValueType;
 
       /// The value type of the map.
       typedef V Value;
-
-      typedef std::vector<Value> Container;	
+      /// The reference type of the map;
+      typedef typename Container::reference Reference;
+      /// The pointer type of the map;
+      typedef typename Container::pointer Pointer;
+
+      /// The const value type of the map.
+      typedef const Value ConstValue;
+      /// The const reference type of the map;
+      typedef typename Container::const_reference ConstReference;
+      /// The pointer type of the map;
+      typedef typename Container::const_pointer ConstPointer;
 
       /** Default constructor for the map.
@@ -65,5 +80,5 @@
 	for (KeyIt it(*getGraph()); it != INVALID; ++it) {
           int id = getGraph()->id(it);
-	  if (id >= container.size()) {
+	  if (id >= (int)container.size()) {
 	    container.resize(id + 1);
 	  }
@@ -78,5 +93,5 @@
 	  for (KeyIt it(*getGraph()); it != INVALID; ++it) {
 	    int id = getGraph()->id(it);
-	    if (id >= container.size()) {
+	    if (id >= (int)container.size()) {
 	      container.resize(id + 1);
 	    }
@@ -96,5 +111,5 @@
 	  for (KeyIt it(*getGraph()); it != INVALID; ++it) {
 	    int id = getGraph()->id(it);
-	    if (id >= container.size()) {
+	    if (id >= (int)container.size()) {
 	      container.resize(id + 1);
 	    }
@@ -102,4 +117,5 @@
 	  }
 	}
+	return *this;
       }
 
@@ -113,5 +129,9 @@
        * actual keys of the graph. 
        */
+<<<<<<< .mine
+      Reference operator[](const Key& key) {
+=======
       typename Container::reference operator[](const KeyType& key) {
+>>>>>>> .r1091
 	int id = getGraph()->id(key);
 	return container[id];
@@ -122,5 +142,9 @@
        * actual keys of the graph. 
        */
+<<<<<<< .mine
+      ConstReference operator[](const Key& key) const {
+=======
       typename Container::const_reference operator[](const KeyType& key) const {
+>>>>>>> .r1091
 	int id = getGraph()->id(key);
 	return container[id];
@@ -139,5 +163,5 @@
       void add(const KeyType& key) {
 	int id = getGraph()->id(key);
-	if (id >= container.size()) {
+	if (id >= (int)container.size()) {
 	  container.resize(id + 1);
 	}
@@ -174,5 +198,5 @@
 
 	typedef extended_pair<const KeyType&, const KeyType&, 
-			      Value&, Value&> Reference;
+			      Map::Reference, Map::Reference> Reference;
 
 	/** Dereference operator for map.
@@ -264,5 +288,5 @@
       
 	typedef extended_pair<const KeyType&, const KeyType&, 
-	  const Value&, const Value&> Reference;
+	  Map::ConstReference, Map::ConstReference> Reference;
 
 	/** Dereference operator for map.
