Index: lemon/bits/alteration_notifier.h
===================================================================
--- lemon/bits/alteration_notifier.h	(revision 2553)
+++ 	(revision )
@@ -1,485 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_ALTERATION_NOTIFIER_H
-#define LEMON_BITS_ALTERATION_NOTIFIER_H
-
-#include <vector>
-#include <list>
-
-#include <lemon/bits/utility.h>
-
-///\ingroup graphbits
-///\file
-///\brief Observer notifier for graph alteration observers.
-
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Notifier class to notify observes about alterations in 
-  /// a container.
-  ///
-  /// The simple graph's can be refered as two containers, one node container
-  /// and one edge container. But they are not standard containers they
-  /// does not store values directly they are just key continars for more
-  /// value containers which are the node and edge maps.
-  ///
-  /// The graph's node and edge sets can be changed as we add or erase
-  /// nodes and edges in the graph. Lemon would like to handle easily
-  /// that the node and edge maps should contain values for all nodes or
-  /// edges. If we want to check on every indicing if the map contains
-  /// the current indicing key that cause a drawback in the performance
-  /// in the library. We use another solution we notify all maps about
-  /// an alteration in the graph, which cause only drawback on the
-  /// alteration of the graph.
-  ///
-  /// This class provides an interface to the container. The \e first() and \e 
-  /// next() member functions make possible to iterate on the keys of the
-  /// container. The \e id() function returns an integer id for each key.
-  /// The \e maxId() function gives back an upper bound of the ids.
-  ///
-  /// For the proper functonality of this class, we should notify it
-  /// about each alteration in the container. The alterations have four type
-  /// as \e add(), \e erase(), \e build() and \e clear(). The \e add() and
-  /// \e erase() signals that only one or few items added or erased to or
-  /// from the graph. If all items are erased from the graph or from an empty
-  /// graph a new graph is builded then it can be signaled with the
-  /// clear() and build() members. Important rule that if we erase items 
-  /// from graph we should first signal the alteration and after that erase
-  /// them from the container, on the other way on item addition we should
-  /// first extend the container and just after that signal the alteration.
-  ///
-  /// The alteration can be observed with a class inherited from the
-  /// \e ObserverBase nested class. The signals can be handled with
-  /// overriding the virtual functions defined in the base class.  The
-  /// observer base can be attached to the notifier with the 
-  /// \e attach() member and can be detached with detach() function. The
-  /// alteration handlers should not call any function which signals
-  /// an other alteration in the same notifier and should not
-  /// detach any observer from the notifier.
-  ///
-  /// Alteration observers try to be exception safe. If an \e add() or
-  /// a \e clear() function throws an exception then the remaining
-  /// observeres will not be notified and the fulfilled additions will
-  /// be rolled back by calling the \e erase() or \e clear()
-  /// functions. Thence the \e erase() and \e clear() should not throw
-  /// exception. Actullay, it can be throw only 
-  /// \ref AlterationObserver::ImmediateDetach ImmediateDetach
-  /// exception which detach the observer from the notifier.
-  ///
-  /// There are some place when the alteration observing is not completly
-  /// reliable. If we want to carry out the node degree in the graph
-  /// as in the \ref InDegMap and we use the reverseEdge that cause 
-  /// unreliable functionality. Because the alteration observing signals
-  /// only erasing and adding but not the reversing it will stores bad
-  /// degrees. The sub graph adaptors cannot signal the alterations because
-  /// just a setting in the filter map can modify the graph and this cannot
-  /// be watched in any way.
-  ///
-  /// \param _Container The container which is observed.
-  /// \param _Item The item type which is obserbved.
-  ///
-  /// \author Balazs Dezso
-
-  template <typename _Container, typename _Item>
-  class AlterationNotifier {
-  public:
-
-    typedef True Notifier;
-
-    typedef _Container Container;
-    typedef _Item Item;
-
-    /// \brief Exception which can be called from \e clear() and 
-    /// \e erase().
-    ///
-    /// From the \e clear() and \e erase() function only this
-    /// exception is allowed to throw. The exception immediatly
-    /// detaches the current observer from the notifier. Because the
-    /// \e clear() and \e erase() should not throw other exceptions
-    /// it can be used to invalidate the observer.
-    struct ImmediateDetach {};
-
-    /// \brief ObserverBase is the base class for the observers.
-    ///
-    /// ObserverBase is the abstract base class for the observers.
-    /// It will be notified about an item was inserted into or
-    /// erased from the graph.
-    ///
-    /// The observer interface contains some pure virtual functions
-    /// to override. The add() and erase() functions are
-    /// to notify the oberver when one item is added or
-    /// erased.
-    ///
-    /// The build() and clear() members are to notify the observer
-    /// about the container is built from an empty container or
-    /// is cleared to an empty container. 
-    /// 
-    /// \author Balazs Dezso
-
-    class ObserverBase {
-    protected:
-      typedef AlterationNotifier Notifier;
-
-      friend class AlterationNotifier;
-
-      /// \brief Default constructor.
-      ///
-      /// Default constructor for ObserverBase.
-      /// 
-      ObserverBase() : _notifier(0) {}
-
-      /// \brief Constructor which attach the observer into notifier.
-      ///
-      /// Constructor which attach the observer into notifier.
-      ObserverBase(AlterationNotifier& nf) {
-        attach(nf);
-      }
-
-      /// \brief Constructor which attach the obserever to the same notifier.
-      ///
-      /// Constructor which attach the obserever to the same notifier as
-      /// the other observer is attached to. 
-      ObserverBase(const ObserverBase& copy) {
-	if (copy.attached()) {
-          attach(*copy.notifier());
-	}
-      }
-	
-      /// \brief Destructor
-      virtual ~ObserverBase() {
-        if (attached()) {
-          detach();
-        }
-      }
-
-      /// \brief Attaches the observer into an AlterationNotifier.
-      ///
-      /// This member attaches the observer into an AlterationNotifier.
-      ///
-      void attach(AlterationNotifier& nf) {
-	nf.attach(*this);
-      }
-      
-      /// \brief Detaches the observer into an AlterationNotifier.
-      ///
-      /// This member detaches the observer from an AlterationNotifier.
-      ///
-      void detach() {
-        _notifier->detach(*this);
-      }
-      
-      /// \brief Gives back a pointer to the notifier which the map 
-      /// attached into.
-      ///
-      /// This function gives back a pointer to the notifier which the map
-      /// attached into.
-      ///
-      Notifier* notifier() const { return const_cast<Notifier*>(_notifier); }
-      
-      /// Gives back true when the observer is attached into a notifier.
-      bool attached() const { return _notifier != 0; }
-
-    private:
-
-      ObserverBase& operator=(const ObserverBase& copy);
-
-    protected:
-      
-      Notifier* _notifier;
-      typename std::list<ObserverBase*>::iterator _index;
-
-      /// \brief The member function to notificate the observer about an
-      /// item 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 Item&) = 0;
-
-      /// \brief The member function to notificate the observer about 
-      /// more item is added to the container.
-      ///
-      /// The add() member function notificates the observer about more item
-      /// is added to the container. It have to be overrided in the
-      /// subclasses.
-      virtual void add(const std::vector<Item>& items) = 0;
-
-      /// \brief The member function to notificate the observer about an
-      /// item is erased from the container.
-      ///
-      /// The erase() member function notificates the observer about an
-      /// item is erased from the container. It have to be overrided in
-      /// the subclasses.	
-      virtual void erase(const Item&) = 0;
-
-      /// \brief The member function to notificate the observer about 
-      /// more item is erased from the container.
-      ///
-      /// The erase() member function notificates the observer about more item
-      /// is erased from the container. It have to be overrided in the
-      /// subclasses.
-      virtual void erase(const std::vector<Item>& items) = 0;
-
-      /// \brief The member function to notificate the observer about the
-      /// container is built.
-      ///
-      /// The build() member function notificates the observer about the
-      /// container is built from an empty container. It have to be
-      /// overrided in the subclasses.
-
-      virtual void build() = 0;
-
-      /// \brief The member function to notificate the observer about all
-      /// items are erased from the container.
-      ///
-      /// The clear() member function notificates the observer about all
-      /// items are erased from the container. It have to be overrided in
-      /// the subclasses.      
-      virtual void clear() = 0;
-
-    };
-	
-  protected:
-
-    const Container* container;
-
-    typedef std::list<ObserverBase*> Observers; 
-    Observers _observers;
-
-		
-  public:
-
-    /// \brief Default constructor.
-    ///
-    /// The default constructor of the AlterationNotifier. 
-    /// It creates an empty notifier.
-    AlterationNotifier() 
-      : container(0) {}
-
-    /// \brief Constructor.
-    ///
-    /// Constructor with the observed container parameter.
-    AlterationNotifier(const Container& _container) 
-      : container(&_container) {}
-
-    /// \brief Copy Constructor of the AlterationNotifier. 
-    ///
-    /// Copy constructor of the AlterationNotifier. 
-    /// It creates only an empty notifier because the copiable
-    /// notifier's observers have to be registered still into that notifier.
-    AlterationNotifier(const AlterationNotifier& _notifier) 
-      : container(_notifier.container) {}
-
-    /// \brief Destructor.
-    ///		
-    /// Destructor of the AlterationNotifier.
-    ///
-    ~AlterationNotifier() {
-      typename Observers::iterator it;
-      for (it = _observers.begin(); it != _observers.end(); ++it) {
-	(*it)->_notifier = 0;
-      }
-    }
-
-    /// \brief Sets the container.
-    ///
-    /// Sets the container.
-    void setContainer(const Container& _container) {
-      container = &_container;
-    }
-
-  protected:
-
-    AlterationNotifier& operator=(const AlterationNotifier&);
-
-  public:
-
-
-
-    /// \brief First item in the container.
-    ///
-    /// Returns the first item in the container. It is
-    /// for start the iteration on the container.
-    void first(Item& item) const {
-      container->first(item);
-    }
-
-    /// \brief Next item in the container.
-    ///
-    /// Returns the next item in the container. It is
-    /// for iterate on the container.
-    void next(Item& item) const {
-      container->next(item);
-    }
-
-    /// \brief Returns the id of the item.
-    ///
-    /// Returns the id of the item provided by the container.
-    int id(const Item& item) const {
-      return container->id(item);
-    }
-
-    /// \brief Returns the maximum id of the container.
-    ///
-    /// Returns the maximum id of the container.
-    int maxId() const {
-      return container->maxId(Item());
-    }
-		
-  protected:
-
-    void attach(ObserverBase& observer) {
-      observer._index = _observers.insert(_observers.begin(), &observer);
-      observer._notifier = this;
-    } 
-
-    void detach(ObserverBase& observer) {
-      _observers.erase(observer._index);
-      observer._index = _observers.end();
-      observer._notifier = 0;
-    }
-
-  public:
-	
-    /// \brief Notifies all the registed observers about an item added to 
-    /// the container.
-    ///
-    /// It notifies all the registed observers about an item added to 
-    /// the container.
-    /// 
-    void add(const Item& item) {
-      typename Observers::reverse_iterator it;
-      try {
-        for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
-          (*it)->add(item);
-        }
-      } catch (...) {
-        typename Observers::iterator jt;
-        for (jt = it.base(); jt != _observers.end(); ++jt) {
-          (*jt)->erase(item);
-        }
-        throw;
-      }
-    }	
-
-    /// \brief Notifies all the registed observers about more item added to 
-    /// the container.
-    ///
-    /// It notifies all the registed observers about more item added to 
-    /// the container.
-    /// 
-    void add(const std::vector<Item>& items) {
-      typename Observers::reverse_iterator it;
-      try {
-        for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
-          (*it)->add(items);
-        }
-      } catch (...) {
-        typename Observers::iterator jt;
-        for (jt = it.base(); jt != _observers.end(); ++jt) {
-          (*jt)->erase(items);
-        }
-        throw;
-      }
-    }	
-
-    /// \brief Notifies all the registed observers about an item erased from 
-    /// the container.
-    ///	
-    /// It notifies all the registed observers about an item erased from 
-    /// the container.
-    /// 
-    void erase(const Item& item) throw() {
-      typename Observers::iterator it = _observers.begin();
-      while (it != _observers.end()) {
-        try {
-          (*it)->erase(item);
-          ++it;
-        } catch (const ImmediateDetach&) {
-          it = _observers.erase(it);
-          (*it)->_index = _observers.end();
-          (*it)->_notifier = 0;
-        }
-      }
-    }
-
-    /// \brief Notifies all the registed observers about more item erased  
-    /// from the container.
-    ///	
-    /// It notifies all the registed observers about more item erased from 
-    /// the container.
-    /// 
-    void erase(const std::vector<Item>& items) {
-      typename Observers::iterator it = _observers.begin();
-      while (it != _observers.end()) {
-        try {
-          (*it)->erase(items);
-          ++it;
-        } catch (const ImmediateDetach&) {
-          it = _observers.erase(it);
-          (*it)->_index = _observers.end();
-          (*it)->_notifier = 0;
-        }
-      }
-    }
-
-    /// \brief Notifies all the registed observers about the container is 
-    /// built.
-    ///		
-    /// Notifies all the registed observers about the container is built
-    /// from an empty container.
-    void build() {
-      typename Observers::reverse_iterator it;
-      try {
-        for (it = _observers.rbegin(); it != _observers.rend(); ++it) {
-          (*it)->build();
-        }
-      } catch (...) {
-        typename Observers::iterator jt;
-        for (jt = it.base(); jt != _observers.end(); ++jt) {
-          (*jt)->clear();
-        }
-        throw;
-      }
-    }
-
-    /// \brief Notifies all the registed observers about all items are 
-    /// erased.
-    ///
-    /// Notifies all the registed observers about all items are erased
-    /// from the container.
-    void clear() {
-      typename Observers::iterator it = _observers.begin();
-      while (it != _observers.end()) {
-        try {
-          (*it)->clear();
-          ++it;
-        } catch (const ImmediateDetach&) {
-          it = _observers.erase(it);
-          (*it)->_index = _observers.end();
-          (*it)->_notifier = 0;
-        }
-      }
-    }
-  };
-
-}
-
-#endif
Index: lemon/bits/array_map.h
===================================================================
--- lemon/bits/array_map.h	(revision 2553)
+++ 	(revision )
@@ -1,346 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_ARRAY_MAP_H
-#define LEMON_BITS_ARRAY_MAP_H
-
-#include <memory>
-
-#include <lemon/bits/traits.h>
-#include <lemon/bits/alteration_notifier.h>
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-/// \ingroup graphbits
-/// \file
-/// \brief Graph map based on the array storage.
-
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Graph map based on the array storage.
-  ///
-  /// 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 uses the allocators to implement 
-  /// the container functionality.
-  ///
-  /// The template parameters are the Graph the current Item type and
-  /// the Value type of the map.
-  template <typename _Graph, typename _Item, typename _Value>
-  class ArrayMap 
-    : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
-  public:
-    /// The graph type of the maps. 
-    typedef _Graph Graph;
-    /// The item type of the map.
-    typedef _Item Item;
-    /// The reference map tag.
-    typedef True ReferenceMapTag;
-
-    /// The key type of the maps.
-    typedef _Item Key;
-    /// The value type of the map.
-    typedef _Value Value;
-
-    /// The const reference type of the map.
-    typedef const _Value& ConstReference;
-    /// The reference type of the map.
-    typedef _Value& Reference;
-
-    /// The notifier type.
-    typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier;
-
-    /// The MapBase of the Map which imlements the core regisitry function.
-    typedef typename Notifier::ObserverBase Parent;
-		
-  private:
-    typedef std::allocator<Value> Allocator;
-
-  public:
-
-    /// \brief Graph initialized map constructor.
-    ///
-    /// Graph initialized map constructor.
-    explicit ArrayMap(const Graph& graph) {
-      Parent::attach(graph.notifier(Item()));
-      allocate_memory();
-      Notifier* nf = Parent::notifier();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-	int id = nf->id(it);;
-	allocator.construct(&(values[id]), Value());
-      }								
-    }
-
-    /// \brief Constructor to use default value to initialize the map. 
-    ///
-    /// It constructs a map and initialize all of the the map. 
-    ArrayMap(const Graph& graph, const Value& value) {
-      Parent::attach(graph.notifier(Item()));
-      allocate_memory();
-      Notifier* nf = Parent::notifier();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-	int id = nf->id(it);;
-	allocator.construct(&(values[id]), value);
-      }								
-    }
-
-    /// \brief 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()) {
-	attach(*copy.notifier());
-      }
-      capacity = copy.capacity;
-      if (capacity == 0) return;
-      values = allocator.allocate(capacity);
-      Notifier* nf = Parent::notifier();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-	int id = nf->id(it);;
-	allocator.construct(&(values[id]), copy.values[id]);
-      }
-    }
-
-    /// \brief Assign operator.
-    ///
-    /// This operator assigns for each item in the map the
-    /// value mapped to the same item in the copied map.  
-    /// The parameter map should be indiced with the same
-    /// itemset because this assign operator does not change
-    /// the container of the map. 
-    ArrayMap& operator=(const ArrayMap& cmap) {
-      return operator=<ArrayMap>(cmap);
-    }
-
-
-    /// \brief Template assign operator.
-    ///
-    /// The given parameter should be conform to the ReadMap
-    /// concecpt and could be indiced by the current item set of
-    /// the NodeMap. In this case the value for each item
-    /// is assigned by the value of the given ReadMap. 
-    template <typename CMap>
-    ArrayMap& operator=(const CMap& cmap) {
-      checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
-      const typename Parent::Notifier* nf = Parent::notifier();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-        set(it, cmap[it]);
-      }
-      return *this;
-    }
-
-    /// \brief The destructor of the map.
-    ///     
-    /// The destructor of the map.
-    virtual ~ArrayMap() {      
-      if (attached()) {
-	clear();
-	detach();
-      }
-    }
-		
-  protected:
-
-    using Parent::attach;
-    using Parent::detach;
-    using Parent::attached;
-
-  public:
-
-    /// \brief The subscript operator. 
-    ///
-    /// The subscript operator. The map can be subscripted by the
-    /// actual keys of the graph. 
-    Value& operator[](const Key& key) {
-      int id = Parent::notifier()->id(key);
-      return values[id];
-    } 
-		
-    /// \brief The const subscript operator.
-    ///
-    /// 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 = Parent::notifier()->id(key);
-      return values[id];
-    }
-
-    /// \brief Setter function of the map.
-    ///	
-    /// 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;
-    }
-
-  protected:
-
-    /// \brief Adds a new key to the map.
-    ///		
-    /// It adds a new key to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const Key& key) {
-      Notifier* nf = Parent::notifier();
-      int id = nf->id(key);
-      if (id >= capacity) {
-	int new_capacity = (capacity == 0 ? 1 : capacity);
-	while (new_capacity <= id) {
-	  new_capacity <<= 1;
-	}
-	Value* new_values = allocator.allocate(new_capacity);
-	Item it;
-	for (nf->first(it); it != INVALID; nf->next(it)) {
-	  int jd = nf->id(it);;
-	  if (id != jd) {
-	    allocator.construct(&(new_values[jd]), values[jd]);
-	    allocator.destroy(&(values[jd]));
-	  }
-	}
-	if (capacity != 0) allocator.deallocate(values, capacity);
-	values = new_values;
-	capacity = new_capacity;
-      }
-      allocator.construct(&(values[id]), Value());
-    }
-
-    /// \brief Adds more new keys to the map.
-    ///		
-    /// It adds more new keys to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const std::vector<Key>& keys) {
-      Notifier* nf = Parent::notifier();
-      int max_id = -1;
-      for (int i = 0; i < int(keys.size()); ++i) {
-	int id = nf->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 (nf->first(it); it != INVALID; nf->next(it)) {
-	  int id = nf->id(it);
-	  bool found = false;
-	  for (int i = 0; i < int(keys.size()); ++i) {
-	    int jd = nf->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 = nf->id(keys[i]);
-	allocator.construct(&(values[id]), Value());
-      }
-    }
-		
-    /// \brief Erase a key from the map.
-    ///
-    /// Erase a key from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const Key& key) {
-      int id = Parent::notifier()->id(key);
-      allocator.destroy(&(values[id]));
-    }
-
-    /// \brief Erase more keys from the map.
-    ///
-    /// Erase more keys from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const std::vector<Key>& keys) {
-      for (int i = 0; i < int(keys.size()); ++i) {
-	int id = Parent::notifier()->id(keys[i]);
-	allocator.destroy(&(values[id]));
-      }
-    }
-
-    /// \brief Buildes the map.
-    ///	
-    /// It buildes the map. It called by the observer notifier
-    /// and it overrides the build() member function of the observer base. 
-    virtual void build() {
-      Notifier* nf = Parent::notifier();
-      allocate_memory();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-	int id = nf->id(it);;
-	allocator.construct(&(values[id]), Value());
-      }								
-    }
-
-    /// \brief Clear the map.
-    ///
-    /// It erase all items from the map. It called by the observer notifier
-    /// and it overrides the clear() member function of the observer base.     
-    virtual void clear() {	
-      Notifier* nf = Parent::notifier();
-      if (capacity != 0) {
-	Item it;
-	for (nf->first(it); it != INVALID; nf->next(it)) {
-	  int id = nf->id(it);
-	  allocator.destroy(&(values[id]));
-	}								
-	allocator.deallocate(values, capacity);
-	capacity = 0;
-      }
-    }
-
-  private:
-      
-    void allocate_memory() {
-      int max_id = Parent::notifier()->maxId();
-      if (max_id == -1) {
-	capacity = 0;
-	values = 0;
-	return;
-      }
-      capacity = 1;
-      while (capacity <= max_id) {
-	capacity <<= 1;
-      }
-      values = allocator.allocate(capacity);	
-    }      
-
-    int capacity;
-    Value* values;
-    Allocator allocator;
-
-  };		
-
-}
-
-#endif 
Index: lemon/bits/base_extender.h
===================================================================
--- lemon/bits/base_extender.h	(revision 2553)
+++ 	(revision )
@@ -1,495 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_BASE_EXTENDER_H
-#define LEMON_BITS_BASE_EXTENDER_H
-
-#include <lemon/bits/invalid.h>
-#include <lemon/error.h>
-
-#include <lemon/bits/map_extender.h>
-#include <lemon/bits/default_map.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-///\ingroup graphbits
-///\file
-///\brief Extenders for the graph types
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief BaseGraph to BaseUGraph extender
-  template <typename Base>
-  class UndirGraphExtender : public Base {
-
-  public:
-
-    typedef Base Parent;
-    typedef typename Parent::Edge UEdge;
-    typedef typename Parent::Node Node;
-
-    typedef True UndirectedTag;
-
-    class Edge : public UEdge {
-      friend class UndirGraphExtender;
-
-    protected:
-      bool forward;
-
-      Edge(const UEdge &ue, bool _forward) :
-        UEdge(ue), forward(_forward) {}
-
-    public:
-      Edge() {}
-
-      /// Invalid edge constructor
-      Edge(Invalid i) : UEdge(i), forward(true) {}
-
-      bool operator==(const Edge &that) const {
-	return forward==that.forward && UEdge(*this)==UEdge(that);
-      }
-      bool operator!=(const Edge &that) const {
-	return forward!=that.forward || UEdge(*this)!=UEdge(that);
-      }
-      bool operator<(const Edge &that) const {
-	return forward<that.forward ||
-	  (!(that.forward<forward) && UEdge(*this)<UEdge(that));
-      }
-    };
-
-
-
-    using Parent::source;
-
-    /// Source of the given Edge.
-    Node source(const Edge &e) const {
-      return e.forward ? Parent::source(e) : Parent::target(e);
-    }
-
-    using Parent::target;
-
-    /// Target of the given Edge.
-    Node target(const Edge &e) const {
-      return e.forward ? Parent::target(e) : Parent::source(e);
-    }
-
-    /// \brief Directed edge from an undirected edge.
-    ///
-    /// Returns a directed edge corresponding to the specified UEdge.
-    /// If the given bool is true the given undirected edge and the
-    /// returned edge have the same source node.
-    static Edge direct(const UEdge &ue, bool d) {
-      return Edge(ue, d);
-    }
-
-    /// Returns whether the given directed edge is same orientation as the
-    /// corresponding undirected edge.
-    ///
-    /// \todo reference to the corresponding point of the undirected graph
-    /// concept. "What does the direction of an undirected edge mean?"
-    static bool direction(const Edge &e) { return e.forward; }
-
-
-    using Parent::first;
-    using Parent::next;
-
-    void first(Edge &e) const {
-      Parent::first(e);
-      e.forward=true;
-    }
-
-    void next(Edge &e) const {
-      if( e.forward ) {
-	e.forward = false;
-      }
-      else {
-	Parent::next(e);
-	e.forward = true;
-      }
-    }
-
-    void firstOut(Edge &e, const Node &n) const {
-      Parent::firstIn(e,n);
-      if( UEdge(e) != INVALID ) {
-	e.forward = false;
-      }
-      else {
-	Parent::firstOut(e,n);
-	e.forward = true;
-      }
-    }
-    void nextOut(Edge &e) const {
-      if( ! e.forward ) {
-	Node n = Parent::target(e);
-	Parent::nextIn(e);
-	if( UEdge(e) == INVALID ) {
-	  Parent::firstOut(e, n);
-	  e.forward = true;
-	}
-      }
-      else {
-	Parent::nextOut(e);
-      }
-    }
-
-    void firstIn(Edge &e, const Node &n) const {
-      Parent::firstOut(e,n);
-      if( UEdge(e) != INVALID ) {
-	e.forward = false;
-      }
-      else {
-	Parent::firstIn(e,n);
-	e.forward = true;
-      }
-    }
-    void nextIn(Edge &e) const {
-      if( ! e.forward ) {
-	Node n = Parent::source(e);
-	Parent::nextOut(e);
-	if( UEdge(e) == INVALID ) {
-	  Parent::firstIn(e, n);
-	  e.forward = true;
-	}
-      }
-      else {
-	Parent::nextIn(e);
-      }
-    }
-
-    void firstInc(UEdge &e, bool &d, const Node &n) const {
-      d = true;
-      Parent::firstOut(e, n);
-      if (e != INVALID) return;
-      d = false;
-      Parent::firstIn(e, n);
-    }
-
-    void nextInc(UEdge &e, bool &d) const {
-      if (d) {
-	Node s = Parent::source(e);
-	Parent::nextOut(e);
-	if (e != INVALID) return;
-	d = false;
-	Parent::firstIn(e, s);
-      } else {
-	Parent::nextIn(e);
-      }
-    }
-
-    Node nodeFromId(int ix) const {
-      return Parent::nodeFromId(ix);
-    }
-
-    Edge edgeFromId(int ix) const {
-      return direct(Parent::edgeFromId(ix >> 1), bool(ix & 1));
-    }
-
-    UEdge uEdgeFromId(int ix) const {
-      return Parent::edgeFromId(ix);
-    }
-
-    int id(const Node &n) const {
-      return Parent::id(n);
-    }
-
-    int id(const UEdge &e) const {
-      return Parent::id(e);
-    }
-
-    int id(const Edge &e) const {
-      return 2 * Parent::id(e) + int(e.forward);
-    }
-
-    int maxNodeId() const {
-      return Parent::maxNodeId();
-    }
-
-    int maxEdgeId() const {
-      return 2 * Parent::maxEdgeId() + 1;
-    }
-
-    int maxUEdgeId() const {
-      return Parent::maxEdgeId();
-    }
-
-
-    int edgeNum() const {
-      return 2 * Parent::edgeNum();
-    }
-
-    int uEdgeNum() const {
-      return Parent::edgeNum();
-    }
-
-    Edge findEdge(Node s, Node t, Edge p = INVALID) const {
-      if (p == INVALID) {
-	UEdge edge = Parent::findEdge(s, t);
-	if (edge != INVALID) return direct(edge, true);
-	edge = Parent::findEdge(t, s);
-	if (edge != INVALID) return direct(edge, false);
-      } else if (direction(p)) {
-	UEdge edge = Parent::findEdge(s, t, p);
-	if (edge != INVALID) return direct(edge, true);
-	edge = Parent::findEdge(t, s);
-	if (edge != INVALID) return direct(edge, false);	
-      } else {
-	UEdge edge = Parent::findEdge(t, s, p);
-	if (edge != INVALID) return direct(edge, false);	      
-      }
-      return INVALID;
-    }
-
-    UEdge findUEdge(Node s, Node t, UEdge p = INVALID) const {
-      if (s != t) {
-        if (p == INVALID) {
-          UEdge edge = Parent::findEdge(s, t);
-          if (edge != INVALID) return edge;
-          edge = Parent::findEdge(t, s);
-          if (edge != INVALID) return edge;
-        } else if (Parent::s(p) == s) {
-          UEdge edge = Parent::findEdge(s, t, p);
-          if (edge != INVALID) return edge;
-          edge = Parent::findEdge(t, s);
-          if (edge != INVALID) return edge;	
-        } else {
-          UEdge edge = Parent::findEdge(t, s, p);
-          if (edge != INVALID) return edge;	      
-        }
-      } else {
-        return Parent::findEdge(s, t, p);
-      }
-      return INVALID;
-    }
-  };
-
-  template <typename Base>
-  class BidirBpUGraphExtender : public Base {
-  public:
-    typedef Base Parent;
-    typedef BidirBpUGraphExtender Graph;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::UEdge UEdge;
-
-
-    using Parent::first;
-    using Parent::next;
-
-    using Parent::id;
-
-    class ANode : public Node {
-      friend class BidirBpUGraphExtender;
-    public:
-      ANode() {}
-      ANode(const Node& node) : Node(node) {
-	LEMON_ASSERT(Parent::aNode(node) || node == INVALID, 
-		     typename Parent::NodeSetError());
-      }
-      ANode& operator=(const Node& node) {
-	LEMON_ASSERT(Parent::aNode(node) || node == INVALID, 
-		     typename Parent::NodeSetError());
-        Node::operator=(node);
-        return *this;
-      }
-      ANode(Invalid) : Node(INVALID) {}
-      ANode& operator=(Invalid) {
-        Node::operator=(INVALID);
-        return *this;
-      }
-    };
-
-    void first(ANode& node) const {
-      Parent::firstANode(static_cast<Node&>(node));
-    }
-    void next(ANode& node) const {
-      Parent::nextANode(static_cast<Node&>(node));
-    }
-
-    int id(const ANode& node) const {
-      return Parent::aNodeId(node);
-    }
-
-    class BNode : public Node {
-      friend class BidirBpUGraphExtender;
-    public:
-      BNode() {}
-      BNode(const Node& node) : Node(node) {
-	LEMON_ASSERT(Parent::bNode(node) || node == INVALID,
-		     typename Parent::NodeSetError());
-      }
-      BNode& operator=(const Node& node) {
-	LEMON_ASSERT(Parent::bNode(node) || node == INVALID, 
-		     typename Parent::NodeSetError());
-        Node::operator=(node);
-        return *this;
-      }
-      BNode(Invalid) : Node(INVALID) {}
-      BNode& operator=(Invalid) {
-        Node::operator=(INVALID);
-        return *this;
-      }
-    };
-
-    void first(BNode& node) const {
-      Parent::firstBNode(static_cast<Node&>(node));
-    }
-    void next(BNode& node) const {
-      Parent::nextBNode(static_cast<Node&>(node));
-    }
-  
-    int id(const BNode& node) const {
-      return Parent::aNodeId(node);
-    }
-
-    Node source(const UEdge& edge) const {
-      return aNode(edge);
-    }
-    Node target(const UEdge& edge) const {
-      return bNode(edge);
-    }
-
-    void firstInc(UEdge& edge, bool& dir, const Node& node) const {
-      if (Parent::aNode(node)) {
-	Parent::firstFromANode(edge, node);
-	dir = true;
-      } else {
-	Parent::firstFromBNode(edge, node);
-	dir = static_cast<UEdge&>(edge) == INVALID;
-      }
-    }
-    void nextInc(UEdge& edge, bool& dir) const {
-      if (dir) {
-	Parent::nextFromANode(edge);
-      } else {
-	Parent::nextFromBNode(edge);
-	if (edge == INVALID) dir = true;
-      }
-    }
-
-    class Edge : public UEdge {
-      friend class BidirBpUGraphExtender;
-    protected:
-      bool forward;
-
-      Edge(const UEdge& edge, bool _forward)
-	: UEdge(edge), forward(_forward) {}
-
-    public:
-      Edge() {}
-      Edge (Invalid) : UEdge(INVALID), forward(true) {}
-      bool operator==(const Edge& i) const {
-	return UEdge::operator==(i) && forward == i.forward;
-      }
-      bool operator!=(const Edge& i) const {
-	return UEdge::operator!=(i) || forward != i.forward;
-      }
-      bool operator<(const Edge& i) const {
-	return UEdge::operator<(i) || 
-	  (!(i.forward<forward) && UEdge(*this)<UEdge(i));
-      }
-    };
-
-    void first(Edge& edge) const {
-      Parent::first(static_cast<UEdge&>(edge));
-      edge.forward = true;
-    }
-
-    void next(Edge& edge) const {
-      if (!edge.forward) {
-	Parent::next(static_cast<UEdge&>(edge));
-      }
-      edge.forward = !edge.forward;
-    }
-
-    void firstOut(Edge& edge, const Node& node) const {
-      if (Parent::aNode(node)) {
-	Parent::firstFromANode(edge, node);
-	edge.forward = true;
-      } else {
-	Parent::firstFromBNode(edge, node);
-	edge.forward = static_cast<UEdge&>(edge) == INVALID;
-      }
-    }
-    void nextOut(Edge& edge) const {
-      if (edge.forward) {
-	Parent::nextFromANode(edge);
-      } else {
-	Parent::nextFromBNode(edge);
-        edge.forward = static_cast<UEdge&>(edge) == INVALID;
-      }
-    }
-
-    void firstIn(Edge& edge, const Node& node) const {
-      if (Parent::bNode(node)) {
-	Parent::firstFromBNode(edge, node);
-	edge.forward = true;	
-      } else {
-	Parent::firstFromANode(edge, node);
-	edge.forward = static_cast<UEdge&>(edge) == INVALID;
-      }
-    }
-    void nextIn(Edge& edge) const {
-      if (edge.forward) {
-	Parent::nextFromBNode(edge);
-      } else {
-	Parent::nextFromANode(edge);
-	edge.forward = static_cast<UEdge&>(edge) == INVALID;
-      }
-    }
-
-    Node source(const Edge& edge) const {
-      return edge.forward ? Parent::aNode(edge) : Parent::bNode(edge);
-    }
-    Node target(const Edge& edge) const {
-      return edge.forward ? Parent::bNode(edge) : Parent::aNode(edge);
-    }
-
-    int id(const Edge& edge) const {
-      return (Parent::id(static_cast<const UEdge&>(edge)) << 1) + 
-        (edge.forward ? 0 : 1);
-    }
-    Edge edgeFromId(int ix) const {
-      return Edge(Parent::fromUEdgeId(ix >> 1), (ix & 1) == 0);
-    }
-    int maxEdgeId() const {
-      return (Parent::maxUEdgeId() << 1) + 1;
-    }
-
-    bool direction(const Edge& edge) const {
-      return edge.forward;
-    }
-
-    Edge direct(const UEdge& edge, bool dir) const {
-      return Edge(edge, dir);
-    }
-
-    int edgeNum() const {
-      return 2 * Parent::uEdgeNum();
-    }
-
-    int uEdgeNum() const {
-      return Parent::uEdgeNum();
-    }
-
-
-  };
-}
-
-#endif
Index: lemon/bits/bezier.h
===================================================================
--- lemon/bits/bezier.h	(revision 2618)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BEZIER_H
-#define LEMON_BEZIER_H
-
-///\ingroup misc
-///\file
-///\brief Classes to compute with Bezier curves.
-///
-///Up to now this file is used internally by \ref graph_to_eps.h
-///
-///\author Alpar Juttner
-
-#include<lemon/dim2.h>
-
-namespace lemon {
-  namespace dim2 {
-
-class BezierBase {
-public:
-  typedef lemon::dim2::Point<double> Point;
-protected:
-  static Point conv(Point x,Point y,double t) {return (1-t)*x+t*y;}
-};
-
-class Bezier1 : public BezierBase
-{
-public:
-  Point p1,p2;
-
-  Bezier1() {}
-  Bezier1(Point _p1, Point _p2) :p1(_p1), p2(_p2) {}
-  
-  Point operator()(double t) const
-  {
-    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
-    return conv(p1,p2,t);
-  }
-  Bezier1 before(double t) const
-  {
-    return Bezier1(p1,conv(p1,p2,t));
-  }
-  
-  Bezier1 after(double t) const
-  {
-    return Bezier1(conv(p1,p2,t),p2);
-  }
-
-  Bezier1 revert() const { return Bezier1(p2,p1);}
-  Bezier1 operator()(double a,double b) const { return before(b).after(a/b); }
-  Point grad() const { return p2-p1; }
-  Point norm() const { return rot90(p2-p1); }
-  Point grad(double) const { return grad(); }
-  Point norm(double t) const { return rot90(grad(t)); }
-};
-
-class Bezier2 : public BezierBase
-{
-public:
-  Point p1,p2,p3;
-
-  Bezier2() {}
-  Bezier2(Point _p1, Point _p2, Point _p3) :p1(_p1), p2(_p2), p3(_p3) {}
-  Bezier2(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,.5)), p3(b.p2) {}
-  Point operator()(double t) const
-  {
-    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
-    return ((1-t)*(1-t))*p1+(2*(1-t)*t)*p2+(t*t)*p3;
-  }
-  Bezier2 before(double t) const
-  {
-    Point q(conv(p1,p2,t));
-    Point r(conv(p2,p3,t));
-    return Bezier2(p1,q,conv(q,r,t));
-  }
-  
-  Bezier2 after(double t) const
-  {
-    Point q(conv(p1,p2,t));
-    Point r(conv(p2,p3,t));
-    return Bezier2(conv(q,r,t),r,p3);
-  }
-  Bezier2 revert() const { return Bezier2(p3,p2,p1);}
-  Bezier2 operator()(double a,double b) const { return before(b).after(a/b); }
-  Bezier1 grad() const { return Bezier1(2.0*(p2-p1),2.0*(p3-p2)); }
-  Bezier1 norm() const { return Bezier1(2.0*rot90(p2-p1),2.0*rot90(p3-p2)); }
-  Point grad(double t) const { return grad()(t); }
-  Point norm(double t) const { return rot90(grad(t)); }
-};
-
-class Bezier3 : public BezierBase
-{
-public:
-  Point p1,p2,p3,p4;
-
-  Bezier3() {}
-  Bezier3(Point _p1, Point _p2, Point _p3, Point _p4)
-    : p1(_p1), p2(_p2), p3(_p3), p4(_p4) {}
-  Bezier3(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,1.0/3.0)), 
-			      p3(conv(b.p1,b.p2,2.0/3.0)), p4(b.p2) {}
-  Bezier3(const Bezier2 &b) : p1(b.p1), p2(conv(b.p1,b.p2,2.0/3.0)),
-			      p3(conv(b.p2,b.p3,1.0/3.0)), p4(b.p3) {}
-  
-  Point operator()(double t) const 
-    {
-      //    return Bezier2(conv(p1,p2,t),conv(p2,p3,t),conv(p3,p4,t))(t);
-      return ((1-t)*(1-t)*(1-t))*p1+(3*t*(1-t)*(1-t))*p2+
-	(3*t*t*(1-t))*p3+(t*t*t)*p4;
-    }
-  Bezier3 before(double t) const
-    {
-      Point p(conv(p1,p2,t));
-      Point q(conv(p2,p3,t));
-      Point r(conv(p3,p4,t));
-      Point a(conv(p,q,t));
-      Point b(conv(q,r,t));
-      Point c(conv(a,b,t));
-      return Bezier3(p1,p,a,c);
-    }
-  
-  Bezier3 after(double t) const
-    {
-      Point p(conv(p1,p2,t));
-      Point q(conv(p2,p3,t));
-      Point r(conv(p3,p4,t));
-      Point a(conv(p,q,t));
-      Point b(conv(q,r,t));
-      Point c(conv(a,b,t));
-      return Bezier3(c,b,r,p4);
-    }
-  Bezier3 revert() const { return Bezier3(p4,p3,p2,p1);}
-  Bezier3 operator()(double a,double b) const { return before(b).after(a/b); }
-  Bezier2 grad() const { return Bezier2(3.0*(p2-p1),3.0*(p3-p2),3.0*(p4-p3)); }
-  Bezier2 norm() const { return Bezier2(3.0*rot90(p2-p1),
-				  3.0*rot90(p3-p2),
-				  3.0*rot90(p4-p3)); }
-  Point grad(double t) const { return grad()(t); }
-  Point norm(double t) const { return rot90(grad(t)); }
-
-  template<class R,class F,class S,class D>
-  R recSplit(F &_f,const S &_s,D _d) const 
-  {
-    const Point a=(p1+p2)/2;
-    const Point b=(p2+p3)/2;
-    const Point c=(p3+p4)/2;
-    const Point d=(a+b)/2;
-    const Point e=(b+c)/2;
-    const Point f=(d+e)/2;
-    R f1=_f(Bezier3(p1,a,d,e),_d);
-    R f2=_f(Bezier3(e,d,c,p4),_d);
-    return _s(f1,f2);
-  }
-  
-};
-
-
-} //END OF NAMESPACE dim2
-} //END OF NAMESPACE lemon
-
-#endif // LEMON_BEZIER_H
Index: lemon/bits/debug_map.h
===================================================================
--- lemon/bits/debug_map.h	(revision 2553)
+++ 	(revision )
@@ -1,382 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_DEBUG_MAP_H
-#define LEMON_BITS_DEBUG_MAP_H
-
-#include <vector>
-#include <algorithm>
-
-#include <lemon/bits/traits.h>
-#include <lemon/bits/utility.h>
-#include <lemon/error.h>
-
-#include <lemon/bits/alteration_notifier.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-///\ingroup graphbits
-///
-///\file
-///\brief Vector based graph maps for debugging.
-namespace lemon {
-
-#ifndef LEMON_STRICT_DEBUG_MAP
-#define LEMON_STRICT_DEBUG_MAP false
-#endif
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Graph map based on the std::vector storage.
-  ///
-  /// The DebugMap template class is graph map structure what
-  /// automatically updates the map when a key is added to or erased from
-  /// the map. This map also checks some programming failures by example
-  /// multiple addition of items, erasing of not existing item or
-  /// not erased items at the destruction of the map. It helps the
-  /// programmer to avoid segmentation faults and memory leaks.
-  ///
-  /// \param Notifier The AlterationNotifier that will notify this map.
-  /// \param Item The item type of the graph items.
-  /// \param Value The value type of the map.
-  /// 
-  /// \author Balazs Dezso  	
-  template <typename _Graph, typename _Item, typename _Value>
-  class DebugMap 
-    : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
-  private:
-		
-    /// The container type of the map.
-    typedef std::vector<_Value> Container;	
-
-    /// The container type of the debug flags.
-    typedef std::vector<bool> Flag;	
-
-  public:
-
-    static const bool strictCheck = LEMON_STRICT_DEBUG_MAP;
-
-    struct MapError {
-    public:
-      virtual ~MapError() {}
-      virtual const char* what() const throw() {
-        return "lemon::DebugMap::MapError";
-      }
-    };
-
-    /// The graph type of the map. 
-    typedef _Graph Graph;
-    /// The item type of the map.
-    typedef _Item Item;
-    /// The reference map tag.
-    typedef True ReferenceMapTag;
-
-    /// The key type of the map.
-    typedef _Item Key;
-    /// The value type of the map.
-    typedef _Value Value;
-
-    /// The notifier type.
-    typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier;
-
-    /// The map type.
-    typedef DebugMap Map;
-    /// The base class of the map.
-    typedef typename Notifier::ObserverBase Parent;
-
-    /// The reference type of the map;
-    typedef typename Container::reference Reference;
-    /// The const reference type of the map;
-    typedef typename Container::const_reference ConstReference;
-
-
-    /// \brief Constructor to attach the new map into the notifier.
-    ///
-    /// It constructs a map and attachs it into the notifier.
-    /// It adds all the items of the graph to the map.
-    DebugMap(const Graph& graph) {
-      Parent::attach(graph.notifier(Item()));
-      container.resize(Parent::notifier()->maxId() + 1);
-      flag.resize(Parent::notifier()->maxId() + 1, false);
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        flag[Parent::notifier()->id(it)] = true;
-      }
-    }
-
-    /// \brief Constructor uses given value to initialize the map. 
-    ///
-    /// It constructs a map uses a given value to initialize the map. 
-    /// It adds all the items of the graph to the map.
-    DebugMap(const Graph& graph, const Value& value) {
-      Parent::attach(graph.notifier(Item()));
-      container.resize(Parent::notifier()->maxId() + 1, value);
-      flag.resize(Parent::notifier()->maxId() + 1, false);
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        flag[Parent::notifier()->id(it)] = true;
-      }
-    }
-
-    /// \brief Copy constructor
-    ///
-    /// Copy constructor.
-    DebugMap(const DebugMap& _copy) : Parent() {
-      if (_copy.attached()) {
-	Parent::attach(*_copy.notifier());
-	container = _copy.container;
-      }
-      flag.resize(Parent::notifier()->maxId() + 1, false);
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        flag[Parent::notifier()->id(it)] = true;
-        LEMON_ASSERT(_copy.flag[Parent::notifier()->id(it)], MapError());
-      }
-    }
-
-    /// \brief Destructor
-    ///
-    /// Destructor.
-    ~DebugMap() {
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      if (notifier != 0) {
-        Item it;
-        for (notifier->first(it); it != INVALID; notifier->next(it)) {
-          LEMON_ASSERT(flag[Parent::notifier()->id(it)], MapError());
-          flag[Parent::notifier()->id(it)] = false;
-        }
-      }
-      for (int i = 0; i < int(flag.size()); ++i) {
-        LEMON_ASSERT(!flag[i], MapError());
-      }
-    }
-
-    /// \brief Assign operator.
-    ///
-    /// This operator assigns for each item in the map the
-    /// value mapped to the same item in the copied map.  
-    /// The parameter map should be indiced with the same
-    /// itemset because this assign operator does not change
-    /// the container of the map. 
-    DebugMap& operator=(const DebugMap& cmap) {
-      return operator=<DebugMap>(cmap);
-    }
-
-
-    /// \brief Template assign operator.
-    ///
-    /// The given parameter should be conform to the ReadMap
-    /// concecpt and could be indiced by the current item set of
-    /// the NodeMap. In this case the value for each item
-    /// is assigned by the value of the given ReadMap. 
-    template <typename CMap>
-    DebugMap& operator=(const CMap& cmap) {
-      checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        set(it, cmap[it]);
-      }
-      return *this;
-    }
-    
-  public:
-
-    /// \brief The subcript operator.
-    ///
-    /// The subscript operator. The map can be subscripted by the
-    /// actual items of the graph.      
-    Reference operator[](const Key& key) {
-      LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
-      return container[Parent::notifier()->id(key)];
-    } 
-		
-    /// \brief The const subcript operator.
-    ///
-    /// The const subscript operator. The map can be subscripted by the
-    /// actual items of the graph. 
-    ConstReference operator[](const Key& key) const {
-      LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
-      return container[Parent::notifier()->id(key)];
-    }
-
-
-    /// \brief The setter function of the map.
-    ///
-    /// It the same as operator[](key) = value expression.
-    void set(const Key& key, const Value& value) {
-      (*this)[key] = value;
-    }
-
-  protected:
-
-    /// \brief Adds a new key to the map.
-    ///		
-    /// It adds a new key to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const Key& key) {
-      int id = Parent::notifier()->id(key);
-      if (id >= int(container.size())) {
-	container.resize(id + 1);
-        flag.resize(id + 1, false);
-      }
-      LEMON_ASSERT(!flag[Parent::notifier()->id(key)], MapError());
-      flag[Parent::notifier()->id(key)] = true;
-      if (strictCheck) {
-        std::vector<bool> fl(flag.size(), false);
-        const typename Parent::Notifier* notifier = Parent::notifier();
-        Item it;
-        for (notifier->first(it); it != INVALID; notifier->next(it)) {
-          int jd = Parent::notifier()->id(it);
-          fl[jd] = true;
-        }
-        LEMON_ASSERT(fl == flag, MapError());
-      }
-    }
-
-    /// \brief Adds more new keys to the map.
-    ///		
-    /// It adds more new keys to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const std::vector<Key>& keys) {
-      int max = container.size() - 1;
-      for (int i = 0; i < int(keys.size()); ++i) {
-        int id = Parent::notifier()->id(keys[i]);
-        if (id >= max) {
-          max = id;
-        }
-      }
-      container.resize(max + 1);
-      flag.resize(max + 1, false);
-      for (int i = 0; i < int(keys.size()); ++i) {
-        LEMON_ASSERT(!flag[Parent::notifier()->id(keys[i])], MapError());
-        flag[Parent::notifier()->id(keys[i])] = true;
-      }
-      if (strictCheck) {
-        std::vector<bool> fl(flag.size(), false);
-        const typename Parent::Notifier* notifier = Parent::notifier();
-        Item it;
-        for (notifier->first(it); it != INVALID; notifier->next(it)) {
-          int id = Parent::notifier()->id(it);
-          fl[id] = true;
-        }
-        LEMON_ASSERT(fl == flag, MapError());
-      }
-    }
-
-    /// \brief Erase a key from the map.
-    ///
-    /// Erase a key from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const Key& key) {
-      if (strictCheck) {
-        std::vector<bool> fl(flag.size(), false);
-        const typename Parent::Notifier* notifier = Parent::notifier();
-        Item it;
-        for (notifier->first(it); it != INVALID; notifier->next(it)) {
-          int id = Parent::notifier()->id(it);
-          fl[id] = true;
-        }
-        LEMON_ASSERT(fl == flag, MapError());
-      }
-      container[Parent::notifier()->id(key)] = Value();
-      LEMON_ASSERT(flag[Parent::notifier()->id(key)], MapError());
-      flag[Parent::notifier()->id(key)] = false;
-    }
-
-    /// \brief Erase more keys from the map.
-    ///
-    /// Erase more keys from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const std::vector<Key>& keys) {
-      if (strictCheck) {
-        std::vector<bool> fl(flag.size(), false);
-        const typename Parent::Notifier* notifier = Parent::notifier();
-        Item it;
-        for (notifier->first(it); it != INVALID; notifier->next(it)) {
-          int id = Parent::notifier()->id(it);
-          fl[id] = true;
-        }
-        LEMON_ASSERT(fl == flag, MapError());
-      }
-      for (int i = 0; i < int(keys.size()); ++i) {
-	container[Parent::notifier()->id(keys[i])] = Value();
-        LEMON_ASSERT(flag[Parent::notifier()->id(keys[i])], MapError());
-        flag[Parent::notifier()->id(keys[i])] = false;
-      }
-    }
-    
-    /// \brief Buildes the map.
-    ///	
-    /// It buildes the map. It called by the observer notifier
-    /// and it overrides the build() member function of the observer base.
-    virtual void build() { 
-      if (strictCheck) {
-        for (int i = 0; i < int(flag.size()); ++i) {
-          LEMON_ASSERT(flag[i], MapError());
-        }
-      }
-      int size = Parent::notifier()->maxId() + 1;
-      container.reserve(size);
-      container.resize(size);
-      flag.reserve(size);
-      flag.resize(size, false);
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        int id = Parent::notifier()->id(it);
-        LEMON_ASSERT(!flag[id], MapError());
-        flag[id] = true;
-      }
-    }
-
-    /// \brief Clear the map.
-    ///
-    /// It erase all items from the map. It called by the observer notifier
-    /// and it overrides the clear() member function of the observer base.     
-    virtual void clear() { 
-      const typename Parent::Notifier* notifier = Parent::notifier();
-      Item it;
-      for (notifier->first(it); it != INVALID; notifier->next(it)) {
-        int id = Parent::notifier()->id(it);
-        LEMON_ASSERT(flag[id], MapError());
-        flag[id] = false;
-      }
-      if (strictCheck) {
-        for (int i = 0; i < int(flag.size()); ++i) {
-          LEMON_ASSERT(!flag[i], MapError());
-        }
-      }
-      container.clear();
-      flag.clear();
-    }
-    
-  private:
-		
-    Container container;
-    Flag flag;
-
-  };
-
-}
-
-#endif
Index: lemon/bits/default_map.h
===================================================================
--- lemon/bits/default_map.h	(revision 2553)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_DEFAULT_MAP_H
-#define LEMON_BITS_DEFAULT_MAP_H
-
-
-#include <lemon/bits/array_map.h>
-#include <lemon/bits/vector_map.h>
-#include <lemon/bits/debug_map.h>
-
-///\ingroup graphbits
-///\file
-///\brief Graph maps that construct and destruct their elements dynamically.
-
-namespace lemon {
-  
-  
-#ifndef LEMON_USE_DEBUG_MAP
-
-  template <typename _Graph, typename _Item, typename _Value>
-  struct DefaultMapSelector {
-    typedef ArrayMap<_Graph, _Item, _Value> Map;
-  };
-
-  // bool
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, bool> {
-    typedef VectorMap<_Graph, _Item, bool> Map;
-  };
-
-  // char
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, char> {
-    typedef VectorMap<_Graph, _Item, char> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, signed char> {
-    typedef VectorMap<_Graph, _Item, signed char> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, unsigned char> {
-    typedef VectorMap<_Graph, _Item, unsigned char> Map;
-  };
-
-
-  // int
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, signed int> {
-    typedef VectorMap<_Graph, _Item, signed int> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, unsigned int> {
-    typedef VectorMap<_Graph, _Item, unsigned int> Map;
-  };
-
-
-  // short
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, signed short> {
-    typedef VectorMap<_Graph, _Item, signed short> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, unsigned short> {
-    typedef VectorMap<_Graph, _Item, unsigned short> Map;
-  };
-
-
-  // long
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, signed long> {
-    typedef VectorMap<_Graph, _Item, signed long> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, unsigned long> {
-    typedef VectorMap<_Graph, _Item, unsigned long> Map;
-  };
-
-
-#if defined __GNUC__ && !defined __STRICT_ANSI__
-
-  // long long
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, signed long long> {
-    typedef VectorMap<_Graph, _Item, signed long long> Map;
-  };
-
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, unsigned long long> {
-    typedef VectorMap<_Graph, _Item, unsigned long long> Map;
-  };
-
-#endif
-
-
-  // float
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, float> {
-    typedef VectorMap<_Graph, _Item, float> Map;
-  };
-
-
-  // double
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, double> {
-    typedef VectorMap<_Graph, _Item,  double> Map;
-  };
-
-
-  // long double
-  template <typename _Graph, typename _Item>
-  struct DefaultMapSelector<_Graph, _Item, long double> {
-    typedef VectorMap<_Graph, _Item, long double> Map;
-  };
-
-
-  // pointer
-  template <typename _Graph, typename _Item, typename _Ptr>
-  struct DefaultMapSelector<_Graph, _Item, _Ptr*> {
-    typedef VectorMap<_Graph, _Item, _Ptr*> Map;
-  };
-
-#else 
-
-  template <typename _Graph, typename _Item, typename _Value>
-  struct DefaultMapSelector {
-    typedef DebugMap<_Graph, _Item, _Value> Map;
-  };
-
-#endif  
-
-  /// \e
-  template <typename _Graph, typename _Item, typename _Value>
-  class DefaultMap 
-    : public DefaultMapSelector<_Graph, _Item, _Value>::Map {
-  public:
-    typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
-    typedef DefaultMap<_Graph, _Item, _Value> Map;
-    
-    typedef typename Parent::Graph Graph;
-    typedef typename Parent::Value Value;
-
-    explicit DefaultMap(const Graph& graph) : Parent(graph) {}
-    DefaultMap(const Graph& graph, const Value& value) 
-      : Parent(graph, value) {}
-
-    DefaultMap& operator=(const DefaultMap& cmap) {
-      return operator=<DefaultMap>(cmap);
-    }
-
-    template <typename CMap>
-    DefaultMap& operator=(const CMap& cmap) {
-      Parent::operator=(cmap);
-      return *this;
-    }
-
-  };
-
-}
-
-#endif
Index: lemon/bits/edge_set_extender.h
===================================================================
--- lemon/bits/edge_set_extender.h	(revision 2553)
+++ 	(revision )
@@ -1,630 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_EDGE_SET_EXTENDER_H
-#define LEMON_BITS_EDGE_SET_EXTENDER_H
-
-#include <lemon/bits/invalid.h>
-#include <lemon/error.h>
-
-#include <lemon/bits/default_map.h>
-
-///\ingroup graphbits
-///\file
-///\brief Extenders for the edge set types
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the EdgeSets
-  template <typename Base>
-  class EdgeSetExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef EdgeSetExtender Graph;
-
-    // Base extensions
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const Edge &e) const {
-      if (n == Parent::source(e))
-	return Parent::target(e);
-      else if(n==Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-
-    // Alteration notifier extensions
-
-    /// The edge observer registry.
-    typedef AlterationNotifier<EdgeSetExtender, Edge> EdgeNotifier;
-
-  protected:
-
-    mutable EdgeNotifier edge_notifier;
-
-  public:
-
-    using Parent::notifier;
-
-    /// \brief Gives back the edge alteration notifier.
-    ///
-    /// Gives back the edge alteration notifier.
-    EdgeNotifier& notifier(Edge) const {
-      return edge_notifier;
-    }
-
-    // Iterable extensions
-
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-
-    using Parent::first;
-
-    // Mappable extension
-    
-    template <typename _Value>
-    class EdgeMap 
-      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef EdgeSetExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      explicit EdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      EdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-
-    // Alteration extension
-
-    Edge addEdge(const Node& from, const Node& to) {
-      Edge edge = Parent::addEdge(from, to);
-      notifier(Edge()).add(edge);
-      return edge;
-    }
-    
-    void clear() {
-      notifier(Edge()).clear();
-      Parent::clear();
-    }
-
-    void erase(const Edge& edge) {
-      notifier(Edge()).erase(edge);
-      Parent::erase(edge);
-    }
-
-    EdgeSetExtender() {
-      edge_notifier.setContainer(*this);
-    }
-
-    ~EdgeSetExtender() {
-      edge_notifier.clear();
-    }
-
-  };
-
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the UEdgeSets
-  template <typename Base>
-  class UEdgeSetExtender : public Base {
-
-  public:
-
-    typedef Base Parent;
-    typedef UEdgeSetExtender Graph;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    int maxId(UEdge) const {
-      return Parent::maxUEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    UEdge fromId(int id, UEdge) const {
-      return Parent::uEdgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const UEdge &e) const {
-      if( n == Parent::source(e))
-	return Parent::target(e);
-      else if( n == Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    Edge oppositeEdge(const Edge &e) const {
-      return Parent::direct(e, !Parent::direction(e));
-    }
-
-    using Parent::direct;
-    Edge direct(const UEdge &ue, const Node &s) const {
-      return Parent::direct(ue, Parent::source(ue) == s);
-    }
-
-    typedef AlterationNotifier<UEdgeSetExtender, Edge> EdgeNotifier;
-    typedef AlterationNotifier<UEdgeSetExtender, UEdge> UEdgeNotifier;
-
-
-  protected:
-
-    mutable EdgeNotifier edge_notifier;
-    mutable UEdgeNotifier uedge_notifier;
-
-  public:
-
-    using Parent::notifier;
-    
-    EdgeNotifier& notifier(Edge) const {
-      return edge_notifier;
-    }
-
-    UEdgeNotifier& notifier(UEdge) const {
-      return uedge_notifier;
-    }
-
-
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class UEdgeIt : public Parent::UEdge { 
-      const Graph* graph;
-    public:
-
-      UEdgeIt() { }
-
-      UEdgeIt(Invalid i) : UEdge(i) { }
-
-      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<UEdge&>(*this));
-      }
-
-      UEdgeIt(const Graph& _graph, const UEdge& e) : 
-	UEdge(e), graph(&_graph) { }
-
-      UEdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class IncEdgeIt : public Parent::UEdge {
-      friend class UEdgeSetExtender;
-      const Graph* graph;
-      bool direction;
-    public:
-
-      IncEdgeIt() { }
-
-      IncEdgeIt(Invalid i) : UEdge(i), direction(false) { }
-
-      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
-	_graph.firstInc(*this, direction, n);
-      }
-
-      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
-	: graph(&_graph), UEdge(ue) {
-	direction = (_graph.source(ue) == n);
-      }
-
-      IncEdgeIt& operator++() {
-	graph->nextInc(*this, direction);
-	return *this; 
-      }
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-
-    /// Base node of the iterator
-    ///
-    /// Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &e) const {
-      return e.direction ? source(e) : target(e);
-    }
-    /// Running node of the iterator
-    ///
-    /// Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &e) const {
-      return e.direction ? target(e) : source(e);
-    }
-
-
-    template <typename _Value>
-    class EdgeMap 
-      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef UEdgeSetExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      EdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      EdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public MapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef UEdgeSetExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, UEdge, _Value> > Parent;
-
-      UEdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-
-      UEdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-
-    // Alteration extension
-
-    UEdge addEdge(const Node& from, const Node& to) {
-      UEdge uedge = Parent::addEdge(from, to);
-      notifier(UEdge()).add(uedge);
-      std::vector<Edge> edges;
-      edges.push_back(Parent::direct(uedge, true));
-      edges.push_back(Parent::direct(uedge, false));
-      notifier(Edge()).add(edges);
-      return uedge;
-    }
-    
-    void clear() {
-      notifier(Edge()).clear();
-      notifier(UEdge()).clear();
-      Parent::clear();
-    }
-
-    void erase(const UEdge& uedge) {
-      std::vector<Edge> edges;
-      edges.push_back(Parent::direct(uedge, true));
-      edges.push_back(Parent::direct(uedge, false));
-      notifier(Edge()).erase(edges);
-      notifier(UEdge()).erase(uedge);
-      Parent::erase(uedge);
-    }
-
-
-    UEdgeSetExtender() {
-      edge_notifier.setContainer(*this);
-      uedge_notifier.setContainer(*this);
-    }
-
-    ~UEdgeSetExtender() {
-      uedge_notifier.clear();
-      edge_notifier.clear();
-    }
-    
-  };
-
-}
-
-#endif
Index: lemon/bits/graph_adaptor_extender.h
===================================================================
--- lemon/bits/graph_adaptor_extender.h	(revision 2553)
+++ 	(revision )
@@ -1,742 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_GRAPH_ADAPTOR_EXTENDER_H
-#define LEMON_BITS_GRAPH_ADAPTOR_EXTENDER_H
-
-#include <lemon/bits/invalid.h>
-#include <lemon/error.h>
-
-#include <lemon/bits/default_map.h>
-
-
-///\ingroup graphbits
-///\file
-///\brief Extenders for the graph adaptor types
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the GraphAdaptors
-  template <typename _Graph>
-  class GraphAdaptorExtender : public _Graph {
-  public:
-
-    typedef _Graph Parent;
-    typedef _Graph Graph;
-    typedef GraphAdaptorExtender Adaptor;
-
-    // Base extensions
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const Edge &e) const {
-      if (n == Parent::source(e))
-	return Parent::target(e);
-      else if(n==Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    class NodeIt : public Node { 
-      const Adaptor* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Adaptor& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Adaptor& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Adaptor& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Adaptor& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Adaptor& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Adaptor& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Adaptor& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Adaptor& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(e);
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(e);
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(e);
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(e);
-    }
-
-  };
-
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the UGraphAdaptors
-  template <typename _UGraph> 
-  class UGraphAdaptorExtender : public _UGraph {
-  public:
-    
-    typedef _UGraph Parent;
-    typedef _UGraph UGraph;
-    typedef UGraphAdaptorExtender Adaptor;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-
-    // UGraph extension    
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    int maxId(UEdge) const {
-      return Parent::maxUEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    UEdge fromId(int id, UEdge) const {
-      return Parent::uEdgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const UEdge &e) const {
-      if( n == Parent::source(e))
-	return Parent::target(e);
-      else if( n == Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    Edge oppositeEdge(const Edge &e) const {
-      return Parent::direct(e, !Parent::direction(e));
-    }
-
-    using Parent::direct;
-    Edge direct(const UEdge &ue, const Node &s) const {
-      return Parent::direct(ue, Parent::source(ue) == s);
-    }
-
-
-    class NodeIt : public Node { 
-      const Adaptor* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Adaptor& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Adaptor& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Adaptor& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Adaptor& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Adaptor& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Adaptor& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Adaptor* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Adaptor& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Adaptor& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-    class UEdgeIt : public Parent::UEdge { 
-      const Adaptor* graph;
-    public:
-
-      UEdgeIt() { }
-
-      UEdgeIt(Invalid i) : UEdge(i) { }
-
-      explicit UEdgeIt(const Adaptor& _graph) : graph(&_graph) {
-	_graph.first(static_cast<UEdge&>(*this));
-      }
-
-      UEdgeIt(const Adaptor& _graph, const UEdge& e) : 
-	UEdge(e), graph(&_graph) { }
-
-      UEdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class IncEdgeIt : public Parent::UEdge { 
-      friend class UGraphAdaptorExtender;
-      const Adaptor* graph;
-      bool direction;
-    public:
-
-      IncEdgeIt() { }
-
-      IncEdgeIt(Invalid i) : UEdge(i), direction(false) { }
-
-      IncEdgeIt(const Adaptor& _graph, const Node &n) : graph(&_graph) {
-	_graph.firstInc(static_cast<UEdge&>(*this), direction, n);
-      }
-
-      IncEdgeIt(const Adaptor& _graph, const UEdge &ue, const Node &n)
-	: graph(&_graph), UEdge(ue) {
-	direction = (_graph.source(ue) == n);
-      }
-
-      IncEdgeIt& operator++() {
-	graph->nextInc(*this, direction);
-	return *this; 
-      }
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-
-    /// Base node of the iterator
-    ///
-    /// Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &e) const {
-      return e.direction ? source(e) : target(e);
-    }
-    /// Running node of the iterator
-    ///
-    /// Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &e) const {
-      return e.direction ? target(e) : source(e);
-    }
-
-  };
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the BpUGraphAdaptors
-  template <typename Base>
-  class BpUGraphAdaptorExtender : public Base {
-  public:
-    typedef Base Parent;
-    typedef BpUGraphAdaptorExtender Graph;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::BNode BNode;
-    typedef typename Parent::ANode ANode;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-    int maxId(BNode) const {
-      return Parent::maxBNodeId();
-    }
-    int maxId(ANode) const {
-      return Parent::maxANodeId();
-    }
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-    int maxId(UEdge) const {
-      return Parent::maxUEdgeId();
-    }
-
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-    ANode fromId(int id, ANode) const {
-      return Parent::nodeFromANodeId(id);
-    }
-    BNode fromId(int id, BNode) const {
-      return Parent::nodeFromBNodeId(id);
-    }
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-    UEdge fromId(int id, UEdge) const {
-      return Parent::uEdgeFromId(id);
-    }  
-  
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-    
-      NodeIt() { }
-    
-      NodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) { }
-    
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class ANodeIt : public Node { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      ANodeIt() { }
-    
-      ANodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit ANodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->firstANode(static_cast<Node&>(*this));
-      }
-
-      ANodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-    
-      ANodeIt& operator++() { 
-	graph->nextANode(*this);
-	return *this; 
-      }
-    };
-
-    class BNodeIt : public Node { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      BNodeIt() { }
-    
-      BNodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit BNodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->firstBNode(static_cast<Node&>(*this));
-      }
-
-      BNodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-    
-      BNodeIt& operator++() { 
-	graph->nextBNode(*this);
-	return *this; 
-      }
-    };
-
-    class EdgeIt : public Edge { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      EdgeIt() { }
-    
-      EdgeIt(Invalid i) : Edge(INVALID) { }
-    
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) { }
-    
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class UEdgeIt : public UEdge { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      UEdgeIt() { }
-    
-      UEdgeIt(Invalid i) : UEdge(INVALID) { }
-    
-      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<UEdge&>(*this));
-      }
-
-      UEdgeIt(const Graph& _graph, const UEdge& edge) 
-	: UEdge(edge), graph(&_graph) { }
-    
-      UEdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-    };
-
-    class OutEdgeIt : public Edge { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      OutEdgeIt() { }
-    
-      OutEdgeIt(Invalid i) : Edge(i) { }
-    
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	graph->firstOut(*this, node);
-      }
-    
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-    
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-    public:
-    
-      InEdgeIt() { }
-    
-      InEdgeIt(Invalid i) : Edge(i) { }
-    
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	graph->firstIn(*this, node);
-      }
-    
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-    
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-  
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-  
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-  
-    class IncEdgeIt : public Parent::UEdge { 
-      friend class BpUGraphAdaptorExtender;
-      const Graph* graph;
-      bool direction;
-    public:
-    
-      IncEdgeIt() { }
-    
-      IncEdgeIt(Invalid i) : UEdge(i), direction(true) { }
-    
-      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
-	graph->firstInc(*this, direction, n);
-      }
-
-      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
-	: graph(&_graph), UEdge(ue) {
-	direction = (graph->source(ue) == n);
-      }
-
-      IncEdgeIt& operator++() {
-	graph->nextInc(*this, direction);
-	return *this; 
-      }
-    };
-  
-
-    /// Base node of the iterator
-    ///
-    /// Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &e) const {
-      return e.direction ? source(e) : target(e);
-    }
-
-    /// Running node of the iterator
-    ///
-    /// Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &e) const {
-      return e.direction ? target(e) : source(e);
-    }
-
-    Node oppositeNode(const Node &n, const UEdge &e) const {
-      if( n == Parent::source(e))
-	return Parent::target(e);
-      else if( n == Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    Edge oppositeEdge(const Edge &e) const {
-      return Parent::direct(e, !Parent::direction(e));
-    }
-
-    using Parent::direct;
-    Edge direct(const UEdge &ue, const Node &s) const {
-      return Parent::direct(ue, Parent::source(ue) == s);
-    }
-
-  };
-
-
-}
-
-
-#endif
Index: lemon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 2585)
+++ 	(revision )
@@ -1,1397 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_GRAPH_EXTENDER_H
-#define LEMON_BITS_GRAPH_EXTENDER_H
-
-#include <lemon/bits/invalid.h>
-#include <lemon/bits/utility.h>
-#include <lemon/error.h>
-
-#include <lemon/bits/map_extender.h>
-#include <lemon/bits/default_map.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-///\ingroup graphbits
-///\file
-///\brief Extenders for the graph types
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the Graphs
-  template <typename Base>
-  class GraphExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef GraphExtender Graph;
-
-    // Base extensions
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const Edge &e) const {
-      if (n == Parent::source(e))
-	return Parent::target(e);
-      else if(n==Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    // Alterable extension
-
-    typedef AlterationNotifier<GraphExtender, Node> NodeNotifier;
-    typedef AlterationNotifier<GraphExtender, Edge> EdgeNotifier;
-
-
-  protected:
-
-    mutable NodeNotifier node_notifier;
-    mutable EdgeNotifier edge_notifier;
-
-  public:
-
-    NodeNotifier& notifier(Node) const {
-      return node_notifier;
-    }
-    
-    EdgeNotifier& notifier(Edge) const {
-      return edge_notifier;
-    }
-
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (i.e. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(e);
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (i.e. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(e);
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (i.e. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(e);
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (i.e. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(e);
-    }
-
-    
-    template <typename _Value>
-    class NodeMap 
-      : public MapExtender<DefaultMap<Graph, Node, _Value> > {
-    public:
-      typedef GraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Node, _Value> > Parent;
-
-      explicit NodeMap(const Graph& graph) 
-	: Parent(graph) {}
-      NodeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-
-      NodeMap& operator=(const NodeMap& cmap) {
-	return operator=<NodeMap>(cmap);
-      }
-
-      template <typename CMap>
-      NodeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-    template <typename _Value>
-    class EdgeMap 
-      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef GraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      explicit EdgeMap(const Graph& graph) 
-	: Parent(graph) {}
-      EdgeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    };
-
-
-    Node addNode() {
-      Node node = Parent::addNode();
-      notifier(Node()).add(node);
-      return node;
-    }
-    
-    Edge addEdge(const Node& from, const Node& to) {
-      Edge edge = Parent::addEdge(from, to);
-      notifier(Edge()).add(edge);
-      return edge;
-    }
-
-    void clear() {
-      notifier(Edge()).clear();
-      notifier(Node()).clear();
-      Parent::clear();
-    }
-
-    template <typename Graph, typename NodeRefMap, typename EdgeRefMap>
-    void build(const Graph& graph, NodeRefMap& nodeRef, EdgeRefMap& edgeRef) {
-      Parent::build(graph, nodeRef, edgeRef);
-      notifier(Node()).build();
-      notifier(Edge()).build();
-    }
-
-    void erase(const Node& node) {
-      Edge edge;
-      Parent::firstOut(edge, node);
-      while (edge != INVALID ) {
-	erase(edge);
-	Parent::firstOut(edge, node);
-      } 
-
-      Parent::firstIn(edge, node);
-      while (edge != INVALID ) {
-	erase(edge);
-	Parent::firstIn(edge, node);
-      }
-
-      notifier(Node()).erase(node);
-      Parent::erase(node);
-    }
-    
-    void erase(const Edge& edge) {
-      notifier(Edge()).erase(edge);
-      Parent::erase(edge);
-    }
-
-    GraphExtender() {
-      node_notifier.setContainer(*this);
-      edge_notifier.setContainer(*this);
-    } 
-    
-
-    ~GraphExtender() {
-      edge_notifier.clear();
-      node_notifier.clear();
-    }
-  };
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the UGraphs
-  template <typename Base> 
-  class UGraphExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef UGraphExtender Graph;
-
-    typedef True UndirectedTag;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-
-    // UGraph extension    
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    int maxId(UEdge) const {
-      return Parent::maxUEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    UEdge fromId(int id, UEdge) const {
-      return Parent::uEdgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const UEdge &e) const {
-      if( n == Parent::source(e))
-	return Parent::target(e);
-      else if( n == Parent::target(e))
-	return Parent::source(e);
-      else
-	return INVALID;
-    }
-
-    Edge oppositeEdge(const Edge &e) const {
-      return Parent::direct(e, !Parent::direction(e));
-    }
-
-    using Parent::direct;
-    Edge direct(const UEdge &ue, const Node &s) const {
-      return Parent::direct(ue, Parent::source(ue) == s);
-    }
-
-    // Alterable extension
-
-    typedef AlterationNotifier<UGraphExtender, Node> NodeNotifier;
-    typedef AlterationNotifier<UGraphExtender, Edge> EdgeNotifier;
-    typedef AlterationNotifier<UGraphExtender, UEdge> UEdgeNotifier;
-
-
-  protected:
-
-    mutable NodeNotifier node_notifier;
-    mutable EdgeNotifier edge_notifier;
-    mutable UEdgeNotifier uedge_notifier;
-
-  public:
-
-    NodeNotifier& notifier(Node) const {
-      return node_notifier;
-    }
-    
-    EdgeNotifier& notifier(Edge) const {
-      return edge_notifier;
-    }
-
-    UEdgeNotifier& notifier(UEdge) const {
-      return uedge_notifier;
-    }
-
-
-
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class EdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      EdgeIt() { }
-
-      EdgeIt(Invalid i) : Edge(i) { }
-
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& e) : 
-	Edge(e), graph(&_graph) { }
-
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class OutEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      OutEdgeIt() { }
-
-      OutEdgeIt(Invalid i) : Edge(i) { }
-
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstOut(*this, node);
-      }
-
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      const Graph* graph;
-    public:
-
-      InEdgeIt() { }
-
-      InEdgeIt(Invalid i) : Edge(i) { }
-
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	_graph.firstIn(*this, node);
-      }
-
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class UEdgeIt : public Parent::UEdge { 
-      const Graph* graph;
-    public:
-
-      UEdgeIt() { }
-
-      UEdgeIt(Invalid i) : UEdge(i) { }
-
-      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
-	_graph.first(static_cast<UEdge&>(*this));
-      }
-
-      UEdgeIt(const Graph& _graph, const UEdge& e) : 
-	UEdge(e), graph(&_graph) { }
-
-      UEdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class IncEdgeIt : public Parent::UEdge {
-      friend class UGraphExtender;
-      const Graph* graph;
-      bool direction;
-    public:
-
-      IncEdgeIt() { }
-
-      IncEdgeIt(Invalid i) : UEdge(i), direction(false) { }
-
-      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
-	_graph.firstInc(*this, direction, n);
-      }
-
-      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
-	: graph(&_graph), UEdge(ue) {
-	direction = (_graph.source(ue) == n);
-      }
-
-      IncEdgeIt& operator++() {
-	graph->nextInc(*this, direction);
-	return *this; 
-      }
-    };
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-
-    /// Base node of the iterator
-    ///
-    /// Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &e) const {
-      return e.direction ? source(e) : target(e);
-    }
-    /// Running node of the iterator
-    ///
-    /// Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &e) const {
-      return e.direction ? target(e) : source(e);
-    }
-
-    // Mappable extension
-
-    template <typename _Value>
-    class NodeMap 
-      : public MapExtender<DefaultMap<Graph, Node, _Value> > {
-    public:
-      typedef UGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Node, _Value> > Parent;
-
-      NodeMap(const Graph& graph) 
-	: Parent(graph) {}
-      NodeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-
-      NodeMap& operator=(const NodeMap& cmap) {
-	return operator=<NodeMap>(cmap);
-      }
-
-      template <typename CMap>
-      NodeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-    template <typename _Value>
-    class EdgeMap 
-      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef UGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      EdgeMap(const Graph& graph) 
-	: Parent(graph) {}
-      EdgeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    };
-
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public MapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef UGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, UEdge, _Value> > Parent;
-
-      UEdgeMap(const Graph& graph) 
-	: Parent(graph) {}
-
-      UEdgeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-
-    };
-
-    // Alteration extension
-
-    Node addNode() {
-      Node node = Parent::addNode();
-      notifier(Node()).add(node);
-      return node;
-    }
-
-    UEdge addEdge(const Node& from, const Node& to) {
-      UEdge uedge = Parent::addEdge(from, to);
-      notifier(UEdge()).add(uedge);
-      std::vector<Edge> ev;
-      ev.push_back(Parent::direct(uedge, true));
-      ev.push_back(Parent::direct(uedge, false));      
-      notifier(Edge()).add(ev);
-      return uedge;
-    }
-    
-    void clear() {
-      notifier(Edge()).clear();
-      notifier(UEdge()).clear();
-      notifier(Node()).clear();
-      Parent::clear();
-    }
-
-    template <typename Graph, typename NodeRefMap, typename UEdgeRefMap>
-    void build(const Graph& graph, NodeRefMap& nodeRef, 
-               UEdgeRefMap& uEdgeRef) {
-      Parent::build(graph, nodeRef, uEdgeRef);
-      notifier(Node()).build();
-      notifier(UEdge()).build();
-      notifier(Edge()).build();
-    }
-
-    void erase(const Node& node) {
-      Edge edge;
-      Parent::firstOut(edge, node);
-      while (edge != INVALID ) {
-	erase(edge);
-	Parent::firstOut(edge, node);
-      } 
-
-      Parent::firstIn(edge, node);
-      while (edge != INVALID ) {
-	erase(edge);
-	Parent::firstIn(edge, node);
-      }
-
-      notifier(Node()).erase(node);
-      Parent::erase(node);
-    }
-
-    void erase(const UEdge& uedge) {
-      std::vector<Edge> ev;
-      ev.push_back(Parent::direct(uedge, true));
-      ev.push_back(Parent::direct(uedge, false));      
-      notifier(Edge()).erase(ev);
-      notifier(UEdge()).erase(uedge);
-      Parent::erase(uedge);
-    }
-
-    UGraphExtender() {
-      node_notifier.setContainer(*this); 
-      edge_notifier.setContainer(*this);
-      uedge_notifier.setContainer(*this);
-    } 
-
-    ~UGraphExtender() {
-      uedge_notifier.clear();
-      edge_notifier.clear();
-      node_notifier.clear(); 
-    } 
-
-  };
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Extender for the BpUGraphs
-  template <typename Base>
-  class BpUGraphExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef BpUGraphExtender Graph;
-
-    typedef True UndirectedTag;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::ANode ANode;
-    typedef typename Parent::BNode BNode;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-
-
-    Node oppositeNode(const Node& node, const UEdge& edge) const {
-      return Parent::aNode(edge) == node ? 
-	Parent::bNode(edge) : Parent::aNode(edge);
-    }
-
-    using Parent::direct;
-    Edge direct(const UEdge& edge, const Node& node) const {
-      return Parent::direct(edge, node == Parent::source(edge));
-    }
-
-    Edge oppositeEdge(const Edge& edge) const {
-      return direct(edge, !Parent::direction(edge));
-    }
-    
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-    int maxId(BNode) const {
-      return Parent::maxBNodeId();
-    }
-    int maxId(ANode) const {
-      return Parent::maxANodeId();
-    }
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-    int maxId(UEdge) const {
-      return Parent::maxUEdgeId();
-    }
-
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-    ANode fromId(int id, ANode) const {
-      return Parent::nodeFromANodeId(id);
-    }
-    BNode fromId(int id, BNode) const {
-      return Parent::nodeFromBNodeId(id);
-    }
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-    UEdge fromId(int id, UEdge) const {
-      return Parent::uEdgeFromId(id);
-    }  
-  
-    typedef AlterationNotifier<BpUGraphExtender, ANode> ANodeNotifier;
-    typedef AlterationNotifier<BpUGraphExtender, BNode> BNodeNotifier;
-    typedef AlterationNotifier<BpUGraphExtender, Node> NodeNotifier;
-    typedef AlterationNotifier<BpUGraphExtender, Edge> EdgeNotifier;
-    typedef AlterationNotifier<BpUGraphExtender, UEdge> UEdgeNotifier;
-
-  protected:
-
-    mutable ANodeNotifier anode_notifier;
-    mutable BNodeNotifier bnode_notifier;
-    mutable NodeNotifier node_notifier;
-    mutable EdgeNotifier edge_notifier;
-    mutable UEdgeNotifier uedge_notifier;
-
-  public:
-
-    NodeNotifier& notifier(Node) const {
-      return node_notifier;
-    }
-
-    ANodeNotifier& notifier(ANode) const {
-      return anode_notifier;
-    }
-
-    BNodeNotifier& notifier(BNode) const {
-      return bnode_notifier;
-    }
-
-    EdgeNotifier& notifier(Edge) const {
-      return edge_notifier;
-    }
-
-    UEdgeNotifier& notifier(UEdge) const {
-      return uedge_notifier;
-    }
-
-    class NodeIt : public Node { 
-      const Graph* graph;
-    public:
-    
-      NodeIt() { }
-    
-      NodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit NodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) { }
-    
-      NodeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class ANodeIt : public Node { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      ANodeIt() { }
-    
-      ANodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit ANodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->firstANode(static_cast<Node&>(*this));
-      }
-
-      ANodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-    
-      ANodeIt& operator++() { 
-	graph->nextANode(*this);
-	return *this; 
-      }
-    };
-
-    class BNodeIt : public Node { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      BNodeIt() { }
-    
-      BNodeIt(Invalid i) : Node(INVALID) { }
-    
-      explicit BNodeIt(const Graph& _graph) : graph(&_graph) {
-	graph->firstBNode(static_cast<Node&>(*this));
-      }
-
-      BNodeIt(const Graph& _graph, const Node& node) 
-	: Node(node), graph(&_graph) {}
-    
-      BNodeIt& operator++() { 
-	graph->nextBNode(*this);
-	return *this; 
-      }
-    };
-
-    class EdgeIt : public Edge { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      EdgeIt() { }
-    
-      EdgeIt(Invalid i) : Edge(INVALID) { }
-    
-      explicit EdgeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<Edge&>(*this));
-      }
-
-      EdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) { }
-    
-      EdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-
-    };
-
-    class UEdgeIt : public UEdge { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      UEdgeIt() { }
-    
-      UEdgeIt(Invalid i) : UEdge(INVALID) { }
-    
-      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
-	graph->first(static_cast<UEdge&>(*this));
-      }
-
-      UEdgeIt(const Graph& _graph, const UEdge& edge) 
-	: UEdge(edge), graph(&_graph) { }
-    
-      UEdgeIt& operator++() { 
-	graph->next(*this);
-	return *this; 
-      }
-    };
-
-    class OutEdgeIt : public Edge { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      OutEdgeIt() { }
-    
-      OutEdgeIt(Invalid i) : Edge(i) { }
-    
-      OutEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	graph->firstOut(*this, node);
-      }
-    
-      OutEdgeIt(const Graph& _graph, const Edge& edge) 
-	: Edge(edge), graph(&_graph) {}
-    
-      OutEdgeIt& operator++() { 
-	graph->nextOut(*this);
-	return *this; 
-      }
-
-    };
-
-
-    class InEdgeIt : public Edge { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-    public:
-    
-      InEdgeIt() { }
-    
-      InEdgeIt(Invalid i) : Edge(i) { }
-    
-      InEdgeIt(const Graph& _graph, const Node& node) 
-	: graph(&_graph) {
-	graph->firstIn(*this, node);
-      }
-    
-      InEdgeIt(const Graph& _graph, const Edge& edge) : 
-	Edge(edge), graph(&_graph) {}
-    
-      InEdgeIt& operator++() { 
-	graph->nextIn(*this);
-	return *this; 
-      }
-
-    };
-  
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the source in this case) of the iterator
-    Node baseNode(const OutEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the target in this case) of the
-    /// iterator
-    Node runningNode(const OutEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-  
-    /// \brief Base node of the iterator
-    ///
-    /// Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InEdgeIt &e) const {
-      return Parent::target(static_cast<const Edge&>(e));
-    }
-    /// \brief Running node of the iterator
-    ///
-    /// Returns the running node (ie. the source in this case) of the
-    /// iterator
-    Node runningNode(const InEdgeIt &e) const {
-      return Parent::source(static_cast<const Edge&>(e));
-    }
-  
-    class IncEdgeIt : public Parent::UEdge { 
-      friend class BpUGraphExtender;
-      const Graph* graph;
-      bool direction;
-    public:
-    
-      IncEdgeIt() { }
-    
-      IncEdgeIt(Invalid i) : UEdge(i), direction(true) { }
-    
-      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
-	graph->firstInc(*this, direction, n);
-      }
-
-      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
-	: graph(&_graph), UEdge(ue) {
-	direction = (graph->source(ue) == n);
-      }
-
-      IncEdgeIt& operator++() {
-	graph->nextInc(*this, direction);
-	return *this; 
-      }
-    };
-  
-
-    /// Base node of the iterator
-    ///
-    /// Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &e) const {
-      return e.direction ? source(e) : target(e);
-    }
-
-    /// Running node of the iterator
-    ///
-    /// Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &e) const {
-      return e.direction ? target(e) : source(e);
-    }
-
-    template <typename _Value>
-    class ANodeMap 
-      : public MapExtender<DefaultMap<Graph, ANode, _Value> > {
-    public:
-      typedef BpUGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, ANode, _Value> > Parent;
-    
-      ANodeMap(const Graph& graph) 
-	: Parent(graph) {}
-      ANodeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-    
-      ANodeMap& operator=(const ANodeMap& cmap) {
-	return operator=<ANodeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      ANodeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    
-    };
-
-    template <typename _Value>
-    class BNodeMap 
-      : public MapExtender<DefaultMap<Graph, BNode, _Value> > {
-    public:
-      typedef BpUGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, BNode, _Value> > Parent;
-    
-      BNodeMap(const Graph& graph) 
-	: Parent(graph) {}
-      BNodeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-    
-      BNodeMap& operator=(const BNodeMap& cmap) {
-	return operator=<BNodeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      BNodeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    
-    };
-
-  public:
-
-    template <typename _Value>
-    class NodeMap {
-    public:
-      typedef BpUGraphExtender Graph;
-
-      typedef Node Key;
-      typedef _Value Value;
-
-      /// The reference type of the map;
-      typedef typename ANodeMap<_Value>::Reference Reference;
-      /// The const reference type of the map;
-      typedef typename ANodeMap<_Value>::ConstReference ConstReference;
-
-      typedef True ReferenceMapTag;
-
-      NodeMap(const Graph& _graph) 
-	: graph(_graph), aNodeMap(_graph), bNodeMap(_graph) {}
-      NodeMap(const Graph& _graph, const _Value& _value) 
-	: graph(_graph), aNodeMap(_graph, _value), bNodeMap(_graph, _value) {}
-
-      NodeMap& operator=(const NodeMap& cmap) {
-	return operator=<NodeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      NodeMap& operator=(const CMap& cmap) {
-	checkConcept<concepts::ReadMap<Node, _Value>, CMap>();
-        aNodeMap = cmap;
-        bNodeMap = cmap;
-        return *this;
-      }
-
-      ConstReference operator[](const Key& node) const {
-	if (Parent::aNode(node)) {
-	  return aNodeMap[node];
-	} else {
-	  return bNodeMap[node];
-	}
-      } 
-
-      Reference operator[](const Key& node) {
-	if (Parent::aNode(node)) {
-	  return aNodeMap[node];
-	} else {
-	  return bNodeMap[node];
-	}
-      }
-
-      void set(const Key& node, const Value& value) {
-	if (Parent::aNode(node)) {
-	  aNodeMap.set(node, value);
-	} else {
-	  bNodeMap.set(node, value);
-	}
-      }
-
-      class MapIt : public NodeIt {
-      public:
-
-        typedef NodeIt Parent;
-        
-        explicit MapIt(NodeMap& _map) 
-          : Parent(_map.graph), map(_map) {}
-        
-        typename MapTraits<NodeMap>::ConstReturnValue operator*() const {
-          return map[*this];
-        }
-        
-        typename MapTraits<NodeMap>::ReturnValue operator*() {
-          return map[*this];
-        }
-        
-        void set(const Value& value) {
-          map.set(*this, value);
-        }
-
-      private:
-        NodeMap& map;
-      };
-
-      class ConstMapIt : public NodeIt {
-      public:
-
-        typedef NodeIt Parent;
-        
-        explicit ConstMapIt(const NodeMap& _map) 
-          : Parent(_map.graph), map(_map) {}
-        
-        typename MapTraits<NodeMap>::ConstReturnValue operator*() const {
-          return map[*this];
-        }
-        
-      private:
-        const NodeMap& map;
-      };
-
-      class ItemIt : public NodeIt {
-      public:
-
-        typedef NodeIt Parent;
-
-        explicit ItemIt(const NodeMap& _map)
-          : Parent(_map.graph) {}
-        
-      };
-      
-    private:
-      const Graph& graph;
-      ANodeMap<_Value> aNodeMap;
-      BNodeMap<_Value> bNodeMap;
-    };
-    
-
-    template <typename _Value>
-    class EdgeMap 
-      : public MapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef BpUGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-    
-      EdgeMap(const Graph& graph) 
-	: Parent(graph) {}
-      EdgeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-    
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    };
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public MapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef BpUGraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, UEdge, _Value> > Parent;
-    
-      UEdgeMap(const Graph& graph) 
-	: Parent(graph) {}
-      UEdgeMap(const Graph& graph, const _Value& value) 
-	: Parent(graph, value) {}
-    
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-	return *this;
-      }
-    };
-
-  
-    Node addANode() {
-      Node node = Parent::addANode();
-      notifier(ANode()).add(node);
-      notifier(Node()).add(node);
-      return node;
-    }
-
-    Node addBNode() {
-      Node node = Parent::addBNode();
-      notifier(BNode()).add(node);
-      notifier(Node()).add(node);
-      return node;
-    }
-  
-    UEdge addEdge(const Node& s, const Node& t) {
-      UEdge uedge = Parent::addEdge(s, t);
-      notifier(UEdge()).add(uedge);
-    
-      std::vector<Edge> ev;
-      ev.push_back(Parent::direct(uedge, true));
-      ev.push_back(Parent::direct(uedge, false));
-      notifier(Edge()).add(ev);
-    
-      return uedge;
-    }
-
-    void clear() {
-      notifier(Edge()).clear();
-      notifier(UEdge()).clear();
-      notifier(Node()).clear();
-      notifier(BNode()).clear();
-      notifier(ANode()).clear();
-      Parent::clear();
-    }
-
-    template <typename Graph, typename ANodeRefMap, 
-              typename BNodeRefMap, typename UEdgeRefMap>
-    void build(const Graph& graph, ANodeRefMap& aNodeRef, 
-               BNodeRefMap& bNodeRef, UEdgeRefMap& uEdgeRef) {
-      Parent::build(graph, aNodeRef, bNodeRef, uEdgeRef);
-      notifier(ANode()).build();
-      notifier(BNode()).build();
-      notifier(Node()).build();
-      notifier(UEdge()).build();
-      notifier(Edge()).build();
-    }
-
-    void erase(const Node& node) {
-      UEdge uedge;
-      if (Parent::aNode(node)) {
-        Parent::firstFromANode(uedge, node);
-        while (uedge != INVALID) {
-          erase(uedge);
-          Parent::firstFromANode(uedge, node);
-        }
-        notifier(ANode()).erase(node);
-      } else {
-        Parent::firstFromBNode(uedge, node);
-        while (uedge != INVALID) {
-          erase(uedge);
-          Parent::firstFromBNode(uedge, node);
-        }
-        notifier(BNode()).erase(node);
-      }
-
-      notifier(Node()).erase(node);
-      Parent::erase(node);
-    }
-    
-    void erase(const UEdge& uedge) {
-      std::vector<Edge> ev;
-      ev.push_back(Parent::direct(uedge, true));
-      ev.push_back(Parent::direct(uedge, false));
-      notifier(Edge()).erase(ev);
-      notifier(UEdge()).erase(uedge);
-      Parent::erase(uedge);
-    }
-
-
-    BpUGraphExtender() {
-      anode_notifier.setContainer(*this); 
-      bnode_notifier.setContainer(*this); 
-      node_notifier.setContainer(*this); 
-      edge_notifier.setContainer(*this); 
-      uedge_notifier.setContainer(*this);
-    } 
-
-    ~BpUGraphExtender() {
-      uedge_notifier.clear();
-      edge_notifier.clear(); 
-      node_notifier.clear(); 
-      anode_notifier.clear(); 
-      bnode_notifier.clear(); 
-    }
-
-    Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
-      UEdge uedge = Parent::findUEdge(u, v, prev);
-      if (uedge != INVALID) {
-        return Parent::direct(uedge, Parent::aNode(u));
-      } else {
-        return INVALID;
-      }
-    }
-
-  };
-
-}
-
-#endif
Index: lemon/bits/invalid.h
===================================================================
--- lemon/bits/invalid.h	(revision 2553)
+++ lemon/bits/invalid.h	(revision 2655)
@@ -3,5 +3,5 @@
  * This file is a part of LEMON, a generic C++ optimization library
  *
