Index: src/work/deba/main.cpp
===================================================================
--- src/work/deba/main.cpp	(revision 571)
+++ src/work/deba/main.cpp	(revision 595)
@@ -1,3 +1,4 @@
 #include <iostream>
+#include <cstdlib>
 #include "test_graph.h"
 
@@ -8,7 +9,15 @@
 int main() {
 	ListGraph g;
-	ListGraph::NodeMapFactory::VectorMap<int> map(g, g.node_maps);
-	ListGraph::Node node = g.addNode();
-	map[node] = 12;	
+	for (int i = 0; i < 3; ++i) {
+		ListGraph::Node node = g.addNode();
+	}
+	ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps);
+	for (int i = 0; i < 10; ++i) {
+		ListGraph::Node node = g.addNode();
+		map[node] = rand()%100;
+	}
+	for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
+		cout << map[it] << endl;
+	}
 	return 0;
 }
Index: src/work/deba/map_base.h
===================================================================
--- src/work/deba/map_base.h	(revision 571)
+++ src/work/deba/map_base.h	(revision 595)
@@ -2,10 +2,12 @@
 #define MAP_BASE_H
 
+using namespace std;
+
 /**
-	Template base class for implementing mapping on nodes.
-	\param The first template parameter is the Graph class. The Graph
-		must have an \emp node_maps member with \emp MapRegistry class.
-	\param The second template parameter is the  type of the class.
-	
+	Template base class for implementing mapping on nodes and edges.
+	\param The first template parameter is the Graph class.
+	\param The second template parameter is the key type.
+	\param The third template parameter is an iterator on
+		the keys.
 */
 
@@ -25,5 +27,5 @@
 		typedef G Graph;
 		typedef MapRegistry<G, K, KIt> Registry;
-		typedef K KeyType;
+		typedef K Key;
 		typedef KIt KeyIt;
 	
@@ -34,5 +36,5 @@
 		*/	
 		
