Index: src/lemon/bits/alteration_notifier.h
===================================================================
--- src/lemon/bits/alteration_notifier.h	(revision 1359)
+++ src/lemon/bits/alteration_notifier.h	(revision 1414)
@@ -30,6 +30,7 @@
   /// @{
 
-  /// Registry class to register objects observes alterations in the graph.
-
+  /// \brief Registry class to register objects observes alterations in 
+  /// the graph.
+  ///
   /// This class is a registry for the objects which observe the
   /// alterations in a container. The alteration observers can be attached
@@ -39,6 +40,5 @@
   ///
   /// The most important application of the alteration observing is the
-  /// dynamic map implementation when the observers are observing the
-  /// alterations in the graph.
+  /// dynamic map implementation.
   ///
   /// \param _Item The item type what the observers are observing, usually
@@ -75,6 +75,6 @@
       friend class AlterationNotifier;
 
-      /// Default constructor.
-
+      /// \brief Default constructor.
+      ///
       /// Default constructor for ObserverBase.
       /// 
@@ -83,6 +83,6 @@
       virtual ~ObserverBase() {}
 
-      /// Attaches the observer into an AlterationNotifier.
-
+      /// \brief Attaches the observer into an AlterationNotifier.
+      ///
       /// This member attaches the observer into an AlterationNotifier.
       ///
@@ -92,6 +92,6 @@
       }
 
-      /// Detaches the observer into an AlterationNotifier.
-
+      /// \brief Detaches the observer into an AlterationNotifier.
+      ///
       /// This member detaches the observer from an AlterationNotifier.
       ///
@@ -132,6 +132,18 @@
       /// subclasses.
 	
-      virtual void add(const Item&) = 0;	
-
+      virtual void add(const Item&) = 0;
+
+      /// \brief The member function to notificate the observer about 
+      /// simulitem is added to the container.
+      ///
+      /// The add() member function notificates the observer about an item
+      /// is added to the container. It have to be overrided in the
+      /// subclasses.
+
+      virtual void add(const std::vector<Item>& items) {
+	for (int i = 0; i < (int)items.size(); ++i) {
+	  add(items[i]);
+	}
+      }
 
       /// \brief The member function to notificate the observer about an
@@ -143,4 +155,10 @@
 	
       virtual void erase(const Item&) = 0;
+
+      virtual void erase(const std::vector<Item>& items) {
+	for (int i = 0; i < (int)items.size(); ++i) {
+	  add(items[i]);
+	}
+      }
 
       /// \brief The member function to notificate the observer about the
@@ -229,18 +247,35 @@
   public:
 	
-    /// Notifies all the registered observers about an Item added to the container.
-		
-    /// It notifies all the registered observers about an Item added to the container.
+    /// \brief Notifies all the registered observers about an Item added to 
+    /// the container.
+    ///
+    /// It notifies all the registered observers about an Item added to 
+    /// the container.
     /// 