- * Copyright (C) 2003-2008
+ * Copyright (C) 2003-2006
  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  * (Egervary Research Group on Combinatorial Optimization, EGRES).
Index: lemon/bits/item_reader.h
===================================================================
--- lemon/bits/item_reader.h	(revision 2553)
+++ 	(revision )
@@ -1,685 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup item_io
-/// \file
-/// \brief Item reader bits for lemon input.
-
-#ifndef LEMON_BITS_ITEM_READER_H
-#define LEMON_BITS_ITEM_READER_H
-
-#include <iostream>
-#include <string>
-
-#include <vector>
-#include <deque>
-#include <list>
-#include <set>
-#include <map>
-
-#include <lemon/error.h>
-
-namespace lemon {
-  
-  template <typename Value>
-  class DefaultReader;
-
-  /// \ingroup item_io
-  ///
-  /// \brief Reader class for unformatted strings.
-  ///
-  /// Reader class for unformatted strings. This class want to be
-  /// a general reader type which can read the most 
-  ///
-  /// \author Balazs Dezso
-  class UnformattedReader {
-  public:
-    /// \brief The value type of reader.
-    ///
-    /// The value type of reader.
-    typedef std::string Value;
-    
-    /// \brief Constructor for the reader.
-    ///
-    /// Constructor for the reader.
-    UnformattedReader() {} 
-    
-    /// \brief Reads an unformatted string from the given stream.
-    ///
-    /// Reads an unformatted string from the given stream.
-    void read(std::istream& is, std::string& value) const {
-      char c;
-      value.clear();
-      is >> std::ws;
-      while (is.get(c) && !whiteSpace(c)) {
-        processChar(c, is, value);
-      }
-    }
-
-  private:
-
-    void processChar(char c, std::istream& is, Value& value) const {
-      switch (c) {
-      case '(':
-        is.putback(c);
-        readParsed('(', ')', is, value);
-        break;
-      case '[':
-        is.putback(c);
-        readParsed('[', ']', is, value);
-        break;
-      case '{':
-        is.putback(c);
-        readParsed('{', '}', is, value);
-        break;
-      case '/':
-        is.putback(c);
-        readParsed('/', '/', is, value);
-        break;
-      case '\"':
-        is.putback(c);
-        readQuoted('\"', is, value);
-        break;
-      case '\'':
-        is.putback(c);
-        readQuoted('\'', is, value);
-        break;
-      default:
-        value += c;
-        break;
-      }
-    }
-
-    void readParsed(char open, char close, 
-                    std::istream& is, Value& value) const {
-      char c;
-      if (!is.get(c) || c != open)
-	throw DataFormatError("Unformatted string format error");
-      value += c;
-      while (is.get(c) && c != close) {
-        processChar(c, is, value);
-      }
-      if (!is) 
-        throw DataFormatError("Unformatted string format error");
-      value += c;      
-    }
-
-    void readQuoted(char quote, std::istream& is, Value& value) const {
-      char c;
-      bool esc = false;
-      if (!is.get(c) || c != quote)
-	throw DataFormatError("Unformatted string format error");
-      value += c;
-      while (is.get(c) && (c != quote || esc)) {
-        if (c == '\\') esc = !esc;
-        else esc = false;
-        value += c;
-      }
-      if (!is) 
-        throw DataFormatError("Unformatted string format error");
-      value += c;
-    }
-
-
-
-    static bool whiteSpace(char c) {
-      return c == ' ' || c == '\t' || c == '\v' || 
-        c == '\n' || c == '\r' || c == '\f'; 
-    }
-
-    
-  };
-
-  /// \ingroup item_io
-  ///
-  /// \brief Reader class for quoted strings.
-  ///
-  /// Reader class for quoted strings. It can process the escape
-  /// sequences in the string.
-  ///
-  /// \author Balazs Dezso
-  class QuotedStringReader {
-    friend class QuotedCharReader;
-  public:
-    /// \brief The value type of reader.
-    ///
-    /// The value type of reader.
-    typedef std::string Value;
-    
-    /// \brief Constructor for the reader.
-    ///
-    /// Constructor for the reader. If the given parameter is true
-    /// the reader processes the escape sequences.
-    QuotedStringReader(bool _escaped = true) 
-      : escaped(_escaped) {}
-    
-    /// \brief Reads a quoted string from the given stream.
-    ///
-    /// Reads a quoted string from the given stream.
-    void read(std::istream& is, std::string& value) const {
-      char c;
-      value.clear();
-      is >> std::ws;
-      if (!is.get(c) || (c != '\"' && c != '\'')) 
-	throw DataFormatError("Quoted format error");
-      char quote = c;
-      while (is.get(c) && c != quote) {
-	if (escaped && c == '\\') {
-	  value += readEscape(is);
-	} else {
-	  value += c;
-	}
-      }
-      if (!is) throw DataFormatError("Quoted format error");
-    }
-
-  private:
-    
-    static char readEscape(std::istream& is) {
-      char c;
-      switch (is.get(c), c) {
-      case '\\':
-	return '\\';
-      case '\"':
-	return '\"';
-      case '\'':
-	return '\'';
-      case '\?':
-	return '\?';
-      case 'a':
-	return '\a';
-      case 'b':
-	return '\b';
-      case 'f':
-	return '\f';
-      case 'n':
-	return '\n';
-      case 'r':
-	return '\r';
-      case 't':
-	return '\t';
-      case 'v':
-	return '\v';
-      case 'x':
-	{
-	  int code;
-	  if (!is.get(c) || !isHex(c)) 
-	    throw DataFormatError("Escape format error");
-	  else if (code = valueHex(c), !is.get(c) || !isHex(c)) is.putback(c);
-	  else code = code * 16 + valueHex(c);
-	  return code;
-	}
-      default:
-	{
-	  int code;
-	  if (!isOct(c)) 
-	    throw DataFormatError("Escape format error");
-	  else if (code = valueOct(c), !is.get(c) || !isOct(c)) 
-	    is.putback(c);
-	  else if (code = code * 8 + valueOct(c), !is.get(c) || !isOct(c)) 
-	    is.putback(c);
-	  else code = code * 8 + valueOct(c);
-	  return code;
-	}	      
-      } 
-    }
-
-    static bool isOct(char c) {
-      return '0' <= c && c <='7'; 
-    }
-    
-    static int valueOct(char c) {
-      return c - '0';
-    }
-
-   static bool isHex(char c) {
-      return ('0' <= c && c <= '9') || 
-	('a' <= c && c <= 'z') || 
-	('A' <= c && c <= 'Z'); 
-    }
-    
-    static int valueHex(char c) {
-      if ('0' <= c && c <= '9') return c - '0';
-      if ('a' <= c && c <= 'z') return c - 'a' + 10;
-      return c - 'A' + 10;
-    }
-
-    bool escaped;
-  };
-
-  /// \ingroup item_io
-  ///
-  /// \brief Reader class for quoted strings.
-  ///
-  /// Reader class for quoted strings. It can process the escape
-  /// sequences in the string.
-  ///
-  /// \author Balazs Dezso
-  class QuotedCharReader {
-  public:
-    /// \brief The value type of reader.
-    ///
-    /// The value type of reader.
-    typedef char Value;
-    
-    /// \brief Constructor for the reader.
-    ///
-    /// Constructor for the reader. If the given parameter is true
-    /// the reader processes the escape sequences.
-    QuotedCharReader(bool _escaped = true) 
-      : escaped(_escaped) {}
-    
-    /// \brief Reads a quoted string from the given stream.
-    ///
-    /// Reads a quoted string from the given stream.
-    void read(std::istream& is, char& value) const {
-      char c;
-      is >> std::ws;
-      if (!is.get(c) || c != '\'') 
-	throw DataFormatError("Quoted format error");
-      if (!is.get(c)) 
-        throw DataFormatError("Quoted format error");
-      if (escaped && c == '\\') {
-        value = QuotedStringReader::readEscape(is);
-      } else {
-        value = c;
-      }
-      if (!is.get(c) || c != '\'') 
-	throw DataFormatError("Quoted format error");
-    }
-
-  private:
-    bool escaped;
-  };
-
-  /// \ingroup item_io
-  /// \brief Reader for standard containers.
-  ///
-  /// Reader for back insertable standard containers. The representation
-  /// of the container is the values enumerated between an open and a
-  /// close parse. 
-  ///
-  /// \author Balazs Dezso
-  template <
-    typename _Container, 
-    typename _ItemReader = DefaultReader<typename _Container::value_type> 
-  >
-  class PushBackReader {
-  public:
-    typedef _Container Value;
-    typedef _ItemReader ItemReader;
-
-  private:
-
-    ItemReader item_reader;
-
-  public:
-
-    /// \brief Constructor for InsertReader
-    ///
-    /// Constructor for InsertReader
-    PushBackReader(const ItemReader& _item_reader = ItemReader())
-      : item_reader(_item_reader) {}
-
-    /// \brief Reads the values into the container from the given stream.
-    ///
-    /// Reads the values into the container from the given stream.
-    void read(std::istream& is, Value& value) const {
-      char c;
-      if (!(is >> c) || c != '(') 
-	throw DataFormatError("PushBackReader format error");
-      while (is >> c && c != ')') {
-	is.putback(c);
-	typename ItemReader::Value item;
-	item_reader.read(is, item);
-	value.push_back(item);
-      }
-      if (!is) throw DataFormatError("PushBackReader format error");
-    }
-
-  };
-
-  /// \ingroup item_io
-  ///
-  /// \brief Reader for standard containers.
-  ///
-  /// Reader for insertable standard containers. The representation
-  /// of the container is the values enumerated between an open and a
-  /// close parse. 
-  ///
-  /// \author Balazs Dezso
-  template <
-    typename _Container, 
-    typename _ItemReader = DefaultReader<typename _Container::value_type> 
-  >
-  class InsertReader {
-  public:
-    typedef _Container Value;
-    typedef _ItemReader ItemReader;
-
-  private:
-
-    ItemReader item_reader;
-
-  public:
-
-    /// \brief Constructor for InsertReader
-    ///
-    /// Constructor for InsertReader
-    InsertReader(const ItemReader& _item_reader = ItemReader())
-      : item_reader(_item_reader) {}
-
-    /// \brief Reads the values into the container from the given stream.
-    ///
-    /// Reads the values into the container from the given stream.
-    void read(std::istream& is, Value& value) const {
-      char c;
-      if (!(is >> c) || c != '(') 
-	throw DataFormatError("InsertReader format error");
-      while (is >> c && c != ')') {
-	is.putback(c);
-	typename ItemReader::Value item;
-	item_reader.read(is, item);
-	value.insert(item);
-      }
-      if (!is) throw DataFormatError("PushBackReader format error");
-    }
-
-  };
-
-  /// \ingroup item_io
-  /// \brief Reader for parsed string.
-  ///
-  /// Reader for parsed strings. You can define the open and close
-  /// parse characters. It reads from the input a character sequence
-  /// which is right parsed.
-  ///
-  /// \author Balazs Dezso
-  class ParsedStringReader {
-  public:
-    typedef std::string Value;
-
-    /// \brief Constructor.
-    ///
-    /// Constructor for ParsedStringReader. You can give as parameter
-    /// the open and close parse characters.
-    ParsedStringReader(char _open = '(', char _close = ')')
-      : open(_open), close(_close) {}
-    
-    
-    /// \brief Reads the parsed string from the given stream.
-    ///
-    /// Reads the parsed string from the given stream.
-    void read(std::istream& is, Value& value) const {
-      char c;
-      value.clear();
-      if (!(is >> c) || c != open) {
-	throw DataFormatError("ParsedStringReader format error");
-      }
-      value += c;
-      int counter = 1;
-      while (counter > 0 && is >> c) {
-	if (c == close) {
-	  --counter;
-	} else if (c == open) {
-	  ++counter;
-	}
-	value += c;
-      }
-      if (!is) {
-	throw DataFormatError("ParsedStrinReader format error");
-      }
-    }
-
-  private:
-    char open, close;
-
-  };
-
-  /// \ingroup item_io
-  /// \brief Reader for read the whole line.
-  ///
-  /// Reader for read the whole line.
-  ///
-  /// \author Balazs Dezso
-  class LineReader {
-  public:
-    typedef std::string Value;
-
-    /// \brief Constructor.
-    ///
-    /// Constructor for the LineReader. If the given parameter is
-    /// true then the spaces before the first not space character are
-    /// skipped.
-    LineReader(bool _skipSpaces = true) : skipSpaces(_skipSpaces) {}
-    
-    /// \brief Reads the line from the given stream.
-    ///
-    /// Reads the line from the given stream.
-    void read(std::istream& is, Value& value) const {
-      if (skipSpaces) is >> std::ws;
-      if (!getline(is, value)) {
-	throw DataFormatError("LineReader format error");
-      }
-    }
-  private:
-    bool skipSpaces;
-  };
-
-  /// \ingroup item_io
-  /// \brief Reader for std::pair.
-  ///
-  /// Reader for std::pair.
-  ///
-  /// \author Balazs Dezso
-  template <typename _Pair, 
-	    typename _FirstReader = 
-	    DefaultReader<typename _Pair::first_type>,
-	    typename _SecondReader = 
-	    DefaultReader<typename _Pair::second_type> >
-  class PairReader {
-  public:
-    typedef _Pair Value;
-
-    typedef _FirstReader FirstReader;
-    typedef _SecondReader SecondReader;
-
-  private:
-
-    FirstReader first_reader;
-    SecondReader second_reader;
-
-  public:
-    
-    /// \brief Constructor.
-    ///
-    /// Constructor for the PairReader.
-    PairReader(const FirstReader& _first_reader = FirstReader(), 
-	       const SecondReader& _second_reader = SecondReader()) 
-      : first_reader(_first_reader), second_reader(_second_reader) {}
-    
-    /// \brief Reads the pair from the given stream.
-    ///
-    /// Reads the pair from the given stream.
-    void read(std::istream& is, Value& value) const {
-      char c;
-      if (!(is >> c) || c != '(') {
-	throw DataFormatError("PairReader format error");
-      }
-      first_reader.read(is, value.first);
-      if (!(is >> c) || c != '=') {
-	throw DataFormatError("PairReader format error");
-      }
-      if (!(is >> c) || c != '>') {
-	throw DataFormatError("PairReader format error");
-      }
-      second_reader.read(is, value.second);
-      if (!(is >> c) || c != ')') {
-	throw DataFormatError("PairReader format error");
-      }
-    }
-  };
-
-  /// \ingroup item_io
-  /// 
-  /// \brief The default item reader template class.
-  ///
-  /// The default item reader template class. If some section reader
-  /// needs to read a value from a stream it will give the default way for it.
-  ///
-  /// \author Balazs Dezso
-  template <typename _Value>
-  class DefaultReader {
-  public:
-    /// The value type.
-    typedef _Value Value;
-    /// \brief Reads a value from the given stream.
-    ///
-    /// Reads a value from the given stream.
-    void read(std::istream& is, Value& value) const {
-      if (!(is >> value)) 
-	throw DataFormatError("DefaultReader format error");
-    }
-  };
-
-  template <>
-  class DefaultReader<std::string> {
-  public:
-    typedef std::string Value;
-    
-    void read(std::istream& is, Value& value) const {
-      char c;
-      if (!(is >> std::ws >> c)) 
-        throw DataFormatError("DefaultReader<string> format error");
-      is.putback(c);
-      switch (c) {
-      case '\"':
-	QuotedStringReader().read(is, value);
-	break;
-      default:
-        UnformattedReader().read(is, value);
-	break;
-      }
-    }
-    
-  };
-
-  template <>
-  class DefaultReader<char> {
-  public:
-    typedef char Value;
-    
-    void read(std::istream& is, Value& value) const {
-      char c;
-      if (!(is >> std::ws >> c))
-        throw DataFormatError("DefaultReader<char> format error");
-      is.putback(c);
-      switch (c) {
-      case '\'':
-	QuotedCharReader().read(is, value);
-	break;
-      default:
-        { 
-          int temp;          
-          if (!(is >> temp)) 
-            throw DataFormatError("DefaultReader<char> format error");
-          value = static_cast<char>(temp);
-          break;
-        }
-      }
-    }    
-  };
-
-  template <>
-  class DefaultReader<bool> {
-  public:
-    typedef bool Value;
-    
-    void read(std::istream& is, Value& value) const {
-      std::string rep;
-      if (!(is >> rep))
-        throw DataFormatError("DefaultReader<bool> format error");
-      if (rep == "true" || rep == "t" || rep == "1") {
-        value = true;
-      } else if (rep == "false" || rep == "f" || rep == "0") {
-        value = false;
-      } else throw DataFormatError("DefaultReader<bool> format error");
-    }    
-  };
-
-  template <typename Item>
-  class DefaultReader<std::vector<Item> > 
-    : public PushBackReader<std::vector<Item> > {};
-
-  template <typename Item>
-  class DefaultReader<std::deque<Item> > 
-    : public PushBackReader<std::deque<Item> > {};
-
-  template <typename Item>
-  class DefaultReader<std::list<Item> > 
-    : public PushBackReader<std::list<Item> > {};
-
-  template <typename Item>
-  class DefaultReader<std::set<Item> > 
-    : public InsertReader<std::set<Item> > {};
-
-  template <typename Key, typename Value>
-  class DefaultReader<std::map<Key, Value> > 
-    : public InsertReader<std::map<Key, Value>,
-			  DefaultReader<std::pair<Key, Value> > > {};
-
-  template <typename Item>
-  class DefaultReader<std::multiset<Item> > 
-    : public InsertReader<std::multiset<Item> > {};
-
-  template <typename Key, typename Value>
-  class DefaultReader<std::multimap<Key, Value> > 
-    : public InsertReader<std::multimap<Key, Value>,
-			  DefaultReader<std::pair<Key, Value> > > {};
-
-  template <typename First, typename Second>
-  class DefaultReader<std::pair<First, Second> > 
-    : public PairReader<std::pair<First, Second> > {};
-
-  /// \ingroup item_io
-  /// 
-  /// \brief The default item reader for skipping a value in the stream.
-  ///
-  /// The default item reader for skipping a value in the stream.
-  ///
-  /// \author Balazs Dezso
-  class DefaultSkipper : public UnformattedReader {};
-
-  /// \ingroup item_io  
-  /// \brief Standard ReaderTraits for the GraphReader class.
-  ///
-  /// Standard ReaderTraits for the GraphReader class.
-  /// It defines standard reading method for all type of value. 
-  /// \author Balazs Dezso
-  struct DefaultReaderTraits {
-
-    template <typename _Value>
-    struct Reader : DefaultReader<_Value> {};
-
-    typedef DefaultSkipper Skipper;
-
-  };
-
-}
-
-#endif
Index: lemon/bits/item_writer.h
===================================================================
--- lemon/bits/item_writer.h	(revision 2553)
+++ 	(revision )
@@ -1,491 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup item_io
-/// \file
-/// \brief Item writer bits for lemon output.
-
-#ifndef LEMON_BITS_ITEM_WRITER_H
-#define LEMON_BITS_ITEM_WRITER_H
-
-#include <iostream>
-#include <sstream>
-#include <string>
-
-#include <vector>
-#include <deque>
-#include <list>
-#include <set>
-#include <map>
-
-#include <lemon/error.h>
-
-namespace lemon {
-  
-  template <typename Value>
-  class DefaultWriter;
-
-  /// \ingroup item_io
-  /// \brief Writer class for quoted strings.
-  ///
-  /// Writer class for unformatted strings.
-  /// \author Balazs Dezso
-  class UnformattedWriter {
-  public:
-    typedef std::string Value;
-
-    /// \brief Constructor for the writer.
-    ///
-    /// Constructor for the writer.
-    UnformattedWriter() {}
-
-    /// \brief Writes an unformatted string to the given stream.
-    ///
-    /// Writes an unformatted string to the given stream.
-    void write(std::ostream& os, const std::string& value) const {
-      os << value;
-    }
-
-    bool readable(const std::string& value) const {
-      std::istringstream is(value);
-      char c;
-      while (is.get(c) && !whiteSpace(c)) {
-        if (!processChar(c, is)) return false;
-      }
-      if (is) return false;
-      return true;
-    }
-
-  private:
-
-    bool processChar(char c, std::istream& is) const {
-      switch (c) {
-      case '(':
-        is.putback(c);
-        if (!readableParsed('(', ')', is)) return false;
-        break;
-      case '[':
-        is.putback(c);
-        if (!readableParsed('[', ']', is)) return false;
-        break;
-      case '{':
-        is.putback(c);
-        if (!readableParsed('{', '}', is)) return false;
-        break;
-      case '/':
-        is.putback(c);
-        if (!readableParsed('/', '/', is)) return false;
-        break;
-      case '\"':
-        is.putback(c);
-        if (!readableQuoted('\"', is)) return false;
-        break;
-      case '\'':
-        is.putback(c);
-        if (!readableQuoted('\'', is)) return false;
-        break;
-      default:
-        break;
-      }
-      return true;
-    }
-
-    bool readableParsed(char open, char close, std::istream& is) const {
-      char c;
-      if (!is.get(c) || c != open) return false;
-      while (is.get(c) && c != close) {
-        if (!processChar(c, is)) return false;
-      }
-      if (!is) return false;
-      return true;
-    }
-
-    bool readableQuoted(char quote, std::istream& is) const {
-      char c;
-      bool esc = false;
-      if (!is.get(c) || c != quote) return false;
-      while (is.get(c) && (c != quote || esc)) {
-        if (c == '\\') esc = !esc;
-        else esc = false;
-      }
-      if (!is) return false;
-      return true;
-    }
-
-    static bool whiteSpace(char c) {
-      return c == ' ' || c == '\t' || c == '\v' || 
-        c == '\n' || c == '\r' || c == '\f'; 
-    }
-
-  };
-
-  /// \ingroup item_io
-  /// \brief Writer class for quoted strings.
-  ///
-  /// Writer class for quoted strings. It can process the escape
-  /// sequences in the string.
-  /// \author Balazs Dezso
-  class QuotedStringWriter {
-    friend class QuotedCharWriter;
-  public:
-    typedef std::string Value;
-
-    /// \brief Constructor for the writer.
-    ///
-    /// Constructor for the writer. If the given parameter is true
-    /// the writer creates escape sequences from special characters.
-    QuotedStringWriter(bool _escaped = true, char _quote = '\"') 
-      : escaped(_escaped), quote(_quote) {}
-
-    /// \brief Writes a quoted string to the given stream.
-    ///
-    /// Writes a quoted string to the given stream.
-    void write(std::ostream& os, const std::string& value) const {
-      os << quote;
-      if (escaped) {
-	std::ostringstream ls;
-	for (int i = 0; i < int(value.size()); ++i) {
-	  writeEscape(ls, value[i]);
-	}
-	os << ls.str();
-      } else {
-	os << value;
-      }
-      os << quote;
-    }
-
-  private:
-    
-    static void writeEscape(std::ostream& os, char c) {
-      switch (c) {
-      case '\\':
-	os << "\\\\";
-	return;
-      case '\"':
-	os << "\\\"";
-	return;
-      case '\'':
-	os << "\\\'";
-	return;
-      case '\?':
-	os << "\\\?";
-	return;
-      case '\a':
-	os << "\\a";
-	return;
-      case '\b':
-	os << "\\b";
-	return;
-      case '\f':
-	os << "\\f";
-	return;
-      case '\r':
-	os << "\\r";
-	return;
-      case '\n':
-	os << "\\n";
-	return;
-      case '\t':
-	os << "\\t";
-	return;
-      case '\v':
-	os << "\\v";
-	return;
-      default:
-	if (c < 0x20) {
-	  os << '\\' << std::oct << static_cast<int>(c);
-	} else {
-	  os << c;
-	}
-	return;
-      }     
-    }
-  private:
-    bool escaped;
-    char quote;
-  };
-
-  /// \ingroup item_io
-  /// \brief Writer class for quoted chars.
-  ///
-  /// Writer class for quoted char. It can process the escape
-  /// sequences in the string.
-  /// \author Balazs Dezso
-  class QuotedCharWriter {
-  public:
-    typedef char Value;
-
-    /// \brief Constructor for the writer.
-    ///
-    /// Constructor for the writer. If the given parameter is true
-    /// the writer creates escape sequences from special characters.
-    QuotedCharWriter(bool _escaped = true) : escaped(_escaped) {}
-
-    /// \brief Writes a quoted char to the given stream.
-    ///
-    /// Writes a quoted char to the given stream.
-    void write(std::ostream& os, const char& value) const {
-      os << "\'";
-      if (escaped) {
-	std::ostringstream ls;
-        QuotedStringWriter::writeEscape(ls, value);
-	os << ls.str();
-      } else {
-	os << value;
-      }
-      os << "\'";
-    }
-
-  private:
-    bool escaped;
-  };
-
-  /// \ingroup item_io
-  /// \brief Writer class for quoted char array.
-  ///
-  /// Writer class for quoted char array. It can process the escape
-  /// sequences in the char array.
-  /// \author Balazs Dezso
-  class QuotedCharArrayWriter {
-  public:
-    typedef const char* Value;
-
-    /// \brief Constructor for the writer.
-    ///
-    /// Constructor for the writer. If the given parameter is true
-    /// the writer creates escape sequences from special characters.
-    QuotedCharArrayWriter(bool _escaped = true) : escaped(_escaped) {}
-
-    /// \brief Writes a quoted char array to the given stream.
-    ///
-    /// Writes a quoted char array to the given stream.
-    void write(std::ostream& os, const char* value) const {
-      QuotedStringWriter(escaped).write(os, std::string(value));
-    }
-
-  private:    
-    bool escaped;
-  };
-
-
-  /// \ingroup item_io
-  ///
-  /// \brief Writer for standard containers.
-  ///
-  /// Writer for each iterable standard containers. The representation
-  /// of the container is the values enumerated between an open and a
-  /// close parse. 
-  ///
-  /// \author Balazs Dezso
-  template <
-    typename _Container, 
-    typename _ItemWriter = DefaultWriter<typename _Container::value_type> 
-  >
-  class IterableWriter {
-  public:
-    typedef _Container Value;
-    typedef _ItemWriter ItemWriter;
-
-  private:
-
-    ItemWriter item_writer;
-
-  public:
-
-    IterableWriter(const ItemWriter& _item_writer = ItemWriter())
-      : item_writer(_item_writer) {}
-
-    /// \brief Writes the values of the container to the given stream.
-    ///
-    /// Writes the values of the container to the given stream.
-    void write(std::ostream& os, const Value& value) const {
-      typename Value::const_iterator it;
-      os << '(';
-      for (it = value.begin(); it != value.end(); ++it) {
-	item_writer.write(os, *it);
-	os << ' ';
-      }
-      os << ')';
-    }
-
-  };
-
-  /// \ingroup item_io
-  ///
-  /// \brief Writer for standard pairs.
-  ///
-  /// Writer for standard pairs. The representation of a pair is
-  ///\code ( first_value => second_value ) \endcode.
-  /// \author Balazs Dezso
-  template <typename _Pair, 
-	    typename _FirstWriter = 
-	    DefaultWriter<typename _Pair::first_type>,
-	    typename _SecondWriter = 
-	    DefaultWriter<typename _Pair::second_type> >
-  class PairWriter {
-  public:
-
-    typedef _Pair Value;
-
-    typedef _FirstWriter FirstWriter;
-    typedef _SecondWriter SecondWriter;
-
-  private:
-
-    FirstWriter first_writer;
-    SecondWriter second_writer;
-
-  public:
-    
-    /// \brief Constructor.
-    ///
-    /// Constructor for the PairWriter.
-    PairWriter(const FirstWriter& _first_writer = FirstWriter(), 
-	       const SecondWriter& _second_writer = SecondWriter()) 
-      : first_writer(_first_writer), second_writer(_second_writer) {}
-    
-    /// \brief Writes the pair from the given stream.
-    ///
-    /// Writes the pair from the given stream.
-    void write(std::ostream& os, const Value& value) const {
-      os << "( ";
-      first_writer.write(os, value.first);
-      os << " => ";
-      second_writer.write(os, value.second);
-      os << " )";
-    }
-
-  };
-
-  /// \ingroup item_io
-  /// 
-  /// \brief The default item writer template class.
-  ///
-  /// The default item writer template class. If some section writer
-  /// needs to write a value to the stream it will give the default way for it.
-  ///
-  /// \author Balazs Dezso
-  template <typename _Value>
-  class DefaultWriter {
-  public:
-    /// The value type.
-    typedef _Value Value;
-    /// \brief Writes the value to the given stream.
-    ///
-    /// Writes the value to the given stream.
-    void write(std::ostream& os, const Value& value) const {
-      os << value;
-    }
-  };
-
-  template <>
-  class DefaultWriter<std::string> {
-  public:
-    typedef std::string Value;
-    
-    void write(std::ostream& os, const Value& value) const {
-      if (UnformattedWriter().readable(value)) {
-        UnformattedWriter().write(os, value);
-      } else {
-        QuotedStringWriter().write(os, value);
-      }
-    }
-      
-  };
-
-  template <>
-  class DefaultWriter<char> 
-    : public QuotedCharWriter {};
-
-  template <>
-  class DefaultWriter<bool> {
-  public:
-    typedef bool Value;
-    
-    void write(std::ostream& os, const Value& value) const {
-      os << (value ? "1" : "0");
-    }
-      
-  };
-
-  template <int length>
-  class DefaultWriter<char[length]> 
-    : public QuotedCharArrayWriter {};
-
-  template <int length>
-  class DefaultWriter<const char[length]> 
-    : public QuotedCharArrayWriter {};
-
-  template <>
-  class DefaultWriter<char*> 
-    : public QuotedCharArrayWriter {};
-
-  template <>
-  class DefaultWriter<const char*> 
-    : public QuotedCharArrayWriter {};
-
-  template <typename Item>
-  class DefaultWriter<std::vector<Item> > 
-    : public IterableWriter<std::vector<Item> > {};
-
-  template <typename Item>
-  class DefaultWriter<std::deque<Item> > 
-    : public IterableWriter<std::deque<Item> > {};
-
-  template <typename Item>
-  class DefaultWriter<std::list<Item> > 
-    : public IterableWriter<std::list<Item> > {};
-  
-  template <typename Item>
-  class DefaultWriter<std::set<Item> > 
-    : public IterableWriter<std::set<Item> > {};
-
-  template <typename Key, typename Value>
-  class DefaultWriter<std::map<Key, Value> > 
-    : public IterableWriter<std::map<Key, Value> > {};
-
-  template <typename Item>
-  class DefaultWriter<std::multiset<Item> > 
-    : public IterableWriter<std::multiset<Item> > {};
-
-  template <typename Key, typename Value>
-  class DefaultWriter<std::multimap<Key, Value> > 
-    : public IterableWriter<std::multimap<Key, Value> > {};
-
-  template <typename First, typename Second>
-  class DefaultWriter<std::pair<First, Second> > 
-    : public PairWriter<std::pair<First, Second> > {};
-
-  /// \ingroup item_io
-  /// \brief Standard WriterTraits for the section writers.
-  ///
-  /// Standard WriterTraits for the section writers.
-  /// It defines standard writing method for all type of value. 
-  /// \author Balazs Dezso
-  struct DefaultWriterTraits {
-
-    template <typename _Value>
-    struct Writer : DefaultWriter<_Value> {
-      typedef DefaultWriter<_Value> Parent;
-    };
-
-  };
-
-}
-
-#endif
Index: lemon/bits/lp_id.h
===================================================================
--- lemon/bits/lp_id.h	(revision 2553)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_LP_SOLVER_ID_H
-#define LEMON_BITS_LP_SOLVER_ID_H
-
-namespace lemon {
-  
-  namespace _lp_bits {
-
-    struct LpIdImpl {
-      std::vector<int> index;
-      std::vector<int> cross;
-      int first_index;
-      int first_free;      
-    };
-
-    class LpId {
-    public:
-      
-      class IdHandler {
-      public:
-        virtual ~IdHandler() {}
-        virtual int addId(LpIdImpl&) = 0;
-        virtual void eraseId(LpIdImpl&, int xn) = 0;
-      };
-      
-      LpId(int min_index = 0) {
-        id_handler = 0;
-        impl.first_free = -1;
-        impl.first_index = min_index;
-        impl.cross.resize(impl.first_index);
-      }
-
-      void setIdHandler(IdHandler& ih) {
-        id_handler = &ih;
-      }
-      
-      int fixId(int fn) const {return impl.cross[fn];}
-      int floatingId(int xn) const {return impl.index[xn];}
-      
-      int addId() {
-        if (id_handler == 0) {
-          int xn, fn = impl.cross.size();
-          if (impl.first_free == -1) {
-            xn = impl.index.size();
-            impl.index.push_back(fn);
-          } else {
-            xn = impl.first_free;
-            impl.first_free = impl.index[impl.first_free];
-            impl.index[xn] = fn;
-          }
-          impl.cross.push_back(xn);
-          return xn;
-        } else {
-          return id_handler->addId(impl);
-        }
-      }
-
-      void eraseId(int xn) {
-        if (id_handler == 0) {
-          int fn = impl.index[xn];
-          impl.index[xn] = impl.first_free;
-          impl.first_free = xn;
-          for(int i = fn + 1; i < int(impl.cross.size()); ++i) {
-            impl.cross[i - 1] = impl.cross[i];
-            impl.index[impl.cross[i]]--;
-          }
-          impl.cross.pop_back();
-        } else {
-          id_handler->eraseId(impl, xn);
-        }
-      }
-
-      void firstFloating(int& fn) const {
-        fn = impl.first_index;
-        if (fn == int(impl.cross.size())) fn = -1;
-      }
-
-      void nextFloating(int& fn) const {
-        ++fn;
-        if (fn == int(impl.cross.size())) fn = -1;
-      }
-
-      void firstFix(int& xn) const {
-        int fn;
-        firstFloating(fn);
-        xn = fn != -1 ? fixId(fn) : -1;
-      }
-      
-      void nextFix(int& xn) const {
-        int fn = floatingId(xn);
-        nextFloating(fn);
-        xn = fn != -1 ? fixId(fn) : -1;    
-      }
-
-    protected:
-      LpIdImpl impl;
-      IdHandler *id_handler;
-    };
-  
-    class RelocateIdHandler : public LpId::IdHandler {
-    public:
-
-      virtual int addId(LpIdImpl& impl) {
-        int xn, fn = impl.cross.size();
-        if (impl.first_free == -1) {
-          xn = impl.index.size();
-          impl.index.push_back(fn);
-        } else {
-          xn = impl.first_free;
-          impl.first_free = impl.index[impl.first_free];
-          impl.index[xn] = fn;
-        }
-        impl.cross.push_back(xn);
-        return xn;
-      }
-
-      virtual void eraseId(LpIdImpl& impl, int xn) {
-        int fn = impl.index[xn];
-        impl.index[xn] = impl.first_free;
-        impl.first_free = xn;
-        impl.cross[fn] = impl.cross.back();
-        impl.index[impl.cross.back()] = fn;
-        impl.cross.pop_back();
-      }
-    };
-  }  
-}
-
-#endif
Index: lemon/bits/map_extender.h
===================================================================
--- lemon/bits/map_extender.h	(revision 2553)
+++ 	(revision )
@@ -1,321 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_MAP_EXTENDER_H
-#define LEMON_BITS_MAP_EXTENDER_H
-
-#include <iterator>
-
-#include <lemon/bits/traits.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-///\file
-///\brief Extenders for iterable maps.
-
-namespace lemon {
-
-  /// \ingroup graphbits
-  /// 
-  /// \brief Extender for maps
-  template <typename _Map>
-  class MapExtender : public _Map {
-  public:
-
-    typedef _Map Parent;
-    typedef MapExtender Map;
-
-
-    typedef typename Parent::Graph Graph;
-    typedef typename Parent::Key Item;
-
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    class MapIt;
-    class ConstMapIt;
-
-    friend class MapIt;
-    friend class ConstMapIt;
-
-  public:
-
-    MapExtender(const Graph& graph) 
-      : Parent(graph) {}
-
-    MapExtender(const Graph& graph, const Value& value) 
-      : Parent(graph, value) {}
-
-    MapExtender& operator=(const MapExtender& cmap) {
-      return operator=<MapExtender>(cmap);
-    }
-
-    template <typename CMap>
-    MapExtender& operator=(const CMap& cmap) {
-      Parent::operator=(cmap);
-      return *this;
-    } 
-
-    class MapIt : public Item {
-    public:
-      
-      typedef Item Parent;
-      typedef typename Map::Value Value;
-      
-      MapIt() {}
-
-      MapIt(Invalid i) : Parent(i) { }
-
-      explicit MapIt(Map& _map) : map(_map) {
-        map.notifier()->first(*this);
-      }
-
-      MapIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      MapIt& operator++() { 
-	map.notifier()->next(*this);
-	return *this; 
-      }
-      
-      typename MapTraits<Map>::ConstReturnValue operator*() const {
-	return map[*this];
-      }
-
-      typename MapTraits<Map>::ReturnValue operator*() {
-	return map[*this];
-      }
-      
-      void set(const Value& value) {
-	map.set(*this, value);
-      }
-      
-    protected:
-      Map& map;
-      
-    };
-
-    class ConstMapIt : public Item {
-    public:
-
-      typedef Item Parent;
-
-      typedef typename Map::Value Value;
-      
-      ConstMapIt() {}
-
-      ConstMapIt(Invalid i) : Parent(i) { }
-
-      explicit ConstMapIt(Map& _map) : map(_map) {
-        map.notifier()->first(*this);
-      }
-
-      ConstMapIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      ConstMapIt& operator++() { 
-	map.notifier()->next(*this);
-	return *this; 
-      }
-
-      typename MapTraits<Map>::ConstReturnValue operator*() const {
-	return map[*this];
-      }
-
-    protected:
-      const Map& map;
-    };
-
-    class ItemIt : public Item {
-    public:
-      
-      typedef Item Parent;
-      
-      ItemIt() {}
-
-      ItemIt(Invalid i) : Parent(i) { }
-
-      explicit ItemIt(Map& _map) : map(_map) {
-        map.notifier()->first(*this);
-      }
-
-      ItemIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      ItemIt& operator++() { 
-	map.notifier()->next(*this);
-	return *this; 
-      }
-
-    protected:
-      const Map& map;
-      
-    };
-  };
-
-  /// \ingroup graphbits
-  /// 
-  /// \brief Extender for maps which use a subset of the items.
-  template <typename _Graph, typename _Map>
-  class SubMapExtender : public _Map {
-  public:
-
-    typedef _Map Parent;
-    typedef SubMapExtender Map;
-
-    typedef _Graph Graph;
-
-    typedef typename Parent::Key Item;
-
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    class MapIt;
-    class ConstMapIt;
-
-    friend class MapIt;
-    friend class ConstMapIt;
-
-  public:
-
-    SubMapExtender(const Graph& _graph) 
-      : Parent(_graph), graph(_graph) {}
-
-    SubMapExtender(const Graph& _graph, const Value& _value) 
-      : Parent(_graph, _value), graph(_graph) {}
-
-    SubMapExtender& operator=(const SubMapExtender& cmap) {
-      return operator=<MapExtender>(cmap);
-    }
-
-    template <typename CMap>
-    SubMapExtender& operator=(const CMap& cmap) {
-      checkConcept<concepts::ReadMap<Key, Value>, CMap>();
-      Item it;
-      for (graph.first(it); it != INVALID; graph.next(it)) {
-        Parent::set(it, cmap[it]);
-      }
-      return *this;
-    } 
-
-    class MapIt : public Item {
-    public:
-      
-      typedef Item Parent;
-      typedef typename Map::Value Value;
-      
-      MapIt() {}
-
-      MapIt(Invalid i) : Parent(i) { }
-
-      explicit MapIt(Map& _map) : map(_map) {
-        map.graph.first(*this);
-      }
-
-      MapIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      MapIt& operator++() { 
-	map.graph.next(*this);
-	return *this; 
-      }
-      
-      typename MapTraits<Map>::ConstReturnValue operator*() const {
-	return map[*this];
-      }
-
-      typename MapTraits<Map>::ReturnValue operator*() {
-	return map[*this];
-      }
-      
-      void set(const Value& value) {
-	map.set(*this, value);
-      }
-      
-    protected:
-      Map& map;
-      
-    };
-
-    class ConstMapIt : public Item {
-    public:
-
-      typedef Item Parent;
-
-      typedef typename Map::Value Value;
-      
-      ConstMapIt() {}
-
-      ConstMapIt(Invalid i) : Parent(i) { }
-
-      explicit ConstMapIt(Map& _map) : map(_map) {
-        map.graph.first(*this);
-      }
-
-      ConstMapIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      ConstMapIt& operator++() { 
-	map.graph.next(*this);
-	return *this; 
-      }
-
-      typename MapTraits<Map>::ConstReturnValue operator*() const {
-	return map[*this];
-      }
-
-    protected:
-      const Map& map;
-    };
-
-    class ItemIt : public Item {
-    public:
-      
-      typedef Item Parent;
-      
-      ItemIt() {}
-
-      ItemIt(Invalid i) : Parent(i) { }
-
-      explicit ItemIt(Map& _map) : map(_map) {
-        map.graph.first(*this);
-      }
-
-      ItemIt(const Map& _map, const Item& item) 
-	: Parent(item), map(_map) {}
-
-      ItemIt& operator++() { 
-	map.graph.next(*this);
-	return *this; 
-      }
-
-    protected:
-      const Map& map;
-      
-    };
-    
-  private:
-
-    const Graph& graph;
-    
-  };
-
-}
-
-#endif
Index: lemon/bits/mingw32_time.cc
===================================================================
--- lemon/bits/mingw32_time.cc	(revision 2553)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifdef WIN32
-
-#include <lemon/bits/mingw32_time.h>
-
-#include <windows.h>
-#include <ctime>
-#include "dos.h"
-
-static const char days[] = 
-"Sun Mon Tue Wed Thu Fri Sat ";
-static const char months[] = 
-"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ";
-
-void num2str(char *c,int i) {
-  c[0]=i/10+'0';
-  c[1]=i%10+'0';
-}
-
-char *asctime_r(const struct tm *t, char *buf) {
-  *(int*)buf=*(int*)(days+(t->tm_wday<<2));
-  *(int*)(buf+4)=*(int*)(months+(t->tm_mon<<2));
-  num2str(buf+8,t->tm_mday);
-  if (buf[8]=='0') buf[8]=' ';
-  buf[10]=' ';
-  num2str(buf+11,t->tm_hour);
-  buf[13]=':';
-  num2str(buf+14,t->tm_min);
-  buf[16]=':';
-  num2str(buf+17,t->tm_sec);
-  buf[19]=' ';
-  num2str(buf+20,(t->tm_year+1900)/100);
-  num2str(buf+22,(t->tm_year+1900)%100);
-  buf[24]='\n'; buf[25]='\0';
-  return buf;
-}
-
-struct tm * localtime_r (const time_t *t, struct tm *tm) {
-  struct tm *tmp;
-  
-  if ((tmp = localtime(t)) && tm)
-    *tm = *tmp;
-  else
-    return 0;
-  
-  return tm;
-}
-
-char *ctime_r(const time_t * tim_p , char * result) {
-  struct tm tm;
-  return asctime_r (localtime_r (tim_p, &tm), result);
-}
-
-
-int gettimeofday(struct timeval * tp, struct timezone *) {
-  SYSTEMTIME systime;
-
-  if (tp) {
-    struct tm tmrec;
-    time_t theTime = time(NULL);
-    
-    
-    tmrec = *localtime(&theTime);
-    tp->tv_sec = mktime(&tmrec);
-    GetLocalTime(&systime); /* system time */
-
-    tp->tv_usec = systime.wMilliseconds * 1000;
-  }
-  return 0;
-}
-
-long filetime_to_clock(FILETIME *ft)
-{
-  __int64 qw = ft->dwHighDateTime;
-  qw <<= 32;
-  qw |= ft->dwLowDateTime;
-  qw /= 10000;  
-  return (long) qw;
-
-}
-
-int times(struct tms *tmbuf)
-{
-  FILETIME create, exit, kernel, user;
-  if (GetProcessTimes(GetCurrentProcess(),&create, &exit, &kernel, &user)) {
-    tmbuf->tms_utime = filetime_to_clock(&user);
-    tmbuf->tms_stime = filetime_to_clock(&kernel);
-    tmbuf->tms_cutime = 0;
-    tmbuf->tms_cstime = 0;
-  }
-  else {
-    tmbuf->tms_utime = clock();
-    tmbuf->tms_stime = 0;
-    tmbuf->tms_cutime = 0;
-    tmbuf->tms_cstime = 0;
-  }
-  return 0;
-}
-
-int sysconf(int)
-{
-  return 1;
-}
-
-#endif
Index: lemon/bits/mingw32_time.h
===================================================================
--- lemon/bits/mingw32_time.h	(revision 2553)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_MINGW32_TIME_H
-#define LEMON_BITS_MINGW32_TIME_H
-
-#ifdef WIN32
-
-#include <windows.h>
-#include <ctime>
-#include "dos.h"
-
-char *asctime_r(const struct tm *t, char *buf);
-struct tm * localtime_r (const time_t *t, struct tm *tm);
-char *ctime_r(const time_t * tim_p , char * result);
-int gettimeofday(struct timeval * tp, struct timezone *);
-
-struct tms {
-  long	tms_utime;
-  long	tms_stime;
-  long	tms_cutime;
-  long	tms_cstime;
-};
-
-long filetime_to_clock(FILETIME *ft);
-
-int times(struct tms *tmbuf);
-
-#define _SC_CLK_TCK 1
-
-int sysconf(int);
-
-#endif
-
-#endif
Index: lemon/bits/path_dump.h
===================================================================
--- lemon/bits/path_dump.h	(revision 2553)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_PRED_MAP_PATH_H
-#define LEMON_BITS_PRED_MAP_PATH_H
-
-namespace lemon {
-
-  template <typename _Graph, typename _PredMap>
-  class PredMapPath {
-  public:
-    typedef True RevPathTag;
-
-    typedef _Graph Graph;
-    typedef typename Graph::Edge Edge;
-    typedef _PredMap PredMap;
-
-    PredMapPath(const Graph& _graph, const PredMap& _predMap,
-                typename Graph::Node _target)
-      : graph(_graph), predMap(_predMap), target(_target) {}
-
-    int length() const {
-      int len = 0;
-      typename Graph::Node node = target;
-      typename Graph::Edge edge;
-      while ((edge = predMap[node]) != INVALID) {
-        node = graph.source(edge);
-        ++len;
-      }
-      return len;
-    }
-
-    bool empty() const {
-      return predMap[target] != INVALID;
-    }
-
-    class RevEdgeIt {
-    public:
-      RevEdgeIt() {}
-      RevEdgeIt(Invalid) : path(0), current(INVALID) {}
-      RevEdgeIt(const PredMapPath& _path) 
-        : path(&_path), current(_path.target) {
-        if (path->predMap[current] == INVALID) current = INVALID;
-      }
-
-      operator const typename Graph::Edge() const {
-        return path->predMap[current];
-      }
-
-      RevEdgeIt& operator++() {
-        current = path->graph.source(path->predMap[current]);
-        if (path->predMap[current] == INVALID) current = INVALID;
-        return *this;
-      }
-
-      bool operator==(const RevEdgeIt& e) const { 
-        return current == e.current; 
-      }
-
-      bool operator!=(const RevEdgeIt& e) const {
-        return current != e.current; 
-      }
-
-      bool operator<(const RevEdgeIt& e) const { 
-        return current < e.current; 
-      }
-      
-    private:
-      const PredMapPath* path;
-      typename Graph::Node current;
-    };
-
-  private:
-    const Graph& graph;
-    const PredMap& predMap;
-    typename Graph::Node target;
-  };
-
-
-  template <typename _Graph, typename _PredMatrixMap>
-  class PredMatrixMapPath {
-  public:
-    typedef True RevPathTag;
-
-    typedef _Graph Graph;
-    typedef typename Graph::Edge Edge;
-    typedef _PredMatrixMap PredMatrixMap;
-
-    PredMatrixMapPath(const Graph& _graph, 
-                      const PredMatrixMap& _predMatrixMap,
-                      typename Graph::Node _source, 
-                      typename Graph::Node _target)
-      : graph(_graph), predMatrixMap(_predMatrixMap), 
-        source(_source), target(_target) {}
-
-    int length() const {
-      int len = 0;
-      typename Graph::Node node = target;
-      typename Graph::Edge edge;
-      while ((edge = predMatrixMap(source, node)) != INVALID) {
-        node = graph.source(edge);
-        ++len;
-      }
-      return len;
-    }
-
-    bool empty() const {
-      return source != target;
-    }
-
-    class RevEdgeIt {
-    public:
-      RevEdgeIt() {}
-      RevEdgeIt(Invalid) : path(0), current(INVALID) {}
-      RevEdgeIt(const PredMatrixMapPath& _path) 
-        : path(&_path), current(_path.target) {
-        if (path->predMatrixMap(path->source, current) == INVALID) 
-          current = INVALID;
-      }
-
-      operator const typename Graph::Edge() const {
-        return path->predMatrixMap(path->source, current);
-      }
-
-      RevEdgeIt& operator++() {
-        current = 
-          path->graph.source(path->predMatrixMap(path->source, current));
-        if (path->predMatrixMap(path->source, current) == INVALID) 
-          current = INVALID;
-        return *this;
-      }
-
-      bool operator==(const RevEdgeIt& e) const { 
-        return current == e.current; 
-      }
-
-      bool operator!=(const RevEdgeIt& e) const {
-        return current != e.current; 
-      }
-
-      bool operator<(const RevEdgeIt& e) const { 
-        return current < e.current; 
-      }
-      
-    private:
-      const PredMatrixMapPath* path;
-      typename Graph::Node current;
-    };
-
-  private:
-    const Graph& graph;
-    const PredMatrixMap& predMatrixMap;
-    typename Graph::Node source;
-    typename Graph::Node target;
-  };
-
-}
-
-#endif
Index: lemon/bits/traits.h
===================================================================
--- lemon/bits/traits.h	(revision 2618)
+++ 	(revision )
@@ -1,346 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_TRAITS_H
-#define LEMON_BITS_TRAITS_H
-
-#include <lemon/bits/utility.h>
-
-///\file
-///\brief Traits for graphs and maps
-///
-
-namespace lemon {
-  template <typename _Graph, typename _Item>
-  class ItemSetTraits {};
-  
-
-  template <typename Graph, typename Enable = void>
-  struct NodeNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct NodeNotifierIndicator<
-    Graph, 
-    typename enable_if<typename Graph::NodeNotifier::Notifier, void>::type
-  > { 
-    typedef typename Graph::NodeNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::Node> {
-  public:
-    
-    typedef _Graph Graph;
-
-    typedef typename Graph::Node Item;
-    typedef typename Graph::NodeIt ItemIt;
-
-    typedef typename NodeNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template NodeMap<_Value> {
-    public:
-      typedef typename Graph::template NodeMap<_Value> Parent; 
-      typedef typename Graph::template NodeMap<_Value> Type; 
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _graph) : Parent(_graph) {}
-      Map(const Graph& _graph, const Value& _value) 
-	: Parent(_graph, _value) {}
-
-     };
-
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct EdgeNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct EdgeNotifierIndicator<
-    Graph, 
-    typename enable_if<typename Graph::EdgeNotifier::Notifier, void>::type
-  > { 
-    typedef typename Graph::EdgeNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::Edge> {
-  public:
-    
-    typedef _Graph Graph;
-
-    typedef typename Graph::Edge Item;
-    typedef typename Graph::EdgeIt ItemIt;
-
-    typedef typename EdgeNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template EdgeMap<_Value> {
-    public:
-      typedef typename Graph::template EdgeMap<_Value> Parent; 
-      typedef typename Graph::template EdgeMap<_Value> Type; 
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _graph) : Parent(_graph) {}
-      Map(const Graph& _graph, const Value& _value) 
-	: Parent(_graph, _value) {}
-    };
-
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct UEdgeNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct UEdgeNotifierIndicator<
-    Graph, 
-    typename enable_if<typename Graph::UEdgeNotifier::Notifier, void>::type
-  > { 
-    typedef typename Graph::UEdgeNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::UEdge> {
-  public:
-    
-    typedef _Graph Graph;
-
-    typedef typename Graph::UEdge Item;
-    typedef typename Graph::UEdgeIt ItemIt;
-
-    typedef typename UEdgeNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template UEdgeMap<_Value> {
-    public:
-      typedef typename Graph::template UEdgeMap<_Value> Parent; 
-      typedef typename Graph::template UEdgeMap<_Value> Type; 
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _graph) : Parent(_graph) {}
-      Map(const Graph& _graph, const Value& _value) 
-	: Parent(_graph, _value) {}
-    };
-
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct ANodeNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct ANodeNotifierIndicator<
-    Graph, 
-    typename enable_if<typename Graph::ANodeNotifier::Notifier, void>::type
-  > { 
-    typedef typename Graph::ANodeNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::ANode> {
-  public:
-    
-    typedef _Graph Graph;
-
-    typedef typename Graph::ANode Item;
-    typedef typename Graph::ANodeIt ItemIt;
-
-    typedef typename ANodeNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template ANodeMap<_Value> {
-    public:
-      typedef typename Graph::template ANodeMap<_Value> Parent; 
-      typedef typename Graph::template ANodeMap<_Value> Type; 
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _graph) : Parent(_graph) {}
-      Map(const Graph& _graph, const Value& _value) 
-	: Parent(_graph, _value) {}
-    };
-
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct BNodeNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct BNodeNotifierIndicator<
-    Graph, 
-    typename enable_if<typename Graph::BNodeNotifier::Notifier, void>::type
-  > { 
-    typedef typename Graph::BNodeNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::BNode> {
-  public:
-    
-    typedef _Graph Graph;
-
-    typedef typename Graph::BNode Item;
-    typedef typename Graph::BNodeIt ItemIt;
-
-    typedef typename BNodeNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template BNodeMap<_Value> {
-    public:
-      typedef typename Graph::template BNodeMap<_Value> Parent; 
-      typedef typename Graph::template BNodeMap<_Value> Type; 
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _graph) : Parent(_graph) {}
-      Map(const Graph& _graph, const Value& _value) 
-	: Parent(_graph, _value) {}
-    };
-
-  };
-
-
-  template <typename Map, typename Enable = void>
-  struct MapTraits {
-    typedef False ReferenceMapTag;
-
-    typedef typename Map::Key Key;
-    typedef typename Map::Value Value;
-
-    typedef Value ConstReturnValue;
-    typedef Value ReturnValue;
-  };
-
-  template <typename Map>
-  struct MapTraits<
-    Map, typename enable_if<typename Map::ReferenceMapTag, void>::type > 
-  {
-    typedef True ReferenceMapTag;
-    
-    typedef typename Map::Key Key;
-    typedef typename Map::Value Value;
-
-    typedef typename Map::ConstReference ConstReturnValue;
-    typedef typename Map::Reference ReturnValue;
-
-    typedef typename Map::ConstReference ConstReference; 
-    typedef typename Map::Reference Reference;
- };
-
-  template <typename MatrixMap, typename Enable = void>
-  struct MatrixMapTraits {
-    typedef False ReferenceMapTag;
-
-    typedef typename MatrixMap::FirstKey FirstKey;
-    typedef typename MatrixMap::SecondKey SecondKey;
-    typedef typename MatrixMap::Value Value;
-
-    typedef Value ConstReturnValue;
-    typedef Value ReturnValue;
-  };
-
-  template <typename MatrixMap>
-  struct MatrixMapTraits<
-    MatrixMap, typename enable_if<typename MatrixMap::ReferenceMapTag, 
-                                  void>::type > 
-  {
-    typedef True ReferenceMapTag;
-    
-    typedef typename MatrixMap::FirstKey FirstKey;
-    typedef typename MatrixMap::SecondKey SecondKey;
-    typedef typename MatrixMap::Value Value;
-
-    typedef typename MatrixMap::ConstReference ConstReturnValue;
-    typedef typename MatrixMap::Reference ReturnValue;
-
-    typedef typename MatrixMap::ConstReference ConstReference; 
-    typedef typename MatrixMap::Reference Reference;
- };
-
-  // Indicators for the tags
-
-  template <typename Graph, typename Enable = void>
-  struct NodeNumTagIndicator {
-    static const bool value = false;
-  };
-
-  template <typename Graph>
-  struct NodeNumTagIndicator<
-    Graph, 
-    typename enable_if<typename Graph::NodeNumTag, void>::type
-  > {
-    static const bool value = true;
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct EdgeNumTagIndicator {
-    static const bool value = false;
-  };
-
-  template <typename Graph>
-  struct EdgeNumTagIndicator<
-    Graph, 
-    typename enable_if<typename Graph::EdgeNumTag, void>::type
-  > {
-    static const bool value = true;
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct FindEdgeTagIndicator {
-    static const bool value = false;
-  };
-
-  template <typename Graph>
-  struct FindEdgeTagIndicator<
-    Graph, 
-    typename enable_if<typename Graph::FindEdgeTag, void>::type
-  > {
-    static const bool value = true;
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct UndirectedTagIndicator {
-    static const bool value = false;
-  };
-
-  template <typename Graph>
-  struct UndirectedTagIndicator<
-    Graph, 
-    typename enable_if<typename Graph::UndirectedTag, void>::type
-  > {
-    static const bool value = true;
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct BuildTagIndicator {
-    static const bool value = false;
-  };
-
-  template <typename Graph>
-  struct BuildTagIndicator<
-    Graph, 
-    typename enable_if<typename Graph::BuildTag, void>::type
-  > {
-    static const bool value = true;
-  };
-
-}
-
-#endif
Index: lemon/bits/utility.h
===================================================================
--- lemon/bits/utility.h	(revision 2553)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-// This file contains a modified version of the enable_if library from BOOST.
-// See the appropriate copyright notice below.
-
-// Boost enable_if library
-
-// Copyright 2003 © The Trustees of Indiana University.
-
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-//    Authors: Jaakko Järvi (jajarvi at osl.iu.edu)
-//             Jeremiah Willcock (jewillco at osl.iu.edu)
-//             Andrew Lumsdaine (lums at osl.iu.edu)
-
-
-#ifndef LEMON_BITS_UTILITY_H
-#define LEMON_BITS_UTILITY_H
-
-///\file
-///\brief Miscellaneous basic utilities
-///
-///\todo Please rethink the organisation of the basic files like this.
-///E.g. this file might be merged with invalid.h.
-
-
-namespace lemon
-{
-
-  /// Basic type for defining "tags". A "YES" condition for \c enable_if.
-
-  /// Basic type for defining "tags". A "YES" condition for \c enable_if.
-  ///
-  ///\sa False
-  ///
-  /// \todo This should go to a separate "basic_types.h" (or something)
-  /// file.
-  struct True {
-    ///\e
-    static const bool value = true;
-  };
-
-  /// Basic type for defining "tags". A "NO" condition for \c enable_if.
-
-  /// Basic type for defining "tags". A "NO" condition for \c enable_if.
-  ///
-  ///\sa True
-  struct False {
-    ///\e
-    static const bool value = false;
-  };
-
-
-  struct InvalidType {
-  };
-
-  template <typename T>
-  struct Wrap {
-    const T &value;
-    Wrap(const T &t) : value(t) {}
-  };
-
-  /**************** dummy class to avoid ambiguity ****************/
-
-  template<int T> struct dummy { dummy(int) {} };
-
-  /**************** enable_if from BOOST ****************/
-  
-  template <typename Type, typename T = void>
-  struct exists {
-    typedef T type;
-  };
-
- 
-  template <bool B, class T = void>
-  struct enable_if_c {
-    typedef T type;
-  };
-
-  template <class T>
-  struct enable_if_c<false, T> {};
-
-  template <class Cond, class T = void> 
-  struct enable_if : public enable_if_c<Cond::value, T> {};
-
-  template <bool B, class T>
-  struct lazy_enable_if_c {
-    typedef typename T::type type;
-  };
-
-  template <class T>
-  struct lazy_enable_if_c<false, T> {};
-
-  template <class Cond, class T> 
-  struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
-
-
-  template <bool B, class T = void>
-  struct disable_if_c {
-    typedef T type;
-  };
-
-  template <class T>
-  struct disable_if_c<true, T> {};
-
-  template <class Cond, class T = void> 
-  struct disable_if : public disable_if_c<Cond::value, T> {};
-
-  template <bool B, class T>
-  struct lazy_disable_if_c {
-    typedef typename T::type type;
-  };
-
-  template <class T>
-  struct lazy_disable_if_c<true, T> {};
-
-  template <class Cond, class T> 
-  struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
-
-} // namespace lemon
-
-#endif
Index: lemon/bits/variant.h
===================================================================
--- lemon/bits/variant.h	(revision 2553)
+++ 	(revision )
@@ -1,508 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_VARIANT_H
-#define LEMON_BITS_VARIANT_H
-
-#include <lemon/error.h>
-
-/// \file
-/// \brief Variant types
-
-namespace lemon {
-
-  namespace _variant_bits {
-  
-    template <int left, int right>
-    struct CTMax {
-      static const int value = left < right ? right : left;
-    };
-
-  }
-
-
-  /// \brief Simple Variant type for two types
-  ///
-  /// Simple Variant type for two types. The Variant type is a type
-  /// safe union. The C++ has strong limitations for using unions, by
-  /// example we can not store type with non default constructor or
-  /// destructor in an union. This class always knowns the current
-  /// state of the variant and it cares for the proper construction
-  /// and destruction.
-  template <typename _First, typename _Second>
-  class BiVariant {
-  public:
-
-    /// \brief The \c First type.
-    typedef _First First;
-    /// \brief The \c Second type.
-    typedef _Second Second;
-
-    struct WrongStateError : public lemon::LogicError {
-    public:
-      virtual const char* what() const throw() {
-        return "lemon::BiVariant::WrongStateError";
-      }
-    };
-
-    /// \brief Constructor
-    ///
-    /// This constructor initalizes to the default value of the \c First
-    /// type.
-    BiVariant() {
-      flag = true;
-      new(reinterpret_cast<First*>(data)) First();
-    }
-
-    /// \brief Constructor
-    ///
-    /// This constructor initalizes to the given value of the \c First
-    /// type.
-    BiVariant(const First& f) {
-      flag = true;
-      new(reinterpret_cast<First*>(data)) First(f);
-    }
-
-    /// \brief Constructor
-    ///
-    /// This constructor initalizes to the given value of the \c
-    /// Second type.
-    BiVariant(const Second& s) {
-      flag = false;
-      new(reinterpret_cast<Second*>(data)) Second(s);
-    }
-
-    /// \brief Copy constructor
-    ///
-    /// Copy constructor
-    BiVariant(const BiVariant& bivariant) {
-      flag = bivariant.flag;
-      if (flag) {
-        new(reinterpret_cast<First*>(data)) First(bivariant.first());      
-      } else {
-        new(reinterpret_cast<Second*>(data)) Second(bivariant.second());      
-      }
-    }
-
-    /// \brief Destrcutor
-    ///
-    /// Destructor
-    ~BiVariant() {
-      destroy();
-    }
-
-    /// \brief Set to the default value of the \c First type.
-    ///
-    /// This function sets the variant to the default value of the \c
-    /// First type.
-    BiVariant& setFirst() {
-      destroy();
-      flag = true;
-      new(reinterpret_cast<First*>(data)) First();   
-      return *this;
-    }
-
-    /// \brief Set to the given value of the \c First type.
-    ///
-    /// This function sets the variant to the given value of the \c
-    /// First type.
-    BiVariant& setFirst(const First& f) {
-      destroy();
-      flag = true;
-      new(reinterpret_cast<First*>(data)) First(f);   
-      return *this;
-    }
-
-    /// \brief Set to the default value of the \c Second type.
-    ///
-    /// This function sets the variant to the default value of the \c
-    /// Second type.
-    BiVariant& setSecond() {
-      destroy();
-      flag = false;
-      new(reinterpret_cast<Second*>(data)) Second();   
-      return *this;
-    }
-
-    /// \brief Set to the given value of the \c Second type.
-    ///
-    /// This function sets the variant to the given value of the \c
-    /// Second type.
-    BiVariant& setSecond(const Second& s) {
-      destroy();
-      flag = false;
-      new(reinterpret_cast<Second*>(data)) Second(s);   
-      return *this;
-    }
-
-    /// \brief Operator form of the \c setFirst()
-    BiVariant& operator=(const First& f) {
-      return setFirst(f);
-    }
-
-    /// \brief Operator form of the \c setSecond()
-    BiVariant& operator=(const Second& s) {
-      return setSecond(s);
-    }
-
-    /// \brief Assign operator
-    BiVariant& operator=(const BiVariant& bivariant) {
-      if (this == &bivariant) return *this;
-      destroy();
-      flag = bivariant.flag;
-      if (flag) {
-        new(reinterpret_cast<First*>(data)) First(bivariant.first());      
-      } else {
-        new(reinterpret_cast<Second*>(data)) Second(bivariant.second());      
-      }
-      return *this;
-    }
-
-    /// \brief Reference to the value
-    ///
-    /// Reference to the value of the \c First type.
-    /// \pre The BiVariant should store value of \c First type.
-    First& first() {
-      LEMON_ASSERT(flag, WrongStateError());
-      return *reinterpret_cast<First*>(data); 
-    }
-
-    /// \brief Const reference to the value
-    ///
-    /// Const reference to the value of the \c First type.
-    /// \pre The BiVariant should store value of \c First type.
-    const First& first() const { 
-      LEMON_ASSERT(flag, WrongStateError());
-      return *reinterpret_cast<const First*>(data); 
-    }
-
-    /// \brief Operator form of the \c first()
-    operator First&() { return first(); }
-    /// \brief Operator form of the const \c first()
-    operator const First&() const { return first(); }
-
-    /// \brief Reference to the value
-    ///
-    /// Reference to the value of the \c Second type.
-    /// \pre The BiVariant should store value of \c Second type.
-    Second& second() { 
-      LEMON_ASSERT(!flag, WrongStateError());
-      return *reinterpret_cast<Second*>(data); 
-    }
-
-    /// \brief Const reference to the value
-    ///
-    /// Const reference to the value of the \c Second type.
-    /// \pre The BiVariant should store value of \c Second type.
-    const Second& second() const { 
-      LEMON_ASSERT(!flag, WrongStateError());
-      return *reinterpret_cast<const Second*>(data); 
-    }
-
-    /// \brief Operator form of the \c second()
-    operator Second&() { return second(); }
-    /// \brief Operator form of the const \c second()
-    operator const Second&() const { return second(); }
-
-    /// \brief %True when the variant is in the first state
-    ///
-    /// %True when the variant stores value of the \c First type.
-    bool firstState() const { return flag; }
-
-    /// \brief %True when the variant is in the second state
-    ///
-    /// %True when the variant stores value of the \c Second type.
-    bool secondState() const { return !flag; }
-
-  private:
-
-    void destroy() {
-      if (flag) {
-        reinterpret_cast<First*>(data)->~First();
-      } else {
-        reinterpret_cast<Second*>(data)->~Second();
-      }
-    }
-    
-    char data[_variant_bits::CTMax<sizeof(First), sizeof(Second)>::value];
-    bool flag;
-  };
-
-  namespace _variant_bits {
-    
-    template <int _idx, typename _TypeMap>
-    struct Memory {
-
-      typedef typename _TypeMap::template Map<_idx>::Type Current;
-
-      static void destroy(int index, char* place) {
-        if (index == _idx) {
-          reinterpret_cast<Current*>(place)->~Current();
-        } else {
-          Memory<_idx - 1, _TypeMap>::destroy(index, place);
-        }
-      }
-
-      static void copy(int index, char* to, const char* from) {
-        if (index == _idx) {
-          new (reinterpret_cast<Current*>(to))
-            Current(reinterpret_cast<const Current*>(from));
-        } else {
-          Memory<_idx - 1, _TypeMap>::copy(index, to, from);
-        }
-      }
-
-    };
-
-    template <typename _TypeMap>
-    struct Memory<-1, _TypeMap> {
-
-      static void destroy(int, char*) {
-        LEMON_ASSERT(false, "Wrong Variant Index.");
-      }
-
-      static void copy(int, char*, const char*) {
-        LEMON_ASSERT(false, "Wrong Variant Index.");
-      }
-    };
-
-    template <int _idx, typename _TypeMap>
-    struct Size {
-      static const int value = 
-      CTMax<sizeof(typename _TypeMap::template Map<_idx>::Type), 
-            Size<_idx - 1, _TypeMap>::value>::value;
-    };
-
-    template <typename _TypeMap>
-    struct Size<0, _TypeMap> {
-      static const int value = 
-      sizeof(typename _TypeMap::template Map<0>::Type);
-    };
-
-  }
-
-  /// \brief Variant type
-  ///
-  /// Simple Variant type. The Variant type is a type safe union. The
-  /// C++ has strong limitations for using unions, by example we
-  /// cannot store type with non default constructor or destructor in
-  /// a union. This class always knowns the current state of the
-  /// variant and it cares for the proper construction and
-  /// destruction.
-  ///
-  /// \param _num The number of the types which can be stored in the
-  /// variant type.
-  /// \param _TypeMap This class describes the types of the Variant. The
-  /// _TypeMap::Map<index>::Type should be a valid type for each index 
-  /// in the range {0, 1, ..., _num - 1}. The \c VariantTypeMap is helper
-  /// class to define such type mappings up to 10 types.
-  ///
-  /// And the usage of the class:
-  ///\code
-  /// typedef Variant<3, VariantTypeMap<int, std::string, double> > MyVariant;
-  /// MyVariant var;
-  /// var.set<0>(12);
-  /// std::cout << var.get<0>() << std::endl;
-  /// var.set<1>("alpha");
-  /// std::cout << var.get<1>() << std::endl;
-  /// var.set<2>(0.75);
-  /// std::cout << var.get<2>() << std::endl;
-  ///\endcode
-  ///
-  /// The result of course:
-  ///\code
-  /// 12
-  /// alpha
-  /// 0.75
-  ///\endcode
-  template <int _num, typename _TypeMap>
-  class Variant {
-  public:
-
-    static const int num = _num;
-
-    typedef _TypeMap TypeMap;
-
-    struct WrongStateError : public lemon::LogicError {
-    public:
-      virtual const char* what() const throw() {
-        return "lemon::Variant::WrongStateError";
-      }
-    };
-
-    /// \brief Constructor
-    ///
-    /// This constructor initalizes to the default value of the \c type
-    /// with 0 index.
-    Variant() {
-      flag = 0;
-      new(reinterpret_cast<typename TypeMap::template Map<0>::Type*>(data)) 
-        typename TypeMap::template Map<0>::Type();
-    }
-
-
-    /// \brief Copy constructor
-    ///
-    /// Copy constructor
-    Variant(const Variant& variant) {
-      flag = variant.flag;
-      _variant_bits::Memory<num - 1, TypeMap>::copy(flag, data, variant.data);
-    }
-
-    /// \brief Assign operator
-    ///
-    /// Assign operator
-    Variant& operator=(const Variant& variant) {
-      if (this == &variant) return *this;
-      _variant_bits::Memory<num - 1, TypeMap>::
-        destroy(flag, data);
-      flag = variant.flag;
-      _variant_bits::Memory<num - 1, TypeMap>::
-        copy(flag, data, variant.data);
-      return *this;
-    }
-
-    /// \brief Destrcutor
-    ///
-    /// Destructor
-    ~Variant() {
-      _variant_bits::Memory<num - 1, TypeMap>::destroy(flag, data);
-    }
-
-    /// \brief Set to the default value of the type with \c _idx index.
-    ///
-    /// This function sets the variant to the default value of the
-    /// type with \c _idx index.
-    template <int _idx>
-    Variant& set() {
-      _variant_bits::Memory<num - 1, TypeMap>::destroy(flag, data);
-      flag = _idx;
-      new(reinterpret_cast<typename TypeMap::template Map<_idx>::Type*>(data)) 
-        typename TypeMap::template Map<_idx>::Type();
-      return *this;
-    }
-
-    /// \brief Set to the given value of the type with \c _idx index.
-    ///
-    /// This function sets the variant to the given value of the type
-    /// with \c _idx index.
-    template <int _idx>
-    Variant& set(const typename _TypeMap::template Map<_idx>::Type& init) {
-      _variant_bits::Memory<num - 1, TypeMap>::destroy(flag, data);
-      flag = _idx;
-      new(reinterpret_cast<typename TypeMap::template Map<_idx>::Type*>(data)) 
-        typename TypeMap::template Map<_idx>::Type(init);
-      return *this;
-    }
-
-    /// \brief Gets the current value of the type with \c _idx index.
-    ///
-    /// Gets the current value of the type with \c _idx index.
-    template <int _idx>
-    const typename TypeMap::template Map<_idx>::Type& get() const {
-      LEMON_ASSERT(_idx == flag, "Wrong Variant Index.");
-      return *reinterpret_cast<const typename TypeMap::
-        template Map<_idx>::Type*>(data); 
-    }
-
-    /// \brief Gets the current value of the type with \c _idx index.
-    ///
-    /// Gets the current value of the type with \c _idx index.
-    template <int _idx>
-    typename _TypeMap::template Map<_idx>::Type& get() {
-      LEMON_ASSERT(_idx == flag, "Wrong Variant Index.");
-      return *reinterpret_cast<typename TypeMap::template Map<_idx>::Type*>
-        (data); 
-    }
-
-    /// \brief Returns the current state of the variant.
-    ///
-    /// Returns the current state of the variant.
-    int state() const {
-      return flag;
-    }
-
-  private:
-    
-    char data[_variant_bits::Size<num - 1, TypeMap>::value];
-    int flag;
-  };
-
-  namespace _variant_bits {
-
-    template <int _index, typename _List>
-    struct Get {
-      typedef typename Get<_index - 1, typename _List::Next>::Type Type;
-    };
-
-    template <typename _List>
-    struct Get<0, _List> {
-      typedef typename _List::Type Type;
-    };
-
-    struct List {};
-    
-    template <typename _Type, typename _List>
-    struct Insert {
-      typedef _List Next;
-      typedef _Type Type;
-    };
-
-    template <int _idx, typename _T0, typename _T1, typename _T2, 
-              typename _T3, typename _T5, typename _T4, typename _T6,
-              typename _T7, typename _T8, typename _T9>
-    struct Mapper {
-      typedef List L10;
-      typedef Insert<_T9, L10> L9;
-      typedef Insert<_T8, L9> L8;
-      typedef Insert<_T7, L8> L7;
-      typedef Insert<_T6, L7> L6;
-      typedef Insert<_T5, L6> L5;
-      typedef Insert<_T4, L5> L4;
-      typedef Insert<_T3, L4> L3;
-      typedef Insert<_T2, L3> L2;
-      typedef Insert<_T1, L2> L1;
-      typedef Insert<_T0, L1> L0;
-      typedef typename Get<_idx, L0>::Type Type;
-    };
-    
-  }
-
-  /// \brief Helper class for Variant
-  ///
-  /// Helper class to define type mappings for Variant. This class
-  /// converts the template parameters to be mappable by integer.
-  /// \see Variant
-  template <
-    typename _T0, 
-    typename _T1 = void, typename _T2 = void, typename _T3 = void,
-    typename _T5 = void, typename _T4 = void, typename _T6 = void,
-    typename _T7 = void, typename _T8 = void, typename _T9 = void>
-  struct VariantTypeMap {
-    template <int _idx>
-    struct Map {
-      typedef typename _variant_bits::
-      Mapper<_idx, _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9>::Type
-      Type;
-    };
-  };
-  
-}
-
-
-#endif
Index: lemon/bits/vector_map.h
===================================================================
--- lemon/bits/vector_map.h	(revision 2553)
+++ 	(revision )
@@ -1,243 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BITS_VECTOR_MAP_H
-#define LEMON_BITS_VECTOR_MAP_H
-
-#include <vector>
-#include <algorithm>
-
-#include <lemon/bits/traits.h>
-#include <lemon/bits/utility.h>
-
-#include <lemon/bits/alteration_notifier.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-///\ingroup graphbits
-///
-///\file
-///\brief Vector based graph maps.
-namespace lemon {
-
-  /// \ingroup graphbits
-  ///
-  /// \brief Graph map based on the std::vector storage.
-  ///
-  /// The VectorMap template class is graph map structure what
-  /// automatically updates the map when a key is added to or erased from
-  /// the map. This map type uses the std::vector to store the values.
-  ///
-  /// \param Notifier The AlterationNotifier that will notify this map.
-  /// \param Item The item type of the graph items.
-  /// \param Value The value type of the map.
-  /// 
-  /// \author Balazs Dezso  	
-  template <typename _Graph, typename _Item, typename _Value>
-  class VectorMap 
-    : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
-  private:
-		
-    /// The container type of the map.
-    typedef std::vector<_Value> Container;	
-
-  public:
-
-    /// The graph type of the map. 
-    typedef _Graph Graph;
-    /// The item type of the map.
-    typedef _Item Item;
-    /// The reference map tag.
-    typedef True ReferenceMapTag;
-
-    /// The key type of the map.
-    typedef _Item Key;
-    /// The value type of the map.
-    typedef _Value Value;
-
-    /// The notifier type.
-    typedef typename ItemSetTraits<_Graph, _Item>::ItemNotifier Notifier;
-
-    /// The map type.
-    typedef VectorMap Map;
-    /// The base class of the map.
-    typedef typename Notifier::ObserverBase Parent;
-
-    /// The reference type of the map;
-    typedef typename Container::reference Reference;
-    /// The const reference type of the map;
-    typedef typename Container::const_reference ConstReference;
-
-
-    /// \brief Constructor to attach the new map into the notifier.
-    ///
-    /// It constructs a map and attachs it into the notifier.
-    /// It adds all the items of the graph to the map.
-    VectorMap(const Graph& graph) {
-      Parent::attach(graph.notifier(Item()));
-      container.resize(Parent::notifier()->maxId() + 1);
-    }
-
-    /// \brief Constructor uses given value to initialize the map. 
-    ///
-    /// It constructs a map uses a given value to initialize the map. 
-    /// It adds all the items of the graph to the map.
-    VectorMap(const Graph& graph, const Value& value) {
-      Parent::attach(graph.notifier(Item()));
-      container.resize(Parent::notifier()->maxId() + 1, value);
-    }
-
-    /// \brief Copy constructor
-    ///
-    /// Copy constructor.
-    VectorMap(const VectorMap& _copy) : Parent() {
-      if (_copy.attached()) {
-	Parent::attach(*_copy.notifier());
-	container = _copy.container;
-      }
-    }
-
-    /// \brief Assign operator.
-    ///
-    /// This operator assigns for each item in the map the
-    /// value mapped to the same item in the copied map.  
-    /// The parameter map should be indiced with the same
-    /// itemset because this assign operator does not change
-    /// the container of the map. 
-    VectorMap& operator=(const VectorMap& cmap) {
-      return operator=<VectorMap>(cmap);
-    }
-
-
-    /// \brief Template assign operator.
-    ///
-    /// The given parameter should be conform to the ReadMap
-    /// concecpt and could be indiced by the current item set of
-    /// the NodeMap. In this case the value for each item
-    /// is assigned by the value of the given ReadMap. 
-    template <typename CMap>
-    VectorMap& operator=(const CMap& cmap) {
-      checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
-      const typename Parent::Notifier* nf = Parent::notifier();
-      Item it;
-      for (nf->first(it); it != INVALID; nf->next(it)) {
-        set(it, cmap[it]);
-      }
-      return *this;
-    }
-    
-  public:
-
-    /// \brief The subcript operator.
-    ///
-    /// The subscript operator. The map can be subscripted by the
-    /// actual items of the graph.      
-    Reference operator[](const Key& key) {
-      return container[Parent::notifier()->id(key)];
-    } 
-		
-    /// \brief The const subcript operator.
-    ///
-    /// The const subscript operator. The map can be subscripted by the
-    /// actual items of the graph. 
-    ConstReference operator[](const Key& key) const {
-      return container[Parent::notifier()->id(key)];
-    }
-
-
-    /// \brief The setter function of the map.
-    ///
-    /// It the same as operator[](key) = value expression.
-    void set(const Key& key, const Value& value) {
-      (*this)[key] = value;
-    }
-
-  protected:
-
-    /// \brief Adds a new key to the map.
-    ///		
-    /// It adds a new key to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const Key& key) {
-      int id = Parent::notifier()->id(key);
-      if (id >= int(container.size())) {
-	container.resize(id + 1);
-      }
-    }
-
-    /// \brief Adds more new keys to the map.
-    ///		
-    /// It adds more new keys to the map. It called by the observer notifier
-    /// and it overrides the add() member function of the observer base.     
-    virtual void add(const std::vector<Key>& keys) {
-      int max = container.size() - 1;
-      for (int i = 0; i < int(keys.size()); ++i) {
-        int id = Parent::notifier()->id(keys[i]);
-        if (id >= max) {
-          max = id;
-        }
-      }
-      container.resize(max + 1);
-    }
-
-    /// \brief Erase a key from the map.
-    ///
-    /// Erase a key from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const Key& key) {
-      container[Parent::notifier()->id(key)] = Value();
-    }
-
-    /// \brief Erase more keys from the map.
-    ///
-    /// Erase more keys from the map. It called by the observer notifier
-    /// and it overrides the erase() member function of the observer base.     
-    virtual void erase(const std::vector<Key>& keys) {
-      for (int i = 0; i < int(keys.size()); ++i) {
-	container[Parent::notifier()->id(keys[i])] = Value();
-      }
-    }
-    
-    /// \brief Buildes the map.
-    ///	
-    /// It buildes the map. It called by the observer notifier
-    /// and it overrides the build() member function of the observer base.
-    virtual void build() { 
-      int size = Parent::notifier()->maxId() + 1;
-      container.reserve(size);
-      container.resize(size);
-    }
-
-    /// \brief Clear the map.
-    ///
-    /// It erase all items from the map. It called by the observer notifier
-    /// and it overrides the clear() member function of the observer base.     
-    virtual void clear() { 
-      container.clear();
-    }
-    
-  private:
-		
-    Container container;
-
-  };
-
-}
-
-#endif