-		MapBase() : registry(0) {}
+		MapBase() : graph(0), registry(0) {}
 
 		/** 
@@ -41,5 +43,5 @@
 	
 		MapBase(Graph& g, Registry& r) : graph(&g), registry(0) {
-			registry->attach(*this);
+			r.attach(*this);
 		}
 
@@ -81,15 +83,14 @@
 	protected:
 		
+		Graph* graph;
 		Registry* registry;
-		Graph* graph;
 
 		int registry_index;
 	
 		/**
-			Helper function to implement the default constructor in the subclasses.
+			Helper function to implement constructors in the subclasses.
 		*/
 	
 		virtual void init() {
-
 			for (KeyIt it(*graph); graph->valid(it); graph->next(it)) {
 				add(it);
@@ -112,6 +113,5 @@
 		*/
 	
-		virtual void add(const KeyType&) = 0;
-	
+		virtual void add(const Key&) = 0;	
 		/** 
 			The erase member function should be overloaded in the subclasses.
@@ -119,5 +119,5 @@
 		*/
 	
-		virtual void erase(const KeyType&) = 0;
+		virtual void erase(const Key&) = 0;
 	
 		/**
Index: src/work/deba/map_registry.h
===================================================================
--- src/work/deba/map_registry.h	(revision 571)
+++ src/work/deba/map_registry.h	(revision 595)
@@ -3,4 +3,6 @@
 
 #include <vector>
+
+using namespace std;
 
 
@@ -63,18 +65,16 @@
 			map.registry = this;
 			map.registry_index = container.size()-1;
-			map.init();
 		} 
 	
-		void detach(Map& map_base) {
-			map_base.destroy();
-			container.back()->registry_index = map_base.registry_index; 
-			container[map_base.registry_index] = container.back();
+		void detach(Map& map) {
+			container.back()->registry_index = map.registry_index; 
+			container[map.registry_index] = container.back();
 			container.pop_back();
-			map_base.registry = 0;
-			map_base.graph = 0;
+			map.registry = 0;
+			map.graph = 0;
 		}
 	
 		
-		void add(Key& key) {
+		virtual void add(Key& key) {
 			typename Container::iterator it;
 			for (it = container.begin(); it != container.end(); ++it) {
@@ -83,5 +83,5 @@
 		}	
 		
-		void erase(Key& key) {
+		virtual void erase(Key& key) {
 			typename Container::iterator it;
 			for (it = container.begin(); it != container.end(); ++it) {
Index: src/work/deba/pac_map_factory.h
===================================================================
--- src/work/deba/pac_map_factory.h	(revision 595)
+++ src/work/deba/pac_map_factory.h	(revision 595)
@@ -0,0 +1,73 @@
+#ifndef PAC_MAP_FACTORY_H
+#define PAC_MAP_FACTORY_H
+
+#include "map_base.h"
+
+/**
+	Converter class to use the standard template
+	libary's pair associative containers as a graph map.
+*/
+
+namespace hugo {
+	
+	template <typename G, typename K, typename KIt, template <typename, typename> class PAC>
+	class PacMapFactory {
+	
+	
+	public:
+		
+		typedef G Graph;
+		typedef K Key;
+		typedef KIt KeyIt;
+		
+		template <typename V> 
+		class Map : public MapBase<G, K, KIt> {
+		public:
+			typedef V Value;
+	
+			Map() {}
+			
+			Map(Graph& g, MapRegistry<G, K, KIt>& r) 
+				: MapBase<G, K, KIt>(g, r) {
+				init();
+			}
+				
+			virtual ~Map() {
+				destroy();
+			}
+	
+	
+			V& operator[](const K& key) {
+				return container.find(key)->second;
+			} 
+		
+			const V& operator[](const K& key) const {
+				return container.find(key)->second;
+			}
+	
+			const V& get(const K& key) const {
+				return container.find(key)->second;
+			} 
+		
+			void set(const K& key, const V& value) {
+				container.find(key)->second = value;
+			}
+		
+			void add(const K& key) {
+				container.insert(key);
+			}
+		
+			void erase(const K& key) {
+				container.erase(key);
+			}
+	
+		private:
+			typedef PAC<K, V> Container;
+		
+			Container container;
+		};
+		
+	};
+}
+
+#endif
Index: src/work/deba/test_graph.h
===================================================================
--- src/work/deba/test_graph.h	(revision 571)
+++ src/work/deba/test_graph.h	(revision 595)
@@ -42,13 +42,15 @@
 	public:
 	
+		typedef MapBase<ListGraph, Node, NodeIt> NodeMapBase;
 		typedef MapRegistry<ListGraph, Node, NodeIt> NodeMapRegistry;
+		typedef VectorMapFactory<ListGraph, Node, NodeIt> NodeMapFactory;
 		NodeMapRegistry node_maps;
-		
-		
+
+
+
+		typedef MapBase<ListGraph, Edge, EdgeIt> EdgeMapBase;
 		typedef MapRegistry<ListGraph, Edge, EdgeIt> EdgeMapRegistry;
+		typedef VectorMapFactory<ListGraph, Edge, EdgeIt> EdgeMapFactory;
 		EdgeMapRegistry edge_maps;
-
-		typedef VectorMapFactory<ListGraph, Edge, EdgeIt> EdgeMapFactory;
-		typedef VectorMapFactory<ListGraph, Node, NodeIt> NodeMapFactory;
  
 
Index: src/work/deba/vector_map_factory.h
===================================================================
--- src/work/deba/vector_map_factory.h	(revision 571)
+++ src/work/deba/vector_map_factory.h	(revision 595)
@@ -3,5 +3,4 @@
 
 #include <vector>
-#include <iostream>
 
 #include "map_base.h"
@@ -20,30 +19,36 @@
 		
 		template <typename V> 
-		class VectorMap : public MapBase<G, K, KIt> {
+		class Map : public MapBase<G, K, KIt> {
 		public:
-			typedef V ValueType;
+			typedef V Value;
 	
-			VectorMap() {}
+			Map() {}
 			
-			VectorMap(Graph& g, MapRegistry<G, K, KIt>& r) 
-				: MapBase<G, K, KIt>(g, r) {}
+			Map(Graph& g, MapRegistry<G, K, KIt>& r) 
+				: MapBase<G, K, KIt>(g, r) {
+				init();
+			}
+				
+			virtual ~Map() {
+				destroy();
+			}
 	
 	
-			ValueType& operator[](const K& key) {
+			Value& operator[](const K& key) {
 				int id = graph->id(key);
 				return container[id];
 			} 
 		
-			const ValueType& operator[](const K& key) const {
+			const Value& operator[](const K& key) const {
 				int id = graph->id(key);
 				return container[id];
 			}
 	
-			const ValueType& get(const K& key) const {
+			const Value& get(const K& key) const {
 				int id = graph->id(key);
 				return container[id];
 			} 
 		
-			void set(const K& key, const ValueType& val) {
+			void set(const K& key, const Value& val) {
 				int id = graph->id(key);
 				container[id] = val;
@@ -52,5 +57,4 @@
 			void add(const K& key) {
 				int id = graph->id(key);
-				std::cerr << id << std::endl;
 				if (id >= container.size()) {
 					container.resize(id + 1);
@@ -61,5 +65,5 @@
 	
 		private:
-			typedef std::vector<ValueType> Container;
+			typedef std::vector<Value> Container;
 		
 			Container container;