-    void add(const Item& key) {
-      typename Container::iterator it;
-      for (it = container.begin(); it != container.end(); ++it) {
-	(*it)->add(key);
+    void add(const Item& item) {
+      typename Container::iterator it;
+      for (it = container.begin(); it != container.end(); ++it) {
+	(*it)->add(item);
       }
     }	
 
-    /// Notifies all the registered observers about an Item erased from the container.
-		
-    /// It notifies all the registered observers about an Item erased from the container.
+    /// \brief Notifies all the registered observers about more Item added to 
+    /// the container.
+    ///
+    /// It notifies all the registered observers about more Item added to 
+    /// the container.
+    /// 
+    void add(const std::vector<Item>& items) {
+      typename Container::iterator it;
+      for (it = container.begin(); it != container.end(); ++it) {
+	(*it)->add(items);
+      }
+    }	
+
+    /// \brief Notifies all the registered observers about an Item erased from 
+    /// the container.
+    ///	
+    /// It notifies all the registered observers about an Item erased from 
+    /// the container.
     /// 
     void erase(const Item& key) {
@@ -250,8 +285,22 @@
       }
     }
+
+    /// \brief Notifies all the registered observers about more Item erased  
+    /// from the container.
+    ///	
+    /// It notifies all the registered observers about more Item erased from 
+    /// the container.
+    /// 
+    void erase(const std::vector<Item>& items) {
+      typename Container::iterator it;
+      for (it = container.begin(); it != container.end(); ++it) {
+	(*it)->erase(items);
+      }
+    }
     
 
-    /// Notifies all the registered observers about the container is built.
-		
+    /// \brief Notifies all the registered observers about the container is 
+    /// built.
+    ///		
     /// Notifies all the registered observers about the container is built
     /// from an empty container.
@@ -264,6 +313,7 @@
 
 
-    /// Notifies all the registered observers about all Items are erased.
-
+    /// \brief Notifies all the registered observers about all Items are 
+    /// erased.
+    ///
     /// Notifies all the registered observers about all Items are erased
     /// from the container.
Index: src/lemon/bits/array_map.h
===================================================================
--- src/lemon/bits/array_map.h	(revision 1374)
+++ src/lemon/bits/array_map.h	(revision 1414)
@@ -1,4 +1,4 @@
 /* -*- C++ -*-
- * src/lemon/array_map.h - Part of LEMON, a generic C++ optimization library
+ * src/lemon/bits/array_map.h - Part of LEMON, a generic C++ optimization library
  *
  * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
@@ -32,12 +32,12 @@
   /// @{
 	
-  /** The ArrayMap template class is graph map structure what
-   *  automatically updates the map when a key is added to or erased from
-   *  the map. This map factory uses the allocators to implement 
-   *  the container functionality.
-   *
-   *  The template parameter is the AlterationNotifier that the maps
-   *  will belong to and the Value.
-   */
+  /// The ArrayMap template class is graph map structure what
+  /// automatically updates the map when a key is added to or erased from
+  /// the map. This map factory uses the allocators to implement 
+  /// the container functionality.
+  ///
+  /// The template parameter is the AlterationNotifier that the maps
+  /// will belong to and the Value.
+   
 
   template <typename _Graph, 
@@ -69,6 +69,6 @@
   public:
 
-    /** Graph and Registry initialized map constructor.
-     */
+    /// Graph and Registry initialized map constructor.
+     
     ArrayMap(const Graph& _g) : graph(&_g) {
       Item it;
@@ -95,6 +95,6 @@
     }
 
-    /** Constructor to copy a map of the same map type.
-     */
+    /// Constructor to copy a map of the same map type.
+     
     ArrayMap(const ArrayMap& copy) : Parent() {
       if (copy.attached()) {
@@ -115,6 +115,6 @@
     using Parent::attached;
 
-    /** Assign operator to copy a map of the same map type.
-     */
+    /// Assign operator to copy a map of the same map type.
+     
     ArrayMap& operator=(const ArrayMap& copy) {
       if (&copy == this) return *this;
@@ -142,6 +142,6 @@
     }
 
-    /** The destructor of the map.
-     */
+    /// The destructor of the map.
+     
     virtual ~ArrayMap() {      
       if (attached()) {
@@ -152,8 +152,7 @@
 	
 	
-    /**
-     * The subscript operator. The map can be subscripted by the
-     * actual keys of the graph. 
-     */
+    ///The subscript operator. The map can be subscripted by the
+    ///actual keys of the graph. 
+     
     Value& operator[](const Key& key) {
       int id = graph->id(key);
@@ -161,8 +160,8 @@
     } 
 		
-    /**
-     * The const subscript operator. The map can be subscripted by the
-     * actual keys of the graph. 
-     */
+
+    ///The const subscript operator. The map can be subscripted by the
+    ///actual keys of the graph. 
+     
     const Value& operator[](const Key& key) const {
       int id = graph->id(key);
@@ -170,13 +169,13 @@
     }
 	
-    /** Setter function of the map. Equivalent with map[key] = val.
-     *  This is a compatibility feature with the not dereferable maps.
-     */
+    /// Setter function of the map. Equivalent with map[key] = val.
+    /// This is a compatibility feature with the not dereferable maps.
+     
     void set(const Key& key, const Value& val) {
       (*this)[key] = val;
     }
 		
-    /** Add a new key to the map. It called by the map registry.
-     */
+    /// Add a new key to the map. It called by the map registry.
+     
     void add(const Key& key) {
       int id = graph->id(key);
@@ -201,10 +200,56 @@
       allocator.construct(&(values[id]), Value());
     }
-		
-    /** Erase a key from the map. It called by the map registry.
-     */
+
+    void add(const std::vector<Key>& keys) {
+      int max_id = -1;
+      for (int i = 0; i < (int)keys.size(); ++i) {
+	int id = graph->id(keys[i]);
+	if (id > max_id) {
+	  max_id = id;
+	}
+      }
+      if (max_id >= capacity) {
+	int new_capacity = (capacity == 0 ? 1 : capacity);
+	while (new_capacity <= max_id) {
+	  new_capacity <<= 1;
+	}
+	Value* new_values = allocator.allocate(new_capacity);
+	Item it;
+	for (graph->first(it); it != INVALID; graph->next(it)) {
+	  int id = graph->id(it);
+	  bool found = false;
+	  for (int i = 0; i < (int)keys.size(); ++i) {
+	    int jd = graph->id(keys[i]);
+	    if (id == jd) {
+	      found = true;
+	      break;
+	    }
+	  }
+	  if (found) continue;
+	  allocator.construct(&(new_values[id]), values[id]);
+	  allocator.destroy(&(values[id]));
+	}
+	if (capacity != 0) allocator.deallocate(values, capacity);
+	values = new_values;
+	capacity = new_capacity;
+      }
+      for (int i = 0; i < (int)keys.size(); ++i) {
+	int id = graph->id(keys[i]);
+	allocator.construct(&(values[id]), Value());
+      }
+    }
+		
+    /// Erase a key from the map. It called by the map registry.
+     
     void erase(const Key& key) {
       int id = graph->id(key);
       allocator.destroy(&(values[id]));
+    }
+
+    void erase(const std::vector<Key>& keys) {
+      for (int i = 0; i < (int)keys.size(); ++i) {
+	int id = graph->id(keys[i]);
+	allocator.destroy(&(values[id]));
+      }
     }
 
@@ -222,5 +267,5 @@
 	Item it;
 	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  int id = graph->id(it);;
+	  int id = graph->id(it);
 	  allocator.destroy(&(values[id]));
 	}								
@@ -233,57 +278,4 @@
       return graph;
     }
-
-//     /// The stl compatible pair iterator of the map.
-//     typedef MapIterator<ArrayMap> Iterator;
-//     /// The stl compatible const pair iterator of the map.
-//     typedef MapConstIterator<ArrayMap> ConstIterator;
-
-//     /** Returns the begin iterator of the map.
-//      */
-//     Iterator begin() {
-//       return Iterator(*this, KeyIt(*MapBase::getGraph()));
-//     }
-
-//     /** Returns the end iterator of the map.
-//      */
-//     Iterator end() {
-//       return Iterator(*this, INVALID);
-//     }
-
-//     /** Returns the begin ConstIterator of the map.
-//      */
-//     ConstIterator begin() const {
-//       return ConstIterator(*this, KeyIt(*MapBase::getGraph()));
-//     }
-
-//     /** Returns the end const_iterator of the map.
-//      */
-//     ConstIterator end() const {
-//       return ConstIterator(*this, INVALID);
-//     }
-
-//     /// The KeySet of the Map.
-//     typedef MapConstKeySet<ArrayMap> ConstKeySet;
-
-//     /// KeySet getter function.
-//     ConstKeySet keySet() const {
-//       return ConstKeySet(*this); 
-//     }
-
-//     /// The ConstValueSet of the Map.
-//     typedef MapConstValueSet<ArrayMap> ConstValueSet;
-
-//     /// ConstValueSet getter function.
-//     ConstValueSet valueSet() const {
-//       return ConstValueSet(*this);
-//     }
-
-//     /// The ValueSet of the Map.
-//     typedef MapValueSet<ArrayMap> ValueSet;
-
-//     /// ValueSet getter function.
-//     ValueSet valueSet() {
-//       return ValueSet(*this);
-//     }
 
   private:
Index: src/lemon/bits/erasable_graph_extender.h
===================================================================
--- src/lemon/bits/erasable_graph_extender.h	(revision 1307)
+++ src/lemon/bits/erasable_graph_extender.h	(revision 1414)
@@ -3,4 +3,6 @@
 #ifndef LEMON_ERASABLE_GRAPH_EXTENDER_H
 #define LEMON_ERASABLE_GRAPH_EXTENDER_H
+
+#include <vector>
 
 #include <lemon/invalid.h>
@@ -68,6 +70,8 @@
     
     void erase(const UndirEdge& uedge) {
-      Parent::getNotifier(Edge()).erase(Edge(uedge,true));
-      Parent::getNotifier(Edge()).erase(Edge(uedge,false));
+      std::vector<Edge> edges;
+      edges.push_back(Edge(uedge,true));
+      edges.push_back(Edge(uedge,false));
+      Parent::getNotifier(Edge()).erase(edges);
       Parent::getNotifier(UndirEdge()).erase(uedge);
       Parent::erase(uedge);
Index: src/lemon/bits/extendable_graph_extender.h
===================================================================
--- src/lemon/bits/extendable_graph_extender.h	(revision 1307)
+++ src/lemon/bits/extendable_graph_extender.h	(revision 1414)
@@ -51,8 +51,8 @@
       Parent::getNotifier(UndirEdge()).add(uedge);
 
-      Edge edge_forward(uedge, true);
-      Edge edge_backward(uedge, false);
-      Parent::getNotifier(Edge()).add(edge_forward);
-      Parent::getNotifier(Edge()).add(edge_backward);
+      std::vector<Edge> edges;
+      edges.push_back(Edge(uedge, true));
+      edges.push_back(Edge(uedge, false));
+      Parent::getNotifier(Edge()).add(edges);
 
       return uedge;
