Index: .hgignore
===================================================================
--- .hgignore	(revision 371)
+++ .hgignore	(revision 0)
@@ -5,42 +5,5 @@
 *~
 *.o
-*.log
-*.lo
-*.tar.*
-*.bak
-Makefile.in
-aclocal.m4
-config.h.in
-configure
-Makefile
-config.h
-config.log
-config.status
-libtool
-stamp-h1
-lemon/lemon.pc
-lemon/libemon.la
-lemon/stamp-h2
-doc/Doxyfile
-cmake/cmake.version
-.dirstamp
-.libs/*
-.deps/*
-demo/*.eps
 
 syntax: regexp
-(.*/)?\#[^/]*\#$
-(.*/)?\.\#[^/]*$
-^doc/html/.*
-^doc/.*\.tag
-^autom4te.cache/.*
-^build-aux/.*
-^objs.*/.*
-^test/[a-z_]*$
-^demo/.*_demo$
-^build/.*
-^doc/gen-images/.*
-CMakeFiles
-DartTestfile.txt
-cmake_install.cmake
-CMakeCache.txt
+html/.*
Index: gtags
===================================================================
--- .hgtags	(revision 428)
+++ 	(revision )
@@ -1,8 +1,0 @@
-58f1a3144134042f6367fceb7eb29ee8a094d843 r1.0
-d5f1163b1522e645c938312f3f8ab303db641c12 r1.0.1
-b4c892aa217c683de570dd20908b638a78391181 r1.0.2
-a441f68fc0736bcb2323de47c71384f748069afe r1.0.3
-2c95c34b1e9e55a6ad4a540381469bc57f4365ac r1.0.4
-50b6b66daafd6ac95ada50ffedcb76d22b4af849 r1.0.5
-7d26a96745f7ef19ace715ad23aa8a10a9d26121 r1.0.6
-c59bdcc8e33e6f8397d7c9b36b199db36e33ce46 r1.0.7
Index: THORS
===================================================================
--- AUTHORS	(revision 424)
+++ 	(revision )
@@ -1,26 +1,0 @@
-The authors of the 1.x series are
-
- * Balazs Dezso <deba@inf.elte.hu>
- * Alpar Juttner <alpar@cs.elte.hu>
- * Peter Kovacs <kpeter@inf.elte.hu>
- * Akos Ladanyi <ladanyi@tmit.bme.hu>
-
-For more details on the actual contribution, please visit the history
-of the main LEMON source repository: http://lemon.cs.elte.hu/hg/lemon
-
-Moreover, this version is heavily based on the 0.x series of
-LEMON. Here is the list of people who contributed to those versions.
-
- * Mihaly Barasz <klao@cs.elte.hu>
- * Johanna Becker <beckerjc@cs.elte.hu>
- * Attila Bernath <athos@cs.elte.hu>
- * Balazs Dezso <deba@inf.elte.hu>
- * Peter Hegyi <hegyi@tmit.bme.hu>
- * Alpar Juttner <alpar@cs.elte.hu>
- * Peter Kovacs <kpeter@inf.elte.hu>
- * Akos Ladanyi <ladanyi@tmit.bme.hu>
- * Marton Makai <marci@cs.elte.hu>
- * Jacint Szabo <jacint@cs.elte.hu>
-
-Again, please visit the history of the old LEMON repository for more
-details: http://lemon.cs.elte.hu/hg/lemon-0.x
Index: akeLists.txt
===================================================================
--- CMakeLists.txt	(revision 396)
+++ 	(revision )
@@ -1,100 +1,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
-  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
-ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
-  SET(PROJECT_NAME "LEMON")
-  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
-ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
-
-PROJECT(${PROJECT_NAME})
-
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-
-IF(MSVC)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
-# Suppressed warnings:
-# C4250: 'class1' : inherits 'class2::member' via dominance
-# C4355: 'this' : used in base member initializer list
-# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
-# C4996: 'function': was declared deprecated
-ENDIF(MSVC)
-
-INCLUDE(FindDoxygen)
-INCLUDE(FindGhostscript)
-
-ADD_DEFINITIONS(-DHAVE_CONFIG_H)
-
-INCLUDE(CheckTypeSize)
-CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
-
-ENABLE_TESTING()
-
-ADD_SUBDIRECTORY(lemon)
-ADD_SUBDIRECTORY(demo)
-ADD_SUBDIRECTORY(doc)
-ADD_SUBDIRECTORY(test)
-
-IF(WIN32)
-  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-  SET(CPACK_PACKAGE_VENDOR "EGRES")
-  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
-    "LEMON - Library of Efficient Models and Optimization in Networks")
-  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
-
-  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
-
-  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
-    "${PROJECT_NAME} ${PROJECT_VERSION}")
-  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
-    "${PROJECT_NAME} ${PROJECT_VERSION}")
-
-  SET(CPACK_COMPONENTS_ALL headers library html_documentation)
-
-  SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
-  SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
-
-  SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
-    "C++ header files")
-  SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
-    "DLL and import library")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
-    "Doxygen generated documentation")
-
-  SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
-
-  SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
-  SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
-
-  SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
-    "Components needed to develop software using LEMON")
-  SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
-    "Documentation of LEMON")
-
-  SET(CPACK_ALL_INSTALL_TYPES Full Developer)
-
-  SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
-  SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
-  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
-
-  SET(CPACK_GENERATOR "NSIS")
-  SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
-  SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
-  #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
-  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
-  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
-  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
-  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
-  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
-  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
-    CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
-    ")
-  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
-    !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-    Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
-    ")
-
-  INCLUDE(CPack)
-ENDIF(WIN32)
Index: STALL
===================================================================
--- INSTALL	(revision 381)
+++ 	(revision )
@@ -1,160 +1,0 @@
-Installation Instructions
-=========================
-
-Since you are reading this I assume you already obtained one of the release
-tarballs and successfully extracted it. The latest version of LEMON is
-available at our web page (http://lemon.cs.elte.hu/).
-
-LEMON provides two different build environments, one is based on "autotool",
-while the other is based on "cmake". This file contains instructions only for
-the former one, which is the recommended build environment on Linux, Mac OSX
-and other unices or if you use Cygwin on Windows. For cmake installation
-instructions visit http://lemon.cs.elte.hu.
-
-In order to install LEMON from the extracted source tarball you have to
-issue the following commands:
-
-   1. `cd lemon-x.y.z'
-
-      This command changes to the directory which was created when you
-      extracted the sources. The x.y.z part is a version number.
-
-   2. `./configure'
-
-      This command runs the configure shell script, which does some checks and
-      creates the makefiles.
-
-   3. `make'
-
-      This command compiles the non-template part of LEMON into libemon.a
-      file. It also compiles the programs in the tools and demo subdirectories
-      when enabled.
-
-   4. `make check'
-
-      This step is optional, but recommended. It runs the test programs that
-      we developed for LEMON to check whether the library works properly on
-      your platform.
-
-   5. `make install'
-
-      This command installs LEMON under /usr/local (you will need root
-      privileges to be able to do that). If you want to install it to some
-      other location, then pass the --prefix=DIRECTORY flag to configure in
-      step 2. For example: `./configure --prefix=/home/username/lemon'.
-
-   6. `make install-html'
-
-      This command installs the documentation under share/doc/lemon/docs. The
-      generated documentation is included in the tarball. If you want to
-      generate it yourself, then run `make html'. Note that for this you need
-      to have the following programs installed: Doxygen, Graphviz, Ghostscript,
-      Latex.
-
-
-Configure Options and Variables
-===============================
-
-In step 2 you can customize the actions of configure by setting variables
-and passing options to it. This can be done like this:
-`./configure [OPTION]... [VARIABLE=VALUE]...'
-
-Below you will find some useful variables and options (see `./configure --help'
-for more):
-
-CXX='comp'
-
-  Change the C++ compiler to 'comp'.
-
-CXXFLAGS='flags'
-
-  Pass the 'flags' to the compiler. For example CXXFLAGS='-O3 -march=pentium-m'
-  turns on generation of aggressively optimized Pentium-M specific code.
-
---prefix=PREFIX
-
-  Set the installation prefix to PREFIX. By default it is /usr/local.
-
---enable-demo
-
-   Build the examples in the demo subdirectory.
-
---disable-demo
-
-   Do not build the examples in the demo subdirectory (default).
-
---enable-tools
-
-   Build the programs in the tools subdirectory (default).
-
---disable-tools
-
-   Do not build the programs in the tools subdirectory.
-
---with-glpk[=PREFIX]
-
-   Enable GLPK support (default). You should specify the prefix too if
-   you installed GLPK to some non-standard location (e.g. your home
-   directory). If it is not found, GLPK support will be disabled.
-
---with-glpk-includedir=DIR
-
-   The directory where the GLPK header files are located. This is only
-   useful when the GLPK headers and libraries are not under the same
-   prefix (which is unlikely).
-
---with-glpk-libdir=DIR
-
-   The directory where the GLPK libraries are located. This is only
-   useful when the GLPK headers and libraries are not under the same
-   prefix (which is unlikely).
-
---without-glpk
-
-   Disable GLPK support.
-
---with-cplex[=PREFIX]
-
-   Enable CPLEX support (default). You should specify the prefix too
-   if you installed CPLEX to some non-standard location
-   (e.g. /opt/ilog/cplex75). If it is not found, CPLEX support will be
-   disabled.
-
---with-cplex-includedir=DIR
-
-   The directory where the CPLEX header files are located. This is
-   only useful when the CPLEX headers and libraries are not under the
-   same prefix (e.g.  /usr/local/cplex/cplex75/include).
-
---with-cplex-libdir=DIR
-
-   The directory where the CPLEX libraries are located. This is only
-   useful when the CPLEX headers and libraries are not under the same
-   prefix (e.g.
-   /usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt).
-
---without-cplex
-
-   Disable CPLEX support.
-
---with-soplex[=PREFIX]
-
-   Enable SoPlex support (default). You should specify the prefix too if
-   you installed SoPlex to some non-standard location (e.g. your home
-   directory). If it is not found, SoPlex support will be disabled.
-
---with-soplex-includedir=DIR
-
-   The directory where the SoPlex header files are located. This is only
-   useful when the SoPlex headers and libraries are not under the same
-   prefix (which is unlikely).
-
---with-soplex-libdir=DIR
-
-   The directory where the SoPlex libraries are located. This is only
-   useful when the SoPlex headers and libraries are not under the same
-   prefix (which is unlikely).
-
---without-soplex
-
-   Disable SoPlex support.
Index: CENSE
===================================================================
--- LICENSE	(revision 385)
+++ 	(revision )
@@ -1,32 +1,0 @@
-LEMON code without an explicit copyright notice is covered by the following
-copyright/license.
-
-Copyright (C) 2003-2008 Egervary Jeno Kombinatorikus Optimalizalasi
-Kutatocsoport (Egervary Combinatorial Optimization Research Group,
-EGRES).
-
-===========================================================================
-Boost Software License, Version 1.0
-===========================================================================
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
Index: kefile.am
===================================================================
--- Makefile.am	(revision 360)
+++ 	(revision )
@@ -1,68 +1,0 @@
-ACLOCAL_AMFLAGS = -I m4
-
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
-LDADD = $(top_builddir)/lemon/libemon.la
-
-EXTRA_DIST = \
-	AUTHORS \
-	LICENSE \
-	m4/lx_check_cplex.m4 \
-	m4/lx_check_glpk.m4 \
-	m4/lx_check_soplex.m4 \
-	CMakeLists.txt \
-	cmake/FindGhostscript.cmake \
-	cmake/version.cmake.in \
-	cmake/version.cmake \
-	cmake/nsis/lemon.ico \
-	cmake/nsis/uninstall.ico
-
-pkgconfigdir = $(libdir)/pkgconfig
-lemondir = $(pkgincludedir)
-bitsdir = $(lemondir)/bits
-conceptdir = $(lemondir)/concepts
-pkgconfig_DATA =
-lib_LTLIBRARIES =
-lemon_HEADERS =
-bits_HEADERS =
-concept_HEADERS =
-noinst_HEADERS =
-noinst_PROGRAMS =
-bin_PROGRAMS =
-check_PROGRAMS =
-dist_bin_SCRIPTS =
-TESTS =
-XFAIL_TESTS =
-
-include lemon/Makefile.am
-include test/Makefile.am
-include doc/Makefile.am
-include demo/Makefile.am
-include tools/Makefile.am
-
-MRPROPERFILES = \
-	aclocal.m4 \
-	config.h.in \
-	config.h.in~ \
-	configure \
-	Makefile.in \
-	build-aux/config.guess \
-	build-aux/config.sub \
-	build-aux/depcomp \
-	build-aux/install-sh \
-	build-aux/ltmain.sh \
-	build-aux/missing \
-	doc/doxygen.log
-
-mrproper:
-	$(MAKE) $(AM_MAKEFLAGS) maintainer-clean
-	-rm -f $(MRPROPERFILES)
-
-dist-bz2: dist
-	zcat $(PACKAGE)-$(VERSION).tar.gz | \
-	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
-
-distcheck-bz2: distcheck
-	zcat $(PACKAGE)-$(VERSION).tar.gz | \
-	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
-
-.PHONY: mrproper dist-bz2 distcheck-bz2
Index: WS
===================================================================
--- NEWS	(revision 426)
+++ 	(revision )
@@ -1,141 +1,0 @@
-2011-08-08 Version 1.0.7 released
-
-        Release series 1.0 has reached its end of life. This is the last
-        bugfix release in that series.
-
-        #382: Allow lgf files without Arc maps
-        #392: Bug fix in Dfs::start(s,t)
-
-2010-10-21 Version 1.0.6 released
-
-        Bugfix release.
-
-        #366: Fix Pred[Matrix]MapPath::empty()
-        #371: Bug fix in (di)graphCopy()
-              The target graph is cleared before adding nodes and arcs/edges.
-
-
-2010-03-08 Version 1.0.5 released
-
-        Bugfix release.
-
-        #250: Fix in pathSource() and pathTarget()
-        #321: Use pathCopy(from,to) instead of copyPath(to,from)
-        #330: Bug fix in map_extender.h
-        #335: Fix clear() function in ExtendFindEnum (#335)
-        #336: Fix the date field comment of graphToEps() output
-
-2009-05-05 Version 1.0.4 released
-
-        Bugfix release.
-
-        #274,#280: Install lemon/config.h and fix its bad include by core.h
-        #275: Prefix macro names with LEMON_ in lemon/config.h
-        ----: Small script for making the release tarballs added
-        ----: Minor improvement in unify-sources.sh (a76f55d7d397)
-
-2009-03-27 LEMON joins to the COIN-OR initiative
-
-        COIN-OR (Computational Infrastructure for Operations Research,
-        http://www.coin-or.org) project is an initiative to spur the
-        development of open-source software for the operations research
-        community.
-
-2009-03-26 Version 1.0.3 released
-
-        Bugfix release, mainly targeting better AIX/xlC and WIN32
-        compatibility.
-
-        ----: Minor clarification in the LICENSE file
-        ----: Add missing unistd.h include to time_measure.h
-        #204: Compilation bug fixed in graph_to_eps.h with VS2005
-        #214,#215: windows.h is never be included by lemon headers
-        #230: Build systems check the availability of 'long long' type
-        #229: Default implementation of Tolerance<> is used for integer types
-        #211,#212: Various fixes for compiling on AIX
-        ----: Improvements in CMAKE config
-              - docs is installed in share/doc/
-              - detects newer versions of Ghostscript
-        #239: Fix missing 'inline' specifier in time_measure.h
-        
-2009-01-23 Version 1.0.2 released
-
-        Bugfix release.
-
-        #193: Bugfix in GraphReader::skipSection()
-        #195: Bugfix in ConEdgeIt()
-        #197: Bugfix in heap unionfind
-              * This bug affects Edmond's general matching algorithms.
-                (Not available in this release.)
-        #207: Fix 'make install' without 'make html' using CMAKE
-        #208: Suppress or fix VS2008 compilation warnings
-        ----: Update the LEMON icon
-        ----: Enable the component-based installer
-              (in installers made by CPACK)
-        ----: Set the proper version for CMAKE in the tarballs
-              (made by autotools).
-
-2008-12-06 Version 1.0.1 released
-
-        Bugfix release.
-
-        #170: Bugfix SmartDigraph::split()
-        #171: Bugfix in SmartGraph::restoreSnapshot()
-        #172: Extended test cases for graphs and digraphs
-        #173: Bugfix in Random
-              * operator()s always return a double now
-              * the faulty real<Num>(Num) and real<Num>(Num,Num)
-                have been removed
-        #187: Remove DijkstraWidestPathOperationTraits
-        #61:  Bugfix in DfsVisit
-
-2008-10-13 Version 1.0 released
-
-	This is the first stable release of LEMON. Compared to the 0.x
-	release series, it features a considerably smaller but more
-	matured set of tools. The API has also completely revised and
-	changed in several places.
-
-	* The major name changes compared to the 0.x series (see the
-          Migration Guide in the doc for more details)
-          * Graph -> Digraph, UGraph -> Graph
-          * Edge -> Arc, UEdge -> Edge
-	  * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)
-	* Other improvements
-	  * Better documentation
-	  * Reviewed and cleaned up codebase
-	  * CMake based build system (along with the autotools based one)
-	* Contents of the library (ported from 0.x)
-	  * Algorithms
-       	    * breadth-first search (bfs.h)
-       	    * depth-first search (dfs.h)
-       	    * Dijkstra's algorithm (dijkstra.h)
-       	    * Kruskal's algorithm (kruskal.h)
-    	  * Data structures
-       	    * graph data structures (list_graph.h, smart_graph.h)
-       	    * path data structures (path.h)
-       	    * binary heap data structure (bin_heap.h)
-       	    * union-find data structures (unionfind.h)
-       	    * miscellaneous property maps (maps.h)
-       	    * two dimensional vector and bounding box (dim2.h)
-          * Concepts
-       	    * graph structure concepts (concepts/digraph.h, concepts/graph.h,
-              concepts/graph_components.h)
-       	    * concepts for other structures (concepts/heap.h, concepts/maps.h,
-	      concepts/path.h)
-    	  * Tools
-       	    * Mersenne twister random number generator (random.h)
-       	    * tools for measuring cpu and wall clock time (time_measure.h)
-       	    * tools for counting steps and events (counter.h)
-       	    * tool for parsing command line arguments (arg_parser.h)
-       	    * tool for visualizing graphs (graph_to_eps.h)
-       	    * tools for reading and writing data in LEMON Graph Format
-              (lgf_reader.h, lgf_writer.h)
-            * tools to handle the anomalies of calculations with
-	      floating point numbers (tolerance.h)
-            * tools to manage RGB colors (color.h)
-    	  * Infrastructure
-       	    * extended assertion handling (assert.h)
-       	    * exception classes and error handling (error.h)
-      	    * concept checking (concept_check.h)
-       	    * commonly used mathematical constants (math.h)
Index: ADME
===================================================================
--- README	(revision 325)
+++ 	(revision )
@@ -1,42 +1,0 @@
-==================================================================
-LEMON - a Library of Efficient Models and Optimization in Networks
-==================================================================
-
-LEMON is an open source library written in C++. It provides
-easy-to-use implementations of common data structures and algorithms
-in the area of optimization and helps implementing new ones. The main
-focus is on graphs and graph algorithms, thus it is especially
-suitable for solving design and optimization problems of
-telecommunication networks. To achieve wide usability its data
-structures and algorithms provide generic interfaces.
-
-Contents
-========
-
-LICENSE
-
-   Copying, distribution and modification conditions and terms.
-
-INSTALL
-
-   General building and installation instructions.
-
-lemon/
-
-   Source code of LEMON library.
-
-doc/
-
-   Documentation of LEMON. The starting page is doc/html/index.html.
-
-demo/
-
-   Some example programs to make you easier to get familiar with LEMON.
-
-test/
-
-   Programs to check the integrity and correctness of LEMON.
-
-tools/
-
-   Various utilities related to LEMON.
Index: ake/FindGhostscript.cmake
===================================================================
--- cmake/FindGhostscript.cmake	(revision 377)
+++ 	(revision )
@@ -1,10 +1,0 @@
-INCLUDE(FindPackageHandleStandardArgs)
-
-FIND_PROGRAM(GHOSTSCRIPT_EXECUTABLE
-  NAMES gs gswin32c
-  PATHS "$ENV{ProgramFiles}/gs"
-  PATH_SUFFIXES gs8.61/bin gs8.62/bin gs8.63/bin gs8.64/bin gs8.65/bin
-  DOC "Ghostscript: PostScript and PDF language interpreter and previewer."
-)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ghostscript DEFAULT_MSG GHOSTSCRIPT_EXECUTABLE)
Index: ake/version.cmake.in
===================================================================
--- cmake/version.cmake.in	(revision 360)
+++ 	(revision )
@@ -1,2 +1,0 @@
-SET(PROJECT_NAME "@PACKAGE_NAME@")
-SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
Index: nfigure.ac
===================================================================
--- configure.ac	(revision 395)
+++ 	(revision )
@@ -1,142 +1,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl Version information.
-m4_define([lemon_version_number],
-	[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
-dnl m4_define([lemon_version_number], [])
-m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
-m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
-m4_define([lemon_version], [ifelse(lemon_version_number(),
-			   [],
-			   [lemon_hg_path().lemon_hg_revision()],
-			   [lemon_version_number()])])
-
-AC_PREREQ([2.59])
-AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
-AC_CONFIG_SRCDIR([lemon/list_graph.h])
-AC_CONFIG_HEADERS([config.h lemon/config.h])
-
-lx_cmdline_cxxflags_set=${CXXFLAGS+set}
-
-dnl Do compilation tests using the C++ compiler.
-AC_LANG([C++])
-
-dnl Check the existence of long long type.
-AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
-if test x"$long_long_found" = x"yes"; then
-  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
-fi
-
-dnl Checks for programs.
-AC_PROG_CXX
-AC_PROG_CXXCPP
-AC_PROG_INSTALL
-AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
-
-AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
-AC_CHECK_PROG([gs_found],[gs],[yes],[no])
-
-dnl Detect Intel compiler.
-AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
-AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
-choke me
-#endif], [ICC=[yes]], [ICC=[no]])
-if test x"$ICC" = x"yes"; then
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-
-dnl Set custom compiler flags when using g++.
-if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
-  CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
-fi
-
-dnl Checks for libraries.
-#LX_CHECK_GLPK
-#LX_CHECK_CPLEX
-#LX_CHECK_SOPLEX
-
-dnl Disable/enable building the demo programs.
-AC_ARG_ENABLE([demo],
-AS_HELP_STRING([--enable-demo], [build the demo programs])
-AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
-              [], [enable_demo=no])
-AC_MSG_CHECKING([whether to build the demo programs])
-if test x"$enable_demo" != x"no"; then
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
-
-dnl Disable/enable building the binary tools.
-AC_ARG_ENABLE([tools],
-AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
-AS_HELP_STRING([--disable-tools], [do not build additional tools]),
-              [], [enable_tools=yes])
-AC_MSG_CHECKING([whether to build the additional tools])
-if test x"$enable_tools" != x"no"; then
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
-
-dnl Checks for header files.
-AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-
-dnl Checks for library functions.
-AC_HEADER_STDC
-AC_CHECK_FUNCS(gettimeofday times ctime_r)
-
-dnl Add dependencies on files generated by configure.
-AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
-  ['$(top_srcdir)/doc/Doxyfile.in $(top_srcdir)/lemon/lemon.pc.in $(top_srcdir)/cmake/version.cmake.in'])
-
-AC_CONFIG_FILES([
-Makefile
-cmake/version.cmake
-doc/Doxyfile
-lemon/lemon.pc
-])
-
-AC_OUTPUT
-
-echo
-echo '****************************** SUMMARY ******************************'
-echo
-echo Package version............... : $PACKAGE-$VERSION
-echo
-echo C++ compiler.................. : $CXX
-echo C++ compiles flags............ : $CXXFLAGS
-echo
-echo Compiler supports long long... : $long_long_found
-echo
-#echo GLPK support.................. : $lx_glpk_found
-#echo CPLEX support................. : $lx_cplex_found
-#echo SOPLEX support................ : $lx_soplex_found
-#echo
-echo Build demo programs........... : $enable_demo
-echo Build additional tools........ : $enable_tools
-echo
-echo The packace will be installed in
-echo -n '  '
-echo $prefix.
-echo
-echo '*********************************************************************'
-
-echo
-echo Configure complete, now type \'make\' and then \'make install\'.
-echo
Index: mo/CMakeLists.txt
===================================================================
--- demo/CMakeLists.txt	(revision 394)
+++ 	(revision )
@@ -1,16 +1,0 @@
-INCLUDE_DIRECTORIES(
-  ${CMAKE_SOURCE_DIR}
-  ${PROJECT_BINARY_DIR}
-)
-
-LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
-
-SET(DEMOS
-  arg_parser_demo
-  graph_to_eps_demo
-  lgf_demo)
-
-FOREACH(DEMO_NAME ${DEMOS})
-  ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc)
-  TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon)
-ENDFOREACH(DEMO_NAME)
Index: mo/Makefile.am
===================================================================
--- demo/Makefile.am	(revision 164)
+++ 	(revision )
@@ -1,16 +1,0 @@
-EXTRA_DIST += \
-	demo/CMakeLists.txt \
-	demo/digraph.lgf
-
-if WANT_DEMO
-
-noinst_PROGRAMS += \
-	demo/arg_parser_demo \
-	demo/graph_to_eps_demo \
-	demo/lgf_demo
-
-endif WANT_DEMO
-
-demo_arg_parser_demo_SOURCES = demo/arg_parser_demo.cc
-demo_graph_to_eps_demo_SOURCES = demo/graph_to_eps_demo.cc
-demo_lgf_demo_SOURCES = demo/lgf_demo.cc
Index: mo/arg_parser_demo.cc
===================================================================
--- demo/arg_parser_demo.cc	(revision 315)
+++ 	(revision )
@@ -1,103 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 demos
-///\file
-///\brief Argument parser demo
-///
-/// This example shows how the argument parser can be used.
-///
-/// \include arg_parser_demo.cc
-
-#include <lemon/arg_parser.h>
-
-using namespace lemon;
-int main(int argc, char **argv)
-{
-  // Initialize the argument parser
-  ArgParser ap(argc, argv);
-  int i;
-  std::string s;
-  double d = 1.0;
-  bool b, nh;
-  bool g1, g2, g3;
-
-  // Add a mandatory integer option with storage reference
-  ap.refOption("n", "An integer input.", i, true);
-  // Add a double option with storage reference (the default value is 1.0)
-  ap.refOption("val", "A double input.", d);
-  // Add a double option without storage reference (the default value is 3.14)
-  ap.doubleOption("val2", "A double input.", 3.14);
-  // Set synonym for -val option
-  ap.synonym("vals", "val");
-  // Add a string option
-  ap.refOption("name", "A string input.", s);
-  // Add bool options
-  ap.refOption("f", "A switch.", b)
-    .refOption("nohelp", "", nh)
-    .refOption("gra", "Choice A", g1)
-    .refOption("grb", "Choice B", g2)
-    .refOption("grc", "Choice C", g3);
-  // Bundle -gr* options into a group
-  ap.optionGroup("gr", "gra")
-    .optionGroup("gr", "grb")
-    .optionGroup("gr", "grc");
-  // Set the group mandatory
-  ap.mandatoryGroup("gr");
-  // Set the options of the group exclusive (only one option can be given)
-  ap.onlyOneGroup("gr");
-  // Add non-parsed arguments (e.g. input files)
-  ap.other("infile", "The input file.")
-    .other("...");
-
-  // Perform the parsing process
-  // (in case of any error it terminates the program)
-  ap.parse();
-
-  // Check each option if it has been given and print its value
-  std::cout << "Parameters of '" << ap.commandName() << "':\n";
-
-  std::cout << "  Value of -n: " << i << std::endl;
-  if(ap.given("val")) std::cout << "  Value of -val: " << d << std::endl;
-  if(ap.given("val2")) {
-    d = ap["val2"];
-    std::cout << "  Value of -val2: " << d << std::endl;
-  }
-  if(ap.given("name")) std::cout << "  Value of -name: " << s << std::endl;
-  if(ap.given("f")) std::cout << "  -f is given\n";
-  if(ap.given("nohelp")) std::cout << "  Value of -nohelp: " << nh << std::endl;
-  if(ap.given("gra")) std::cout << "  -gra is given\n";
-  if(ap.given("grb")) std::cout << "  -grb is given\n";
-  if(ap.given("grc")) std::cout << "  -grc is given\n";
-
-  switch(ap.files().size()) {
-  case 0:
-    std::cout << "  No file argument was given.\n";
-    break;
-  case 1:
-    std::cout << "  1 file argument was given. It is:\n";
-    break;
-  default:
-    std::cout << "  "
-              << ap.files().size() << " file arguments were given. They are:\n";
-  }
-  for(unsigned int i=0;i<ap.files().size();++i)
-    std::cout << "    '" << ap.files()[i] << "'\n";
-
-  return 0;
-}
Index: mo/digraph.lgf
===================================================================
--- demo/digraph.lgf	(revision 164)
+++ 	(revision )
@@ -1,29 +1,0 @@
-@nodes
-label
-0
-1
-2
-3
-4
-5
-6
-7
-@arcs
-		label capacity
-0 	1 	0  	  16
-0 	2 	1 	  12
-0 	3 	2 	  20
-1 	2 	3 	  10
-1 	4 	4 	  10
-1 	5 	5 	  13
-2 	3 	6 	  10
-2 	4 	7 	  8
-2 	6 	8 	  8
-5 	3 	9 	  20
-3 	6 	10 	  25
-4 	7 	11 	  15
-5 	7 	12 	  15
-6 	7 	13 	  18
-@attributes
-source 0
-target 7
Index: mo/graph_to_eps_demo.cc
===================================================================
--- demo/graph_to_eps_demo.cc	(revision 317)
+++ 	(revision )
@@ -1,206 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 demos
-/// \file
-/// \brief Demo of the graph drawing function \ref graphToEps()
-///
-/// This demo program shows examples how to use the function \ref
-/// graphToEps(). It takes no input but simply creates seven
-/// <tt>.eps</tt> files demonstrating the capability of \ref
-/// graphToEps(), and showing how to draw directed graphs,
-/// how to handle parallel egdes, how to change the properties (like
-/// color, shape, size, title etc.) of nodes and arcs individually
-/// using appropriate graph maps.
-///
-/// \include graph_to_eps_demo.cc
-
-#include<lemon/list_graph.h>
-#include<lemon/graph_to_eps.h>
-#include<lemon/math.h>
-
-using namespace std;
-using namespace lemon;
-
-int main()
-{
-  Palette palette;
-  Palette paletteW(true);
-
-  // Create a small digraph
-  ListDigraph g;
-  typedef ListDigraph::Node Node;
-  typedef ListDigraph::NodeIt NodeIt;
-  typedef ListDigraph::Arc Arc;
-  typedef dim2::Point<int> Point;
-
-  Node n1=g.addNode();
-  Node n2=g.addNode();
-  Node n3=g.addNode();
-  Node n4=g.addNode();
-  Node n5=g.addNode();
-
-  ListDigraph::NodeMap<Point> coords(g);
-  ListDigraph::NodeMap<double> sizes(g);
-  ListDigraph::NodeMap<int> colors(g);
-  ListDigraph::NodeMap<int> shapes(g);
-  ListDigraph::ArcMap<int> acolors(g);
-  ListDigraph::ArcMap<int> widths(g);
-
-  coords[n1]=Point(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
-  coords[n2]=Point(50,70);  sizes[n2]=2; colors[n2]=2; shapes[n2]=2;
-  coords[n3]=Point(70,70);  sizes[n3]=1; colors[n3]=3; shapes[n3]=0;
-  coords[n4]=Point(70,50);  sizes[n4]=2; colors[n4]=4; shapes[n4]=1;
-  coords[n5]=Point(85,60);  sizes[n5]=3; colors[n5]=5; shapes[n5]=2;
-
-  Arc a;
-
-  a=g.addArc(n1,n2); acolors[a]=0; widths[a]=1;
-  a=g.addArc(n2,n3); acolors[a]=0; widths[a]=1;
-  a=g.addArc(n3,n5); acolors[a]=0; widths[a]=3;
-  a=g.addArc(n5,n4); acolors[a]=0; widths[a]=1;
-  a=g.addArc(n4,n1); acolors[a]=0; widths[a]=1;
-  a=g.addArc(n2,n4); acolors[a]=1; widths[a]=2;
-  a=g.addArc(n3,n4); acolors[a]=2; widths[a]=1;
-
-  IdMap<ListDigraph,Node> id(g);
-
-  // Create .eps files showing the digraph with different options
-  cout << "Create 'graph_to_eps_demo_out_1_pure.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_1_pure.eps").
-    coords(coords).
-    title("Sample .eps figure").
-    copyright("(C) 2003-2008 LEMON Project").
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out_2.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_2.eps").
-    coords(coords).
-    title("Sample .eps figure").
-    copyright("(C) 2003-2008 LEMON Project").
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeScale(2).nodeSizes(sizes).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    arcColors(composeMap(palette,acolors)).
-    arcWidthScale(.4).arcWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out_3_arr.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_3_arr.eps").
-    title("Sample .eps figure (with arrowheads)").
-    copyright("(C) 2003-2008 LEMON Project").
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeColors(composeMap(palette,colors)).
-    coords(coords).
-    nodeScale(2).nodeSizes(sizes).
-    nodeShapes(shapes).
-    arcColors(composeMap(palette,acolors)).
-    arcWidthScale(.4).arcWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    drawArrows().arrowWidth(2).arrowLength(2).
-    run();
-
-  // Add more arcs to the digraph
-  a=g.addArc(n1,n4); acolors[a]=2; widths[a]=1;
-  a=g.addArc(n4,n1); acolors[a]=1; widths[a]=2;
-
-  a=g.addArc(n1,n2); acolors[a]=1; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=2; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=3; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=4; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=5; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=6; widths[a]=1;
-  a=g.addArc(n1,n2); acolors[a]=7; widths[a]=1;
-
-  cout << "Create 'graph_to_eps_demo_out_4_par.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_4_par.eps").
-    title("Sample .eps figure (parallel arcs)").
-    copyright("(C) 2003-2008 LEMON Project").
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeShapes(shapes).
-    coords(coords).
-    nodeScale(2).nodeSizes(sizes).
-    nodeColors(composeMap(palette,colors)).
-    arcColors(composeMap(palette,acolors)).
-    arcWidthScale(.4).arcWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parArcDist(1.5).
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out_5_par_arr.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_5_par_arr.eps").
-    title("Sample .eps figure (parallel arcs and arrowheads)").
-    copyright("(C) 2003-2008 LEMON Project").
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeScale(2).nodeSizes(sizes).
-    coords(coords).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    arcColors(composeMap(palette,acolors)).
-    arcWidthScale(.3).arcWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parArcDist(1).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out_6_par_arr_a4.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_6_par_arr_a4.eps").
-    title("Sample .eps figure (fits to A4)").
-    copyright("(C) 2003-2008 LEMON Project").
-    scaleToA4().
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeScale(2).nodeSizes(sizes).
-    coords(coords).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    arcColors(composeMap(palette,acolors)).
-    arcWidthScale(.3).arcWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parArcDist(1).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
-
-  // Create an .eps file showing the colors of a default Palette
-  ListDigraph h;
-  ListDigraph::NodeMap<int> hcolors(h);
-  ListDigraph::NodeMap<Point> hcoords(h);
-
-  int cols=int(sqrt(double(palette.size())));
-  for(int i=0;i<int(paletteW.size());i++) {
-    Node n=h.addNode();
-    hcoords[n]=Point(1+i%cols,1+i/cols);
-    hcolors[n]=i;
-  }
-
-  cout << "Create 'graph_to_eps_demo_out_7_colors.eps'" << endl;
-  graphToEps(h,"graph_to_eps_demo_out_7_colors.eps").
-    scale(60).
-    title("Sample .eps figure (Palette demo)").
-    copyright("(C) 2003-2008 LEMON Project").
-    coords(hcoords).
-    absoluteNodeSizes().absoluteArcWidths().
-    nodeScale(.45).
-    distantColorNodeTexts().
-    nodeTexts(hcolors).nodeTextSize(.6).
-    nodeColors(composeMap(paletteW,hcolors)).
-    run();
-
-  return 0;
-}
Index: mo/lgf_demo.cc
===================================================================
--- demo/lgf_demo.cc	(revision 294)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 demos
-///\file
-///\brief Demonstrating graph input and output
-///
-/// This program gives an example of how to read and write a digraph
-/// and additional maps from/to a stream or a file using the
-/// \ref lgf-format "LGF" format.
-///
-/// The \c "digraph.lgf" file:
-/// \include digraph.lgf
-///
-/// And the program which reads it and prints the digraph to the
-/// standard output:
-/// \include lgf_demo.cc
-
-#include <iostream>
-#include <lemon/smart_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/lgf_writer.h>
-
-using namespace lemon;
-
-int main() {
-  SmartDigraph g;
-  SmartDigraph::ArcMap<int> cap(g);
-  SmartDigraph::Node s, t;
-
-  try {
-    digraphReader(g, "digraph.lgf"). // read the directed graph into g
-      arcMap("capacity", cap).       // read the 'capacity' arc map into cap
-      node("source", s).             // read 'source' node to s
-      node("target", t).             // read 'target' node to t
-      run();
-  } catch (Exception& error) { // check if there was any error
-    std::cerr << "Error: " << error.what() << std::endl;
-    return -1;
-  }
-
-  std::cout << "A digraph is read from 'digraph.lgf'." << std::endl;
-  std::cout << "Number of nodes: " << countNodes(g) << std::endl;
-  std::cout << "Number of arcs: " << countArcs(g) << std::endl;
-
-  std::cout << "We can write it to the standard output:" << std::endl;
-
-  digraphWriter(g).                // write g to the standard output
-    arcMap("capacity", cap).       // write cap into 'capacity'
-    node("source", s).             // write s to 'source'
-    node("target", t).             // write t to 'target'
-    run();
-
-  return 0;
-}
Index: c/CMakeLists.txt
===================================================================
--- doc/CMakeLists.txt	(revision 377)
+++ 	(revision )
@@ -1,42 +1,0 @@
-SET(PACKAGE_NAME ${PROJECT_NAME})
-SET(PACKAGE_VERSION ${PROJECT_VERSION})
-SET(abs_top_srcdir ${CMAKE_SOURCE_DIR})
-SET(abs_top_builddir ${CMAKE_BINARY_DIR})
-
-CONFIGURE_FILE(
-  ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in
-  ${CMAKE_BINARY_DIR}/doc/Doxyfile
-  @ONLY)
-
-IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
-  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
-  IF(UNIX)
-    ADD_CUSTOM_TARGET(html
-      COMMAND rm -rf gen-images
-      COMMAND mkdir gen-images
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
-      COMMAND rm -rf html
-      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-  ELSEIF(WIN32)
-    ADD_CUSTOM_TARGET(html
-      COMMAND if exist gen-images rmdir /s /q gen-images
-      COMMAND mkdir gen-images
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
-      COMMAND ${GHOSTSCRIPT_EXECUTABLE} -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
-      COMMAND if exist html rmdir /s /q html
-      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
-      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-  ENDIF(UNIX)
-  INSTALL(
-    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
-    DESTINATION share/doc
-    COMPONENT html_documentation)
-ENDIF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
Index: c/Doxyfile.in
===================================================================
--- doc/Doxyfile.in	(revision 321)
+++ 	(revision )
@@ -1,266 +1,0 @@
-# Doxyfile 1.5.7.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING      = UTF-8
-PROJECT_NAME           = @PACKAGE_NAME@
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-OUTPUT_DIRECTORY       = 
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = NO
-ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = "@abs_top_srcdir@"
-STRIP_FROM_INC_PATH    = "@abs_top_srcdir@"
-SHORT_NAMES            = YES
-JAVADOC_AUTOBRIEF      = NO
-QT_AUTOBRIEF           = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = YES
-INHERIT_DOCS           = NO
-SEPARATE_MEMBER_PAGES  = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = NO
-OPTIMIZE_OUTPUT_JAVA   = NO
-OPTIMIZE_FOR_FORTRAN   = NO
-OPTIMIZE_OUTPUT_VHDL   = NO
-BUILTIN_STL_SUPPORT    = YES
-CPP_CLI_SUPPORT        = NO
-SIP_SUPPORT            = NO
-IDL_PROPERTY_SUPPORT   = YES
-DISTRIBUTE_GROUP_DOC   = NO
-SUBGROUPING            = YES
-TYPEDEF_HIDES_STRUCT   = NO
-SYMBOL_CACHE_SIZE      = 0
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = NO
-EXTRACT_PRIVATE        = YES
-EXTRACT_STATIC         = YES
-EXTRACT_LOCAL_CLASSES  = NO
-EXTRACT_LOCAL_METHODS  = NO
-EXTRACT_ANON_NSPACES   = NO
-HIDE_UNDOC_MEMBERS     = YES
-HIDE_UNDOC_CLASSES     = YES
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = YES
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = NO
-SORT_BRIEF_DOCS        = NO
-SORT_GROUP_NAMES       = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 5
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = YES
-SHOW_FILES             = YES
-SHOW_NAMESPACES        = YES
-FILE_VERSION_FILTER    = 
-LAYOUT_FILE            = DoxygenLayout.xml
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = doxygen.log
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = "@abs_top_srcdir@/doc" \
-                         "@abs_top_srcdir@/lemon" \
-                         "@abs_top_srcdir@/lemon/bits" \
-                         "@abs_top_srcdir@/lemon/concepts" \
-                         "@abs_top_srcdir@/demo" \
-                         "@abs_top_srcdir@/tools" \
-                         "@abs_top_srcdir@/test/test_tools.h"
-INPUT_ENCODING         = UTF-8
-FILE_PATTERNS          = *.h \
-                         *.cc \
-                         *.dox
-RECURSIVE              = NO
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXCLUDE_SYMBOLS        = 
-EXAMPLE_PATH           = "@abs_top_srcdir@/demo" \
-                         "@abs_top_srcdir@/LICENSE" \
-                         "@abs_top_srcdir@/doc"
-EXAMPLE_PATTERNS       = 
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = "@abs_top_srcdir@/doc/images" \
-                         "@abs_top_builddir@/doc/gen-images"
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION    = NO
-REFERENCES_LINK_SOURCE = YES
-USE_HTAGS              = NO
-VERBATIM_HEADERS       = NO
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = YES
-COLS_IN_ALPHA_INDEX    = 2
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-HTML_DYNAMIC_SECTIONS  = NO
-GENERATE_DOCSET        = NO
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-GENERATE_HTMLHELP      = NO
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-CHM_INDEX_ENCODING     = 
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-GENERATE_QHP           = NO
-QCH_FILE               = 
-QHP_NAMESPACE          = org.doxygen.Project
-QHP_VIRTUAL_FOLDER     = doc
-QHG_LOCATION           = 
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-FORMULA_FONTSIZE       = 10
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = YES
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = amsmath \
-                         amssymb
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = YES
-USE_PDFLATEX           = YES
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = DOXYGEN
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
-GENERATE_TAGFILE       = html/lemon.tag
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = NO
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = YES
-MSCGEN_PATH            = 
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = YES
-DOT_FONTNAME           = FreeSans
-DOT_FONTSIZE           = 10
-DOT_FONTPATH           = 
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = NO
-GROUP_GRAPHS           = NO
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
-INCLUDE_GRAPH          = NO
-INCLUDED_BY_GRAPH      = NO
-CALL_GRAPH             = NO
-CALLER_GRAPH           = NO
-GRAPHICAL_HIERARCHY    = NO
-DIRECTORY_GRAPH        = NO
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
-DOT_GRAPH_MAX_NODES    = 50
-MAX_DOT_GRAPH_DEPTH    = 0
-DOT_TRANSPARENT        = NO
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
Index: c/DoxygenLayout.xml
===================================================================
--- doc/DoxygenLayout.xml	(revision 321)
+++ 	(revision )
@@ -1,182 +1,0 @@
-<doxygenlayout version="1.0">
-  <!-- Navigation index tabs for HTML output -->
-  <navindex>
-    <tab type="mainpage" visible="yes" title=""/>
-    <tab type="modules" visible="yes" title=""/>
-    <tab type="classes" visible="yes" title="">
-      <tab type="classes" visible="yes" title=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
-      <tab type="hierarchy" visible="yes" title=""/>
-      <tab type="classmembers" visible="yes" title=""/>
-    </tab>
-    <tab type="namespaces" visible="yes" title="">
-      <tab type="namespaces" visible="yes" title=""/>
-      <tab type="namespacemembers" visible="yes" title=""/>
-    </tab>
-    <tab type="files" visible="yes" title="">
-      <tab type="files" visible="yes" title=""/>
-      <tab type="globals" visible="yes" title=""/>
-    </tab>
-    <tab type="dirs" visible="yes" title=""/>
-    <tab type="examples" visible="yes" title=""/>  
-    <tab type="pages" visible="yes" title=""/>
-  </navindex>
-
-  <!-- Layout definition for a class page -->
-  <class>
-    <briefdescription visible="no"/>
-    <detaileddescription title=""/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <inheritancegraph visible="$CLASS_GRAPH"/>
-    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
-    <allmemberslink visible="yes"/>
-    <memberdecl>
-      <membergroups visible="yes"/>
-      <nestedclasses visible="yes" title=""/>
-      <publictypes title=""/>
-      <publicslots title=""/>
-      <signals title=""/>
-      <publicmethods title=""/>
-      <publicstaticmethods title=""/>
-      <publicattributes title=""/>
-      <publicstaticattributes title=""/>
-      <protectedtypes title=""/>
-      <protectedslots title=""/>
-      <protectedmethods title=""/>
-      <protectedstaticmethods title=""/>
-      <protectedattributes title=""/>
-      <protectedstaticattributes title=""/>
-      <packagetypes title=""/>
-      <packagemethods title=""/>
-      <packagestaticmethods title=""/>
-      <packageattributes title=""/>
-      <packagestaticattributes title=""/>
-      <properties title=""/>
-      <events title=""/>
-      <privatetypes title=""/>
-      <privateslots title=""/>
-      <privatemethods title=""/>
-      <privatestaticmethods title=""/>
-      <privateattributes title=""/>
-      <privatestaticattributes title=""/>
-      <friends title=""/>
-      <related title="" subtitle=""/>
-    </memberdecl>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <constructors title=""/>
-      <functions title=""/>
-      <related title=""/>
-      <variables title=""/>
-      <properties title=""/>
-      <events title=""/>
-    </memberdef>
-    <usedfiles visible="$SHOW_USED_FILES"/>
-    <authorsection visible="yes"/>
-  </class>
-
-  <!-- Layout definition for a namespace page -->
-  <namespace>
-    <briefdescription visible="no"/>
-    <detaileddescription title=""/>
-    <memberdecl>
-      <nestednamespaces visible="yes" title=""/>
-      <classes visible="yes" title=""/>
-      <membergroups visible="yes"/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdecl>
-    <memberdef>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </namespace>
-
-  <!-- Layout definition for a file page -->
-  <file>
-    <briefdescription visible="no"/>
-    <detaileddescription title=""/>
-    <includes visible="$SHOW_INCLUDE_FILES"/>
-    <includegraph visible="$INCLUDE_GRAPH"/>
-    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
-    <sourcelink visible="yes"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdecl>
-    <memberdef>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <functions title=""/>
-      <variables title=""/>
-    </memberdef>
-    <authorsection/>
-  </file>
-
-  <!-- Layout definition for a group page -->
-  <group>
-    <briefdescription visible="no"/>
-    <detaileddescription title=""/>
-    <groupgraph visible="$GROUP_GRAPHS"/>
-    <memberdecl>
-      <classes visible="yes" title=""/>
-      <namespaces visible="yes" title=""/>
-      <dirs visible="yes" title=""/>
-      <nestedgroups visible="yes" title=""/>
-      <files visible="yes" title=""/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdecl>
-    <memberdef>
-      <pagedocs/>
-      <defines title=""/>
-      <typedefs title=""/>
-      <enums title=""/>
-      <enumvalues title=""/>
-      <functions title=""/>
-      <variables title=""/>
-      <signals title=""/>
-      <publicslots title=""/>
-      <protectedslots title=""/>
-      <privateslots title=""/>
-      <events title=""/>
-      <properties title=""/>
-      <friends title=""/>
-    </memberdef>
-    <authorsection visible="yes"/>
-  </group>
-
-  <!-- Layout definition for a directory page -->
-  <directory>
-    <briefdescription visible="no"/>
-    <detaileddescription title=""/>
-    <directorygraph visible="yes"/>
-    <memberdecl>
-      <dirs visible="yes"/>
-      <files visible="yes"/>
-    </memberdecl>
-  </directory>
-</doxygenlayout>
Index: c/Makefile.am
===================================================================
--- doc/Makefile.am	(revision 322)
+++ 	(revision )
@@ -1,87 +1,0 @@
-EXTRA_DIST += \
-	doc/Doxyfile.in \
-	doc/DoxygenLayout.xml \
-	doc/coding_style.dox \
-	doc/dirs.dox \
-	doc/groups.dox \
-	doc/lgf.dox \
-	doc/license.dox \
-	doc/mainpage.dox \
-	doc/migration.dox \
-	doc/named-param.dox \
-	doc/namespaces.dox \
-	doc/html \
-	doc/CMakeLists.txt
-
-DOC_EPS_IMAGES18 = \
-	nodeshape_0.eps \
-	nodeshape_1.eps \
-	nodeshape_2.eps \
-	nodeshape_3.eps \
-	nodeshape_4.eps
-
-DOC_EPS_IMAGES = \
-	$(DOC_EPS_IMAGES18)
-
-DOC_PNG_IMAGES = \
-	$(DOC_EPS_IMAGES:%.eps=doc/gen-images/%.png)
-
-EXTRA_DIST += $(DOC_EPS_IMAGES:%=doc/images/%)
-
-doc/html:
-	$(MAKE) $(AM_MAKEFLAGS) html
-
-GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4
-
-$(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
-	-mkdir doc/gen-images
-	if test ${gs_found} = yes; then \
-	  $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \
-	else \
-	  echo; \
-	  echo "Ghostscript not found."; \
-	  echo; \
-	  exit 1; \
-	fi
-
-html-local: $(DOC_PNG_IMAGES)
-	if test ${doxygen_found} = yes; then \
-	  cd doc; \
-	  doxygen Doxyfile; \
-	  cd ..; \
-	else \
-	  echo; \
-	  echo "Doxygen not found."; \
-	  echo; \
-	  exit 1; \
-	fi
-
-clean-local:
-	-rm -rf doc/html
-	-rm -f doc/doxygen.log
-	-rm -f $(DOC_PNG_IMAGES)
-	-rm -rf doc/gen-images
-
-update-external-tags:
-	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
-	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
-	rm doc/libstdc++.tag.tmp
-
-install-html-local: doc/html
-	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(htmldir)/docs
-	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \
-	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \
-	done
-
-uninstall-local:
-	@$(NORMAL_UNINSTALL)
-	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \
-	  rm -f $(DESTDIR)$(htmldir)/docs/$$f; \
-	done
-
-.PHONY: update-external-tags
Index: c/coding_style.dox
===================================================================
--- doc/coding_style.dox	(revision 210)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-/*!
-
-\page coding_style LEMON Coding Style
-
-\section naming_conv Naming Conventions
-
-In order to make development easier we have made some conventions
-according to coding style. These include names of types, classes,
-functions, variables, constants and exceptions. If these conventions
-are met in one's code then it is easier to read and maintain
-it. Please comply with these conventions if you want to contribute
-developing LEMON library.
-
-\note When the coding style requires the capitalization of an abbreviation,
-only the first letter should be upper case.
-
-\code
-XmlReader
-\endcode
-
-
-\warning In some cases we diverge from these rules.
-This is primary done because STL uses different naming convention and
-in certain cases
-it is beneficial to provide STL compatible interface.
-
-\subsection cs-files File Names
-
-The header file names should look like the following.
-
-\code
-header_file.h
-\endcode
-
-Note that all standard LEMON headers are located in the \c lemon subdirectory,
-so you should include them from C++ source like this:
-
-\code
-#include <lemon/header_file.h>
-\endcode
-
-The source code files use the same style and they have '.cc' extension.
-
-\code
-source_code.cc
-\endcode
-
-\subsection cs-class Classes and other types
-
-The name of a class or any type should look like the following.
-
-\code
-AllWordsCapitalizedWithoutUnderscores
-\endcode
-
-\subsection cs-func Methods and other functions
-
-The name of a function should look like the following.
-
-\code
-firstWordLowerCaseRestCapitalizedWithoutUnderscores
-\endcode
-
-\subsection cs-funcs Constants, Macros
-
-The names of constants and macros should look like the following.
-
-\code
-ALL_UPPER_CASE_WITH_UNDERSCORES
-\endcode
-
-\subsection cs-loc-var Class and instance member variables, auto variables
-
-The names of class and instance member variables and auto variables
-(=variables used locally in methods) should look like the following.
-
-\code
-all_lower_case_with_underscores
-\endcode
-
-\subsection pri-loc-var Private member variables
-
-Private member variables should start with underscore
-
-\code
-_start_with_underscores
-\endcode
-
-\subsection cs-excep Exceptions
-
-When writing exceptions please comply the following naming conventions.
-
-\code
-ClassNameEndsWithException
-\endcode
-
-or
-
-\code
-ClassNameEndsWithError
-\endcode
-
-\section header-template Template Header File
-
-Each LEMON header file should look like this:
-
-\include template.h
-
-*/
Index: c/dirs.dox
===================================================================
--- doc/dirs.dox	(revision 427)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-/**
-\dir demo
-\brief A collection of demo applications.
-
-This directory contains several simple demo applications, mainly
-for educational purposes.
-*/
-
-/**
-\dir doc
-\brief Auxiliary (and the whole generated) documentation.
-
-This directory contains some auxiliary pages and the whole generated
-documentation.
-*/
-
-/**
-\dir test
-\brief Test programs.
-
-This directory contains several test programs that check the consistency
-of the code.
-*/
-
-/**
-\dir tools
-\brief Some useful executables.
-
-This directory contains the sources of some useful complete executables.
-*/
-
-/**
-\dir lemon
-\brief Base include directory of LEMON.
-
-This is the base directory of LEMON includes, so each include file must be
-prefixed with this, e.g.
-\code
-#include<lemon/list_graph.h>
-#include<lemon/dijkstra.h>
-\endcode
-*/
-
-/**
-\dir concepts
-\brief Concept descriptors and checking classes.
-
-This directory contains the concept descriptors and concept checking tools.
-For more information see the \ref concept "Concepts" module.
-*/
-
-/**
-\dir bits
-\brief Auxiliary tools for implementation.
-
-This directory contains some auxiliary classes for implementing graphs,
-maps and some other classes.
-As a user you typically don't have to deal with these files.
-*/
Index: c/groups.dox
===================================================================
--- doc/groups.dox	(revision 427)
+++ 	(revision )
@@ -1,320 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-/**
-@defgroup datas Data Structures
-This group describes the several data structures implemented in LEMON.
-*/
-
-/**
-@defgroup graphs Graph Structures
-@ingroup datas
-\brief Graph structures implemented in LEMON.
-
-The implementation of combinatorial algorithms heavily relies on
-efficient graph implementations. LEMON offers data structures which are
-planned to be easily used in an experimental phase of implementation studies,
-and thereafter the program code can be made efficient by small modifications.
-
-The most efficient implementation of diverse applications require the
-usage of different physical graph implementations. These differences
-appear in the size of graph we require to handle, memory or time usage
-limitations or in the set of operations through which the graph can be
-accessed.  LEMON provides several physical graph structures to meet
-the diverging requirements of the possible users.  In order to save on
-running time or on memory usage, some structures may fail to provide
-some graph features like arc/edge or node deletion.
-
-You are free to use the graph structure that fit your requirements
-the best, most graph algorithms and auxiliary data structures can be used
-with any graph structure.
-
-<b>See also:</b> \ref graph_concepts "Graph Structure Concepts".
-*/
-
-/**
-@defgroup maps Maps
-@ingroup datas
-\brief Map structures implemented in LEMON.
-
-This group describes the map structures implemented in LEMON.
-
-LEMON provides several special purpose maps and map adaptors that e.g. combine
-new maps from existing ones.
-
-<b>See also:</b> \ref map_concepts "Map Concepts".
-*/
-
-/**
-@defgroup graph_maps Graph Maps
-@ingroup maps
-\brief Special graph-related maps.
-
-This group describes maps that are specifically designed to assign
-values to the nodes and arcs of graphs.
-*/
-
-/**
-\defgroup map_adaptors Map Adaptors
-\ingroup maps
-\brief Tools to create new maps from existing ones
-
-This group describes map adaptors that are used to create "implicit"
-maps from other maps.
-
-Most of them are \ref lemon::concepts::ReadMap "read-only maps".
-They can make arithmetic and logical operations between one or two maps
-(negation, shifting, addition, multiplication, logical 'and', 'or',
-'not' etc.) or e.g. convert a map to another one of different Value type.
-
-The typical usage of this classes is passing implicit maps to
-algorithms.  If a function type algorithm is called then the function
-type map adaptors can be used comfortable. For example let's see the
-usage of map adaptors with the \c graphToEps() function.
-\code
-  Color nodeColor(int deg) {
-    if (deg >= 2) {
-      return Color(0.5, 0.0, 0.5);
-    } else if (deg == 1) {
-      return Color(1.0, 0.5, 1.0);
-    } else {
-      return Color(0.0, 0.0, 0.0);
-    }
-  }
-
-  Digraph::NodeMap<int> degree_map(graph);
-
-  graphToEps(graph, "graph.eps")
-    .coords(coords).scaleToA4().undirected()
-    .nodeColors(composeMap(functorToMap(nodeColor), degree_map))
-    .run();
-\endcode
-The \c functorToMap() function makes an \c int to \c Color map from the
-\c nodeColor() function. The \c composeMap() compose the \c degree_map
-and the previously created map. The composed map is a proper function to
-get the color of each node.
-
-The usage with class type algorithms is little bit harder. In this
-case the function type map adaptors can not be used, because the
-function map adaptors give back temporary objects.
-\code
-  Digraph graph;
-
-  typedef Digraph::ArcMap<double> DoubleArcMap;
-  DoubleArcMap length(graph);
-  DoubleArcMap speed(graph);
-
-  typedef DivMap<DoubleArcMap, DoubleArcMap> TimeMap;
-  TimeMap time(length, speed);
-
-  Dijkstra<Digraph, TimeMap> dijkstra(graph, time);
-  dijkstra.run(source, target);
-\endcode
-We have a length map and a maximum speed map on the arcs of a digraph.
-The minimum time to pass the arc can be calculated as the division of
-the two maps which can be done implicitly with the \c DivMap template
-class. We use the implicit minimum time map as the length map of the
-\c Dijkstra algorithm.
-*/
-
-/**
-@defgroup paths Path Structures
-@ingroup datas
-\brief %Path structures implemented in LEMON.
-
-This group describes the path structures implemented in LEMON.
-
-LEMON provides flexible data structures to work with paths.
-All of them have similar interfaces and they can be copied easily with
-assignment operators and copy constructors. This makes it easy and
-efficient to have e.g. the Dijkstra algorithm to store its result in
-any kind of path structure.
-
-\sa lemon::concepts::Path
-*/
-
-/**
-@defgroup auxdat Auxiliary Data Structures
-@ingroup datas
-\brief Auxiliary data structures implemented in LEMON.
-
-This group describes some data structures implemented in LEMON in
-order to make it easier to implement combinatorial algorithms.
-*/
-
-/**
-@defgroup algs Algorithms
-\brief This group describes the several algorithms
-implemented in LEMON.
-
-This group describes the several algorithms
-implemented in LEMON.
-*/
-
-/**
-@defgroup search Graph Search
-@ingroup algs
-\brief Common graph search algorithms.
-
-This group describes the common graph search algorithms like
-Breadth-First Search (BFS) and Depth-First Search (DFS).
-*/
-
-/**
-@defgroup shortest_path Shortest Path Algorithms
-@ingroup algs
-\brief Algorithms for finding shortest paths.
-
-This group describes the algorithms for finding shortest paths in graphs.
-*/
-
-/**
-@defgroup spantree Minimum Spanning Tree Algorithms
-@ingroup algs
-\brief Algorithms for finding a minimum cost spanning tree in a graph.
-
-This group describes the algorithms for finding a minimum cost spanning
-tree in a graph
-*/
-
-/**
-@defgroup utils Tools and Utilities
-\brief Tools and utilities for programming in LEMON
-
-Tools and utilities for programming in LEMON.
-*/
-
-/**
-@defgroup gutils Basic Graph Utilities
-@ingroup utils
-\brief Simple basic graph utilities.
-
-This group describes some simple basic graph utilities.
-*/
-
-/**
-@defgroup misc Miscellaneous Tools
-@ingroup utils
-\brief Tools for development, debugging and testing.
-
-This group describes several useful tools for development,
-debugging and testing.
-*/
-
-/**
-@defgroup timecount Time Measuring and Counting
-@ingroup misc
-\brief Simple tools for measuring the performance of algorithms.
-
-This group describes simple tools for measuring the performance
-of algorithms.
-*/
-
-/**
-@defgroup exceptions Exceptions
-@ingroup utils
-\brief Exceptions defined in LEMON.
-
-This group describes the exceptions defined in LEMON.
-*/
-
-/**
-@defgroup io_group Input-Output
-\brief Graph Input-Output methods
-
-This group describes the tools for importing and exporting graphs
-and graph related data. Now it supports the LEMON format
-and the encapsulated postscript (EPS) format.
-postscript (EPS) format.
-*/
-
-/**
-@defgroup lemon_io LEMON Input-Output
-@ingroup io_group
-\brief Reading and writing LEMON Graph Format.
-
-This group describes methods for reading and writing
-\ref lgf-format "LEMON Graph Format".
-*/
-
-/**
-@defgroup eps_io Postscript Exporting
-@ingroup io_group
-\brief General \c EPS drawer and graph exporter
-
-This group describes general \c EPS drawing methods and special
-graph exporting tools.
-*/
-
-/**
-@defgroup concept Concepts
-\brief Skeleton classes and concept checking classes
-
-This group describes the data/algorithm skeletons and concept checking
-classes implemented in LEMON.
-
-The purpose of the classes in this group is fourfold.
-
-- These classes contain the documentations of the %concepts. In order
-  to avoid document multiplications, an implementation of a concept
-  simply refers to the corresponding concept class.
-
-- These classes declare every functions, <tt>typedef</tt>s etc. an
-  implementation of the %concepts should provide, however completely
-  without implementations and real data structures behind the
-  interface. On the other hand they should provide nothing else. All
-  the algorithms working on a data structure meeting a certain concept
-  should compile with these classes. (Though it will not run properly,
-  of course.) In this way it is easily to check if an algorithm
-  doesn't use any extra feature of a certain implementation.
-
-- The concept descriptor classes also provide a <em>checker class</em>
-  that makes it possible to check whether a certain implementation of a
-  concept indeed provides all the required features.
-
-- Finally, They can serve as a skeleton of a new implementation of a concept.
-*/
-
-/**
-@defgroup graph_concepts Graph Structure Concepts
-@ingroup concept
-\brief Skeleton and concept checking classes for graph structures
-
-This group describes the skeletons and concept checking classes of LEMON's
-graph structures and helper classes used to implement these.
-*/
-
-/**
-@defgroup map_concepts Map Concepts
-@ingroup concept
-\brief Skeleton and concept checking classes for maps
-
-This group describes the skeletons and concept checking classes of maps.
-*/
-
-/**
-\anchor demoprograms
-
-@defgroup demos Demo programs
-
-Some demo programs are listed here. Their full source codes can be found in
-the \c demo subdirectory of the source tree.
-
-It order to compile them, use <tt>--enable-demo</tt> configure option when
-build the library.
-*/
Index: c/images/nodeshape_0.eps
===================================================================
--- doc/images/nodeshape_0.eps	(revision 152)
+++ 	(revision )
@@ -1,57 +1,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: LEMON GraphToEps figure
-%%Creator: LEMON GraphToEps function
-%%BoundingBox: 0 0 200 200
-%%EndComments
-/lb { setlinewidth setrgbcolor newpath moveto
-      4 2 roll 1 index 1 index curveto stroke } bind def
-/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
-/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
-/sq { newpath 2 index 1 index add 2 index 2 index add moveto
-      2 index 1 index sub 2 index 2 index add lineto
-      2 index 1 index sub 2 index 2 index sub lineto
-      2 index 1 index add 2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/di { newpath 2 index 1 index add 2 index moveto
-      2 index             2 index 2 index add lineto
-      2 index 1 index sub 2 index             lineto
-      2 index             2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
-     setrgbcolor 1.1 div c fill
-   } bind def
-/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
-     setrgbcolor 1.1 div sq fill
-   } bind def
-/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
-     setrgbcolor 1.1 div di fill
-   } bind def
-/arrl 1 def
-/arrw 0.3 def
-/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
-/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
-       /w exch def /len exch def
-       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
-       len w sub arrl sub dx dy lrl
-       arrw dy dx neg lrl
-       dx arrl w add mul dy w 2 div arrw add mul sub
-       dy arrl w add mul dx w 2 div arrw add mul add rlineto
-       dx arrl w add mul neg dy w 2 div arrw add mul sub
-       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
-       arrw dy dx neg lrl
-       len w sub arrl sub neg dx dy lrl
-       closepath fill } bind def
-/cshow { 2 index 2 index moveto dup stringwidth pop
-         neg 2 div fosi .35 mul neg rmoveto show pop pop} def
-
-gsave
-100 dup scale
-%Edges:
-gsave
-grestore
-%Nodes:
-gsave
-1 1 1 0.2 1 0.2 nc
-grestore
-grestore
-showpage
Index: c/images/nodeshape_1.eps
===================================================================
--- doc/images/nodeshape_1.eps	(revision 152)
+++ 	(revision )
@@ -1,57 +1,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: LEMON GraphToEps figure
-%%Creator: LEMON GraphToEps function
-%%BoundingBox: 0 0 200 200
-%%EndComments
-/lb { setlinewidth setrgbcolor newpath moveto
-      4 2 roll 1 index 1 index curveto stroke } bind def
-/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
-/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
-/sq { newpath 2 index 1 index add 2 index 2 index add moveto
-      2 index 1 index sub 2 index 2 index add lineto
-      2 index 1 index sub 2 index 2 index sub lineto
-      2 index 1 index add 2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/di { newpath 2 index 1 index add 2 index moveto
-      2 index             2 index 2 index add lineto
-      2 index 1 index sub 2 index             lineto
-      2 index             2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
-     setrgbcolor 1.1 div c fill
-   } bind def
-/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
-     setrgbcolor 1.1 div sq fill
-   } bind def
-/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
-     setrgbcolor 1.1 div di fill
-   } bind def
-/arrl 1 def
-/arrw 0.3 def
-/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
-/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
-       /w exch def /len exch def
-       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
-       len w sub arrl sub dx dy lrl
-       arrw dy dx neg lrl
-       dx arrl w add mul dy w 2 div arrw add mul sub
-       dy arrl w add mul dx w 2 div arrw add mul add rlineto
-       dx arrl w add mul neg dy w 2 div arrw add mul sub
-       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
-       arrw dy dx neg lrl
-       len w sub arrl sub neg dx dy lrl
-       closepath fill } bind def
-/cshow { 2 index 2 index moveto dup stringwidth pop
-         neg 2 div fosi .35 mul neg rmoveto show pop pop} def
-
-gsave
-100 dup scale
-%Edges:
-gsave
-grestore
-%Nodes:
-gsave
-1 1 1 0.2 1 0.2 nsq
-grestore
-grestore
-showpage
Index: c/images/nodeshape_2.eps
===================================================================
--- doc/images/nodeshape_2.eps	(revision 152)
+++ 	(revision )
@@ -1,57 +1,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: LEMON GraphToEps figure
-%%Creator: LEMON GraphToEps function
-%%BoundingBox: 0 0 200 200
-%%EndComments
-/lb { setlinewidth setrgbcolor newpath moveto
-      4 2 roll 1 index 1 index curveto stroke } bind def
-/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
-/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
-/sq { newpath 2 index 1 index add 2 index 2 index add moveto
-      2 index 1 index sub 2 index 2 index add lineto
-      2 index 1 index sub 2 index 2 index sub lineto
-      2 index 1 index add 2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/di { newpath 2 index 1 index add 2 index moveto
-      2 index             2 index 2 index add lineto
-      2 index 1 index sub 2 index             lineto
-      2 index             2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
-     setrgbcolor 1.1 div c fill
-   } bind def
-/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
-     setrgbcolor 1.1 div sq fill
-   } bind def
-/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
-     setrgbcolor 1.1 div di fill
-   } bind def
-/arrl 1 def
-/arrw 0.3 def
-/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
-/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
-       /w exch def /len exch def
-       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
-       len w sub arrl sub dx dy lrl
-       arrw dy dx neg lrl
-       dx arrl w add mul dy w 2 div arrw add mul sub
-       dy arrl w add mul dx w 2 div arrw add mul add rlineto
-       dx arrl w add mul neg dy w 2 div arrw add mul sub
-       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
-       arrw dy dx neg lrl
-       len w sub arrl sub neg dx dy lrl
-       closepath fill } bind def
-/cshow { 2 index 2 index moveto dup stringwidth pop
-         neg 2 div fosi .35 mul neg rmoveto show pop pop} def
-
-gsave
-100 dup scale
-%Edges:
-gsave
-grestore
-%Nodes:
-gsave
-1 1 1 0.2 1 0.2 ndi
-grestore
-grestore
-showpage
Index: c/images/nodeshape_3.eps
===================================================================
--- doc/images/nodeshape_3.eps	(revision 152)
+++ 	(revision )
@@ -1,77 +1,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: LEMON GraphToEps figure
-%%Creator: LEMON GraphToEps function
-%%BoundingBox: 0 0 256 372
-%%EndComments
-/lb { setlinewidth setrgbcolor newpath moveto
-      4 2 roll 1 index 1 index curveto stroke } bind def
-/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
-/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
-/sq { newpath 2 index 1 index add 2 index 2 index add moveto
-      2 index 1 index sub 2 index 2 index add lineto
-      2 index 1 index sub 2 index 2 index sub lineto
-      2 index 1 index add 2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/di { newpath 2 index 1 index add 2 index moveto
-      2 index             2 index 2 index add lineto
-      2 index 1 index sub 2 index             lineto
-      2 index             2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
-     setrgbcolor 1.1 div c fill
-   } bind def
-/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
-     setrgbcolor 1.1 div sq fill
-   } bind def
-/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
-     setrgbcolor 1.1 div di fill
-   } bind def
-/nfemale { 0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
-  newpath 5 index 5 index moveto 5 index 5 index 5 index 3.01 mul sub
-  lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto
-  5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke
-  5 index 5 index 5 index c fill
-  setrgbcolor 1.1 div c fill
-  } bind def
-/nmale {
-  0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
-  newpath 5 index 5 index moveto
-  5 index 4 index 1 mul 1.5 mul add
-  5 index 5 index 3 sqrt 1.5 mul mul add
-  1 index 1 index lineto
-  1 index 1 index 7 index sub moveto
-  1 index 1 index lineto
-  exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto
-  stroke
-  5 index 5 index 5 index c fill
-  setrgbcolor 1.1 div c fill
-  } bind def
-/arrl 1 def
-/arrw 0.3 def
-/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
-/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
-       /w exch def /len exch def
-       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
-       len w sub arrl sub dx dy lrl
-       arrw dy dx neg lrl
-       dx arrl w add mul dy w 2 div arrw add mul sub
-       dy arrl w add mul dx w 2 div arrw add mul add rlineto
-       dx arrl w add mul neg dy w 2 div arrw add mul sub
-       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
-       arrw dy dx neg lrl
-       len w sub arrl sub neg dx dy lrl
-       closepath fill } bind def
-/cshow { 2 index 2 index moveto dup stringwidth pop
-         neg 2 div fosi .35 mul neg rmoveto show pop pop} def
-
-gsave
-100 dup scale
-%Edges:
-gsave
-grestore
-%Nodes:
-gsave
-1 1 1 0.2 1 0.2 nmale
-grestore
-grestore
-showpage
Index: c/images/nodeshape_4.eps
===================================================================
--- doc/images/nodeshape_4.eps	(revision 152)
+++ 	(revision )
@@ -1,77 +1,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: LEMON GraphToEps figure
-%%Creator: LEMON GraphToEps function
-%%BoundingBox: 0 -199 200 200
-%%EndComments
-/lb { setlinewidth setrgbcolor newpath moveto
-      4 2 roll 1 index 1 index curveto stroke } bind def
-/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def
-/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def
-/sq { newpath 2 index 1 index add 2 index 2 index add moveto
-      2 index 1 index sub 2 index 2 index add lineto
-      2 index 1 index sub 2 index 2 index sub lineto
-      2 index 1 index add 2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/di { newpath 2 index 1 index add 2 index moveto
-      2 index             2 index 2 index add lineto
-      2 index 1 index sub 2 index             lineto
-      2 index             2 index 2 index sub lineto
-      closepath pop pop pop} bind def
-/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill
-     setrgbcolor 1.1 div c fill
-   } bind def
-/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill
-     setrgbcolor 1.1 div sq fill
-   } bind def
-/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill
-     setrgbcolor 1.1 div di fill
-   } bind def
-/nfemale { 0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
-  newpath 5 index 5 index moveto 5 index 5 index 5 index 3.01 mul sub
-  lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto
-  5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke
-  5 index 5 index 5 index c fill
-  setrgbcolor 1.1 div c fill
-  } bind def
-/nmale {
-  0 0 0 setrgbcolor 3 index 0.0909091 1.5 mul mul setlinewidth
-  newpath 5 index 5 index moveto
-  5 index 4 index 1 mul 1.5 mul add
-  5 index 5 index 3 sqrt 1.5 mul mul add
-  1 index 1 index lineto
-  1 index 1 index 7 index sub moveto
-  1 index 1 index lineto
-  exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto
-  stroke
-  5 index 5 index 5 index c fill
-  setrgbcolor 1.1 div c fill
-  } bind def
-/arrl 1 def
-/arrw 0.3 def
-/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def
-/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def
-       /w exch def /len exch def
-       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto
-       len w sub arrl sub dx dy lrl
-       arrw dy dx neg lrl
-       dx arrl w add mul dy w 2 div arrw add mul sub
-       dy arrl w add mul dx w 2 div arrw add mul add rlineto
-       dx arrl w add mul neg dy w 2 div arrw add mul sub
-       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto
-       arrw dy dx neg lrl
-       len w sub arrl sub neg dx dy lrl
-       closepath fill } bind def
-/cshow { 2 index 2 index moveto dup stringwidth pop
-         neg 2 div fosi .35 mul neg rmoveto show pop pop} def
-
-gsave
-100 dup scale
-%Edges:
-gsave
-grestore
-%Nodes:
-gsave
-1 1 1 0.2 1 0.2 nfemale
-grestore
-grestore
-showpage
Index: c/lgf.dox
===================================================================
--- doc/lgf.dox	(revision 427)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-namespace lemon {
-/*!
-
-
-
-\page lgf-format LEMON Graph Format (LGF)
-
-The \e LGF is a <em>column oriented</em>
-file format for storing graphs and associated data like
-node and edge maps.
-
-Each line with \c '#' first non-whitespace
-character is considered as a comment line.
-
-Otherwise the file consists of sections starting with
-a header line. The header lines starts with an \c '@' character followed by the
-type of section. The standard section types are \c \@nodes, \c
-\@arcs and \c \@edges
-and \@attributes. Each header line may also have an optional
-\e name, which can be use to distinguish the sections of the same
-type.
-
-The standard sections are column oriented, each line consists of
-<em>token</em>s separated by whitespaces. A token can be \e plain or
-\e quoted. A plain token is just a sequence of non-whitespace characters,
-while a quoted token is a
-character sequence surrounded by double quotes, and it can also
-contain whitespaces and escape sequences.
-
-The \c \@nodes section describes a set of nodes and associated
-maps. The first is a header line, its columns are the names of the
-maps appearing in the following lines.
-One of the maps must be called \c
-"label", which plays special role in the file.
-The following
-non-empty lines until the next section describes nodes of the
-graph. Each line contains the values of the node maps
-associated to the current node.
-
-\code
- @nodes
- label  coordinates  size    title
- 1      (10,20)      10      "First node"
- 2      (80,80)      8       "Second node"
- 3      (40,10)      10      "Third node"
-\endcode
-
-The \c \@arcs section is very similar to the \c \@nodes section, it
-again starts with a header line describing the names of the maps, but
-the \c "label" map is not obligatory here. The following lines
-describe the arcs. The first two tokens of each line are the source
-and the target node of the arc, respectively, then come the map
-values. The source and target tokens must be node labels.
-
-\code
- @arcs
-         capacity
- 1   2   16
- 1   3   12
- 2   3   18
-\endcode
-
-If there is no map in the \c \@arcs section at all, then it must be
-indicated by a sole '-' sign in the first line.
-
-\code
- @arcs
-         -
- 1   2
- 1   3
- 2   3
-\endcode
-
-The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can
-also store the edge set of an undirected graph. In such case there is
-a conventional method for store arc maps in the file, if two columns
-have the same caption with \c '+' and \c '-' prefix, then these columns
-can be regarded as the values of an arc map.
-
-The \c \@attributes section contains key-value pairs, each line
-consists of two tokens, an attribute name, and then an attribute
-value. The value of the attribute could be also a label value of a
-node or an edge, or even an edge label prefixed with \c '+' or \c '-',
-which regards to the forward or backward directed arc of the
-corresponding edge.
-
-\code
- @attributes
- source 1
- target 3
- caption "LEMON test digraph"
-\endcode
-
-The \e LGF can contain extra sections, but there is no restriction on
-the format of such sections.
-
-*/
-}
-
-//  LocalWords:  whitespace whitespaces
Index: c/license.dox
===================================================================
--- doc/license.dox	(revision 209)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-/**
-
-\page license License Terms
-
-\verbinclude LICENSE
-
-*/
Index: c/mainpage.dox
===================================================================
--- doc/mainpage.dox	(revision 329)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-/**
-\mainpage LEMON Documentation
-
-\section intro Introduction
-
-\subsection whatis What is LEMON
-
-LEMON stands for
-<b>L</b>ibrary of <b>E</b>fficient <b>M</b>odels
-and <b>O</b>ptimization in <b>N</b>etworks.
-It is a C++ template
-library aimed at combinatorial optimization tasks which
-often involve in working
-with graphs.
-
-<b>
-LEMON is an <a class="el" href="http://opensource.org/">open&nbsp;source</a>
-project.
-You are free to use it in your commercial or
-non-commercial applications under very permissive
-\ref license "license terms".
-</b>
-
-\subsection howtoread How to read the documentation
-
-If you know what you are looking for then try to find it under the
-<a class="el" href="modules.html">Modules</a>
-section.
-
-If you are a user of the old (0.x) series of LEMON, please check out the
-\ref migration "Migration Guide" for the backward incompatibilities.
-*/
Index: c/migration.dox
===================================================================
--- doc/migration.dox	(revision 318)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-namespace lemon {
-/*!
-
-\page migration Migration from the 0.x Series
-
-This guide gives an in depth description on what has changed compared
-to the 0.x release series.
-
-Many of these changes adjusted automatically by the
-<tt>script/lemon-0.x-to-1.x.sh</tt> tool. Those requiring manual
-update are typeset <b>boldface</b>.
-
-\section migration-graph Graph Related Name Changes
-
-- \ref concepts::Digraph "Directed graphs" are called \c Digraph and
-  they have <tt>Arc</tt>s (instead of <tt>Edge</tt>s), while
-  \ref concepts::Graph "undirected graphs" are called \c Graph
-  (instead of \c UGraph) and they have <tt>Edge</tt>s (instead of
-  <tt>UEdge</tt>s). These changes reflected thoroughly everywhere in
-  the library. Namely,
-  - \c Graph -> \c Digraph
-    - \c %ListGraph -> \c ListDigraph, \c %SmartGraph -> \c SmartDigraph etc.
-  - \c UGraph -> \c Graph
-    - \c ListUGraph -> \c ListGraph, \c SmartUGraph -> \c SmartGraph etc.
-  - \c Edge -> \c Arc, \c UEdge -> \c Edge
-  - \c EdgeMap -> \c ArcMap, \c UEdgeMap -> \c EdgeMap
-  - \c EdgeIt -> \c ArcIt, \c UEdgeIt -> \c EdgeIt
-  - Class names and function names containing the words \c graph,
-    \c ugraph, \e edge or \e arc should also be updated.
-- <b>The two endpoints of an (\e undirected) \c Edge can be obtained by the
-  <tt>u()</tt> and <tt>v()</tt> member function of the graph
-  (instead of <tt>source()</tt> and <tt>target()</tt>). This change
-  must be done by hand.</b>
-  \n Of course, you can still use <tt>source()</tt> and <tt>target()</tt>
-  for <tt>Arc</tt>s (directed edges).
-
-\warning
-<b>The <tt>script/lemon-0.x-to-1.x.sh</tt> tool replaces all instances of
-the words \c graph, \c digraph, \c edge and \c arc, so it replaces them
-in strings, comments etc. as well as in all identifiers.</b>
-
-\section migration-lgf LGF tools
- - The \ref lgf-format "LGF file format" has changed,
-   <tt>\@nodeset</tt> has changed to <tt>\@nodes</tt>,
-   <tt>\@edgeset</tt> and <tt>\@uedgeset</tt> to <tt>\@arcs</tt> or
-   <tt>\@edges</tt>, which become completely equivalents. The
-   <tt>\@nodes</tt>, <tt>\@edges</tt> and <tt>\@uedges</tt> sections are
-   removed from the format, the content of them should be
-   the part of <tt>\@attributes</tt> section. The data fields in
-   the sections must follow a strict format, they must be either character
-   sequences without whitespaces or quoted strings.
- - The <tt>LemonReader</tt> and <tt>LemonWriter</tt> core interfaces
-   are no longer available.
- - The implementation of the general section readers and writers has changed
-   they are simple functors now. Beside the old
-   stream based section handling, currently line oriented section
-   reading and writing are also supported. In the
-   section readers the lines must be counted manually. The sections
-   should be read and written with the SectionWriter and SectionReader
-   classes.
- - Instead of the item readers and writers, item converters should be
-   used. The converters are functors, which map the type to
-   std::string or std::string to the type. The converters for standard
-   containers hasn't yet been implemented in the new LEMON. The converters
-   can return strings in any format, because if it is necessary, the LGF
-   writer and reader will quote and unquote the given value.
- - The DigraphReader and DigraphWriter can used similarly to the
-   0.x series, however the <tt>read</tt> or <tt>write</tt> prefix of
-   the member functions are removed.
- - The new LEMON supports the function like interface, the \c
-   digraphReader and \c digraphWriter functions are more convenient than
-   using the classes directly.
-
-\section migration-search BFS, DFS and Dijkstra
-- <b>Using the function interface of BFS, DFS and %Dijkstra both source and
-  target nodes can be given as parameters of the <tt>run()</tt> function
-  (instead of \c bfs(), \c dfs() or \c dijkstra() itself).</b>
-- \ref named-templ-param "Named class template parameters" of \c Bfs,
-  \c Dfs, \c Dijkstra, \c BfsVisit, \c DfsVisit are renamed to start
-  with "Set" instead of "Def". Namely,
-  - \c DefPredMap -> \c SetPredMap
-  - \c DefDistMap -> \c SetDistMap
-  - \c DefReachedMap -> \c SetReachedMap
-  - \c DefProcessedMap -> \c SetProcessedMap
-  - \c DefHeap -> \c SetHeap
-  - \c DefStandardHeap -> \c SetStandardHeap
-  - \c DefOperationTraits -> \c SetOperationTraits
-  - \c DefProcessedMapToBeDefaultMap -> \c SetStandardProcessedMap
-
-\section migration-error Exceptions and Debug tools
-
-<b>The class hierarchy of exceptions has largely been simplified. Now,
-only the i/o related tools may throw exceptions. All other exceptions
-have been replaced with either the \c LEMON_ASSERT or the \c LEMON_DEBUG
-macros.</b>
-
-<b>On the other hand, the parameter order of constructors of the
-exceptions has been changed. See \ref IoError and \ref FormatError for
-more details.</b>
-
-\section migration-other Others
-- <b>The contents of <tt>graph_utils.h</tt> are moved to <tt>core.h</tt>
-  and <tt>maps.h</tt>. <tt>core.h</tt> is included by all graph types,
-  therefore it usually do not have to be included directly.</b>
-- <b><tt>path_utils.h</tt> is merged to \c path.h.</b>
-- <b>The semantic of the assignment operations and copy constructors of maps
-  are still under discussion. So, you must copy them by hand (i.e. copy
-  each entry one-by-one)</b>
-- <b>The parameters of the graph copying tools (i.e. \c GraphCopy,
-  \c DigraphCopy) have to be given in the from-to order.</b>
-- \c copyDigraph() and \c copyGraph() are renamed to \c digraphCopy()
-  and \c graphCopy(), respectively.
-- <b>The interface of \ref DynArcLookUp has changed. It is now the same as
-  of \ref ArcLookUp and \ref AllArcLookUp</b>
-- Some map types should also been renamed. Namely,
-  - \c IntegerMap -> \c RangeMap
-  - \c StdMap -> \c SparseMap
-  - \c FunctorMap -> \c FunctorToMap
-  - \c MapFunctor -> \c MapToFunctor
-  - \c ForkWriteMap -> \c ForkMap
-  - \c StoreBoolMap -> \c LoggerBoolMap
-- \c dim2::BoundingBox -> \c dim2::Box
-
-*/
-}
Index: c/named-param.dox
===================================================================
--- doc/named-param.dox	(revision 269)
+++ 	(revision )
@@ -1,119 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-/*!
-
-\page named-param Named Parameters
-
-\section named-func-param Named Function Parameters
-
-Several modern languages provide a convenient way to refer the
-function parameters by name also when you call the function. It is
-especially comfortable in case of a function having tons of parameters
-with natural default values. Sadly, C++ lack this amenity.
-
-However, with a crafty trick and with some little
-inconvenience, it is possible to emulate is.
-The example below shows how to do it.
-
-\code
-class namedFn
-{
-  int _id;
-  double _val;
-  int _dim;
-
-  public:
-  namedFn() : _id(0), _val(1), _dim(2) {}
-  namedFn& id(int p)     { _id  = p ; return *this; }
-  namedFn& val(double p) { _val = p ; return *this; }
-  namedFn& dim(int p)    { _dim = p ; return *this; }
-
-  run() {
-    std::cout << "Here comes the function itself\n" <<
-              << "With parameters "
-              << _id << ", " << _val << ", " << _dim << std::endl;
-  }
-};
-\endcode
-
-Then you can use it like this.
-
-\code
-namedFn().id(3).val(2).run();
-\endcode
-
-The trick is obvious, each "named parameter" changes one component of
-the underlying class, then gives back a reference to it. Finally,
-<tt>run()</tt> executes the algorithm itself.
-
-\note Although it is a class, namedFn is used pretty much like as it were
-a function. That it why we called it namedFn instead of \c NamedFn.
-
-\note In fact, the final <tt>.run()</tt> could be made unnecessary,
-because the algorithm could also be implemented in the destructor of
-\c namedFn instead. This however would make it impossible to implement
-functions with return values, and would also cause serious problems when
-implementing \ref named-templ-func-param "named template parameters".
-<b>Therefore, by convention, <tt>.run()</tt> must be used
-explicitly to execute a function having named parameters
-everywhere in LEMON.</b>
-
-\section named-templ-func-param Named Function Template Parameters
-
-A named parameter can also be a template function. The usage is
-exactly the same, but the implementation behind is a kind of black
-magic and they are the dirtiest part of the LEMON code.
-
-You will probably never need to know how it works, but if you really
-committed, have a look at \ref lemon/graph_to_eps.h for an example.
-
-\section traits-classes Traits Classes
-
-A similar game can also be played when defining classes. In this case
-the type of the class attributes can be changed. Initially we have to
-define a special class called <em>Traits Class</em> defining the
-default type of the attributes. Then the types of these attributes can
-be changed in the same way as described in the next section.
-
-See \ref lemon::DijkstraDefaultTraits for an
-example how a traits class implementation looks like.
-
-\section named-templ-param Named Class Template Parameters
-
-If we would like to change the type of an attribute in a class that
-was instantiated by using a traits class as a template parameter, and
-the class contains named parameters, we do not have to instantiate again
-the class with new traits class, but instead adaptor classes can
-be used as shown in the following example.
-
-\code
-Dijkstra<>::SetPredMap<NullMap<Node,Arc> >::Create
-\endcode
-
-It can also be used in conjunction with other named template
-parameters in arbitrary order.
-
-\code
-Dijkstra<>::SetDistMap<MyMap>::SetPredMap<NullMap<Node,Arc> >::Create
-\endcode
-
-The result will be an instantiated Dijkstra class, in which the
-DistMap and the PredMap is modified.
-
-*/
Index: c/namespaces.dox
===================================================================
--- doc/namespaces.dox	(revision 209)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-/// The namespace of LEMON
-
-/// The namespace of LEMON
-///
-namespace lemon {
-
-  /// The namespace of LEMON concepts and concept checking classes
-
-  /// The namespace of LEMON concepts and concept checking classes
-  ///
-  namespace concepts {}
-}
Index: c/template.h
===================================================================
--- doc/template.h	(revision 209)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_TEMPLATE_H
-#define LEMON_TEMPLATE_H
-
-#endif // LEMON_TEMPLATE_H
Index: mon/CMakeLists.txt
===================================================================
--- lemon/CMakeLists.txt	(revision 394)
+++ 	(revision )
@@ -1,33 +1,0 @@
-INCLUDE_DIRECTORIES(
-  ${CMAKE_SOURCE_DIR}
-  ${PROJECT_BINARY_DIR}
-)
-
-CONFIGURE_FILE(
-  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
-  ${CMAKE_CURRENT_BINARY_DIR}/config.h
-)
-
-ADD_LIBRARY(lemon
-  arg_parser.cc
-  base.cc
-  color.cc
-  random.cc
-  bits/windows.cc
-)
-
-INSTALL(
-  TARGETS lemon
-  ARCHIVE DESTINATION lib
-  COMPONENT library)
-
-INSTALL(
-  DIRECTORY . bits concepts
-  DESTINATION include/lemon
-  COMPONENT headers
-  FILES_MATCHING PATTERN "*.h")
-
-INSTALL(
-  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
-  DESTINATION include/lemon
-  COMPONENT headers)
Index: mon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 398)
+++ 	(revision )
@@ -1,68 +1,0 @@
-EXTRA_DIST += \
-	lemon/lemon.pc.in \
-	lemon/CMakeLists.txt
-
-pkgconfig_DATA += lemon/lemon.pc
-
-lib_LTLIBRARIES += lemon/libemon.la
-
-lemon_libemon_la_SOURCES = \
-        lemon/arg_parser.cc \
-        lemon/base.cc \
-        lemon/color.cc \
-        lemon/random.cc \
-	lemon/bits/windows.cc
-
-#lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS)
-#lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS)
-
-nodist_lemon_HEADERS = lemon/config.h
-
-lemon_HEADERS += \
-        lemon/arg_parser.h \
-	lemon/assert.h \
-        lemon/bfs.h \
-        lemon/bin_heap.h \
-        lemon/color.h \
-	lemon/concept_check.h \
-        lemon/counter.h \
-	lemon/core.h \
-        lemon/dfs.h \
-        lemon/dijkstra.h \
-        lemon/dim2.h \
-	lemon/error.h \
-        lemon/graph_to_eps.h \
-	lemon/kruskal.h \
-	lemon/lgf_reader.h \
-	lemon/lgf_writer.h \
-	lemon/list_graph.h \
-	lemon/maps.h \
-	lemon/math.h \
-	lemon/path.h \
-        lemon/random.h \
-	lemon/smart_graph.h \
-        lemon/time_measure.h \
-        lemon/tolerance.h \
-	lemon/unionfind.h \
-	lemon/bits/windows.h
-
-bits_HEADERS += \
-	lemon/bits/alteration_notifier.h \
-	lemon/bits/array_map.h \
-	lemon/bits/base_extender.h \
-        lemon/bits/bezier.h \
-	lemon/bits/default_map.h \
-        lemon/bits/enable_if.h \
-	lemon/bits/graph_extender.h \
-	lemon/bits/map_extender.h \
-	lemon/bits/path_dump.h \
-	lemon/bits/traits.h \
-	lemon/bits/vector_map.h
-
-concept_HEADERS += \
-	lemon/concepts/digraph.h \
-	lemon/concepts/graph.h \
-	lemon/concepts/graph_components.h \
-	lemon/concepts/heap.h \
-	lemon/concepts/maps.h \
-	lemon/concepts/path.h
Index: mon/arg_parser.cc
===================================================================
--- lemon/arg_parser.cc	(revision 315)
+++ 	(revision )
@@ -1,465 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/arg_parser.h>
-
-namespace lemon {
-
-  void ArgParser::_showHelp(void *p)
-  {
-    (static_cast<ArgParser*>(p))->showHelp();
-    exit(1);
-  }
-
-  ArgParser::ArgParser(int argc, const char * const *argv)
-    :_argc(argc), _argv(argv), _command_name(argv[0]) {
-    funcOption("-help","Print a short help message",_showHelp,this);
-    synonym("help","-help");
-    synonym("h","-help");
-  }
-
-  ArgParser::~ArgParser()
-  {
-    for(Opts::iterator i=_opts.begin();i!=_opts.end();++i)
-      if(i->second.self_delete)
-        switch(i->second.type) {
-        case BOOL:
-          delete i->second.bool_p;
-          break;
-        case STRING:
-          delete i->second.string_p;
-          break;
-        case DOUBLE:
-          delete i->second.double_p;
-          break;
-        case INTEGER:
-          delete i->second.int_p;
-          break;
-        case UNKNOWN:
-          break;
-        case FUNC:
-          break;
-        }
-  }
-
-
-  ArgParser &ArgParser::intOption(const std::string &name,
-                               const std::string &help,
-                               int value, bool obl)
-  {
-    ParData p;
-    p.int_p=new int(value);
-    p.self_delete=true;
-    p.help=help;
-    p.type=INTEGER;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::doubleOption(const std::string &name,
-                               const std::string &help,
-                               double value, bool obl)
-  {
-    ParData p;
-    p.double_p=new double(value);
-    p.self_delete=true;
-    p.help=help;
-    p.type=DOUBLE;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::boolOption(const std::string &name,
-                               const std::string &help,
-                               bool value, bool obl)
-  {
-    ParData p;
-    p.bool_p=new bool(value);
-    p.self_delete=true;
-    p.help=help;
-    p.type=BOOL;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::stringOption(const std::string &name,
-                               const std::string &help,
-                               std::string value, bool obl)
-  {
-    ParData p;
-    p.string_p=new std::string(value);
-    p.self_delete=true;
-    p.help=help;
-    p.type=STRING;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::refOption(const std::string &name,
-                               const std::string &help,
-                               int &ref, bool obl)
-  {
-    ParData p;
-    p.int_p=&ref;
-    p.self_delete=false;
-    p.help=help;
-    p.type=INTEGER;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::refOption(const std::string &name,
-                                  const std::string &help,
-                                  double &ref, bool obl)
-  {
-    ParData p;
-    p.double_p=&ref;
-    p.self_delete=false;
-    p.help=help;
-    p.type=DOUBLE;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::refOption(const std::string &name,
-                                  const std::string &help,
-                                  bool &ref, bool obl)
-  {
-    ParData p;
-    p.bool_p=&ref;
-    p.self_delete=false;
-    p.help=help;
-    p.type=BOOL;
-    p.mandatory=obl;
-    _opts[name]=p;
-
-    ref = false;
-
-    return *this;
-  }
-
-  ArgParser &ArgParser::refOption(const std::string &name,
-                               const std::string &help,
-                               std::string &ref, bool obl)
-  {
-    ParData p;
-    p.string_p=&ref;
-    p.self_delete=false;
-    p.help=help;
-    p.type=STRING;
-    p.mandatory=obl;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::funcOption(const std::string &name,
-                               const std::string &help,
-                               void (*func)(void *),void *data)
-  {
-    ParData p;
-    p.func_p.p=func;
-    p.func_p.data=data;
-    p.self_delete=false;
-    p.help=help;
-    p.type=FUNC;
-    p.mandatory=false;
-    _opts[name]=p;
-    return *this;
-  }
-
-  ArgParser &ArgParser::optionGroup(const std::string &group,
-                                    const std::string &opt)
-  {
-    Opts::iterator i = _opts.find(opt);
-    LEMON_ASSERT(i!=_opts.end(), "Unknown option: '"+opt+"'");
-    LEMON_ASSERT(!(i->second.ingroup),
-                 "Option already in option group: '"+opt+"'");
-    GroupData &g=_groups[group];
-    g.opts.push_back(opt);
-    i->second.ingroup=true;
-    return *this;
-  }
-
-  ArgParser &ArgParser::onlyOneGroup(const std::string &group)
-  {
-    GroupData &g=_groups[group];
-    g.only_one=true;
-    return *this;
-  }
-
-  ArgParser &ArgParser::synonym(const std::string &syn,
-                                const std::string &opt)
-  {
-    Opts::iterator o = _opts.find(opt);
-    Opts::iterator s = _opts.find(syn);
-    LEMON_ASSERT(o!=_opts.end(), "Unknown option: '"+opt+"'");
-    LEMON_ASSERT(s==_opts.end(), "Option already used: '"+syn+"'");
-    ParData p;
-    p.help=opt;
-    p.mandatory=false;
-    p.syn=true;
-    _opts[syn]=p;
-    o->second.has_syn=true;
-    return *this;
-  }
-
-  ArgParser &ArgParser::mandatoryGroup(const std::string &group)
-  {
-    GroupData &g=_groups[group];
-    g.mandatory=true;
-    return *this;
-  }
-
-  ArgParser &ArgParser::other(const std::string &name,
-                              const std::string &help)
-  {
-    _others_help.push_back(OtherArg(name,help));
-    return *this;
-  }
-
-  void ArgParser::show(std::ostream &os,Opts::const_iterator i) const
-  {
-    os << "-" << i->first;
-    if(i->second.has_syn)
-      for(Opts::const_iterator j=_opts.begin();j!=_opts.end();++j)
-        if(j->second.syn&&j->second.help==i->first)
-          os << "|-" << j->first;
-    switch(i->second.type) {
-    case STRING:
-      os << " str";
-      break;
-    case INTEGER:
-      os << " int";
-      break;
-    case DOUBLE:
-      os << " num";
-      break;
-    default:
-      break;
-    }
-  }
-
-  void ArgParser::show(std::ostream &os,Groups::const_iterator i) const
-  {
-    GroupData::Opts::const_iterator o=i->second.opts.begin();
-    while(o!=i->second.opts.end()) {
-      show(os,_opts.find(*o));
-      ++o;
-      if(o!=i->second.opts.end()) os<<'|';
-    }
-  }
-
-  void ArgParser::showHelp(Opts::const_iterator i) const
-  {
-    if(i->second.help.size()==0||i->second.syn) return;
-    std::cerr << "  ";
-    show(std::cerr,i);
-    std::cerr << std::endl;
-    std::cerr << "     " << i->second.help << std::endl;
-  }
-  void ArgParser::showHelp(std::vector<ArgParser::OtherArg>::const_iterator i)
-    const
-  {
-    if(i->help.size()==0) return;
-    std::cerr << "  " << i->name << std::endl
-              << "     " << i->help << std::endl;
-  }
-
-  void ArgParser::shortHelp() const
-  {
-    const unsigned int LINE_LEN=77;
-    const std::string indent("    ");
-    std::cerr << "Usage:\n  " << _command_name;
-    int pos=_command_name.size()+2;
-    for(Groups::const_iterator g=_groups.begin();g!=_groups.end();++g) {
-      std::ostringstream cstr;
-      cstr << ' ';
-      if(!g->second.mandatory) cstr << '[';
-      show(cstr,g);
-      if(!g->second.mandatory) cstr << ']';
-      if(pos+cstr.str().size()>LINE_LEN) {
-        std::cerr << std::endl << indent;
-        pos=indent.size();
-      }
-      std::cerr << cstr.str();
-      pos+=cstr.str().size();
-    }
-    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i)
-      if(!i->second.ingroup&&!i->second.syn) {
-        std::ostringstream cstr;
-        cstr << ' ';
-        if(!i->second.mandatory) cstr << '[';
-        show(cstr,i);
-        if(!i->second.mandatory) cstr << ']';
-        if(pos+cstr.str().size()>LINE_LEN) {
-          std::cerr << std::endl << indent;
-          pos=indent.size();
-        }
-        std::cerr << cstr.str();
-        pos+=cstr.str().size();
-      }
-    for(std::vector<OtherArg>::const_iterator i=_others_help.begin();
-        i!=_others_help.end();++i)
-      {
-        std::ostringstream cstr;
-        cstr << ' ' << i->name;
-
-        if(pos+cstr.str().size()>LINE_LEN) {
-          std::cerr << std::endl << indent;
-          pos=indent.size();
-        }
-        std::cerr << cstr.str();
-        pos+=cstr.str().size();
-      }
-    std::cerr << std::endl;
-  }
-
-  void ArgParser::showHelp() const
-  {
-    shortHelp();
-    std::cerr << "Where:\n";
-    for(std::vector<OtherArg>::const_iterator i=_others_help.begin();
-        i!=_others_help.end();++i) showHelp(i);
-    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i);
-    exit(1);
-  }
-
-
-  void ArgParser::unknownOpt(std::string arg) const
-  {
-    std::cerr << "\nUnknown option: " << arg << "\n";
-    std::cerr << "\nType '" << _command_name <<
-      " --help' to obtain a short summary on the usage.\n\n";
-    exit(1);
-  }
-
-  void ArgParser::requiresValue(std::string arg, OptType t) const
-  {
-    std::cerr << "Argument '" << arg << "' requires a";
-    switch(t) {
-    case STRING:
-      std::cerr << " string";
-      break;
-    case INTEGER:
-      std::cerr << "n integer";
-      break;
-    case DOUBLE:
-      std::cerr << " floating point";
-      break;
-    default:
-      break;
-    }
-    std::cerr << " value\n\n";
-    showHelp();
-  }
-
-
-  void ArgParser::checkMandatories() const
-  {
-    bool ok=true;
-    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i)
-      if(i->second.mandatory&&!i->second.set)
-        {
-          if(ok)
-            std::cerr << _command_name
-                      << ": The following mandatory arguments are missing.\n";
-          ok=false;
-          showHelp(i);
-        }
-    for(Groups::const_iterator i=_groups.begin();i!=_groups.end();++i)
-      if(i->second.mandatory||i->second.only_one)
-        {
-          int set=0;
-          for(GroupData::Opts::const_iterator o=i->second.opts.begin();
-              o!=i->second.opts.end();++o)
-            if(_opts.find(*o)->second.set) ++set;
-          if(i->second.mandatory&&!set) {
-            std::cerr << _command_name <<
-              ": At least one of the following arguments is mandatory.\n";
-            ok=false;
-            for(GroupData::Opts::const_iterator o=i->second.opts.begin();
-                o!=i->second.opts.end();++o)
-              showHelp(_opts.find(*o));
-          }
-          if(i->second.only_one&&set>1) {
-            std::cerr << _command_name <<
-              ": At most one of the following arguments can be given.\n";
-            ok=false;
-            for(GroupData::Opts::const_iterator o=i->second.opts.begin();
-                o!=i->second.opts.end();++o)
-              showHelp(_opts.find(*o));
-          }
-        }
-    if(!ok) {
-      std::cerr << "\nType '" << _command_name <<
-        " --help' to obtain a short summary on the usage.\n\n";
-      exit(1);
-    }
-  }
-
-  ArgParser &ArgParser::parse()
-  {
-    for(int ar=1; ar<_argc; ++ar) {
-      std::string arg(_argv[ar]);
-      if (arg[0] != '-' || arg.size() == 1) {
-        _file_args.push_back(arg);
-      }
-      else {
-        Opts::iterator i = _opts.find(arg.substr(1));
-        if(i==_opts.end()) unknownOpt(arg);
-        else {
-          if(i->second.syn) i=_opts.find(i->second.help);
-          ParData &p(i->second);
-          if (p.type==BOOL) *p.bool_p=true;
-          else if (p.type==FUNC) p.func_p.p(p.func_p.data);
-          else if(++ar==_argc) requiresValue(arg, p.type);
-          else {
-            std::string val(_argv[ar]);
-            std::istringstream vals(val);
-            switch(p.type) {
-            case STRING:
-              *p.string_p=val;
-              break;
-            case INTEGER:
-              vals >> *p.int_p;
-              break;
-            case DOUBLE:
-              vals >> *p.double_p;
-              break;
-            default:
-              break;
-            }
-            if(p.type!=STRING&&(!vals||!vals.eof()))
-              requiresValue(arg, p.type);
-          }
-          p.set = true;
-        }
-      }
-    }
-    checkMandatories();
-
-    return *this;
-  }
-
-}
Index: mon/arg_parser.h
===================================================================
--- lemon/arg_parser.h	(revision 315)
+++ 	(revision )
@@ -1,386 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_ARG_PARSER_H
-#define LEMON_ARG_PARSER_H
-
-#include <vector>
-#include <map>
-#include <list>
-#include <string>
-#include <iostream>
-#include <sstream>
-#include <algorithm>
-#include <lemon/assert.h>
-
-///\ingroup misc
-///\file
-///\brief A tool to parse command line arguments.
-
-namespace lemon {
-
-  ///Command line arguments parser
-
-  ///\ingroup misc
-  ///Command line arguments parser.
-  ///
-  ///For a complete example see the \ref arg_parser_demo.cc demo file.
-  class ArgParser {
-
-    static void _showHelp(void *p);
-  protected:
-
-    int _argc;
-    const char * const *_argv;
-
-    enum OptType { UNKNOWN=0, BOOL=1, STRING=2, DOUBLE=3, INTEGER=4, FUNC=5 };
-
-    class ParData {
-    public:
-      union {
-        bool *bool_p;
-        int *int_p;
-        double *double_p;
-        std::string *string_p;
-        struct {
-          void (*p)(void *);
-          void *data;
-        } func_p;
-
-      };
-      std::string help;
-      bool mandatory;
-      OptType type;
-      bool set;
-      bool ingroup;
-      bool has_syn;
-      bool syn;
-      bool self_delete;
-      ParData() : mandatory(false), type(UNKNOWN), set(false), ingroup(false),
-                  has_syn(false), syn(false), self_delete(false) {}
-    };
-
-    typedef std::map<std::string,ParData> Opts;
-    Opts _opts;
-
-    class GroupData
-    {
-    public:
-      typedef std::list<std::string> Opts;
-      Opts opts;
-      bool only_one;
-      bool mandatory;
-      GroupData() :only_one(false), mandatory(false) {}
-    };
-
-    typedef std::map<std::string,GroupData> Groups;
-    Groups _groups;
-
-    struct OtherArg
-    {
-      std::string name;
-      std::string help;
-      OtherArg(std::string n, std::string h) :name(n), help(h) {}
-
-    };
-
-    std::vector<OtherArg> _others_help;
-    std::vector<std::string> _file_args;
-    std::string _command_name;
-
-
-  private:
-    //Bind a function to an option.
-
-    //\param name The name of the option. The leading '-' must be omitted.
-    //\param help A help string.
-    //\retval func The function to be called when the option is given. It
-    //  must be of type "void f(void *)"
-    //\param data Data to be passed to \c func
-    ArgParser &funcOption(const std::string &name,
-                    const std::string &help,
-                    void (*func)(void *),void *data);
-
-  public:
-
-    ///Constructor
-    ArgParser(int argc, const char * const *argv);
-
-    ~ArgParser();
-
-    ///\name Options
-    ///
-
-    ///@{
-
-    ///Add a new integer type option
-
-    ///Add a new integer type option.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param value A default value for the option.
-    ///\param obl Indicate if the option is mandatory.
-    ArgParser &intOption(const std::string &name,
-                    const std::string &help,
-                    int value=0, bool obl=false);
-
-    ///Add a new floating point type option
-
-    ///Add a new floating point type option.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param value A default value for the option.
-    ///\param obl Indicate if the option is mandatory.
-    ArgParser &doubleOption(const std::string &name,
-                      const std::string &help,
-                      double value=0, bool obl=false);
-
-    ///Add a new bool type option
-
-    ///Add a new bool type option.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param value A default value for the option.
-    ///\param obl Indicate if the option is mandatory.
-    ///\note A mandatory bool obtion is of very little use.
-    ArgParser &boolOption(const std::string &name,
-                      const std::string &help,
-                      bool value=false, bool obl=false);
-
-    ///Add a new string type option
-
-    ///Add a new string type option.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param value A default value for the option.
-    ///\param obl Indicate if the option is mandatory.
-    ArgParser &stringOption(const std::string &name,
-                      const std::string &help,
-                      std::string value="", bool obl=false);
-
-    ///Give help string for non-parsed arguments.
-
-    ///With this function you can give help string for non-parsed arguments.
-    ///The parameter \c name will be printed in the short usage line, while
-    ///\c help gives a more detailed description.
-    ArgParser &other(const std::string &name,
-                     const std::string &help="");
-
-    ///@}
-
-    ///\name Options with External Storage
-    ///Using this functions, the value of the option will be directly written
-    ///into a variable once the option appears in the command line.
-
-    ///@{
-
-    ///Add a new integer type option with a storage reference
-
-    ///Add a new integer type option with a storage reference.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param obl Indicate if the option is mandatory.
-    ///\retval ref The value of the argument will be written to this variable.
-    ArgParser &refOption(const std::string &name,
-                    const std::string &help,
-                    int &ref, bool obl=false);
-
-    ///Add a new floating type option with a storage reference
-
-    ///Add a new floating type option with a storage reference.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param obl Indicate if the option is mandatory.
-    ///\retval ref The value of the argument will be written to this variable.
-    ArgParser &refOption(const std::string &name,
-                      const std::string &help,
-                      double &ref, bool obl=false);
-
-    ///Add a new bool type option with a storage reference
-
-    ///Add a new bool type option with a storage reference.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param obl Indicate if the option is mandatory.
-    ///\retval ref The value of the argument will be written to this variable.
-    ///\note A mandatory bool obtion is of very little use.
-    ArgParser &refOption(const std::string &name,
-                      const std::string &help,
-                      bool &ref, bool obl=false);
-
-    ///Add a new string type option with a storage reference
-
-    ///Add a new string type option with a storage reference.
-    ///\param name The name of the option. The leading '-' must be omitted.
-    ///\param help A help string.
-    ///\param obl Indicate if the option is mandatory.
-    ///\retval ref The value of the argument will be written to this variable.
-    ArgParser &refOption(const std::string &name,
-                      const std::string &help,
-                      std::string &ref, bool obl=false);
-
-    ///@}
-
-    ///\name Option Groups and Synonyms
-    ///
-
-    ///@{
-
-    ///Bundle some options into a group
-
-    /// You can group some option by calling this function repeatedly for each
-    /// option to be grouped with the same groupname.
-    ///\param group The group name.
-    ///\param opt The option name.
-    ArgParser &optionGroup(const std::string &group,
-                           const std::string &opt);
-
-    ///Make the members of a group exclusive
-
-    ///If you call this function for a group, than at most one of them can be
-    ///given at the same time.
-    ArgParser &onlyOneGroup(const std::string &group);
-
-    ///Make a group mandatory
-
-    ///Using this function, at least one of the members of \c group
-    ///must be given.
-    ArgParser &mandatoryGroup(const std::string &group);
-
-    ///Create synonym to an option
-
-    ///With this function you can create a synonym \c syn of the
-    ///option \c opt.
-    ArgParser &synonym(const std::string &syn,
-                           const std::string &opt);
-
-    ///@}
-
-  private:
-    void show(std::ostream &os,Opts::const_iterator i) const;
-    void show(std::ostream &os,Groups::const_iterator i) const;
-    void showHelp(Opts::const_iterator i) const;
-    void showHelp(std::vector<OtherArg>::const_iterator i) const;
-
-    void unknownOpt(std::string arg) const;
-
-    void requiresValue(std::string arg, OptType t) const;
-    void checkMandatories() const;
-
-    void shortHelp() const;
-    void showHelp() const;
-  public:
-
-    ///Start the parsing process
-    ArgParser &parse();
-
-    /// Synonym for parse()
-    ArgParser &run()
-    {
-      return parse();
-    }
-
-    ///Give back the command name (the 0th argument)
-    const std::string &commandName() const { return _command_name; }
-
-    ///Check if an opion has been given to the command.
-    bool given(std::string op) const
-    {
-      Opts::const_iterator i = _opts.find(op);
-      return i!=_opts.end()?i->second.set:false;
-    }
-
-
-    ///Magic type for operator[]
-
-    ///This is the type of the return value of ArgParser::operator[]().
-    ///It automatically converts to \c int, \c double, \c bool or
-    ///\c std::string if the type of the option matches, which is checked
-    ///with an \ref LEMON_ASSERT "assertion" (i.e. it performs runtime
-    ///type checking).
-    class RefType
-    {
-      const ArgParser &_parser;
-      std::string _name;
-    public:
-      ///\e
-      RefType(const ArgParser &p,const std::string &n) :_parser(p),_name(n) {}
-      ///\e
-      operator bool()
-      {
-        Opts::const_iterator i = _parser._opts.find(_name);
-        LEMON_ASSERT(i!=_parser._opts.end(),
-                     std::string()+"Unkown option: '"+_name+"'");
-        LEMON_ASSERT(i->second.type==ArgParser::BOOL,
-                     std::string()+"'"+_name+"' is a bool option");
-        return *(i->second.bool_p);
-      }
-      ///\e
-      operator std::string()
-      {
-        Opts::const_iterator i = _parser._opts.find(_name);
-        LEMON_ASSERT(i!=_parser._opts.end(),
-                     std::string()+"Unkown option: '"+_name+"'");
-        LEMON_ASSERT(i->second.type==ArgParser::STRING,
-                     std::string()+"'"+_name+"' is a string option");
-        return *(i->second.string_p);
-      }
-      ///\e
-      operator double()
-      {
-        Opts::const_iterator i = _parser._opts.find(_name);
-        LEMON_ASSERT(i!=_parser._opts.end(),
-                     std::string()+"Unkown option: '"+_name+"'");
-        LEMON_ASSERT(i->second.type==ArgParser::DOUBLE ||
-                     i->second.type==ArgParser::INTEGER,
-                     std::string()+"'"+_name+"' is a floating point option");
-        return i->second.type==ArgParser::DOUBLE ?
-          *(i->second.double_p) : *(i->second.int_p);
-      }
-      ///\e
-      operator int()
-      {
-        Opts::const_iterator i = _parser._opts.find(_name);
-        LEMON_ASSERT(i!=_parser._opts.end(),
-                     std::string()+"Unkown option: '"+_name+"'");
-        LEMON_ASSERT(i->second.type==ArgParser::INTEGER,
-                     std::string()+"'"+_name+"' is an integer option");
-        return *(i->second.int_p);
-      }
-
-    };
-
-    ///Give back the value of an option
-
-    ///Give back the value of an option.
-    ///\sa RefType
-    RefType operator[](const std::string &n) const
-    {
-      return RefType(*this, n);
-    }
-
-    ///Give back the non-option type arguments.
-
-    ///Give back a reference to a vector consisting of the program arguments
-    ///not starting with a '-' character.
-    const std::vector<std::string> &files() const { return _file_args; }
-
-  };
-}
-
-#endif // LEMON_ARG_PARSER_H
Index: mon/assert.h
===================================================================
--- lemon/assert.h	(revision 290)
+++ 	(revision )
@@ -1,214 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_ASSERT_H
-#define LEMON_ASSERT_H
-
-/// \ingroup exceptions
-/// \file
-/// \brief Extended assertion handling
-
-#include <lemon/error.h>
-
-namespace lemon {
-
-  inline void assert_fail_abort(const char *file, int line,
-                                const char *function, const char* message,
-                                const char *assertion)
-  {
-    std::cerr << file << ":" << line << ": ";
-    if (function)
-      std::cerr << function << ": ";
-    std::cerr << message;
-    if (assertion)
-      std::cerr << " (assertion '" << assertion << "' failed)";
-    std::cerr << std::endl;
-    std::abort();
-  }
-
-  namespace _assert_bits {
-
-
-    inline const char* cstringify(const std::string& str) {
-      return str.c_str();
-    }
-
-    inline const char* cstringify(const char* str) {
-      return str;
-    }
-  }
-}
-
-#endif // LEMON_ASSERT_H
-
-#undef LEMON_ASSERT
-#undef LEMON_DEBUG
-
-#if (defined(LEMON_ASSERT_ABORT) ? 1 : 0) +               \
-  (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1
-#error "LEMON assertion system is not set properly"
-#endif
-
-#if ((defined(LEMON_ASSERT_ABORT) ? 1 : 0) +            \
-     (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 ||     \
-     defined(LEMON_ENABLE_ASSERTS)) &&                  \
-  (defined(LEMON_DISABLE_ASSERTS) ||                    \
-   defined(NDEBUG))
-#error "LEMON assertion system is not set properly"
-#endif
-
-
-#if defined LEMON_ASSERT_ABORT
-#  undef LEMON_ASSERT_HANDLER
-#  define LEMON_ASSERT_HANDLER ::lemon::assert_fail_abort
-#elif defined LEMON_ASSERT_CUSTOM
-#  undef LEMON_ASSERT_HANDLER
-#  ifndef LEMON_CUSTOM_ASSERT_HANDLER
-#    error "LEMON_CUSTOM_ASSERT_HANDLER is not set"
-#  endif
-#  define LEMON_ASSERT_HANDLER LEMON_CUSTOM_ASSERT_HANDLER
-#elif defined LEMON_DISABLE_ASSERTS
-#  undef LEMON_ASSERT_HANDLER
-#elif defined NDEBUG
-#  undef LEMON_ASSERT_HANDLER
-#else
-#  define LEMON_ASSERT_HANDLER ::lemon::assert_fail_abort
-#endif
-
-#ifndef LEMON_FUNCTION_NAME
-#  if defined __GNUC__
-#    define LEMON_FUNCTION_NAME (__PRETTY_FUNCTION__)
-#  elif defined _MSC_VER
-#    define LEMON_FUNCTION_NAME (__FUNCSIG__)
-#  elif __STDC_VERSION__ >= 199901L
-#    define LEMON_FUNCTION_NAME (__func__)
-#  else
-#    define LEMON_FUNCTION_NAME ("<unknown>")
-#  endif
-#endif
-
-#ifdef DOXYGEN
-
-/// \ingroup exceptions
-///
-/// \brief Macro for assertion with customizable message
-///
-/// Macro for assertion with customizable message.
-/// \param exp An expression that must be convertible to \c bool.  If it is \c
-/// false, then an assertion is raised. The concrete behaviour depends on the
-/// settings of the assertion system.
-/// \param msg A <tt>const char*</tt> parameter, which can be used to provide
-/// information about the circumstances of the failed assertion.
-///
-/// The assertions are enabled in the default behaviour.
-/// You can disable them with the following code:
-/// \code
-/// #define LEMON_DISABLE_ASSERTS
-/// \endcode
-/// or with compilation parameters:
-/// \code
-/// g++ -DLEMON_DISABLE_ASSERTS
-/// make CXXFLAGS='-DLEMON_DISABLE_ASSERTS'
-/// \endcode
-/// The checking is also disabled when the standard macro \c NDEBUG is defined.
-///
-/// As a default behaviour the failed assertion prints a short log message to
-/// the standard error and aborts the execution.
-///
-/// However, the following modes can be used in the assertion system:
-/// - \c LEMON_ASSERT_ABORT The failed assertion prints a short log message to
-///   the standard error and aborts the program. It is the default behaviour.
-/// - \c LEMON_ASSERT_CUSTOM The user can define own assertion handler
-///   function.
-///   \code
-///     void custom_assert_handler(const char* file, int line,
-///                                const char* function, const char* message,
-///                                const char* assertion);
-///   \endcode
-///   The name of the function should be defined as the \c
-///   LEMON_CUSTOM_ASSERT_HANDLER macro name.
-///   \code
-///     #define LEMON_CUSTOM_ASSERT_HANDLER custom_assert_handler
-///   \endcode
-///   Whenever an assertion is occured, the custom assertion
-///   handler is called with appropiate parameters.
-///
-/// The assertion mode can also be changed within one compilation unit.
-/// If the macros are redefined with other settings and the
-/// \ref lemon/assert.h "assert.h" file is reincluded, then the
-/// behaviour is changed appropiately to the new settings.
-#  define LEMON_ASSERT(exp, msg)                                        \
-  (static_cast<void> (!!(exp) ? 0 : (                                   \
-    LEMON_ASSERT_HANDLER(__FILE__, __LINE__,                            \
-                         LEMON_FUNCTION_NAME,                           \
-                         ::lemon::_assert_bits::cstringify(msg), #exp), 0)))
-
-/// \ingroup exceptions
-///
-/// \brief Macro for internal assertions
-///
-/// Macro for internal assertions, it is used in the library to check
-/// the consistency of results of algorithms, several pre- and
-/// postconditions and invariants. The checking is disabled by
-/// default, but it can be turned on with the macro \c
-/// LEMON_ENABLE_DEBUG.
-/// \code
-/// #define LEMON_ENABLE_DEBUG
-/// \endcode
-/// or with compilation parameters:
-/// \code
-/// g++ -DLEMON_ENABLE_DEBUG
-/// make CXXFLAGS='-DLEMON_ENABLE_DEBUG'
-/// \endcode
-///
-/// This macro works like the \c LEMON_ASSERT macro, therefore the
-/// current behaviour depends on the settings of \c LEMON_ASSERT
-/// macro.
-///
-/// \see LEMON_ASSERT
-#  define LEMON_DEBUG(exp, msg)                                         \
-  (static_cast<void> (!!(exp) ? 0 : (                                   \
-    LEMON_ASSERT_HANDLER(__FILE__, __LINE__,                            \
-                         LEMON_FUNCTION_NAME,                           \
-                         ::lemon::_assert_bits::cstringify(msg), #exp), 0)))
-
-#else
-
-#  ifndef LEMON_ASSERT_HANDLER
-#    define LEMON_ASSERT(exp, msg)  (static_cast<void>(0))
-#    define LEMON_DEBUG(exp, msg) (static_cast<void>(0))
-#  else
-#    define LEMON_ASSERT(exp, msg)                                      \
-       (static_cast<void> (!!(exp) ? 0 : (                              \
-        LEMON_ASSERT_HANDLER(__FILE__, __LINE__,                        \
-                             LEMON_FUNCTION_NAME,                       \
-                             ::lemon::_assert_bits::cstringify(msg),    \
-                             #exp), 0)))
-#    if LEMON_ENABLE_DEBUG
-#      define LEMON_DEBUG(exp, msg)                                     \
-         (static_cast<void> (!!(exp) ? 0 : (                            \
-           LEMON_ASSERT_HANDLER(__FILE__, __LINE__,                     \
-                                LEMON_FUNCTION_NAME,                    \
-                                ::lemon::_assert_bits::cstringify(msg), \
-                                #exp), 0)))
-#    else
-#      define LEMON_DEBUG(exp, msg) (static_cast<void>(0))
-#    endif
-#  endif
-
-#endif
Index: mon/base.cc
===================================================================
--- lemon/base.cc	(revision 427)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-///\file
-///\brief Some basic non-inline functions and static global data.
-
-#include<lemon/tolerance.h>
-#include<lemon/core.h>
-namespace lemon {
-
-  float Tolerance<float>::def_epsilon = static_cast<float>(1e-4);
-  double Tolerance<double>::def_epsilon = 1e-10;
-  long double Tolerance<long double>::def_epsilon = 1e-14;
-
-#ifndef LEMON_ONLY_TEMPLATES
-  const Invalid INVALID = Invalid();
-#endif
-
-} //namespace lemon
Index: mon/bfs.h
===================================================================
--- lemon/bfs.h	(revision 305)
+++ 	(revision )
@@ -1,1753 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_BFS_H
-#define LEMON_BFS_H
-
-///\ingroup search
-///\file
-///\brief BFS algorithm.
-
-#include <lemon/list_graph.h>
-#include <lemon/bits/path_dump.h>
-#include <lemon/core.h>
-#include <lemon/error.h>
-#include <lemon/maps.h>
-#include <lemon/path.h>
-
-namespace lemon {
-
-  ///Default traits class of Bfs class.
-
-  ///Default traits class of Bfs class.
-  ///\tparam GR Digraph type.
-  template<class GR>
-  struct BfsDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that indicates which nodes are reached.
-
-    ///The type of the map that indicates which nodes are reached.
-    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-    ///Instantiates a ReachedMap.
-
-    ///This function instantiates a ReachedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &g)
-    {
-      return new ReachedMap(g);
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<int> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///DistMap.
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-  };
-
-  ///%BFS algorithm class.
-
-  ///\ingroup search
-  ///This class provides an efficient implementation of the %BFS algorithm.
-  ///
-  ///There is also a \ref bfs() "function-type interface" for the BFS
-  ///algorithm, which is convenient in the simplier cases and it can be
-  ///used easier.
-  ///
-  ///\tparam GR The type of the digraph the algorithm runs on.
-  ///The default value is \ref ListDigraph. The value of GR is not used
-  ///directly by \ref Bfs, it is only passed to \ref BfsDefaultTraits.
-  ///\tparam TR Traits class to set various data types used by the algorithm.
-  ///The default traits class is
-  ///\ref BfsDefaultTraits "BfsDefaultTraits<GR>".
-  ///See \ref BfsDefaultTraits for the documentation of
-  ///a Bfs traits class.
-#ifdef DOXYGEN
-  template <typename GR,
-            typename TR>
-#else
-  template <typename GR=ListDigraph,
-            typename TR=BfsDefaultTraits<GR> >
-#endif
-  class Bfs {
-  public:
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    ///\brief The type of the map that stores the predecessor arcs of the
-    ///shortest paths.
-    typedef typename TR::PredMap PredMap;
-    ///The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///The type of the map that indicates which nodes are reached.
-    typedef typename TR::ReachedMap ReachedMap;
-    ///The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the paths.
-    typedef PredMapPath<Digraph, PredMap> Path;
-
-    ///The traits class.
-    typedef TR Traits;
-
-  private:
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    //Pointer to the underlying digraph.
-    const Digraph *G;
-    //Pointer to the map of predecessor arcs.
-    PredMap *_pred;
-    //Indicates if _pred is locally allocated (true) or not.
-    bool local_pred;
-    //Pointer to the map of distances.
-    DistMap *_dist;
-    //Indicates if _dist is locally allocated (true) or not.
-    bool local_dist;
-    //Pointer to the map of reached status of the nodes.
-    ReachedMap *_reached;
-    //Indicates if _reached is locally allocated (true) or not.
-    bool local_reached;
-    //Pointer to the map of processed status of the nodes.
-    ProcessedMap *_processed;
-    //Indicates if _processed is locally allocated (true) or not.
-    bool local_processed;
-
-    std::vector<typename Digraph::Node> _queue;
-    int _queue_head,_queue_tail,_queue_next_dist;
-    int _curr_dist;
-
-    //Creates the maps if necessary.
-    void create_maps()
-    {
-      if(!_pred) {
-        local_pred = true;
-        _pred = Traits::createPredMap(*G);
-      }
-      if(!_dist) {
-        local_dist = true;
-        _dist = Traits::createDistMap(*G);
-      }
-      if(!_reached) {
-        local_reached = true;
-        _reached = Traits::createReachedMap(*G);
-      }
-      if(!_processed) {
-        local_processed = true;
-        _processed = Traits::createProcessedMap(*G);
-      }
-    }
-
-  protected:
-
-    Bfs() {}
-
-  public:
-
-    typedef Bfs Create;
-
-    ///\name Named template parameters
-
-    ///@{
-
-    template <class T>
-    struct SetPredMapTraits : public Traits {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "PredMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    template <class T>
-    struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > {
-      typedef Bfs< Digraph, SetPredMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetDistMapTraits : public Traits {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "DistMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    template <class T>
-    struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > {
-      typedef Bfs< Digraph, SetDistMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetReachedMapTraits : public Traits {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "ReachedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ReachedMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ReachedMap type.
-    template <class T>
-    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
-      typedef Bfs< Digraph, SetReachedMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetProcessedMapTraits : public Traits {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "ProcessedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    template <class T>
-    struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > {
-      typedef Bfs< Digraph, SetProcessedMapTraits<T> > Create;
-    };
-
-    struct SetStandardProcessedMapTraits : public Traits {
-      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &g)
-      {
-        return new ProcessedMap(g);
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///If you don't set it explicitly, it will be automatically allocated.
-    struct SetStandardProcessedMap :
-      public Bfs< Digraph, SetStandardProcessedMapTraits > {
-      typedef Bfs< Digraph, SetStandardProcessedMapTraits > Create;
-    };
-
-    ///@}
-
-  public:
-
-    ///Constructor.
-
-    ///Constructor.
-    ///\param g The digraph the algorithm runs on.
-    Bfs(const Digraph &g) :
-      G(&g),
-      _pred(NULL), local_pred(false),
-      _dist(NULL), local_dist(false),
-      _reached(NULL), local_reached(false),
-      _processed(NULL), local_processed(false)
-    { }
-
-    ///Destructor.
-    ~Bfs()
-    {
-      if(local_pred) delete _pred;
-      if(local_dist) delete _dist;
-      if(local_reached) delete _reached;
-      if(local_processed) delete _processed;
-    }
-
-    ///Sets the map that stores the predecessor arcs.
-
-    ///Sets the map that stores the predecessor arcs.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Bfs &predMap(PredMap &m)
-    {
-      if(local_pred) {
-        delete _pred;
-        local_pred=false;
-      }
-      _pred = &m;
-      return *this;
-    }
-
-    ///Sets the map that indicates which nodes are reached.
-
-    ///Sets the map that indicates which nodes are reached.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Bfs &reachedMap(ReachedMap &m)
-    {
-      if(local_reached) {
-        delete _reached;
-        local_reached=false;
-      }
-      _reached = &m;
-      return *this;
-    }
-
-    ///Sets the map that indicates which nodes are processed.
-
-    ///Sets the map that indicates which nodes are processed.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Bfs &processedMap(ProcessedMap &m)
-    {
-      if(local_processed) {
-        delete _processed;
-        local_processed=false;
-      }
-      _processed = &m;
-      return *this;
-    }
-
-    ///Sets the map that stores the distances of the nodes.
-
-    ///Sets the map that stores the distances of the nodes calculated by
-    ///the algorithm.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Bfs &distMap(DistMap &m)
-    {
-      if(local_dist) {
-        delete _dist;
-        local_dist=false;
-      }
-      _dist = &m;
-      return *this;
-    }
-
-  public:
-
-    ///\name Execution control
-    ///The simplest way to execute the algorithm is to use
-    ///one of the member functions called \ref lemon::Bfs::run() "run()".
-    ///\n
-    ///If you need more control on the execution, first you must call
-    ///\ref lemon::Bfs::init() "init()", then you can add several source
-    ///nodes with \ref lemon::Bfs::addSource() "addSource()".
-    ///Finally \ref lemon::Bfs::start() "start()" will perform the
-    ///actual path computation.
-
-    ///@{
-
-    ///Initializes the internal data structures.
-
-    ///Initializes the internal data structures.
-    ///
-    void init()
-    {
-      create_maps();
-      _queue.resize(countNodes(*G));
-      _queue_head=_queue_tail=0;
-      _curr_dist=1;
-      for ( NodeIt u(*G) ; u!=INVALID ; ++u ) {
-        _pred->set(u,INVALID);
-        _reached->set(u,false);
-        _processed->set(u,false);
-      }
-    }
-
-    ///Adds a new source node.
-
-    ///Adds a new source node to the set of nodes to be processed.
-    ///
-    void addSource(Node s)
-    {
-      if(!(*_reached)[s])
-        {
-          _reached->set(s,true);
-          _pred->set(s,INVALID);
-          _dist->set(s,0);
-          _queue[_queue_head++]=s;
-          _queue_next_dist=_queue_head;
-        }
-    }
-
-    ///Processes the next node.
-
-    ///Processes the next node.
-    ///
-    ///\return The processed node.
-    ///
-    ///\pre The queue must not be empty.
-    Node processNextNode()
-    {
-      if(_queue_tail==_queue_next_dist) {
-        _curr_dist++;
-        _queue_next_dist=_queue_head;
-      }
-      Node n=_queue[_queue_tail++];
-      _processed->set(n,true);
-      Node m;
-      for(OutArcIt e(*G,n);e!=INVALID;++e)
-        if(!(*_reached)[m=G->target(e)]) {
-          _queue[_queue_head++]=m;
-          _reached->set(m,true);
-          _pred->set(m,e);
-          _dist->set(m,_curr_dist);
-        }
-      return n;
-    }
-
-    ///Processes the next node.
-
-    ///Processes the next node and checks if the given target node
-    ///is reached. If the target node is reachable from the processed
-    ///node, then the \c reach parameter will be set to \c true.
-    ///
-    ///\param target The target node.
-    ///\retval reach Indicates if the target node is reached.
-    ///It should be initially \c false.
-    ///
-    ///\return The processed node.
-    ///
-    ///\pre The queue must not be empty.
-    Node processNextNode(Node target, bool& reach)
-    {
-      if(_queue_tail==_queue_next_dist) {
-        _curr_dist++;
-        _queue_next_dist=_queue_head;
-      }
-      Node n=_queue[_queue_tail++];
-      _processed->set(n,true);
-      Node m;
-      for(OutArcIt e(*G,n);e!=INVALID;++e)
-        if(!(*_reached)[m=G->target(e)]) {
-          _queue[_queue_head++]=m;
-          _reached->set(m,true);
-          _pred->set(m,e);
-          _dist->set(m,_curr_dist);
-          reach = reach || (target == m);
-        }
-      return n;
-    }
-
-    ///Processes the next node.
-
-    ///Processes the next node and checks if at least one of reached
-    ///nodes has \c true value in the \c nm node map. If one node
-    ///with \c true value is reachable from the processed node, then the
-    ///\c rnode parameter will be set to the first of such nodes.
-    ///
-    ///\param nm A \c bool (or convertible) node map that indicates the
-    ///possible targets.
-    ///\retval rnode The reached target node.
-    ///It should be initially \c INVALID.
-    ///
-    ///\return The processed node.
-    ///
-    ///\pre The queue must not be empty.
-    template<class NM>
-    Node processNextNode(const NM& nm, Node& rnode)
-    {
-      if(_queue_tail==_queue_next_dist) {
-        _curr_dist++;
-        _queue_next_dist=_queue_head;
-      }
-      Node n=_queue[_queue_tail++];
-      _processed->set(n,true);
-      Node m;
-      for(OutArcIt e(*G,n);e!=INVALID;++e)
-        if(!(*_reached)[m=G->target(e)]) {
-          _queue[_queue_head++]=m;
-          _reached->set(m,true);
-          _pred->set(m,e);
-          _dist->set(m,_curr_dist);
-          if (nm[m] && rnode == INVALID) rnode = m;
-        }
-      return n;
-    }
-
-    ///The next node to be processed.
-
-    ///Returns the next node to be processed or \c INVALID if the queue
-    ///is empty.
-    Node nextNode() const
-    {
-      return _queue_tail<_queue_head?_queue[_queue_tail]:INVALID;
-    }
-
-    ///\brief Returns \c false if there are nodes
-    ///to be processed.
-    ///
-    ///Returns \c false if there are nodes
-    ///to be processed in the queue.
-    bool emptyQueue() const { return _queue_tail==_queue_head; }
-
-    ///Returns the number of the nodes to be processed.
-
-    ///Returns the number of the nodes to be processed in the queue.
-    int queueSize() const { return _queue_head-_queue_tail; }
-
-    ///Executes the algorithm.
-
-    ///Executes the algorithm.
-    ///
-    ///This method runs the %BFS algorithm from the root node(s)
-    ///in order to compute the shortest path to each node.
-    ///
-    ///The algorithm computes
-    ///- the shortest path tree (forest),
-    ///- the distance of each node from the root(s).
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\note <tt>b.start()</tt> is just a shortcut of the following code.
-    ///\code
-    ///  while ( !b.emptyQueue() ) {
-    ///    b.processNextNode();
-    ///  }
-    ///\endcode
-    void start()
-    {
-      while ( !emptyQueue() ) processNextNode();
-    }
-
-    ///Executes the algorithm until the given target node is reached.
-
-    ///Executes the algorithm until the given target node is reached.
-    ///
-    ///This method runs the %BFS algorithm from the root node(s)
-    ///in order to compute the shortest path to \c t.
-    ///
-    ///The algorithm computes
-    ///- the shortest path to \c t,
-    ///- the distance of \c t from the root(s).
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\note <tt>b.start(t)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  bool reach = false;
-    ///  while ( !b.emptyQueue() && !reach ) {
-    ///    b.processNextNode(t, reach);
-    ///  }
-    ///\endcode
-    void start(Node t)
-    {
-      bool reach = false;
-      while ( !emptyQueue() && !reach ) processNextNode(t, reach);
-    }
-
-    ///Executes the algorithm until a condition is met.
-
-    ///Executes the algorithm until a condition is met.
-    ///
-    ///This method runs the %BFS algorithm from the root node(s) in
-    ///order to compute the shortest path to a node \c v with
-    /// <tt>nm[v]</tt> true, if such a node can be found.
-    ///
-    ///\param nm A \c bool (or convertible) node map. The algorithm
-    ///will stop when it reaches a node \c v with <tt>nm[v]</tt> true.
-    ///
-    ///\return The reached node \c v with <tt>nm[v]</tt> true or
-    ///\c INVALID if no such node was found.
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\note <tt>b.start(nm)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  Node rnode = INVALID;
-    ///  while ( !b.emptyQueue() && rnode == INVALID ) {
-    ///    b.processNextNode(nm, rnode);
-    ///  }
-    ///  return rnode;
-    ///\endcode
-    template<class NodeBoolMap>
-    Node start(const NodeBoolMap &nm)
-    {
-      Node rnode = INVALID;
-      while ( !emptyQueue() && rnode == INVALID ) {
-        processNextNode(nm, rnode);
-      }
-      return rnode;
-    }
-
-    ///Runs the algorithm from the given source node.
-
-    ///This method runs the %BFS algorithm from node \c s
-    ///in order to compute the shortest path to each node.
-    ///
-    ///The algorithm computes
-    ///- the shortest path tree,
-    ///- the distance of each node from the root.
-    ///
-    ///\note <tt>b.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  b.init();
-    ///  b.addSource(s);
-    ///  b.start();
-    ///\endcode
-    void run(Node s) {
-      init();
-      addSource(s);
-      start();
-    }
-
-    ///Finds the shortest path between \c s and \c t.
-
-    ///This method runs the %BFS algorithm from node \c s
-    ///in order to compute the shortest path to node \c t
-    ///(it stops searching when \c t is processed).
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    ///
-    ///\note Apart from the return value, <tt>b.run(s,t)</tt> is just a
-    ///shortcut of the following code.
-    ///\code
-    ///  b.init();
-    ///  b.addSource(s);
-    ///  b.start(t);
-    ///\endcode
-    bool run(Node s,Node t) {
-      init();
-      addSource(s);
-      start(t);
-      return reached(t);
-    }
-
-    ///Runs the algorithm to visit all nodes in the digraph.
-
-    ///This method runs the %BFS algorithm in order to
-    ///compute the shortest path to each node.
-    ///
-    ///The algorithm computes
-    ///- the shortest path tree (forest),
-    ///- the distance of each node from the root(s).
-    ///
-    ///\note <tt>b.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  b.init();
-    ///  for (NodeIt n(gr); n != INVALID; ++n) {
-    ///    if (!b.reached(n)) {
-    ///      b.addSource(n);
-    ///      b.start();
-    ///    }
-    ///  }
-    ///\endcode
-    void run() {
-      init();
-      for (NodeIt n(*G); n != INVALID; ++n) {
-        if (!reached(n)) {
-          addSource(n);
-          start();
-        }
-      }
-    }
-
-    ///@}
-
-    ///\name Query Functions
-    ///The result of the %BFS algorithm can be obtained using these
-    ///functions.\n
-    ///Either \ref lemon::Bfs::run() "run()" or \ref lemon::Bfs::start()
-    ///"start()" must be called before using them.
-
-    ///@{
-
-    ///The shortest path to a node.
-
-    ///Returns the shortest path to a node.
-    ///
-    ///\warning \c t should be reachable from the root(s).
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Path path(Node t) const { return Path(*G, *_pred, t); }
-
-    ///The distance of a node from the root(s).
-
-    ///Returns the distance of a node from the root(s).
-    ///
-    ///\warning If node \c v is not reachable from the root(s), then
-    ///the return value of this function is undefined.
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    int dist(Node v) const { return (*_dist)[v]; }
-
-    ///Returns the 'previous arc' of the shortest path tree for a node.
-
-    ///This function returns the 'previous arc' of the shortest path
-    ///tree for the node \c v, i.e. it returns the last arc of a
-    ///shortest path from the root(s) to \c v. It is \c INVALID if \c v
-    ///is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The shortest path tree used here is equal to the shortest path
-    ///tree used in \ref predNode().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Arc predArc(Node v) const { return (*_pred)[v];}
-
-    ///Returns the 'previous node' of the shortest path tree for a node.
-
-    ///This function returns the 'previous node' of the shortest path
-    ///tree for the node \c v, i.e. it returns the last but one node
-    ///from a shortest path from the root(s) to \c v. It is \c INVALID
-    ///if \c v is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The shortest path tree used here is equal to the shortest path
-    ///tree used in \ref predArc().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Node predNode(Node v) const { return (*_pred)[v]==INVALID ? INVALID:
-                                  G->source((*_pred)[v]); }
-
-    ///\brief Returns a const reference to the node map that stores the
-    /// distances of the nodes.
-    ///
-    ///Returns a const reference to the node map that stores the distances
-    ///of the nodes calculated by the algorithm.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const DistMap &distMap() const { return *_dist;}
-
-    ///\brief Returns a const reference to the node map that stores the
-    ///predecessor arcs.
-    ///
-    ///Returns a const reference to the node map that stores the predecessor
-    ///arcs, which form the shortest path tree.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const PredMap &predMap() const { return *_pred;}
-
-    ///Checks if a node is reachable from the root(s).
-
-    ///Returns \c true if \c v is reachable from the root(s).
-    ///\pre Either \ref run() or \ref start()
-    ///must be called before using this function.
-    bool reached(Node v) const { return (*_reached)[v]; }
-
-    ///@}
-  };
-
-  ///Default traits class of bfs() function.
-
-  ///Default traits class of bfs() function.
-  ///\tparam GR Digraph type.
-  template<class GR>
-  struct BfsWizardDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default it is a NullMap.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap.
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that indicates which nodes are reached.
-
-    ///The type of the map that indicates which nodes are reached.
-    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-    ///Instantiates a ReachedMap.
-
-    ///This function instantiates a ReachedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &g)
-    {
-      return new ReachedMap(g);
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<int> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define
-    ///the DistMap
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-
-    ///The type of the shortest paths.
-
-    ///The type of the shortest paths.
-    ///It must meet the \ref concepts::Path "Path" concept.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  /// Default traits class used by BfsWizard
-
-  /// To make it easier to use Bfs algorithm
-  /// we have created a wizard class.
-  /// This \ref BfsWizard class needs default traits,
-  /// as well as the \ref Bfs class.
-  /// The \ref BfsWizardBase is a class to be the default traits of the
-  /// \ref BfsWizard class.
-  template<class GR>
-  class BfsWizardBase : public BfsWizardDefaultTraits<GR>
-  {
-
-    typedef BfsWizardDefaultTraits<GR> Base;
-  protected:
-    //The type of the nodes in the digraph.
-    typedef typename Base::Digraph::Node Node;
-
-    //Pointer to the digraph the algorithm runs on.
-    void *_g;
-    //Pointer to the map of reached nodes.
-    void *_reached;
-    //Pointer to the map of processed nodes.
-    void *_processed;
-    //Pointer to the map of predecessors arcs.
-    void *_pred;
-    //Pointer to the map of distances.
-    void *_dist;
-    //Pointer to the shortest path to the target node.
-    void *_path;
-    //Pointer to the distance of the target node.
-    int *_di;
-
-    public:
-    /// Constructor.
-
-    /// This constructor does not require parameters, therefore it initiates
-    /// all of the attributes to \c 0.
-    BfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
-                      _dist(0), _path(0), _di(0) {}
-
-    /// Constructor.
-
-    /// This constructor requires one parameter,
-    /// others are initiated to \c 0.
-    /// \param g The digraph the algorithm runs on.
-    BfsWizardBase(const GR &g) :
-      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))),
-      _reached(0), _processed(0), _pred(0), _dist(0),  _path(0), _di(0) {}
-
-  };
-
-  /// Auxiliary class for the function-type interface of BFS algorithm.
-
-  /// This auxiliary class is created to implement the
-  /// \ref bfs() "function-type interface" of \ref Bfs algorithm.
-  /// It does not have own \ref run() method, it uses the functions
-  /// and features of the plain \ref Bfs.
-  ///
-  /// This class should only be used through the \ref bfs() function,
-  /// which makes it easier to use the algorithm.
-  template<class TR>
-  class BfsWizard : public TR
-  {
-    typedef TR Base;
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    typedef typename TR::PredMap PredMap;
-    ///\brief The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///\brief The type of the map that indicates which nodes are reached.
-    typedef typename TR::ReachedMap ReachedMap;
-    ///\brief The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the shortest paths
-    typedef typename TR::Path Path;
-
-  public:
-
-    /// Constructor.
-    BfsWizard() : TR() {}
-
-    /// Constructor that requires parameters.
-
-    /// Constructor that requires parameters.
-    /// These parameters will be the default values for the traits class.
-    /// \param g The digraph the algorithm runs on.
-    BfsWizard(const Digraph &g) :
-      TR(g) {}
-
-    ///Copy constructor
-    BfsWizard(const TR &b) : TR(b) {}
-
-    ~BfsWizard() {}
-
-    ///Runs BFS algorithm from the given source node.
-
-    ///This method runs BFS algorithm from node \c s
-    ///in order to compute the shortest path to each node.
-    void run(Node s)
-    {
-      Bfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
-      if (Base::_pred)
-        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_reached)
-        alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
-      if (Base::_processed)
-        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      if (s!=INVALID)
-        alg.run(s);
-      else
-        alg.run();
-    }
-
-    ///Finds the shortest path between \c s and \c t.
-
-    ///This method runs BFS algorithm from node \c s
-    ///in order to compute the shortest path to node \c t
-    ///(it stops searching when \c t is processed).
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    bool run(Node s, Node t)
-    {
-      Bfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
-      if (Base::_pred)
-        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_reached)
-        alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
-      if (Base::_processed)
-        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      alg.run(s,t);
-      if (Base::_path)
-        *reinterpret_cast<Path*>(Base::_path) = alg.path(t);
-      if (Base::_di)
-        *Base::_di = alg.dist(t);
-      return alg.reached(t);
-    }
-
-    ///Runs BFS algorithm to visit all nodes in the digraph.
-
-    ///This method runs BFS algorithm in order to compute
-    ///the shortest path to each node.
-    void run()
-    {
-      run(INVALID);
-    }
-
-    template<class T>
-    struct SetPredMapBase : public Base {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &) { return 0; };
-      SetPredMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    template<class T>
-    BfsWizard<SetPredMapBase<T> > predMap(const T &t)
-    {
-      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return BfsWizard<SetPredMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetReachedMapBase : public Base {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
-      SetReachedMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting ReachedMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting ReachedMap object.
-    template<class T>
-    BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
-    {
-      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return BfsWizard<SetReachedMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetDistMapBase : public Base {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &) { return 0; };
-      SetDistMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    template<class T>
-    BfsWizard<SetDistMapBase<T> > distMap(const T &t)
-    {
-      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return BfsWizard<SetDistMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetProcessedMapBase : public Base {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
-      SetProcessedMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    template<class T>
-    BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
-    {
-      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return BfsWizard<SetProcessedMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetPathBase : public Base {
-      typedef T Path;
-      SetPathBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the shortest path to the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the shortest path to the target node.
-    template<class T>
-    BfsWizard<SetPathBase<T> > path(const T &t)
-    {
-      Base::_path=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return BfsWizard<SetPathBase<T> >(*this);
-    }
-
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    BfsWizard dist(const int &d)
-    {
-      Base::_di=const_cast<int*>(&d);
-      return *this;
-    }
-
-  };
-
-  ///Function-type interface for BFS algorithm.
-
-  /// \ingroup search
-  ///Function-type interface for BFS algorithm.
-  ///
-  ///This function also has several \ref named-func-param "named parameters",
-  ///they are declared as the members of class \ref BfsWizard.
-  ///The following examples show how to use these parameters.
-  ///\code
-  ///  // Compute shortest path from node s to each node
-  ///  bfs(g).predMap(preds).distMap(dists).run(s);
-  ///
-  ///  // Compute shortest path from s to t
-  ///  bool reached = bfs(g).path(p).dist(d).run(s,t);
-  ///\endcode
-  ///\warning Don't forget to put the \ref BfsWizard::run() "run()"
-  ///to the end of the parameter list.
-  ///\sa BfsWizard
-  ///\sa Bfs
-  template<class GR>
-  BfsWizard<BfsWizardBase<GR> >
-  bfs(const GR &digraph)
-  {
-    return BfsWizard<BfsWizardBase<GR> >(digraph);
-  }
-
-#ifdef DOXYGEN
-  /// \brief Visitor class for BFS.
-  ///
-  /// This class defines the interface of the BfsVisit events, and
-  /// it could be the base of a real visitor class.
-  template <typename _Digraph>
-  struct BfsVisitor {
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::Node Node;
-    /// \brief Called for the source node(s) of the BFS.
-    ///
-    /// This function is called for the source node(s) of the BFS.
-    void start(const Node& node) {}
-    /// \brief Called when a node is reached first time.
-    ///
-    /// This function is called when a node is reached first time.
-    void reach(const Node& node) {}
-    /// \brief Called when a node is processed.
-    ///
-    /// This function is called when a node is processed.
-    void process(const Node& node) {}
-    /// \brief Called when an arc reaches a new node.
-    ///
-    /// This function is called when the BFS finds an arc whose target node
-    /// is not reached yet.
-    void discover(const Arc& arc) {}
-    /// \brief Called when an arc is examined but its target node is
-    /// already discovered.
-    ///
-    /// This function is called when an arc is examined but its target node is
-    /// already discovered.
-    void examine(const Arc& arc) {}
-  };
-#else
-  template <typename _Digraph>
-  struct BfsVisitor {
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::Node Node;
-    void start(const Node&) {}
-    void reach(const Node&) {}
-    void process(const Node&) {}
-    void discover(const Arc&) {}
-    void examine(const Arc&) {}
-
-    template <typename _Visitor>
-    struct Constraints {
-      void constraints() {
-        Arc arc;
-        Node node;
-        visitor.start(node);
-        visitor.reach(node);
-        visitor.process(node);
-        visitor.discover(arc);
-        visitor.examine(arc);
-      }
-      _Visitor& visitor;
-    };
-  };
-#endif
-
-  /// \brief Default traits class of BfsVisit class.
-  ///
-  /// Default traits class of BfsVisit class.
-  /// \tparam _Digraph The type of the digraph the algorithm runs on.
-  template<class _Digraph>
-  struct BfsVisitDefaultTraits {
-
-    /// \brief The type of the digraph the algorithm runs on.
-    typedef _Digraph Digraph;
-
-    /// \brief The type of the map that indicates which nodes are reached.
-    ///
-    /// The type of the map that indicates which nodes are reached.
-    /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-
-    /// \brief Instantiates a ReachedMap.
-    ///
-    /// This function instantiates a ReachedMap.
-    /// \param digraph is the digraph, to which
-    /// we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &digraph) {
-      return new ReachedMap(digraph);
-    }
-
-  };
-
-  /// \ingroup search
-  ///
-  /// \brief %BFS algorithm class with visitor interface.
-  ///
-  /// This class provides an efficient implementation of the %BFS algorithm
-  /// with visitor interface.
-  ///
-  /// The %BfsVisit class provides an alternative interface to the Bfs
-  /// class. It works with callback mechanism, the BfsVisit object calls
-  /// the member functions of the \c Visitor class on every BFS event.
-  ///
-  /// This interface of the BFS algorithm should be used in special cases
-  /// when extra actions have to be performed in connection with certain
-  /// events of the BFS algorithm. Otherwise consider to use Bfs or bfs()
-  /// instead.
-  ///
-  /// \tparam _Digraph The type of the digraph the algorithm runs on.
-  /// The default value is
-  /// \ref ListDigraph. The value of _Digraph is not used directly by
-  /// \ref BfsVisit, it is only passed to \ref BfsVisitDefaultTraits.
-  /// \tparam _Visitor The Visitor type that is used by the algorithm.
-  /// \ref BfsVisitor "BfsVisitor<_Digraph>" is an empty visitor, which
-  /// does not observe the BFS events. If you want to observe the BFS
-  /// events, you should implement your own visitor class.
-  /// \tparam _Traits Traits class to set various data types used by the
-  /// algorithm. The default traits class is
-  /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<_Digraph>".
-  /// See \ref BfsVisitDefaultTraits for the documentation of
-  /// a BFS visit traits class.
-#ifdef DOXYGEN
-  template <typename _Digraph, typename _Visitor, typename _Traits>
-#else
-  template <typename _Digraph = ListDigraph,
-            typename _Visitor = BfsVisitor<_Digraph>,
-            typename _Traits = BfsVisitDefaultTraits<_Digraph> >
-#endif
-  class BfsVisit {
-  public:
-
-    ///The traits class.
-    typedef _Traits Traits;
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename Traits::Digraph Digraph;
-
-    ///The visitor type used by the algorithm.
-    typedef _Visitor Visitor;
-
-    ///The type of the map that indicates which nodes are reached.
-    typedef typename Traits::ReachedMap ReachedMap;
-
-  private:
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    //Pointer to the underlying digraph.
-    const Digraph *_digraph;
-    //Pointer to the visitor object.
-    Visitor *_visitor;
-    //Pointer to the map of reached status of the nodes.
-    ReachedMap *_reached;
-    //Indicates if _reached is locally allocated (true) or not.
-    bool local_reached;
-
-    std::vector<typename Digraph::Node> _list;
-    int _list_front, _list_back;
-
-    //Creates the maps if necessary.
-    void create_maps() {
-      if(!_reached) {
-        local_reached = true;
-        _reached = Traits::createReachedMap(*_digraph);
-      }
-    }
-
-  protected:
-
-    BfsVisit() {}
-
-  public:
-
-    typedef BfsVisit Create;
-
-    /// \name Named template parameters
-
-    ///@{
-    template <class T>
-    struct SetReachedMapTraits : public Traits {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &digraph) {
-        LEMON_ASSERT(false, "ReachedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// ReachedMap type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
-    template <class T>
-    struct SetReachedMap : public BfsVisit< Digraph, Visitor,
-                                            SetReachedMapTraits<T> > {
-      typedef BfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
-    };
-    ///@}
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// Constructor.
-    ///
-    /// \param digraph The digraph the algorithm runs on.
-    /// \param visitor The visitor object of the algorithm.
-    BfsVisit(const Digraph& digraph, Visitor& visitor)
-      : _digraph(&digraph), _visitor(&visitor),
-        _reached(0), local_reached(false) {}
-
-    /// \brief Destructor.
-    ~BfsVisit() {
-      if(local_reached) delete _reached;
-    }
-
-    /// \brief Sets the map that indicates which nodes are reached.
-    ///
-    /// Sets the map that indicates which nodes are reached.
-    /// If you don't use this function before calling \ref run(),
-    /// it will allocate one. The destructor deallocates this
-    /// automatically allocated map, of course.
-    /// \return <tt> (*this) </tt>
-    BfsVisit &reachedMap(ReachedMap &m) {
-      if(local_reached) {
-        delete _reached;
-        local_reached = false;
-      }
-      _reached = &m;
-      return *this;
-    }
-
-  public:
-
-    /// \name Execution control
-    /// The simplest way to execute the algorithm is to use
-    /// one of the member functions called \ref lemon::BfsVisit::run()
-    /// "run()".
-    /// \n
-    /// If you need more control on the execution, first you must call
-    /// \ref lemon::BfsVisit::init() "init()", then you can add several
-    /// source nodes with \ref lemon::BfsVisit::addSource() "addSource()".
-    /// Finally \ref lemon::BfsVisit::start() "start()" will perform the
-    /// actual path computation.
-
-    /// @{
-
-    /// \brief Initializes the internal data structures.
-    ///
-    /// Initializes the internal data structures.
-    void init() {
-      create_maps();
-      _list.resize(countNodes(*_digraph));
-      _list_front = _list_back = -1;
-      for (NodeIt u(*_digraph) ; u != INVALID ; ++u) {
-        _reached->set(u, false);
-      }
-    }
-
-    /// \brief Adds a new source node.
-    ///
-    /// Adds a new source node to the set of nodes to be processed.
-    void addSource(Node s) {
-      if(!(*_reached)[s]) {
-          _reached->set(s,true);
-          _visitor->start(s);
-          _visitor->reach(s);
-          _list[++_list_back] = s;
-        }
-    }
-
-    /// \brief Processes the next node.
-    ///
-    /// Processes the next node.
-    ///
-    /// \return The processed node.
-    ///
-    /// \pre The queue must not be empty.
-    Node processNextNode() {
-      Node n = _list[++_list_front];
-      _visitor->process(n);
-      Arc e;
-      for (_digraph->firstOut(e, n); e != INVALID; _digraph->nextOut(e)) {
-        Node m = _digraph->target(e);
-        if (!(*_reached)[m]) {
-          _visitor->discover(e);
-          _visitor->reach(m);
-          _reached->set(m, true);
-          _list[++_list_back] = m;
-        } else {
-          _visitor->examine(e);
-        }
-      }
-      return n;
-    }
-
-    /// \brief Processes the next node.
-    ///
-    /// Processes the next node and checks if the given target node
-    /// is reached. If the target node is reachable from the processed
-    /// node, then the \c reach parameter will be set to \c true.
-    ///
-    /// \param target The target node.
-    /// \retval reach Indicates if the target node is reached.
-    /// It should be initially \c false.
-    ///
-    /// \return The processed node.
-    ///
-    /// \pre The queue must not be empty.
-    Node processNextNode(Node target, bool& reach) {
-      Node n = _list[++_list_front];
-      _visitor->process(n);
-      Arc e;
-      for (_digraph->firstOut(e, n); e != INVALID; _digraph->nextOut(e)) {
-        Node m = _digraph->target(e);
-        if (!(*_reached)[m]) {
-          _visitor->discover(e);
-          _visitor->reach(m);
-          _reached->set(m, true);
-          _list[++_list_back] = m;
-          reach = reach || (target == m);
-        } else {
-          _visitor->examine(e);
-        }
-      }
-      return n;
-    }
-
-    /// \brief Processes the next node.
-    ///
-    /// Processes the next node and checks if at least one of reached
-    /// nodes has \c true value in the \c nm node map. If one node
-    /// with \c true value is reachable from the processed node, then the
-    /// \c rnode parameter will be set to the first of such nodes.
-    ///
-    /// \param nm A \c bool (or convertible) node map that indicates the
-    /// possible targets.
-    /// \retval rnode The reached target node.
-    /// It should be initially \c INVALID.
-    ///
-    /// \return The processed node.
-    ///
-    /// \pre The queue must not be empty.
-    template <typename NM>
-    Node processNextNode(const NM& nm, Node& rnode) {
-      Node n = _list[++_list_front];
-      _visitor->process(n);
-      Arc e;
-      for (_digraph->firstOut(e, n); e != INVALID; _digraph->nextOut(e)) {
-        Node m = _digraph->target(e);
-        if (!(*_reached)[m]) {
-          _visitor->discover(e);
-          _visitor->reach(m);
-          _reached->set(m, true);
-          _list[++_list_back] = m;
-          if (nm[m] && rnode == INVALID) rnode = m;
-        } else {
-          _visitor->examine(e);
-        }
-      }
-      return n;
-    }
-
-    /// \brief The next node to be processed.
-    ///
-    /// Returns the next node to be processed or \c INVALID if the queue
-    /// is empty.
-    Node nextNode() const {
-      return _list_front != _list_back ? _list[_list_front + 1] : INVALID;
-    }
-
-    /// \brief Returns \c false if there are nodes
-    /// to be processed.
-    ///
-    /// Returns \c false if there are nodes
-    /// to be processed in the queue.
-    bool emptyQueue() const { return _list_front == _list_back; }
-
-    /// \brief Returns the number of the nodes to be processed.
-    ///
-    /// Returns the number of the nodes to be processed in the queue.
-    int queueSize() const { return _list_back - _list_front; }
-
-    /// \brief Executes the algorithm.
-    ///
-    /// Executes the algorithm.
-    ///
-    /// This method runs the %BFS algorithm from the root node(s)
-    /// in order to compute the shortest path to each node.
-    ///
-    /// The algorithm computes
-    /// - the shortest path tree (forest),
-    /// - the distance of each node from the root(s).
-    ///
-    /// \pre init() must be called and at least one root node should be added
-    /// with addSource() before using this function.
-    ///
-    /// \note <tt>b.start()</tt> is just a shortcut of the following code.
-    /// \code
-    ///   while ( !b.emptyQueue() ) {
-    ///     b.processNextNode();
-    ///   }
-    /// \endcode
-    void start() {
-      while ( !emptyQueue() ) processNextNode();
-    }
-
-    /// \brief Executes the algorithm until the given target node is reached.
-    ///
-    /// Executes the algorithm until the given target node is reached.
-    ///
-    /// This method runs the %BFS algorithm from the root node(s)
-    /// in order to compute the shortest path to \c t.
-    ///
-    /// The algorithm computes
-    /// - the shortest path to \c t,
-    /// - the distance of \c t from the root(s).
-    ///
-    /// \pre init() must be called and at least one root node should be
-    /// added with addSource() before using this function.
-    ///
-    /// \note <tt>b.start(t)</tt> is just a shortcut of the following code.
-    /// \code
-    ///   bool reach = false;
-    ///   while ( !b.emptyQueue() && !reach ) {
-    ///     b.processNextNode(t, reach);
-    ///   }
-    /// \endcode
-    void start(Node t) {
-      bool reach = false;
-      while ( !emptyQueue() && !reach ) processNextNode(t, reach);
-    }
-
-    /// \brief Executes the algorithm until a condition is met.
-    ///
-    /// Executes the algorithm until a condition is met.
-    ///
-    /// This method runs the %BFS algorithm from the root node(s) in
-    /// order to compute the shortest path to a node \c v with
-    /// <tt>nm[v]</tt> true, if such a node can be found.
-    ///
-    /// \param nm must be a bool (or convertible) node map. The
-    /// algorithm will stop when it reaches a node \c v with
-    /// <tt>nm[v]</tt> true.
-    ///
-    /// \return The reached node \c v with <tt>nm[v]</tt> true or
-    /// \c INVALID if no such node was found.
-    ///
-    /// \pre init() must be called and at least one root node should be
-    /// added with addSource() before using this function.
-    ///
-    /// \note <tt>b.start(nm)</tt> is just a shortcut of the following code.
-    /// \code
-    ///   Node rnode = INVALID;
-    ///   while ( !b.emptyQueue() && rnode == INVALID ) {
-    ///     b.processNextNode(nm, rnode);
-    ///   }
-    ///   return rnode;
-    /// \endcode
-    template <typename NM>
-    Node start(const NM &nm) {
-      Node rnode = INVALID;
-      while ( !emptyQueue() && rnode == INVALID ) {
-        processNextNode(nm, rnode);
-      }
-      return rnode;
-    }
-
-    /// \brief Runs the algorithm from the given source node.
-    ///
-    /// This method runs the %BFS algorithm from node \c s
-    /// in order to compute the shortest path to each node.
-    ///
-    /// The algorithm computes
-    /// - the shortest path tree,
-    /// - the distance of each node from the root.
-    ///
-    /// \note <tt>b.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///   b.init();
-    ///   b.addSource(s);
-    ///   b.start();
-    ///\endcode
-    void run(Node s) {
-      init();
-      addSource(s);
-      start();
-    }
-
-    /// \brief Finds the shortest path between \c s and \c t.
-    ///
-    /// This method runs the %BFS algorithm from node \c s
-    /// in order to compute the shortest path to node \c t
-    /// (it stops searching when \c t is processed).
-    ///
-    /// \return \c true if \c t is reachable form \c s.
-    ///
-    /// \note Apart from the return value, <tt>b.run(s,t)</tt> is just a
-    /// shortcut of the following code.
-    ///\code
-    ///   b.init();
-    ///   b.addSource(s);
-    ///   b.start(t);
-    ///\endcode
-    bool run(Node s,Node t) {
-      init();
-      addSource(s);
-      start(t);
-      return reached(t);
-    }
-
-    /// \brief Runs the algorithm to visit all nodes in the digraph.
-    ///
-    /// This method runs the %BFS algorithm in order to
-    /// compute the shortest path to each node.
-    ///
-    /// The algorithm computes
-    /// - the shortest path tree (forest),
-    /// - the distance of each node from the root(s).
-    ///
-    /// \note <tt>b.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  b.init();
-    ///  for (NodeIt n(gr); n != INVALID; ++n) {
-    ///    if (!b.reached(n)) {
-    ///      b.addSource(n);
-    ///      b.start();
-    ///    }
-    ///  }
-    ///\endcode
-    void run() {
-      init();
-      for (NodeIt it(*_digraph); it != INVALID; ++it) {
-        if (!reached(it)) {
-          addSource(it);
-          start();
-        }
-      }
-    }
-
-    ///@}
-
-    /// \name Query Functions
-    /// The result of the %BFS algorithm can be obtained using these
-    /// functions.\n
-    /// Either \ref lemon::BfsVisit::run() "run()" or
-    /// \ref lemon::BfsVisit::start() "start()" must be called before
-    /// using them.
-    ///@{
-
-    /// \brief Checks if a node is reachable from the root(s).
-    ///
-    /// Returns \c true if \c v is reachable from the root(s).
-    /// \pre Either \ref run() or \ref start()
-    /// must be called before using this function.
-    bool reached(Node v) { return (*_reached)[v]; }
-
-    ///@}
-
-  };
-
-} //END OF NAMESPACE LEMON
-
-#endif
Index: mon/bin_heap.h
===================================================================
--- lemon/bin_heap.h	(revision 209)
+++ 	(revision )
@@ -1,346 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_BIN_HEAP_H
-#define LEMON_BIN_HEAP_H
-
-///\ingroup auxdat
-///\file
-///\brief Binary Heap implementation.
-
-#include <vector>
-#include <utility>
-#include <functional>
-
-namespace lemon {
-
-  ///\ingroup auxdat
-  ///
-  ///\brief A Binary Heap implementation.
-  ///
-  ///This class implements the \e binary \e heap data structure. A \e heap
-  ///is a data structure for storing items with specified values called \e
-  ///priorities in such a way that finding the item with minimum priority is
-  ///efficient. \c Compare specifies the ordering of the priorities. In a heap
-  ///one can change the priority of an item, add or erase an item, etc.
-  ///
-  ///\tparam _Prio Type of the priority of the items.
-  ///\tparam _ItemIntMap A read and writable Item int map, used internally
-  ///to handle the cross references.
-  ///\tparam _Compare A class for the ordering of the priorities. The
-  ///default is \c std::less<_Prio>.
-  ///
-  ///\sa FibHeap
-  ///\sa Dijkstra
-  template <typename _Prio, typename _ItemIntMap,
-            typename _Compare = std::less<_Prio> >
-  class BinHeap {
-
-  public:
-    ///\e
-    typedef _ItemIntMap ItemIntMap;
-    ///\e
-    typedef _Prio Prio;
-    ///\e
-    typedef typename ItemIntMap::Key Item;
-    ///\e
-    typedef std::pair<Item,Prio> Pair;
-    ///\e
-    typedef _Compare Compare;
-
-    /// \brief Type to represent the items states.
-    ///
-    /// Each Item element have a state associated to it. It may be "in heap",
-    /// "pre heap" or "post heap". The latter two are indifferent from the
-    /// heap's point of view, but may be useful to the user.
-    ///
-    /// The ItemIntMap \e should be initialized in such way that it maps
-    /// PRE_HEAP (-1) to any element to be put in the heap...
-    enum State {
-      IN_HEAP = 0,
-      PRE_HEAP = -1,
-      POST_HEAP = -2
-    };
-
-  private:
-    std::vector<Pair> data;
-    Compare comp;
-    ItemIntMap &iim;
-
-  public:
-    /// \brief The constructor.
-    ///
-    /// The constructor.
-    /// \param _iim should be given to the constructor, since it is used
-    /// internally to handle the cross references. The value of the map
-    /// should be PRE_HEAP (-1) for each element.
-    explicit BinHeap(ItemIntMap &_iim) : iim(_iim) {}
-
-    /// \brief The constructor.
-    ///
-    /// The constructor.
-    /// \param _iim should be given to the constructor, since it is used
-    /// internally to handle the cross references. The value of the map
-    /// should be PRE_HEAP (-1) for each element.
-    ///
-    /// \param _comp The comparator function object.
-    BinHeap(ItemIntMap &_iim, const Compare &_comp)
-      : iim(_iim), comp(_comp) {}
-
-
-    /// The number of items stored in the heap.
-    ///
-    /// \brief Returns the number of items stored in the heap.
-    int size() const { return data.size(); }
-
-    /// \brief Checks if the heap stores no items.
-    ///
-    /// Returns \c true if and only if the heap stores no items.
-    bool empty() const { return data.empty(); }
-
-    /// \brief Make empty this heap.
-    ///
-    /// Make empty this heap. It does not change the cross reference map.
-    /// If you want to reuse what is not surely empty you should first clear
-    /// the heap and after that you should set the cross reference map for
-    /// each item to \c PRE_HEAP.
-    void clear() {
-      data.clear();
-    }
-
-  private:
-    static int parent(int i) { return (i-1)/2; }
-
-    static int second_child(int i) { return 2*i+2; }
-    bool less(const Pair &p1, const Pair &p2) const {
-      return comp(p1.second, p2.second);
-    }
-
-    int bubble_up(int hole, Pair p) {
-      int par = parent(hole);
-      while( hole>0 && less(p,data[par]) ) {
-        move(data[par],hole);
-        hole = par;
-        par = parent(hole);
-      }
-      move(p, hole);
-      return hole;
-    }
-
-    int bubble_down(int hole, Pair p, int length) {
-      int child = second_child(hole);
-      while(child < length) {
-        if( less(data[child-1], data[child]) ) {
-          --child;
-        }
-        if( !less(data[child], p) )
-          goto ok;
-        move(data[child], hole);
-        hole = child;
-        child = second_child(hole);
-      }
-      child--;
-      if( child<length && less(data[child], p) ) {
-        move(data[child], hole);
-        hole=child;
-      }
-    ok:
-      move(p, hole);
-      return hole;
-    }
-
-    void move(const Pair &p, int i) {
-      data[i] = p;
-      iim.set(p.first, i);
-    }
-
-  public:
-    /// \brief Insert a pair of item and priority into the heap.
-    ///
-    /// Adds \c p.first to the heap with priority \c p.second.
-    /// \param p The pair to insert.
-    void push(const Pair &p) {
-      int n = data.size();
-      data.resize(n+1);
-      bubble_up(n, p);
-    }
-
-    /// \brief Insert an item into the heap with the given heap.
-    ///
-    /// Adds \c i to the heap with priority \c p.
-    /// \param i The item to insert.
-    /// \param p The priority of the item.
-    void push(const Item &i, const Prio &p) { push(Pair(i,p)); }
-
-    /// \brief Returns the item with minimum priority relative to \c Compare.
-    ///
-    /// This method returns the item with minimum priority relative to \c
-    /// Compare.
-    /// \pre The heap must be nonempty.
-    Item top() const {
-      return data[0].first;
-    }
-
-    /// \brief Returns the minimum priority relative to \c Compare.
-    ///
-    /// It returns the minimum priority relative to \c Compare.
-    /// \pre The heap must be nonempty.
-    Prio prio() const {
-      return data[0].second;
-    }
-
-    /// \brief Deletes the item with minimum priority relative to \c Compare.
-    ///
-    /// This method deletes the item with minimum priority relative to \c
-    /// Compare from the heap.
-    /// \pre The heap must be non-empty.
-    void pop() {
-      int n = data.size()-1;
-      iim.set(data[0].first, POST_HEAP);
-      if (n > 0) {
-        bubble_down(0, data[n], n);
-      }
-      data.pop_back();
-    }
-
-    /// \brief Deletes \c i from the heap.
-    ///
-    /// This method deletes item \c i from the heap.
-    /// \param i The item to erase.
-    /// \pre The item should be in the heap.
-    void erase(const Item &i) {
-      int h = iim[i];
-      int n = data.size()-1;
-      iim.set(data[h].first, POST_HEAP);
-      if( h < n ) {
-        if ( bubble_up(h, data[n]) == h) {
-          bubble_down(h, data[n], n);
-        }
-      }
-      data.pop_back();
-    }
-
-
-    /// \brief Returns the priority of \c i.
-    ///
-    /// This function returns the priority of item \c i.
-    /// \pre \c i must be in the heap.
-    /// \param i The item.
-    Prio operator[](const Item &i) const {
-      int idx = iim[i];
-      return data[idx].second;
-    }
-
-    /// \brief \c i gets to the heap with priority \c p independently
-    /// if \c i was already there.
-    ///
-    /// This method calls \ref push(\c i, \c p) if \c i is not stored
-    /// in the heap and sets the priority of \c i to \c p otherwise.
-    /// \param i The item.
-    /// \param p The priority.
-    void set(const Item &i, const Prio &p) {
-      int idx = iim[i];
-      if( idx < 0 ) {
-        push(i,p);
-      }
-      else if( comp(p, data[idx].second) ) {
-        bubble_up(idx, Pair(i,p));
-      }
-      else {
-        bubble_down(idx, Pair(i,p), data.size());
-      }
-    }
-
-    /// \brief Decreases the priority of \c i to \c p.
-    ///
-    /// This method decreases the priority of item \c i to \c p.
-    /// \pre \c i must be stored in the heap with priority at least \c
-    /// p relative to \c Compare.
-    /// \param i The item.
-    /// \param p The priority.
-    void decrease(const Item &i, const Prio &p) {
-      int idx = iim[i];
-      bubble_up(idx, Pair(i,p));
-    }
-
-    /// \brief Increases the priority of \c i to \c p.
-    ///
-    /// This method sets the priority of item \c i to \c p.
-    /// \pre \c i must be stored in the heap with priority at most \c
-    /// p relative to \c Compare.
-    /// \param i The item.
-    /// \param p The priority.
-    void increase(const Item &i, const Prio &p) {
-      int idx = iim[i];
-      bubble_down(idx, Pair(i,p), data.size());
-    }
-
-    /// \brief Returns if \c item is in, has already been in, or has
-    /// never been in the heap.
-    ///
-    /// This method returns PRE_HEAP if \c item has never been in the
-    /// heap, IN_HEAP if it is in the heap at the moment, and POST_HEAP
-    /// otherwise. In the latter case it is possible that \c item will
-    /// get back to the heap again.
-    /// \param i The item.
-    State state(const Item &i) const {
-      int s = iim[i];
-      if( s>=0 )
-        s=0;
-      return State(s);
-    }
-
-    /// \brief Sets the state of the \c item in the heap.
-    ///
-    /// Sets the state of the \c item in the heap. It can be used to
-    /// manually clear the heap when it is important to achive the
-    /// better time complexity.
-    /// \param i The item.
-    /// \param st The state. It should not be \c IN_HEAP.
-    void state(const Item& i, State st) {
-      switch (st) {
-      case POST_HEAP:
-      case PRE_HEAP:
-        if (state(i) == IN_HEAP) {
-          erase(i);
-        }
-        iim[i] = st;
-        break;
-      case IN_HEAP:
-        break;
-      }
-    }
-
-    /// \brief Replaces an item in the heap.
-    ///
-    /// The \c i item is replaced with \c j item. The \c i item should
-    /// be in the heap, while the \c j should be out of the heap. The
-    /// \c i item will out of the heap and \c j will be in the heap
-    /// with the same prioriority as prevoiusly the \c i item.
-    void replace(const Item& i, const Item& j) {
-      int idx = iim[i];
-      iim.set(i, iim[j]);
-      iim.set(j, idx);
-      data[idx].first = j;
-    }
-
-  }; // class BinHeap
-
-} // namespace lemon
-
-#endif // LEMON_BIN_HEAP_H
Index: mon/bits/alteration_notifier.h
===================================================================
--- lemon/bits/alteration_notifier.h	(revision 318)
+++ 	(revision )
@@ -1,467 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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/core.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 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.
-
-  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.
-    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)->_index = _observers.end();
-          (*it)->_notifier = 0;
-          it = _observers.erase(it);
-        }
-      }
-    }
-
-    // \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)->_index = _observers.end();
-          (*it)->_notifier = 0;
-          it = _observers.erase(it);
-        }
-      }
-    }
-
-    // \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)->_index = _observers.end();
-          (*it)->_notifier = 0;
-          it = _observers.erase(it);
-        }
-      }
-    }
-  };
-
-}
-
-#endif
Index: mon/bits/array_map.h
===================================================================
--- lemon/bits/array_map.h	(revision 318)
+++ 	(revision )
@@ -1,348 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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);
-      }
-    }
-
-  private:
-    // \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;
-    }
-
-  public:
-    // \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: mon/bits/base_extender.h
===================================================================
--- lemon/bits/base_extender.h	(revision 318)
+++ 	(revision )
@@ -1,494 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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/core.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 digraphbits
-//\file
-//\brief Extenders for the digraph types
-namespace lemon {
-
-  // \ingroup digraphbits
-  //
-  // \brief BaseDigraph to BaseGraph extender
-  template <typename Base>
-  class UndirDigraphExtender : public Base {
-
-  public:
-
-    typedef Base Parent;
-    typedef typename Parent::Arc Edge;
-    typedef typename Parent::Node Node;
-
-    typedef True UndirectedTag;
-
-    class Arc : public Edge {
-      friend class UndirDigraphExtender;
-
-    protected:
-      bool forward;
-
-      Arc(const Edge &ue, bool _forward) :
-        Edge(ue), forward(_forward) {}
-
-    public:
-      Arc() {}
-
-      // Invalid arc constructor
-      Arc(Invalid i) : Edge(i), forward(true) {}
-
-      bool operator==(const Arc &that) const {
-        return forward==that.forward && Edge(*this)==Edge(that);
-      }
-      bool operator!=(const Arc &that) const {
-        return forward!=that.forward || Edge(*this)!=Edge(that);
-      }
-      bool operator<(const Arc &that) const {
-        return forward<that.forward ||
-          (!(that.forward<forward) && Edge(*this)<Edge(that));
-      }
-    };
-
-    // First node of the edge
-    Node u(const Edge &e) const {
-      return Parent::source(e);
-    }
-
-    // Source of the given arc
-    Node source(const Arc &e) const {
-      return e.forward ? Parent::source(e) : Parent::target(e);
-    }
-
-    // Second node of the edge
-    Node v(const Edge &e) const {
-      return Parent::target(e);
-    }
-
-    // Target of the given arc
-    Node target(const Arc &e) const {
-      return e.forward ? Parent::target(e) : Parent::source(e);
-    }
-
-    // \brief Directed arc from an edge.
-    //
-    // Returns a directed arc corresponding to the specified edge.
-    // If the given bool is true, the first node of the given edge and
-    // the source node of the returned arc are the same.
-    static Arc direct(const Edge &e, bool d) {
-      return Arc(e, d);
-    }
-
-    // Returns whether the given directed arc has the same orientation
-    // as the corresponding edge.
-    static bool direction(const Arc &a) { return a.forward; }
-
-    using Parent::first;
-    using Parent::next;
-
-    void first(Arc &e) const {
-      Parent::first(e);
-      e.forward=true;
-    }
-
-    void next(Arc &e) const {
-      if( e.forward ) {
-        e.forward = false;
-      }
-      else {
-        Parent::next(e);
-        e.forward = true;
-      }
-    }
-
-    void firstOut(Arc &e, const Node &n) const {
-      Parent::firstIn(e,n);
-      if( Edge(e) != INVALID ) {
-        e.forward = false;
-      }
-      else {
-        Parent::firstOut(e,n);
-        e.forward = true;
-      }
-    }
-    void nextOut(Arc &e) const {
-      if( ! e.forward ) {
-        Node n = Parent::target(e);
-        Parent::nextIn(e);
-        if( Edge(e) == INVALID ) {
-          Parent::firstOut(e, n);
-          e.forward = true;
-        }
-      }
-      else {
-        Parent::nextOut(e);
-      }
-    }
-
-    void firstIn(Arc &e, const Node &n) const {
-      Parent::firstOut(e,n);
-      if( Edge(e) != INVALID ) {
-        e.forward = false;
-      }
-      else {
-        Parent::firstIn(e,n);
-        e.forward = true;
-      }
-    }
-    void nextIn(Arc &e) const {
-      if( ! e.forward ) {
-        Node n = Parent::source(e);
-        Parent::nextOut(e);
-        if( Edge(e) == INVALID ) {
-          Parent::firstIn(e, n);
-          e.forward = true;
-        }
-      }
-      else {
-        Parent::nextIn(e);
-      }
-    }
-
-    void firstInc(Edge &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(Edge &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);
-    }
-
-    Arc arcFromId(int ix) const {
-      return direct(Parent::arcFromId(ix >> 1), bool(ix & 1));
-    }
-
-    Edge edgeFromId(int ix) const {
-      return Parent::arcFromId(ix);
-    }
-
-    int id(const Node &n) const {
-      return Parent::id(n);
-    }
-
-    int id(const Edge &e) const {
-      return Parent::id(e);
-    }
-
-    int id(const Arc &e) const {
-      return 2 * Parent::id(e) + int(e.forward);
-    }
-
-    int maxNodeId() const {
-      return Parent::maxNodeId();
-    }
-
-    int maxArcId() const {
-      return 2 * Parent::maxArcId() + 1;
-    }
-
-    int maxEdgeId() const {
-      return Parent::maxArcId();
-    }
-
-    int arcNum() const {
-      return 2 * Parent::arcNum();
-    }
-
-    int edgeNum() const {
-      return Parent::arcNum();
-    }
-
-    Arc findArc(Node s, Node t, Arc p = INVALID) const {
-      if (p == INVALID) {
-        Edge arc = Parent::findArc(s, t);
-        if (arc != INVALID) return direct(arc, true);
-        arc = Parent::findArc(t, s);
-        if (arc != INVALID) return direct(arc, false);
-      } else if (direction(p)) {
-        Edge arc = Parent::findArc(s, t, p);
-        if (arc != INVALID) return direct(arc, true);
-        arc = Parent::findArc(t, s);
-        if (arc != INVALID) return direct(arc, false);
-      } else {
-        Edge arc = Parent::findArc(t, s, p);
-        if (arc != INVALID) return direct(arc, false);
-      }
-      return INVALID;
-    }
-
-    Edge findEdge(Node s, Node t, Edge p = INVALID) const {
-      if (s != t) {
-        if (p == INVALID) {
-          Edge arc = Parent::findArc(s, t);
-          if (arc != INVALID) return arc;
-          arc = Parent::findArc(t, s);
-          if (arc != INVALID) return arc;
-        } else if (Parent::s(p) == s) {
-          Edge arc = Parent::findArc(s, t, p);
-          if (arc != INVALID) return arc;
-          arc = Parent::findArc(t, s);
-          if (arc != INVALID) return arc;
-        } else {
-          Edge arc = Parent::findArc(t, s, p);
-          if (arc != INVALID) return arc;
-        }
-      } else {
-        return Parent::findArc(s, t, p);
-      }
-      return INVALID;
-    }
-  };
-
-  template <typename Base>
-  class BidirBpGraphExtender : public Base {
-  public:
-    typedef Base Parent;
-    typedef BidirBpGraphExtender Digraph;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Edge Edge;
-
-
-    using Parent::first;
-    using Parent::next;
-
-    using Parent::id;
-
-    class Red : public Node {
-      friend class BidirBpGraphExtender;
-    public:
-      Red() {}
-      Red(const Node& node) : Node(node) {
-        LEMON_DEBUG(Parent::red(node) || node == INVALID,
-                    typename Parent::NodeSetError());
-      }
-      Red& operator=(const Node& node) {
-        LEMON_DEBUG(Parent::red(node) || node == INVALID,
-                    typename Parent::NodeSetError());
-        Node::operator=(node);
-        return *this;
-      }
-      Red(Invalid) : Node(INVALID) {}
-      Red& operator=(Invalid) {
-        Node::operator=(INVALID);
-        return *this;
-      }
-    };
-
-    void first(Red& node) const {
-      Parent::firstRed(static_cast<Node&>(node));
-    }
-    void next(Red& node) const {
-      Parent::nextRed(static_cast<Node&>(node));
-    }
-
-    int id(const Red& node) const {
-      return Parent::redId(node);
-    }
-
-    class Blue : public Node {
-      friend class BidirBpGraphExtender;
-    public:
-      Blue() {}
-      Blue(const Node& node) : Node(node) {
-        LEMON_DEBUG(Parent::blue(node) || node == INVALID,
-                    typename Parent::NodeSetError());
-      }
-      Blue& operator=(const Node& node) {
-        LEMON_DEBUG(Parent::blue(node) || node == INVALID,
-                    typename Parent::NodeSetError());
-        Node::operator=(node);
-        return *this;
-      }
-      Blue(Invalid) : Node(INVALID) {}
-      Blue& operator=(Invalid) {
-        Node::operator=(INVALID);
-        return *this;
-      }
-    };
-
-    void first(Blue& node) const {
-      Parent::firstBlue(static_cast<Node&>(node));
-    }
-    void next(Blue& node) const {
-      Parent::nextBlue(static_cast<Node&>(node));
-    }
-
-    int id(const Blue& node) const {
-      return Parent::redId(node);
-    }
-
-    Node source(const Edge& arc) const {
-      return red(arc);
-    }
-    Node target(const Edge& arc) const {
-      return blue(arc);
-    }
-
-    void firstInc(Edge& arc, bool& dir, const Node& node) const {
-      if (Parent::red(node)) {
-        Parent::firstFromRed(arc, node);
-        dir = true;
-      } else {
-        Parent::firstFromBlue(arc, node);
-        dir = static_cast<Edge&>(arc) == INVALID;
-      }
-    }
-    void nextInc(Edge& arc, bool& dir) const {
-      if (dir) {
-        Parent::nextFromRed(arc);
-      } else {
-        Parent::nextFromBlue(arc);
-        if (arc == INVALID) dir = true;
-      }
-    }
-
-    class Arc : public Edge {
-      friend class BidirBpGraphExtender;
-    protected:
-      bool forward;
-
-      Arc(const Edge& arc, bool _forward)
-        : Edge(arc), forward(_forward) {}
-
-    public:
-      Arc() {}
-      Arc (Invalid) : Edge(INVALID), forward(true) {}
-      bool operator==(const Arc& i) const {
-        return Edge::operator==(i) && forward == i.forward;
-      }
-      bool operator!=(const Arc& i) const {
-        return Edge::operator!=(i) || forward != i.forward;
-      }
-      bool operator<(const Arc& i) const {
-        return Edge::operator<(i) ||
-          (!(i.forward<forward) && Edge(*this)<Edge(i));
-      }
-    };
-
-    void first(Arc& arc) const {
-      Parent::first(static_cast<Edge&>(arc));
-      arc.forward = true;
-    }
-
-    void next(Arc& arc) const {
-      if (!arc.forward) {
-        Parent::next(static_cast<Edge&>(arc));
-      }
-      arc.forward = !arc.forward;
-    }
-
-    void firstOut(Arc& arc, const Node& node) const {
-      if (Parent::red(node)) {
-        Parent::firstFromRed(arc, node);
-        arc.forward = true;
-      } else {
-        Parent::firstFromBlue(arc, node);
-        arc.forward = static_cast<Edge&>(arc) == INVALID;
-      }
-    }
-    void nextOut(Arc& arc) const {
-      if (arc.forward) {
-        Parent::nextFromRed(arc);
-      } else {
-        Parent::nextFromBlue(arc);
-        arc.forward = static_cast<Edge&>(arc) == INVALID;
-      }
-    }
-
-    void firstIn(Arc& arc, const Node& node) const {
-      if (Parent::blue(node)) {
-        Parent::firstFromBlue(arc, node);
-        arc.forward = true;
-      } else {
-        Parent::firstFromRed(arc, node);
-        arc.forward = static_cast<Edge&>(arc) == INVALID;
-      }
-    }
-    void nextIn(Arc& arc) const {
-      if (arc.forward) {
-        Parent::nextFromBlue(arc);
-      } else {
-        Parent::nextFromRed(arc);
-        arc.forward = static_cast<Edge&>(arc) == INVALID;
-      }
-    }
-
-    Node source(const Arc& arc) const {
-      return arc.forward ? Parent::red(arc) : Parent::blue(arc);
-    }
-    Node target(const Arc& arc) const {
-      return arc.forward ? Parent::blue(arc) : Parent::red(arc);
-    }
-
-    int id(const Arc& arc) const {
-      return (Parent::id(static_cast<const Edge&>(arc)) << 1) +
-        (arc.forward ? 0 : 1);
-    }
-    Arc arcFromId(int ix) const {
-      return Arc(Parent::fromEdgeId(ix >> 1), (ix & 1) == 0);
-    }
-    int maxArcId() const {
-      return (Parent::maxEdgeId() << 1) + 1;
-    }
-
-    bool direction(const Arc& arc) const {
-      return arc.forward;
-    }
-
-    Arc direct(const Edge& arc, bool dir) const {
-      return Arc(arc, dir);
-    }
-
-    int arcNum() const {
-      return 2 * Parent::edgeNum();
-    }
-
-    int edgeNum() const {
-      return Parent::edgeNum();
-    }
-
-
-  };
-}
-
-#endif
Index: mon/bits/bezier.h
===================================================================
--- lemon/bits/bezier.h	(revision 318)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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
-
-#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: mon/bits/default_map.h
===================================================================
--- lemon/bits/default_map.h	(revision 427)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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/config.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 LEMON_HAVE_LONG_LONG
-
-  // 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
-
-  // DefaultMap class
-  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: mon/bits/enable_if.h
===================================================================
--- lemon/bits/enable_if.h	(revision 318)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 (c) 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 Jarvi (jajarvi at osl.iu.edu)
-//             Jeremiah Willcock (jewillco at osl.iu.edu)
-//             Andrew Lumsdaine (lums at osl.iu.edu)
-
-
-#ifndef LEMON_BITS_ENABLE_IF_H
-#define LEMON_BITS_ENABLE_IF_H
-
-//\file
-//\brief Miscellaneous basic utilities
-
-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
-  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;
-  };
-
-
-
-  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: mon/bits/graph_extender.h
===================================================================
--- lemon/bits/graph_extender.h	(revision 318)
+++ 	(revision )
@@ -1,754 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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/core.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 digraph types
-namespace lemon {
-
-  // \ingroup graphbits
-  //
-  // \brief Extender for the Digraphs
-  template <typename Base>
-  class DigraphExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef DigraphExtender Digraph;
-
-    // Base extensions
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Arc Arc;
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Arc) const {
-      return Parent::maxArcId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Arc fromId(int id, Arc) const {
-      return Parent::arcFromId(id);
-    }
-
-    Node oppositeNode(const Node &node, const Arc &arc) const {
-      if (node == Parent::source(arc))
-        return Parent::target(arc);
-      else if(node == Parent::target(arc))
-        return Parent::source(arc);
-      else
-        return INVALID;
-    }
-
-    // Alterable extension
-
-    typedef AlterationNotifier<DigraphExtender, Node> NodeNotifier;
-    typedef AlterationNotifier<DigraphExtender, Arc> ArcNotifier;
-
-
-  protected:
-
-    mutable NodeNotifier node_notifier;
-    mutable ArcNotifier arc_notifier;
-
-  public:
-
-    NodeNotifier& notifier(Node) const {
-      return node_notifier;
-    }
-
-    ArcNotifier& notifier(Arc) const {
-      return arc_notifier;
-    }
-
-    class NodeIt : public Node {
-      const Digraph* _digraph;
-    public:
-
-      NodeIt() {}
-
-      NodeIt(Invalid i) : Node(i) { }
-
-      explicit NodeIt(const Digraph& digraph) : _digraph(&digraph) {
-        _digraph->first(static_cast<Node&>(*this));
-      }
-
-      NodeIt(const Digraph& digraph, const Node& node)
-        : Node(node), _digraph(&digraph) {}
-
-      NodeIt& operator++() {
-        _digraph->next(*this);
-        return *this;
-      }
-
-    };
-
-
-    class ArcIt : public Arc {
-      const Digraph* _digraph;
-    public:
-
-      ArcIt() { }
-
-      ArcIt(Invalid i) : Arc(i) { }
-
-      explicit ArcIt(const Digraph& digraph) : _digraph(&digraph) {
-        _digraph->first(static_cast<Arc&>(*this));
-      }
-
-      ArcIt(const Digraph& digraph, const Arc& arc) :
-        Arc(arc), _digraph(&digraph) { }
-
-      ArcIt& operator++() {
-        _digraph->next(*this);
-        return *this;
-      }
-
-    };
-
-
-    class OutArcIt : public Arc {
-      const Digraph* _digraph;
-    public:
-
-      OutArcIt() { }
-
-      OutArcIt(Invalid i) : Arc(i) { }
-
-      OutArcIt(const Digraph& digraph, const Node& node)
-        : _digraph(&digraph) {
-        _digraph->firstOut(*this, node);
-      }
-
-      OutArcIt(const Digraph& digraph, const Arc& arc)
-        : Arc(arc), _digraph(&digraph) {}
-
-      OutArcIt& operator++() {
-        _digraph->nextOut(*this);
-        return *this;
-      }
-
-    };
-
-
-    class InArcIt : public Arc {
-      const Digraph* _digraph;
-    public:
-
-      InArcIt() { }
-
-      InArcIt(Invalid i) : Arc(i) { }
-
-      InArcIt(const Digraph& digraph, const Node& node)
-        : _digraph(&digraph) {
-        _digraph->firstIn(*this, node);
-      }
-
-      InArcIt(const Digraph& digraph, const Arc& arc) :
-        Arc(arc), _digraph(&digraph) {}
-
-      InArcIt& operator++() {
-        _digraph->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 OutArcIt &arc) const {
-      return Parent::source(arc);
-    }
-    // \brief Running node of the iterator
-    //
-    // Returns the running node (i.e. the target in this case) of the
-    // iterator
-    Node runningNode(const OutArcIt &arc) const {
-      return Parent::target(arc);
-    }
-
-    // \brief Base node of the iterator
-    //
-    // Returns the base node (i.e. the target in this case) of the iterator
-    Node baseNode(const InArcIt &arc) const {
-      return Parent::target(arc);
-    }
-    // \brief Running node of the iterator
-    //
-    // Returns the running node (i.e. the source in this case) of the
-    // iterator
-    Node runningNode(const InArcIt &arc) const {
-      return Parent::source(arc);
-    }
-
-
-    template <typename _Value>
-    class NodeMap
-      : public MapExtender<DefaultMap<Digraph, Node, _Value> > {
-    public:
-      typedef DigraphExtender Digraph;
-      typedef MapExtender<DefaultMap<Digraph, Node, _Value> > Parent;
-
-      explicit NodeMap(const Digraph& digraph)
-        : Parent(digraph) {}
-      NodeMap(const Digraph& digraph, const _Value& value)
-        : Parent(digraph, value) {}
-
-    private:
-      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 ArcMap
-      : public MapExtender<DefaultMap<Digraph, Arc, _Value> > {
-    public:
-      typedef DigraphExtender Digraph;
-      typedef MapExtender<DefaultMap<Digraph, Arc, _Value> > Parent;
-
-      explicit ArcMap(const Digraph& digraph)
-        : Parent(digraph) {}
-      ArcMap(const Digraph& digraph, const _Value& value)
-        : Parent(digraph, value) {}
-
-    private:
-      ArcMap& operator=(const ArcMap& cmap) {
-        return operator=<ArcMap>(cmap);
-      }
-
-      template <typename CMap>
-      ArcMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-        return *this;
-      }
-    };
-
-
-    Node addNode() {
-      Node node = Parent::addNode();
-      notifier(Node()).add(node);
-      return node;
-    }
-
-    Arc addArc(const Node& from, const Node& to) {
-      Arc arc = Parent::addArc(from, to);
-      notifier(Arc()).add(arc);
-      return arc;
-    }
-
-    void clear() {
-      notifier(Arc()).clear();
-      notifier(Node()).clear();
-      Parent::clear();
-    }
-
-    template <typename Digraph, typename NodeRefMap, typename ArcRefMap>
-    void build(const Digraph& digraph, NodeRefMap& nodeRef, ArcRefMap& arcRef) {
-      Parent::build(digraph, nodeRef, arcRef);
-      notifier(Node()).build();
-      notifier(Arc()).build();
-    }
-
-    void erase(const Node& node) {
-      Arc arc;
-      Parent::firstOut(arc, node);
-      while (arc != INVALID ) {
-        erase(arc);
-        Parent::firstOut(arc, node);
-      }
-
-      Parent::firstIn(arc, node);
-      while (arc != INVALID ) {
-        erase(arc);
-        Parent::firstIn(arc, node);
-      }
-
-      notifier(Node()).erase(node);
-      Parent::erase(node);
-    }
-
-    void erase(const Arc& arc) {
-      notifier(Arc()).erase(arc);
-      Parent::erase(arc);
-    }
-
-    DigraphExtender() {
-      node_notifier.setContainer(*this);
-      arc_notifier.setContainer(*this);
-    }
-
-
-    ~DigraphExtender() {
-      arc_notifier.clear();
-      node_notifier.clear();
-    }
-  };
-
-  // \ingroup _graphbits
-  //
-  // \brief Extender for the Graphs
-  template <typename Base>
-  class GraphExtender : public Base {
-  public:
-
-    typedef Base Parent;
-    typedef GraphExtender Graph;
-
-    typedef True UndirectedTag;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::Arc Arc;
-    typedef typename Parent::Edge Edge;
-
-    // Graph extension
-
-    int maxId(Node) const {
-      return Parent::maxNodeId();
-    }
-
-    int maxId(Arc) const {
-      return Parent::maxArcId();
-    }
-
-    int maxId(Edge) const {
-      return Parent::maxEdgeId();
-    }
-
-    Node fromId(int id, Node) const {
-      return Parent::nodeFromId(id);
-    }
-
-    Arc fromId(int id, Arc) const {
-      return Parent::arcFromId(id);
-    }
-
-    Edge fromId(int id, Edge) const {
-      return Parent::edgeFromId(id);
-    }
-
-    Node oppositeNode(const Node &n, const Edge &e) const {
-      if( n == Parent::u(e))
-        return Parent::v(e);
-      else if( n == Parent::v(e))
-        return Parent::u(e);
-      else
-        return INVALID;
-    }
-
-    Arc oppositeArc(const Arc &arc) const {
-      return Parent::direct(arc, !Parent::direction(arc));
-    }
-
-    using Parent::direct;
-    Arc direct(const Edge &edge, const Node &node) const {
-      return Parent::direct(edge, Parent::u(edge) == node);
-    }
-
-    // Alterable extension
-
-    typedef AlterationNotifier<GraphExtender, Node> NodeNotifier;
-    typedef AlterationNotifier<GraphExtender, Arc> ArcNotifier;
-    typedef AlterationNotifier<GraphExtender, Edge> EdgeNotifier;
-
-
-  protected:
-
-    mutable NodeNotifier node_notifier;
-    mutable ArcNotifier arc_notifier;
-    mutable EdgeNotifier edge_notifier;
-
-  public:
-
-    NodeNotifier& notifier(Node) const {
-      return node_notifier;
-    }
-
-    ArcNotifier& notifier(Arc) const {
-      return arc_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 ArcIt : public Arc {
-      const Graph* _graph;
-    public:
-
-      ArcIt() { }
-
-      ArcIt(Invalid i) : Arc(i) { }
-
-      explicit ArcIt(const Graph& graph) : _graph(&graph) {
-        _graph->first(static_cast<Arc&>(*this));
-      }
-
-      ArcIt(const Graph& graph, const Arc& arc) :
-        Arc(arc), _graph(&graph) { }
-
-      ArcIt& operator++() {
-        _graph->next(*this);
-        return *this;
-      }
-
-    };
-
-
-    class OutArcIt : public Arc {
-      const Graph* _graph;
-    public:
-
-      OutArcIt() { }
-
-      OutArcIt(Invalid i) : Arc(i) { }
-
-      OutArcIt(const Graph& graph, const Node& node)
-        : _graph(&graph) {
-        _graph->firstOut(*this, node);
-      }
-
-      OutArcIt(const Graph& graph, const Arc& arc)
-        : Arc(arc), _graph(&graph) {}
-
-      OutArcIt& operator++() {
-        _graph->nextOut(*this);
-        return *this;
-      }
-
-    };
-
-
-    class InArcIt : public Arc {
-      const Graph* _graph;
-    public:
-
-      InArcIt() { }
-
-      InArcIt(Invalid i) : Arc(i) { }
-
-      InArcIt(const Graph& graph, const Node& node)
-        : _graph(&graph) {
-        _graph->firstIn(*this, node);
-      }
-
-      InArcIt(const Graph& graph, const Arc& arc) :
-        Arc(arc), _graph(&graph) {}
-
-      InArcIt& operator++() {
-        _graph->nextIn(*this);
-        return *this;
-      }
-
-    };
-
-
-    class EdgeIt : public Parent::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& edge) :
-        Edge(edge), _graph(&graph) { }
-
-      EdgeIt& operator++() {
-        _graph->next(*this);
-        return *this;
-      }
-
-    };
-
-    class IncEdgeIt : public Parent::Edge {
-      friend class GraphExtender;
-      const Graph* _graph;
-      bool _direction;
-    public:
-
-      IncEdgeIt() { }
-
-      IncEdgeIt(Invalid i) : Edge(i), _direction(false) { }
-
-      IncEdgeIt(const Graph& graph, const Node &node) : _graph(&graph) {
-        _graph->firstInc(*this, _direction, node);
-      }
-
-      IncEdgeIt(const Graph& graph, const Edge &edge, const Node &node)
-        : _graph(&graph), Edge(edge) {
-        _direction = (_graph->source(edge) == node);
-      }
-
-      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 OutArcIt &arc) const {
-      return Parent::source(static_cast<const Arc&>(arc));
-    }
-    // \brief Running node of the iterator
-    //
-    // Returns the running node (ie. the target in this case) of the
-    // iterator
-    Node runningNode(const OutArcIt &arc) const {
-      return Parent::target(static_cast<const Arc&>(arc));
-    }
-
-    // \brief Base node of the iterator
-    //
-    // Returns the base node (ie. the target in this case) of the iterator
-    Node baseNode(const InArcIt &arc) const {
-      return Parent::target(static_cast<const Arc&>(arc));
-    }
-    // \brief Running node of the iterator
-    //
-    // Returns the running node (ie. the source in this case) of the
-    // iterator
-    Node runningNode(const InArcIt &arc) const {
-      return Parent::source(static_cast<const Arc&>(arc));
-    }
-
-    // Base node of the iterator
-    //
-    // Returns the base node of the iterator
-    Node baseNode(const IncEdgeIt &edge) const {
-      return edge._direction ? u(edge) : v(edge);
-    }
-    // Running node of the iterator
-    //
-    // Returns the running node of the iterator
-    Node runningNode(const IncEdgeIt &edge) const {
-      return edge._direction ? v(edge) : u(edge);
-    }
-
-    // Mappable extension
-
-    template <typename _Value>
-    class NodeMap
-      : public MapExtender<DefaultMap<Graph, Node, _Value> > {
-    public:
-      typedef GraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Node, _Value> > Parent;
-
-      NodeMap(const Graph& graph)
-        : Parent(graph) {}
-      NodeMap(const Graph& graph, const _Value& value)
-        : Parent(graph, value) {}
-
-    private:
-      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 ArcMap
-      : public MapExtender<DefaultMap<Graph, Arc, _Value> > {
-    public:
-      typedef GraphExtender Graph;
-      typedef MapExtender<DefaultMap<Graph, Arc, _Value> > Parent;
-
-      ArcMap(const Graph& graph)
-        : Parent(graph) {}
-      ArcMap(const Graph& graph, const _Value& value)
-        : Parent(graph, value) {}
-
-    private:
-      ArcMap& operator=(const ArcMap& cmap) {
-        return operator=<ArcMap>(cmap);
-      }
-
-      template <typename CMap>
-      ArcMap& 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;
-
-      EdgeMap(const Graph& graph)
-        : Parent(graph) {}
-
-      EdgeMap(const Graph& graph, const _Value& value)
-        : Parent(graph, value) {}
-
-    private:
-      EdgeMap& operator=(const EdgeMap& cmap) {
-        return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-        Parent::operator=(cmap);
-        return *this;
-      }
-
-    };
-
-    // Alteration extension
-
-    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);
-      std::vector<Arc> ev;
-      ev.push_back(Parent::direct(edge, true));
-      ev.push_back(Parent::direct(edge, false));
-      notifier(Arc()).add(ev);
-      return edge;
-    }
-
-    void clear() {
-      notifier(Arc()).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();
-      notifier(Arc()).build();
-    }
-
-    void erase(const Node& node) {
-      Arc arc;
-      Parent::firstOut(arc, node);
-      while (arc != INVALID ) {
-        erase(arc);
-        Parent::firstOut(arc, node);
-      }
-
-      Parent::firstIn(arc, node);
-      while (arc != INVALID ) {
-        erase(arc);
-        Parent::firstIn(arc, node);
-      }
-
-      notifier(Node()).erase(node);
-      Parent::erase(node);
-    }
-
-    void erase(const Edge& edge) {
-      std::vector<Arc> av;
-      av.push_back(Parent::direct(edge, true));
-      av.push_back(Parent::direct(edge, false));
-      notifier(Arc()).erase(av);
-      notifier(Edge()).erase(edge);
-      Parent::erase(edge);
-    }
-
-    GraphExtender() {
-      node_notifier.setContainer(*this);
-      arc_notifier.setContainer(*this);
-      edge_notifier.setContainer(*this);
-    }
-
-    ~GraphExtender() {
-      edge_notifier.clear();
-      arc_notifier.clear();
-      node_notifier.clear();
-    }
-
-  };
-
-}
-
-#endif
Index: mon/bits/map_extender.h
===================================================================
--- lemon/bits/map_extender.h	(revision 427)
+++ 	(revision )
@@ -1,325 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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) {}
-
-  private:
-    MapExtender& operator=(const MapExtender& cmap) {
-      return operator=<MapExtender>(cmap);
-    }
-
-    template <typename CMap>
-    MapExtender& operator=(const CMap& cmap) {
-      Parent::operator=(cmap);
-      return *this;
-    }
-
-  public:
-    class MapIt : public Item {
-    public:
-
-      typedef Item Parent;
-      typedef typename Map::Value Value;
-
-      MapIt() : map(NULL) {}
-
-      MapIt(Invalid i) : Parent(i), map(NULL) {}
-
-      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() : map(NULL) {}
-
-      ConstMapIt(Invalid i) : Parent(i), map(NULL) {}
-
-      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() : map(NULL) {}
-
-      ItemIt(Invalid i) : Parent(i), map(NULL) {}
-
-      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) {}
-
-  private:
-    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;
-    }
-
-  public:
-    class MapIt : public Item {
-    public:
-
-      typedef Item Parent;
-      typedef typename Map::Value Value;
-
-      MapIt() : map(NULL) {}
-
-      MapIt(Invalid i) : Parent(i), map(NULL) { }
-
-      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() : map(NULL) {}
-
-      ConstMapIt(Invalid i) : Parent(i), map(NULL) { }
-
-      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() : map(NULL) {}
-
-      ItemIt(Invalid i) : Parent(i), map(NULL) { }
-
-      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: mon/bits/path_dump.h
===================================================================
--- lemon/bits/path_dump.h	(revision 427)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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 _Digraph, typename _PredMap>
-  class PredMapPath {
-  public:
-    typedef True RevPathTag;
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef _PredMap PredMap;
-
-    PredMapPath(const Digraph& _digraph, const PredMap& _predMap,
-                typename Digraph::Node _target)
-      : digraph(_digraph), predMap(_predMap), target(_target) {}
-
-    int length() const {
-      int len = 0;
-      typename Digraph::Node node = target;
-      typename Digraph::Arc arc;
-      while ((arc = predMap[node]) != INVALID) {
-        node = digraph.source(arc);
-        ++len;
-      }
-      return len;
-    }
-
-    bool empty() const {
-      return predMap[target] == INVALID;
-    }
-
-    class RevArcIt {
-    public:
-      RevArcIt() {}
-      RevArcIt(Invalid) : path(0), current(INVALID) {}
-      RevArcIt(const PredMapPath& _path)
-        : path(&_path), current(_path.target) {
-        if (path->predMap[current] == INVALID) current = INVALID;
-      }
-
-      operator const typename Digraph::Arc() const {
-        return path->predMap[current];
-      }
-
-      RevArcIt& operator++() {
-        current = path->digraph.source(path->predMap[current]);
-        if (path->predMap[current] == INVALID) current = INVALID;
-        return *this;
-      }
-
-      bool operator==(const RevArcIt& e) const {
-        return current == e.current;
-      }
-
-      bool operator!=(const RevArcIt& e) const {
-        return current != e.current;
-      }
-
-      bool operator<(const RevArcIt& e) const {
-        return current < e.current;
-      }
-
-    private:
-      const PredMapPath* path;
-      typename Digraph::Node current;
-    };
-
-  private:
-    const Digraph& digraph;
-    const PredMap& predMap;
-    typename Digraph::Node target;
-  };
-
-
-  template <typename _Digraph, typename _PredMatrixMap>
-  class PredMatrixMapPath {
-  public:
-    typedef True RevPathTag;
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef _PredMatrixMap PredMatrixMap;
-
-    PredMatrixMapPath(const Digraph& _digraph,
-                      const PredMatrixMap& _predMatrixMap,
-                      typename Digraph::Node _source,
-                      typename Digraph::Node _target)
-      : digraph(_digraph), predMatrixMap(_predMatrixMap),
-        source(_source), target(_target) {}
-
-    int length() const {
-      int len = 0;
-      typename Digraph::Node node = target;
-      typename Digraph::Arc arc;
-      while ((arc = predMatrixMap(source, node)) != INVALID) {
-        node = digraph.source(arc);
-        ++len;
-      }
-      return len;
-    }
-
-    bool empty() const {
-      return predMatrixMap(source, target) == INVALID;
-    }
-
-    class RevArcIt {
-    public:
-      RevArcIt() {}
-      RevArcIt(Invalid) : path(0), current(INVALID) {}
-      RevArcIt(const PredMatrixMapPath& _path)
-        : path(&_path), current(_path.target) {
-        if (path->predMatrixMap(path->source, current) == INVALID)
-          current = INVALID;
-      }
-
-      operator const typename Digraph::Arc() const {
-        return path->predMatrixMap(path->source, current);
-      }
-
-      RevArcIt& operator++() {
-        current =
-          path->digraph.source(path->predMatrixMap(path->source, current));
-        if (path->predMatrixMap(path->source, current) == INVALID)
-          current = INVALID;
-        return *this;
-      }
-
-      bool operator==(const RevArcIt& e) const {
-        return current == e.current;
-      }
-
-      bool operator!=(const RevArcIt& e) const {
-        return current != e.current;
-      }
-
-      bool operator<(const RevArcIt& e) const {
-        return current < e.current;
-      }
-
-    private:
-      const PredMatrixMapPath* path;
-      typename Digraph::Node current;
-    };
-
-  private:
-    const Digraph& digraph;
-    const PredMatrixMap& predMatrixMap;
-    typename Digraph::Node source;
-    typename Digraph::Node target;
-  };
-
-}
-
-#endif
Index: mon/bits/traits.h
===================================================================
--- lemon/bits/traits.h	(revision 318)
+++ 	(revision )
@@ -1,274 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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
-
-//\file
-//\brief Traits for graphs and maps
-//
-
-#include <lemon/bits/enable_if.h>
-
-namespace lemon {
-
-  struct InvalidType {};
-
-  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& _digraph) : Parent(_digraph) {}
-      Map(const Graph& _digraph, const Value& _value)
-        : Parent(_digraph, _value) {}
-
-     };
-
-  };
-
-  template <typename Graph, typename Enable = void>
-  struct ArcNotifierIndicator {
-    typedef InvalidType Type;
-  };
-  template <typename Graph>
-  struct ArcNotifierIndicator<
-    Graph,
-    typename enable_if<typename Graph::ArcNotifier::Notifier, void>::type
-  > {
-    typedef typename Graph::ArcNotifier Type;
-  };
-
-  template <typename _Graph>
-  class ItemSetTraits<_Graph, typename _Graph::Arc> {
-  public:
-
-    typedef _Graph Graph;
-
-    typedef typename Graph::Arc Item;
-    typedef typename Graph::ArcIt ItemIt;
-
-    typedef typename ArcNotifierIndicator<Graph>::Type ItemNotifier;
-
-    template <typename _Value>
-    class Map : public Graph::template ArcMap<_Value> {
-    public:
-      typedef typename Graph::template ArcMap<_Value> Parent;
-      typedef typename Graph::template ArcMap<_Value> Type;
-      typedef typename Parent::Value Value;
-
-      Map(const Graph& _digraph) : Parent(_digraph) {}
-      Map(const Graph& _digraph, const Value& _value)
-        : Parent(_digraph, _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& _digraph) : Parent(_digraph) {}
-      Map(const Graph& _digraph, const Value& _value)
-        : Parent(_digraph, _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: mon/bits/vector_map.h
===================================================================
--- lemon/bits/vector_map.h	(revision 318)
+++ 	(revision )
@@ -1,240 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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/core.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.
-  //
-  // \tparam _Graph The graph this map is attached to.
-  // \tparam _Item The item type of the graph items.
-  // \tparam _Value The value type of the map.
-  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);
-    }
-
-  private:
-    // \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
Index: mon/bits/windows.cc
===================================================================
--- lemon/bits/windows.cc	(revision 427)
+++ 	(revision )
@@ -1,132 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-///\file
-///\brief Some basic non-inline functions and static global data.
-
-#include<lemon/bits/windows.h>
-
-#ifdef WIN32
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#ifndef NOMINMAX
-#define NOMINMAX
-#endif
-#ifdef UNICODE
-#undef UNICODE
-#endif
-#include <windows.h>
-#ifdef LOCALE_INVARIANT
-#define MY_LOCALE LOCALE_INVARIANT
-#else
-#define MY_LOCALE LOCALE_NEUTRAL
-#endif
-#else
-#include <unistd.h>
-#include <ctime>
-#include <sys/times.h>
-#include <sys/time.h>
-#endif
-
-#include <cmath>
-#include <sstream>
-
-namespace lemon {
-  namespace bits {
-    void getWinProcTimes(double &rtime,
-                         double &utime, double &stime,
-                         double &cutime, double &cstime)
-    {
-#ifdef WIN32
-      static const double ch = 4294967296.0e-7;
-      static const double cl = 1.0e-7;
-
-      FILETIME system;
-      GetSystemTimeAsFileTime(&system);
-      rtime = ch * system.dwHighDateTime + cl * system.dwLowDateTime;
-
-      FILETIME create, exit, kernel, user;
-      if (GetProcessTimes(GetCurrentProcess(),&create, &exit, &kernel, &user)) {
-        utime = ch * user.dwHighDateTime + cl * user.dwLowDateTime;
-        stime = ch * kernel.dwHighDateTime + cl * kernel.dwLowDateTime;
-        cutime = 0;
-        cstime = 0;
-      } else {
-        rtime = 0;
-        utime = 0;
-        stime = 0;
-        cutime = 0;
-        cstime = 0;
-      }
-#else
-      timeval tv;
-      gettimeofday(&tv, 0);
-      rtime=tv.tv_sec+double(tv.tv_usec)/1e6;
-
-      tms ts;
-      double tck=sysconf(_SC_CLK_TCK);
-      times(&ts);
-      utime=ts.tms_utime/tck;
-      stime=ts.tms_stime/tck;
-      cutime=ts.tms_cutime/tck;
-      cstime=ts.tms_cstime/tck;
-#endif
-    }
-
-    std::string getWinFormattedDate()
-    {
-      std::ostringstream os;
-#ifdef WIN32
-      SYSTEMTIME time;
-      GetSystemTime(&time);
-      char buf1[11], buf2[9], buf3[5];
-          if (GetDateFormat(MY_LOCALE, 0, &time,
-                        ("ddd MMM dd"), buf1, 11) &&
-          GetTimeFormat(MY_LOCALE, 0, &time,
-                        ("HH':'mm':'ss"), buf2, 9) &&
-          GetDateFormat(MY_LOCALE, 0, &time,
-                        ("yyyy"), buf3, 5)) {
-        os << buf1 << ' ' << buf2 << ' ' << buf3;
-      }
-      else os << "unknown";
-#else
-      timeval tv;
-      gettimeofday(&tv, 0);
-
-      char cbuf[26];
-      ctime_r(&tv.tv_sec,cbuf);
-      os << cbuf;
-#endif
-      return os.str();
-    }
-
-    int getWinRndSeed()
-    {
-#ifdef WIN32
-      FILETIME time;
-      GetSystemTimeAsFileTime(&time);
-      return GetCurrentProcessId() + time.dwHighDateTime + time.dwLowDateTime;
-#else
-      timeval tv;
-      gettimeofday(&tv, 0);
-      return getpid() + tv.tv_sec + tv.tv_usec;
-#endif
-    }
-  }
-}
Index: mon/bits/windows.h
===================================================================
--- lemon/bits/windows.h	(revision 368)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2009
- * 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_WINDOWS_H
-#define LEMON_WINDOWS_H
-
-#include <string>
-
-namespace lemon {
-  namespace bits {
-    void getWinProcTimes(double &rtime,
-                         double &utime, double &stime,
-                         double &cutime, double &cstime);
-    std::string getWinFormattedDate();
-    int getWinRndSeed();
-  }
-}
-
-#endif
Index: mon/color.cc
===================================================================
--- lemon/color.cc	(revision 209)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-///\file
-///\brief Color constants
-
-#include<lemon/color.h>
-
-namespace lemon {
-
-  const Color WHITE(1,1,1);
-
-  const Color BLACK(0,0,0);
-  const Color RED(1,0,0);
-  const Color GREEN(0,1,0);
-  const Color BLUE(0,0,1);
-  const Color YELLOW(1,1,0);
-  const Color MAGENTA(1,0,1);
-  const Color CYAN(0,1,1);
-
-  const Color GREY(0,0,0);
-  const Color DARK_RED(.5,0,0);
-  const Color DARK_GREEN(0,.5,0);
-  const Color DARK_BLUE(0,0,.5);
-  const Color DARK_YELLOW(.5,.5,0);
-  const Color DARK_MAGENTA(.5,0,.5);
-  const Color DARK_CYAN(0,.5,.5);
-
-} //namespace lemon
Index: mon/color.h
===================================================================
--- lemon/color.h	(revision 317)
+++ 	(revision )
@@ -1,204 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_COLOR_H
-#define LEMON_COLOR_H
-
-#include<vector>
-#include<lemon/math.h>
-#include<lemon/maps.h>
-
-
-///\ingroup misc
-///\file
-///\brief Tools to manage RGB colors.
-
-namespace lemon {
-
-
-  /// \addtogroup misc
-  /// @{
-
-  ///Data structure representing RGB colors.
-
-  ///Data structure representing RGB colors.
-  class Color
-  {
-    double _r,_g,_b;
-  public:
-    ///Default constructor
-    Color() {}
-    ///Constructor
-    Color(double r,double g,double b) :_r(r),_g(g),_b(b) {};
-    ///Set the red component
-    double & red() {return _r;}
-    ///Return the red component
-    const double & red() const {return _r;}
-    ///Set the green component
-    double & green() {return _g;}
-    ///Return the green component
-    const double & green() const {return _g;}
-    ///Set the blue component
-    double & blue() {return _b;}
-    ///Return the blue component
-    const double & blue() const {return _b;}
-    ///Set the color components
-    void set(double r,double g,double b) { _r=r;_g=g;_b=b; };
-  };
-
-  /// White color constant
-  extern const Color WHITE;
-  /// Black color constant
-  extern const Color BLACK;
-  /// Red color constant
-  extern const Color RED;
-  /// Green color constant
-  extern const Color GREEN;
-  /// Blue color constant
-  extern const Color BLUE;
-  /// Yellow color constant
-  extern const Color YELLOW;
-  /// Magenta color constant
-  extern const Color MAGENTA;
-  /// Cyan color constant
-  extern const Color CYAN;
-  /// Grey color constant
-  extern const Color GREY;
-  /// Dark red color constant
-  extern const Color DARK_RED;
-  /// Dark green color constant
-  extern const Color DARK_GREEN;
-  /// Drak blue color constant
-  extern const Color DARK_BLUE;
-  /// Dark yellow color constant
-  extern const Color DARK_YELLOW;
-  /// Dark magenta color constant
-  extern const Color DARK_MAGENTA;
-  /// Dark cyan color constant
-  extern const Color DARK_CYAN;
-
-  ///Map <tt>int</tt>s to different <tt>Color</tt>s
-
-  ///This map assigns one of the predefined \ref Color "Color"s to
-  ///each <tt>int</tt>. It is possible to change the colors as well as
-  ///their number. The integer range is cyclically mapped to the
-  ///provided set of colors.
-  ///
-  ///This is a true \ref concepts::ReferenceMap "reference map", so
-  ///you can also change the actual colors.
-
-  class Palette : public MapBase<int,Color>
-  {
-    std::vector<Color> colors;
-  public:
-    ///Constructor
-
-    ///Constructor.
-    ///\param have_white Indicates whether white is among the
-    ///provided initial colors (\c true) or not (\c false). If it is true,
-    ///white will be assigned to \c 0.
-    ///\param num The number of the allocated colors. If it is \c -1,
-    ///the default color configuration is set up (26 color plus optionaly the
-    ///white).  If \c num is less then 26/27 then the default color
-    ///list is cut. Otherwise the color list is filled repeatedly with
-    ///the default color list.  (The colors can be changed later on.)
-    Palette(bool have_white=false,int num=-1)
-    {
-      if (num==0) return;
-      do {
-        if(have_white) colors.push_back(Color(1,1,1));
-
-        colors.push_back(Color(0,0,0));
-        colors.push_back(Color(1,0,0));
-        colors.push_back(Color(0,1,0));
-        colors.push_back(Color(0,0,1));
-        colors.push_back(Color(1,1,0));
-        colors.push_back(Color(1,0,1));
-        colors.push_back(Color(0,1,1));
-
-        colors.push_back(Color(.5,0,0));
-        colors.push_back(Color(0,.5,0));
-        colors.push_back(Color(0,0,.5));
-        colors.push_back(Color(.5,.5,0));
-        colors.push_back(Color(.5,0,.5));
-        colors.push_back(Color(0,.5,.5));
-
-        colors.push_back(Color(.5,.5,.5));
-        colors.push_back(Color(1,.5,.5));
-        colors.push_back(Color(.5,1,.5));
-        colors.push_back(Color(.5,.5,1));
-        colors.push_back(Color(1,1,.5));
-        colors.push_back(Color(1,.5,1));
-        colors.push_back(Color(.5,1,1));
-
-        colors.push_back(Color(1,.5,0));
-        colors.push_back(Color(.5,1,0));
-        colors.push_back(Color(1,0,.5));
-        colors.push_back(Color(0,1,.5));
-        colors.push_back(Color(0,.5,1));
-        colors.push_back(Color(.5,0,1));
-      } while(int(colors.size())<num);
-      if(num>=0) colors.resize(num);
-    }
-    ///\e
-    Color &operator[](int i)
-    {
-      return colors[i%colors.size()];
-    }
-    ///\e
-    const Color &operator[](int i) const
-    {
-      return colors[i%colors.size()];
-    }
-    ///\e
-    void set(int i,const Color &c)
-    {
-      colors[i%colors.size()]=c;
-    }
-    ///Adds a new color to the end of the color list.
-    void add(const Color &c)
-    {
-      colors.push_back(c);
-    }
-
-    ///Sets the number of the existing colors.
-    void resize(int s) { colors.resize(s);}
-    ///Returns the number of the existing colors.
-    int size() const { return int(colors.size());}
-  };
-
-  ///Returns a visibly distinct \ref Color
-
-  ///Returns a \ref Color which is as different from the given parameter
-  ///as it is possible.
-  inline Color distantColor(const Color &c)
-  {
-    return Color(c.red()<.5?1:0,c.green()<.5?1:0,c.blue()<.5?1:0);
-  }
-  ///Returns black for light colors and white for the dark ones.
-
-  ///Returns black for light colors and white for the dark ones.
-  inline Color distantBW(const Color &c){
-    return (.2125*c.red()+.7154*c.green()+.0721*c.blue())<.5 ? WHITE : BLACK;
-  }
-
-  /// @}
-
-} //END OF NAMESPACE LEMON
-
-#endif // LEMON_COLOR_H
Index: mon/concept_check.h
===================================================================
--- lemon/concept_check.h	(revision 285)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-// The contents of this file was inspired by the concept checking
-// utility of the BOOST library (http://www.boost.org).
-
-///\file
-///\brief Basic utilities for concept checking.
-///
-
-#ifndef LEMON_CONCEPT_CHECK_H
-#define LEMON_CONCEPT_CHECK_H
-
-namespace lemon {
-
-  /*
-    "inline" is used for ignore_unused_variable_warning()
-    and function_requires() to make sure there is no
-    overtarget with g++.
-  */
-
-  template <class T> inline void ignore_unused_variable_warning(const T&) { }
-
-  ///\e
-  template <class Concept>
-  inline void function_requires()
-  {
-#if !defined(NDEBUG)
-    void (Concept::*x)() = & Concept::constraints;
-    ignore_unused_variable_warning(x);
-#endif
-  }
-
-  ///\e
-  template <typename Concept, typename Type>
-  inline void checkConcept() {
-#if !defined(NDEBUG)
-    typedef typename Concept::template Constraints<Type> ConceptCheck;
-    void (ConceptCheck::*x)() = & ConceptCheck::constraints;
-    ignore_unused_variable_warning(x);
-#endif
-  }
-
-} // namespace lemon
-
-#endif // LEMON_CONCEPT_CHECK_H
Index: mon/concepts/digraph.h
===================================================================
--- lemon/concepts/digraph.h	(revision 263)
+++ 	(revision )
@@ -1,487 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_CONCEPT_DIGRAPH_H
-#define LEMON_CONCEPT_DIGRAPH_H
-
-///\ingroup graph_concepts
-///\file
-///\brief The concept of directed graphs.
-
-#include <lemon/core.h>
-#include <lemon/concepts/maps.h>
-#include <lemon/concept_check.h>
-#include <lemon/concepts/graph_components.h>
-
-namespace lemon {
-  namespace concepts {
-
-    /// \ingroup graph_concepts
-    ///
-    /// \brief Class describing the concept of directed graphs.
-    ///
-    /// This class describes the \ref concept "concept" of the
-    /// immutable directed digraphs.
-    ///
-    /// Note that actual digraph implementation like @ref ListDigraph or
-    /// @ref SmartDigraph may have several additional functionality.
-    ///
-    /// \sa concept
-    class Digraph {
-    private:
-      ///Digraphs are \e not copy constructible. Use DigraphCopy() instead.
-
-      ///Digraphs are \e not copy constructible. Use DigraphCopy() instead.
-      ///
-      Digraph(const Digraph &) {};
-      ///\brief Assignment of \ref Digraph "Digraph"s to another ones are
-      ///\e not allowed. Use DigraphCopy() instead.
-
-      ///Assignment of \ref Digraph "Digraph"s to another ones are
-      ///\e not allowed.  Use DigraphCopy() instead.
-
-      void operator=(const Digraph &) {}
-    public:
-      ///\e
-
-      /// Defalult constructor.
-
-      /// Defalult constructor.
-      ///
-      Digraph() { }
-      /// Class for identifying a node of the digraph
-
-      /// This class identifies a node of the digraph. It also serves
-      /// as a base class of the node iterators,
-      /// thus they will convert to this type.
-      class Node {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        Node() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        Node(const Node&) { }
-
-        /// Invalid constructor \& conversion.
-
-        /// This constructor initializes the iterator to be invalid.
-        /// \sa Invalid for more details.
-        Node(Invalid) { }
-        /// Equality operator
-
-        /// Two iterators are equal if and only if they point to the
-        /// same object or both are invalid.
-        bool operator==(Node) const { return true; }
-
-        /// Inequality operator
-
-        /// \sa operator==(Node n)
-        ///
-        bool operator!=(Node) const { return true; }
-
-        /// Artificial ordering operator.
-
-        /// To allow the use of digraph descriptors as key type in std::map or
-        /// similar associative container we require this.
-        ///
-        /// \note This operator only have to define some strict ordering of
-        /// the items; this order has nothing to do with the iteration
-        /// ordering of the items.
-        bool operator<(Node) const { return false; }
-
-      };
-
-      /// This iterator goes through each node.
-
-      /// This iterator goes through each node.
-      /// Its usage is quite simple, for example you can count the number
-      /// of nodes in digraph \c g of type \c Digraph like this:
-      ///\code
-      /// int count=0;
-      /// for (Digraph::NodeIt n(g); n!=INVALID; ++n) ++count;
-      ///\endcode
-      class NodeIt : public Node {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        NodeIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        NodeIt(const NodeIt& n) : Node(n) { }
-        /// Invalid constructor \& conversion.
-
-        /// Initialize the iterator to be invalid.
-        /// \sa Invalid for more details.
-        NodeIt(Invalid) { }
-        /// Sets the iterator to the first node.
-
-        /// Sets the iterator to the first node of \c g.
-        ///
-        NodeIt(const Digraph&) { }
-        /// Node -> NodeIt conversion.
-
-        /// Sets the iterator to the node of \c the digraph pointed by
-        /// the trivial iterator.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        NodeIt(const Digraph&, const Node&) { }
-        /// Next node.
-
-        /// Assign the iterator to the next node.
-        ///
-        NodeIt& operator++() { return *this; }
-      };
-
-
-      /// Class for identifying an arc of the digraph
-
-      /// This class identifies an arc of the digraph. It also serves
-      /// as a base class of the arc iterators,
-      /// thus they will convert to this type.
-      class Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        Arc() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        Arc(const Arc&) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        Arc(Invalid) { }
-        /// Equality operator
-
-        /// Two iterators are equal if and only if they point to the
-        /// same object or both are invalid.
-        bool operator==(Arc) const { return true; }
-        /// Inequality operator
-
-        /// \sa operator==(Arc n)
-        ///
-        bool operator!=(Arc) const { return true; }
-
-        /// Artificial ordering operator.
-
-        /// To allow the use of digraph descriptors as key type in std::map or
-        /// similar associative container we require this.
-        ///
-        /// \note This operator only have to define some strict ordering of
-        /// the items; this order has nothing to do with the iteration
-        /// ordering of the items.
-        bool operator<(Arc) const { return false; }
-      };
-
-      /// This iterator goes trough the outgoing arcs of a node.
-
-      /// This iterator goes trough the \e outgoing arcs of a certain node
-      /// of a digraph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of outgoing arcs of a node \c n
-      /// in digraph \c g of type \c Digraph as follows.
-      ///\code
-      /// int count=0;
-      /// for (Digraph::OutArcIt e(g, n); e!=INVALID; ++e) ++count;
-      ///\endcode
-
-      class OutArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        OutArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        OutArcIt(const OutArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        OutArcIt(Invalid) { }
-        /// This constructor sets the iterator to the first outgoing arc.
-
-        /// This constructor sets the iterator to the first outgoing arc of
-        /// the node.
-        OutArcIt(const Digraph&, const Node&) { }
-        /// Arc -> OutArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        OutArcIt(const Digraph&, const Arc&) { }
-        ///Next outgoing arc
-
-        /// Assign the iterator to the next
-        /// outgoing arc of the corresponding node.
-        OutArcIt& operator++() { return *this; }
-      };
-
-      /// This iterator goes trough the incoming arcs of a node.
-
-      /// This iterator goes trough the \e incoming arcs of a certain node
-      /// of a digraph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of outgoing arcs of a node \c n
-      /// in digraph \c g of type \c Digraph as follows.
-      ///\code
-      /// int count=0;
-      /// for(Digraph::InArcIt e(g, n); e!=INVALID; ++e) ++count;
-      ///\endcode
-
-      class InArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        InArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        InArcIt(const InArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        InArcIt(Invalid) { }
-        /// This constructor sets the iterator to first incoming arc.
-
-        /// This constructor set the iterator to the first incoming arc of
-        /// the node.
-        InArcIt(const Digraph&, const Node&) { }
-        /// Arc -> InArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator \c e.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        InArcIt(const Digraph&, const Arc&) { }
-        /// Next incoming arc
-
-        /// Assign the iterator to the next inarc of the corresponding node.
-        ///
-        InArcIt& operator++() { return *this; }
-      };
-      /// This iterator goes through each arc.
-
-      /// This iterator goes through each arc of a digraph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of arcs in a digraph \c g of type \c Digraph as follows:
-      ///\code
-      /// int count=0;
-      /// for(Digraph::ArcIt e(g); e!=INVALID; ++e) ++count;
-      ///\endcode
-      class ArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        ArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        ArcIt(const ArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        ArcIt(Invalid) { }
-        /// This constructor sets the iterator to the first arc.
-
-        /// This constructor sets the iterator to the first arc of \c g.
-        ///@param g the digraph
-        ArcIt(const Digraph& g) { ignore_unused_variable_warning(g); }
-        /// Arc -> ArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator \c e.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        ArcIt(const Digraph&, const Arc&) { }
-        ///Next arc
-
-        /// Assign the iterator to the next arc.
-        ArcIt& operator++() { return *this; }
-      };
-      ///Gives back the target node of an arc.
-
-      ///Gives back the target node of an arc.
-      ///
-      Node target(Arc) const { return INVALID; }
-      ///Gives back the source node of an arc.
-
-      ///Gives back the source node of an arc.
-      ///
-      Node source(Arc) const { return INVALID; }
-
-      /// \brief Returns the ID of the node.
-      int id(Node) const { return -1; }
-
-      /// \brief Returns the ID of the arc.
-      int id(Arc) const { return -1; }
-
-      /// \brief Returns the node with the given ID.
-      ///
-      /// \pre The argument should be a valid node ID in the graph.
-      Node nodeFromId(int) const { return INVALID; }
-
-      /// \brief Returns the arc with the given ID.
-      ///
-      /// \pre The argument should be a valid arc ID in the graph.
-      Arc arcFromId(int) const { return INVALID; }
-
-      /// \brief Returns an upper bound on the node IDs.
-      int maxNodeId() const { return -1; }
-
-      /// \brief Returns an upper bound on the arc IDs.
-      int maxArcId() const { return -1; }
-
-      void first(Node&) const {}
-      void next(Node&) const {}
-
-      void first(Arc&) const {}
-      void next(Arc&) const {}
-
-
-      void firstIn(Arc&, const Node&) const {}
-      void nextIn(Arc&) const {}
-
-      void firstOut(Arc&, const Node&) const {}
-      void nextOut(Arc&) const {}
-
-      // The second parameter is dummy.
-      Node fromId(int, Node) const { return INVALID; }
-      // The second parameter is dummy.
-      Arc fromId(int, Arc) const { return INVALID; }
-
-      // Dummy parameter.
-      int maxId(Node) const { return -1; }
-      // Dummy parameter.
-      int maxId(Arc) const { return -1; }
-
-      /// \brief The base node of the iterator.
-      ///
-      /// Gives back the base node of the iterator.
-      /// It is always the target of the pointed arc.
-      Node baseNode(const InArcIt&) const { return INVALID; }
-
-      /// \brief The running node of the iterator.
-      ///
-      /// Gives back the running node of the iterator.
-      /// It is always the source of the pointed arc.
-      Node runningNode(const InArcIt&) const { return INVALID; }
-
-      /// \brief The base node of the iterator.
-      ///
-      /// Gives back the base node of the iterator.
-      /// It is always the source of the pointed arc.
-      Node baseNode(const OutArcIt&) const { return INVALID; }
-
-      /// \brief The running node of the iterator.
-      ///
-      /// Gives back the running node of the iterator.
-      /// It is always the target of the pointed arc.
-      Node runningNode(const OutArcIt&) const { return INVALID; }
-
-      /// \brief The opposite node on the given arc.
-      ///
-      /// Gives back the opposite node on the given arc.
-      Node oppositeNode(const Node&, const Arc&) const { return INVALID; }
-
-      /// \brief Read write map of the nodes to type \c T.
-      ///
-      /// ReadWrite map of the nodes to type \c T.
-      /// \sa Reference
-      template<class T>
-      class NodeMap : public ReadWriteMap< Node, T > {
-      public:
-
-        ///\e
-        NodeMap(const Digraph&) { }
-        ///\e
-        NodeMap(const Digraph&, T) { }
-
-      private:
-        ///Copy constructor
-        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
-        ///Assignment operator
-        template <typename CMap>
-        NodeMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Node, T>, CMap>();
-          return *this;
-        }
-      };
-
-      /// \brief Read write map of the arcs to type \c T.
-      ///
-      /// Reference map of the arcs to type \c T.
-      /// \sa Reference
-      template<class T>
-      class ArcMap : public ReadWriteMap<Arc,T> {
-      public:
-
-        ///\e
-        ArcMap(const Digraph&) { }
-        ///\e
-        ArcMap(const Digraph&, T) { }
-      private:
-        ///Copy constructor
-        ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
-        ///Assignment operator
-        template <typename CMap>
-        ArcMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Arc, T>, CMap>();
-          return *this;
-        }
-      };
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<IterableDigraphComponent<>, _Digraph>();
-          checkConcept<IDableDigraphComponent<>, _Digraph>();
-          checkConcept<MappableDigraphComponent<>, _Digraph>();
-        }
-      };
-
-    };
-
-  } //namespace concepts
-} //namespace lemon
-
-
-
-#endif // LEMON_CONCEPT_DIGRAPH_H
Index: mon/concepts/graph.h
===================================================================
--- lemon/concepts/graph.h	(revision 263)
+++ 	(revision )
@@ -1,752 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 graph_concepts
-///\file
-///\brief The concept of Undirected Graphs.
-
-#ifndef LEMON_CONCEPT_GRAPH_H
-#define LEMON_CONCEPT_GRAPH_H
-
-#include <lemon/concepts/graph_components.h>
-#include <lemon/concepts/graph.h>
-#include <lemon/core.h>
-
-namespace lemon {
-  namespace concepts {
-
-    /// \ingroup graph_concepts
-    ///
-    /// \brief Class describing the concept of Undirected Graphs.
-    ///
-    /// This class describes the common interface of all Undirected
-    /// Graphs.
-    ///
-    /// As all concept describing classes it provides only interface
-    /// without any sensible implementation. So any algorithm for
-    /// undirected graph should compile with this class, but it will not
-    /// run properly, of course.
-    ///
-    /// The LEMON undirected graphs also fulfill the concept of
-    /// directed graphs (\ref lemon::concepts::Digraph "Digraph
-    /// Concept"). Each edges can be seen as two opposite
-    /// directed arc and consequently the undirected graph can be
-    /// seen as the direceted graph of these directed arcs. The
-    /// Graph has the Edge inner class for the edges and
-    /// the Arc type for the directed arcs. The Arc type is
-    /// convertible to Edge or inherited from it so from a directed
-    /// arc we can get the represented edge.
-    ///
-    /// In the sense of the LEMON each edge has a default
-    /// direction (it should be in every computer implementation,
-    /// because the order of edge's nodes defines an
-    /// orientation). With the default orientation we can define that
-    /// the directed arc is forward or backward directed. With the \c
-    /// direction() and \c direct() function we can get the direction
-    /// of the directed arc and we can direct an edge.
-    ///
-    /// The EdgeIt is an iterator for the edges. We can use
-    /// the EdgeMap to map values for the edges. The InArcIt and
-    /// OutArcIt iterates on the same edges but with opposite
-    /// direction. The IncEdgeIt iterates also on the same edges
-    /// as the OutArcIt and InArcIt but it is not convertible to Arc just
-    /// to Edge.
-    class Graph {
-    public:
-      /// \brief The undirected graph should be tagged by the
-      /// UndirectedTag.
-      ///
-      /// The undirected graph should be tagged by the UndirectedTag. This
-      /// tag helps the enable_if technics to make compile time
-      /// specializations for undirected graphs.
-      typedef True UndirectedTag;
-
-      /// \brief The base type of node iterators,
-      /// or in other words, the trivial node iterator.
-      ///
-      /// This is the base type of each node iterator,
-      /// thus each kind of node iterator converts to this.
-      /// More precisely each kind of node iterator should be inherited
-      /// from the trivial node iterator.
-      class Node {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        Node() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        Node(const Node&) { }
-
-        /// Invalid constructor \& conversion.
-
-        /// This constructor initializes the iterator to be invalid.
-        /// \sa Invalid for more details.
-        Node(Invalid) { }
-        /// Equality operator
-
-        /// Two iterators are equal if and only if they point to the
-        /// same object or both are invalid.
-        bool operator==(Node) const { return true; }
-
-        /// Inequality operator
-
-        /// \sa operator==(Node n)
-        ///
-        bool operator!=(Node) const { return true; }
-
-        /// Artificial ordering operator.
-
-        /// To allow the use of graph descriptors as key type in std::map or
-        /// similar associative container we require this.
-        ///
-        /// \note This operator only have to define some strict ordering of
-        /// the items; this order has nothing to do with the iteration
-        /// ordering of the items.
-        bool operator<(Node) const { return false; }
-
-      };
-
-      /// This iterator goes through each node.
-
-      /// This iterator goes through each node.
-      /// Its usage is quite simple, for example you can count the number
-      /// of nodes in graph \c g of type \c Graph like this:
-      ///\code
-      /// int count=0;
-      /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
-      ///\endcode
-      class NodeIt : public Node {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        NodeIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        NodeIt(const NodeIt& n) : Node(n) { }
-        /// Invalid constructor \& conversion.
-
-        /// Initialize the iterator to be invalid.
-        /// \sa Invalid for more details.
-        NodeIt(Invalid) { }
-        /// Sets the iterator to the first node.
-
-        /// Sets the iterator to the first node of \c g.
-        ///
-        NodeIt(const Graph&) { }
-        /// Node -> NodeIt conversion.
-
-        /// Sets the iterator to the node of \c the graph pointed by
-        /// the trivial iterator.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        NodeIt(const Graph&, const Node&) { }
-        /// Next node.
-
-        /// Assign the iterator to the next node.
-        ///
-        NodeIt& operator++() { return *this; }
-      };
-
-
-      /// The base type of the edge iterators.
-
-      /// The base type of the edge iterators.
-      ///
-      class Edge {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        Edge() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        Edge(const Edge&) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        Edge(Invalid) { }
-        /// Equality operator
-
-        /// Two iterators are equal if and only if they point to the
-        /// same object or both are invalid.
-        bool operator==(Edge) const { return true; }
-        /// Inequality operator
-
-        /// \sa operator==(Edge n)
-        ///
-        bool operator!=(Edge) const { return true; }
-
-        /// Artificial ordering operator.
-
-        /// To allow the use of graph descriptors as key type in std::map or
-        /// similar associative container we require this.
-        ///
-        /// \note This operator only have to define some strict ordering of
-        /// the items; this order has nothing to do with the iteration
-        /// ordering of the items.
-        bool operator<(Edge) const { return false; }
-      };
-
-      /// This iterator goes through each edge.
-
-      /// This iterator goes through each edge of a graph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of edges in a graph \c g of type \c Graph as follows:
-      ///\code
-      /// int count=0;
-      /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
-      ///\endcode
-      class EdgeIt : public Edge {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        EdgeIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        EdgeIt(const EdgeIt& e) : Edge(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        EdgeIt(Invalid) { }
-        /// This constructor sets the iterator to the first edge.
-
-        /// This constructor sets the iterator to the first edge.
-        EdgeIt(const Graph&) { }
-        /// Edge -> EdgeIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator.
-        /// This feature necessitates that each time we
-        /// iterate the edge-set, the iteration order is the
-        /// same.
-        EdgeIt(const Graph&, const Edge&) { }
-        /// Next edge
-
-        /// Assign the iterator to the next edge.
-        EdgeIt& operator++() { return *this; }
-      };
-
-      /// \brief This iterator goes trough the incident undirected
-      /// arcs of a node.
-      ///
-      /// This iterator goes trough the incident edges
-      /// of a certain node of a graph. You should assume that the
-      /// loop arcs will be iterated twice.
-      ///
-      /// Its usage is quite simple, for example you can compute the
-      /// degree (i.e. count the number of incident arcs of a node \c n
-      /// in graph \c g of type \c Graph as follows.
-      ///
-      ///\code
-      /// int count=0;
-      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
-      ///\endcode
-      class IncEdgeIt : public Edge {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        IncEdgeIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        IncEdgeIt(const IncEdgeIt& e) : Edge(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        IncEdgeIt(Invalid) { }
-        /// This constructor sets the iterator to first incident arc.
-
-        /// This constructor set the iterator to the first incident arc of
-        /// the node.
-        IncEdgeIt(const Graph&, const Node&) { }
-        /// Edge -> IncEdgeIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator \c e.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        IncEdgeIt(const Graph&, const Edge&) { }
-        /// Next incident arc
-
-        /// Assign the iterator to the next incident arc
-        /// of the corresponding node.
-        IncEdgeIt& operator++() { return *this; }
-      };
-
-      /// The directed arc type.
-
-      /// The directed arc type. It can be converted to the
-      /// edge or it should be inherited from the undirected
-      /// arc.
-      class Arc : public Edge {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        Arc() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        Arc(const Arc& e) : Edge(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        Arc(Invalid) { }
-        /// Equality operator
-
-        /// Two iterators are equal if and only if they point to the
-        /// same object or both are invalid.
-        bool operator==(Arc) const { return true; }
-        /// Inequality operator
-
-        /// \sa operator==(Arc n)
-        ///
-        bool operator!=(Arc) const { return true; }
-
-        /// Artificial ordering operator.
-
-        /// To allow the use of graph descriptors as key type in std::map or
-        /// similar associative container we require this.
-        ///
-        /// \note This operator only have to define some strict ordering of
-        /// the items; this order has nothing to do with the iteration
-        /// ordering of the items.
-        bool operator<(Arc) const { return false; }
-
-      };
-      /// This iterator goes through each directed arc.
-
-      /// This iterator goes through each arc of a graph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of arcs in a graph \c g of type \c Graph as follows:
-      ///\code
-      /// int count=0;
-      /// for(Graph::ArcIt e(g); e!=INVALID; ++e) ++count;
-      ///\endcode
-      class ArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        ArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        ArcIt(const ArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        ArcIt(Invalid) { }
-        /// This constructor sets the iterator to the first arc.
-
-        /// This constructor sets the iterator to the first arc of \c g.
-        ///@param g the graph
-        ArcIt(const Graph &g) { ignore_unused_variable_warning(g); }
-        /// Arc -> ArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator \c e.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        ArcIt(const Graph&, const Arc&) { }
-        ///Next arc
-
-        /// Assign the iterator to the next arc.
-        ArcIt& operator++() { return *this; }
-      };
-
-      /// This iterator goes trough the outgoing directed arcs of a node.
-
-      /// This iterator goes trough the \e outgoing arcs of a certain node
-      /// of a graph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of outgoing arcs of a node \c n
-      /// in graph \c g of type \c Graph as follows.
-      ///\code
-      /// int count=0;
-      /// for (Graph::OutArcIt e(g, n); e!=INVALID; ++e) ++count;
-      ///\endcode
-
-      class OutArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        OutArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        OutArcIt(const OutArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        OutArcIt(Invalid) { }
-        /// This constructor sets the iterator to the first outgoing arc.
-
-        /// This constructor sets the iterator to the first outgoing arc of
-        /// the node.
-        ///@param n the node
-        ///@param g the graph
-        OutArcIt(const Graph& n, const Node& g) {
-          ignore_unused_variable_warning(n);
-          ignore_unused_variable_warning(g);
-        }
-        /// Arc -> OutArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        OutArcIt(const Graph&, const Arc&) { }
-        ///Next outgoing arc
-
-        /// Assign the iterator to the next
-        /// outgoing arc of the corresponding node.
-        OutArcIt& operator++() { return *this; }
-      };
-
-      /// This iterator goes trough the incoming directed arcs of a node.
-
-      /// This iterator goes trough the \e incoming arcs of a certain node
-      /// of a graph.
-      /// Its usage is quite simple, for example you can count the number
-      /// of outgoing arcs of a node \c n
-      /// in graph \c g of type \c Graph as follows.
-      ///\code
-      /// int count=0;
-      /// for(Graph::InArcIt e(g, n); e!=INVALID; ++e) ++count;
-      ///\endcode
-
-      class InArcIt : public Arc {
-      public:
-        /// Default constructor
-
-        /// @warning The default constructor sets the iterator
-        /// to an undefined value.
-        InArcIt() { }
-        /// Copy constructor.
-
-        /// Copy constructor.
-        ///
-        InArcIt(const InArcIt& e) : Arc(e) { }
-        /// Initialize the iterator to be invalid.
-
-        /// Initialize the iterator to be invalid.
-        ///
-        InArcIt(Invalid) { }
-        /// This constructor sets the iterator to first incoming arc.
-
-        /// This constructor set the iterator to the first incoming arc of
-        /// the node.
-        ///@param n the node
-        ///@param g the graph
-        InArcIt(const Graph& g, const Node& n) {
-          ignore_unused_variable_warning(n);
-          ignore_unused_variable_warning(g);
-        }
-        /// Arc -> InArcIt conversion
-
-        /// Sets the iterator to the value of the trivial iterator \c e.
-        /// This feature necessitates that each time we
-        /// iterate the arc-set, the iteration order is the same.
-        InArcIt(const Graph&, const Arc&) { }
-        /// Next incoming arc
-
-        /// Assign the iterator to the next inarc of the corresponding node.
-        ///
-        InArcIt& operator++() { return *this; }
-      };
-
-      /// \brief Read write map of the nodes to type \c T.
-      ///
-      /// ReadWrite map of the nodes to type \c T.
-      /// \sa Reference
-      template<class T>
-      class NodeMap : public ReadWriteMap< Node, T >
-      {
-      public:
-
-        ///\e
-        NodeMap(const Graph&) { }
-        ///\e
-        NodeMap(const Graph&, T) { }
-
-      private:
-        ///Copy constructor
-        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
-        ///Assignment operator
-        template <typename CMap>
-        NodeMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Node, T>, CMap>();
-          return *this;
-        }
-      };
-
-      /// \brief Read write map of the directed arcs to type \c T.
-      ///
-      /// Reference map of the directed arcs to type \c T.
-      /// \sa Reference
-      template<class T>
-      class ArcMap : public ReadWriteMap<Arc,T>
-      {
-      public:
-
-        ///\e
-        ArcMap(const Graph&) { }
-        ///\e
-        ArcMap(const Graph&, T) { }
-      private:
-        ///Copy constructor
-        ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { }
-        ///Assignment operator
-        template <typename CMap>
-        ArcMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Arc, T>, CMap>();
-          return *this;
-        }
-      };
-
-      /// Read write map of the edges to type \c T.
-
-      /// Reference map of the arcs to type \c T.
-      /// \sa Reference
-      template<class T>
-      class EdgeMap : public ReadWriteMap<Edge,T>
-      {
-      public:
-
-        ///\e
-        EdgeMap(const Graph&) { }
-        ///\e
-        EdgeMap(const Graph&, T) { }
-      private:
-        ///Copy constructor
-        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) {}
-        ///Assignment operator
-        template <typename CMap>
-        EdgeMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Edge, T>, CMap>();
-          return *this;
-        }
-      };
-
-      /// \brief Direct the given edge.
-      ///
-      /// Direct the given edge. The returned arc source
-      /// will be the given node.
-      Arc direct(const Edge&, const Node&) const {
-        return INVALID;
-      }
-
-      /// \brief Direct the given edge.
-      ///
-      /// Direct the given edge. The returned arc
-      /// represents the given edge and the direction comes
-      /// from the bool parameter. The source of the edge and
-      /// the directed arc is the same when the given bool is true.
-      Arc direct(const Edge&, bool) const {
-        return INVALID;
-      }
-
-      /// \brief Returns true if the arc has default orientation.
-      ///
-      /// Returns whether the given directed arc is same orientation as
-      /// the corresponding edge's default orientation.
-      bool direction(Arc) const { return true; }
-
-      /// \brief Returns the opposite directed arc.
-      ///
-      /// Returns the opposite directed arc.
-      Arc oppositeArc(Arc) const { return INVALID; }
-
-      /// \brief Opposite node on an arc
-      ///
-      /// \return the opposite of the given Node on the given Edge
-      Node oppositeNode(Node, Edge) const { return INVALID; }
-
-      /// \brief First node of the edge.
-      ///
-      /// \return the first node of the given Edge.
-      ///
-      /// Naturally edges don't have direction and thus
-      /// don't have source and target node. But we use these two methods
-      /// to query the two nodes of the arc. The direction of the arc
-      /// which arises this way is called the inherent direction of the
-      /// edge, and is used to define the "default" direction
-      /// of the directed versions of the arcs.
-      /// \sa direction
-      Node u(Edge) const { return INVALID; }
-
-      /// \brief Second node of the edge.
-      Node v(Edge) const { return INVALID; }
-
-      /// \brief Source node of the directed arc.
-      Node source(Arc) const { return INVALID; }
-
-      /// \brief Target node of the directed arc.
-      Node target(Arc) const { return INVALID; }
-
-      /// \brief Returns the id of the node.
-      int id(Node) const { return -1; }
-
-      /// \brief Returns the id of the edge.
-      int id(Edge) const { return -1; }
-
-      /// \brief Returns the id of the arc.
-      int id(Arc) const { return -1; }
-
-      /// \brief Returns the node with the given id.
-      ///
-      /// \pre The argument should be a valid node id in the graph.
-      Node nodeFromId(int) const { return INVALID; }
-
-      /// \brief Returns the edge with the given id.
-      ///
-      /// \pre The argument should be a valid edge id in the graph.
-      Edge edgeFromId(int) const { return INVALID; }
-
-      /// \brief Returns the arc with the given id.
-      ///
-      /// \pre The argument should be a valid arc id in the graph.
-      Arc arcFromId(int) const { return INVALID; }
-
-      /// \brief Returns an upper bound on the node IDs.
-      int maxNodeId() const { return -1; }
-
-      /// \brief Returns an upper bound on the edge IDs.
-      int maxEdgeId() const { return -1; }
-
-      /// \brief Returns an upper bound on the arc IDs.
-      int maxArcId() const { return -1; }
-
-      void first(Node&) const {}
-      void next(Node&) const {}
-
-      void first(Edge&) const {}
-      void next(Edge&) const {}
-
-      void first(Arc&) const {}
-      void next(Arc&) const {}
-
-      void firstOut(Arc&, Node) const {}
-      void nextOut(Arc&) const {}
-
-      void firstIn(Arc&, Node) const {}
-      void nextIn(Arc&) const {}
-
-      void firstInc(Edge &, bool &, const Node &) const {}
-      void nextInc(Edge &, bool &) const {}
-
-      // The second parameter is dummy.
-      Node fromId(int, Node) const { return INVALID; }
-      // The second parameter is dummy.
-      Edge fromId(int, Edge) const { return INVALID; }
-      // The second parameter is dummy.
-      Arc fromId(int, Arc) const { return INVALID; }
-
-      // Dummy parameter.
-      int maxId(Node) const { return -1; }
-      // Dummy parameter.
-      int maxId(Edge) const { return -1; }
-      // Dummy parameter.
-      int maxId(Arc) const { return -1; }
-
-      /// \brief Base node of the iterator
-      ///
-      /// Returns the base node (the source in this case) of the iterator
-      Node baseNode(OutArcIt e) const {
-        return source(e);
-      }
-      /// \brief Running node of the iterator
-      ///
-      /// Returns the running node (the target in this case) of the
-      /// iterator
-      Node runningNode(OutArcIt e) const {
-        return target(e);
-      }
-
-      /// \brief Base node of the iterator
-      ///
-      /// Returns the base node (the target in this case) of the iterator
-      Node baseNode(InArcIt e) const {
-        return target(e);
-      }
-      /// \brief Running node of the iterator
-      ///
-      /// Returns the running node (the source in this case) of the
-      /// iterator
-      Node runningNode(InArcIt e) const {
-        return source(e);
-      }
-
-      /// \brief Base node of the iterator
-      ///
-      /// Returns the base node of the iterator
-      Node baseNode(IncEdgeIt) const {
-        return INVALID;
-      }
-
-      /// \brief Running node of the iterator
-      ///
-      /// Returns the running node of the iterator
-      Node runningNode(IncEdgeIt) const {
-        return INVALID;
-      }
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<IterableGraphComponent<>, _Graph>();
-          checkConcept<IDableGraphComponent<>, _Graph>();
-          checkConcept<MappableGraphComponent<>, _Graph>();
-        }
-      };
-
-    };
-
-  }
-
-}
-
-#endif
Index: mon/concepts/graph_components.h
===================================================================
--- lemon/concepts/graph_components.h	(revision 317)
+++ 	(revision )
@@ -1,1497 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 graph_concepts
-///\file
-///\brief The concept of graph components.
-
-
-#ifndef LEMON_CONCEPT_GRAPH_COMPONENTS_H
-#define LEMON_CONCEPT_GRAPH_COMPONENTS_H
-
-#include <lemon/core.h>
-#include <lemon/concepts/maps.h>
-
-#include <lemon/bits/alteration_notifier.h>
-
-namespace lemon {
-  namespace concepts {
-
-    /// \brief Skeleton class for graph Node and Arc types
-    ///
-    /// This class describes the interface of Node and Arc (and Edge
-    /// in undirected graphs) subtypes of graph types.
-    ///
-    /// \note This class is a template class so that we can use it to
-    /// create graph skeleton classes. The reason for this is than Node
-    /// and Arc types should \em not derive from the same base class.
-    /// For Node you should instantiate it with character 'n' and for Arc
-    /// with 'a'.
-
-#ifndef DOXYGEN
-    template <char _selector = '0'>
-#endif
-    class GraphItem {
-    public:
-      /// \brief Default constructor.
-      ///
-      /// \warning The default constructor is not required to set
-      /// the item to some well-defined value. So you should consider it
-      /// as uninitialized.
-      GraphItem() {}
-      /// \brief Copy constructor.
-      ///
-      /// Copy constructor.
-      ///
-      GraphItem(const GraphItem &) {}
-      /// \brief Invalid constructor \& conversion.
-      ///
-      /// This constructor initializes the item to be invalid.
-      /// \sa Invalid for more details.
-      GraphItem(Invalid) {}
-      /// \brief Assign operator for nodes.
-      ///
-      /// The nodes are assignable.
-      ///
-      GraphItem& operator=(GraphItem const&) { return *this; }
-      /// \brief Equality operator.
-      ///
-      /// Two iterators are equal if and only if they represents the
-      /// same node in the graph or both are invalid.
-      bool operator==(GraphItem) const { return false; }
-      /// \brief Inequality operator.
-      ///
-      /// \sa operator==(const Node& n)
-      ///
-      bool operator!=(GraphItem) const { return false; }
-
-      /// \brief Artificial ordering operator.
-      ///
-      /// To allow the use of graph descriptors as key type in std::map or
-      /// similar associative container we require this.
-      ///
-      /// \note This operator only have to define some strict ordering of
-      /// the items; this order has nothing to do with the iteration
-      /// ordering of the items.
-      bool operator<(GraphItem) const { return false; }
-
-      template<typename _GraphItem>
-      struct Constraints {
-        void constraints() {
-          _GraphItem i1;
-          _GraphItem i2 = i1;
-          _GraphItem i3 = INVALID;
-
-          i1 = i2 = i3;
-
-          bool b;
-          //          b = (ia == ib) && (ia != ib) && (ia < ib);
-          b = (ia == ib) && (ia != ib);
-          b = (ia == INVALID) && (ib != INVALID);
-          b = (ia < ib);
-        }
-
-        const _GraphItem &ia;
-        const _GraphItem &ib;
-      };
-    };
-
-    /// \brief An empty base directed graph class.
-    ///
-    /// This class provides the minimal set of features needed for a
-    /// directed graph structure. All digraph concepts have to be
-    /// conform to this base directed graph. It just provides types
-    /// for nodes and arcs and functions to get the source and the
-    /// target of the arcs.
-    class BaseDigraphComponent {
-    public:
-
-      typedef BaseDigraphComponent Digraph;
-
-      /// \brief Node class of the digraph.
-      ///
-      /// This class represents the Nodes of the digraph.
-      ///
-      typedef GraphItem<'n'> Node;
-
-      /// \brief Arc class of the digraph.
-      ///
-      /// This class represents the Arcs of the digraph.
-      ///
-      typedef GraphItem<'e'> Arc;
-
-      /// \brief Gives back the target node of an arc.
-      ///
-      /// Gives back the target node of an arc.
-      ///
-      Node target(const Arc&) const { return INVALID;}
-
-      /// \brief Gives back the source node of an arc.
-      ///
-      /// Gives back the source node of an arc.
-      ///
-      Node source(const Arc&) const { return INVALID;}
-
-      /// \brief Gives back the opposite node on the given arc.
-      ///
-      /// Gives back the opposite node on the given arc.
-      Node oppositeNode(const Node&, const Arc&) const {
-        return INVALID;
-      }
-
-      template <typename _Digraph>
-      struct Constraints {
-        typedef typename _Digraph::Node Node;
-        typedef typename _Digraph::Arc Arc;
-
-        void constraints() {
-          checkConcept<GraphItem<'n'>, Node>();
-          checkConcept<GraphItem<'a'>, Arc>();
-          {
-            Node n;
-            Arc e(INVALID);
-            n = digraph.source(e);
-            n = digraph.target(e);
-            n = digraph.oppositeNode(n, e);
-          }
-        }
-
-        const _Digraph& digraph;
-      };
-    };
-
-    /// \brief An empty base undirected graph class.
-    ///
-    /// This class provides the minimal set of features needed for an
-    /// undirected graph structure. All undirected graph concepts have
-    /// to be conform to this base graph. It just provides types for
-    /// nodes, arcs and edges and functions to get the
-    /// source and the target of the arcs and edges,
-    /// conversion from arcs to edges and function to get
-    /// both direction of the edges.
-    class BaseGraphComponent : public BaseDigraphComponent {
-    public:
-      typedef BaseDigraphComponent::Node Node;
-      typedef BaseDigraphComponent::Arc Arc;
-      /// \brief Undirected arc class of the graph.
-      ///
-      /// This class represents the edges of the graph.
-      /// The undirected graphs can be used as a directed graph which
-      /// for each arc contains the opposite arc too so the graph is
-      /// bidirected. The edge represents two opposite
-      /// directed arcs.
-      class Edge : public GraphItem<'u'> {
-      public:
-        typedef GraphItem<'u'> Parent;
-        /// \brief Default constructor.
-        ///
-        /// \warning The default constructor is not required to set
-        /// the item to some well-defined value. So you should consider it
-        /// as uninitialized.
-        Edge() {}
-        /// \brief Copy constructor.
-        ///
-        /// Copy constructor.
-        ///
-        Edge(const Edge &) : Parent() {}
-        /// \brief Invalid constructor \& conversion.
-        ///
-        /// This constructor initializes the item to be invalid.
-        /// \sa Invalid for more details.
-        Edge(Invalid) {}
-        /// \brief Converter from arc to edge.
-        ///
-        /// Besides the core graph item functionality each arc should
-        /// be convertible to the represented edge.
-        Edge(const Arc&) {}
-        /// \brief Assign arc to edge.
-        ///
-        /// Besides the core graph item functionality each arc should
-        /// be convertible to the represented edge.
-        Edge& operator=(const Arc&) { return *this; }
-      };
-
-      /// \brief Returns the direction of the arc.
-      ///
-      /// Returns the direction of the arc. Each arc represents an
-      /// edge with a direction. It gives back the
-      /// direction.
-      bool direction(const Arc&) const { return true; }
-
-      /// \brief Returns the directed arc.
-      ///
-      /// Returns the directed arc from its direction and the
-      /// represented edge.
-      Arc direct(const Edge&, bool) const { return INVALID;}
-
-      /// \brief Returns the directed arc.
-      ///
-      /// Returns the directed arc from its source and the
-      /// represented edge.
-      Arc direct(const Edge&, const Node&) const { return INVALID;}
-
-      /// \brief Returns the opposite arc.
-      ///
-      /// Returns the opposite arc. It is the arc representing the
-      /// same edge and has opposite direction.
-      Arc oppositeArc(const Arc&) const { return INVALID;}
-
-      /// \brief Gives back one ending of an edge.
-      ///
-      /// Gives back one ending of an edge.
-      Node u(const Edge&) const { return INVALID;}
-
-      /// \brief Gives back the other ending of an edge.
-      ///
-      /// Gives back the other ending of an edge.
-      Node v(const Edge&) const { return INVALID;}
-
-      template <typename _Graph>
-      struct Constraints {
-        typedef typename _Graph::Node Node;
-        typedef typename _Graph::Arc Arc;
-        typedef typename _Graph::Edge Edge;
-
-        void constraints() {
-          checkConcept<BaseDigraphComponent, _Graph>();
-          checkConcept<GraphItem<'u'>, Edge>();
-          {
-            Node n;
-            Edge ue(INVALID);
-            Arc e;
-            n = graph.u(ue);
-            n = graph.v(ue);
-            e = graph.direct(ue, true);
-            e = graph.direct(ue, n);
-            e = graph.oppositeArc(e);
-            ue = e;
-            bool d = graph.direction(e);
-            ignore_unused_variable_warning(d);
-          }
-        }
-
-        const _Graph& graph;
-      };
-
-    };
-
-    /// \brief An empty idable base digraph class.
-    ///
-    /// This class provides beside the core digraph features
-    /// core id functions for the digraph structure.
-    /// The most of the base digraphs should be conform to this concept.
-    /// The id's are unique and immutable.
-    template <typename _Base = BaseDigraphComponent>
-    class IDableDigraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-
-      /// \brief Gives back an unique integer id for the Node.
-      ///
-      /// Gives back an unique integer id for the Node.
-      ///
-      int id(const Node&) const { return -1;}
-
-      /// \brief Gives back the node by the unique id.
-      ///
-      /// Gives back the node by the unique id.
-      /// If the digraph does not contain node with the given id
-      /// then the result of the function is undetermined.
-      Node nodeFromId(int) const { return INVALID;}
-
-      /// \brief Gives back an unique integer id for the Arc.
-      ///
-      /// Gives back an unique integer id for the Arc.
-      ///
-      int id(const Arc&) const { return -1;}
-
-      /// \brief Gives back the arc by the unique id.
-      ///
-      /// Gives back the arc by the unique id.
-      /// If the digraph does not contain arc with the given id
-      /// then the result of the function is undetermined.
-      Arc arcFromId(int) const { return INVALID;}
-
-      /// \brief Gives back an integer greater or equal to the maximum
-      /// Node id.
-      ///
-      /// Gives back an integer greater or equal to the maximum Node
-      /// id.
-      int maxNodeId() const { return -1;}
-
-      /// \brief Gives back an integer greater or equal to the maximum
-      /// Arc id.
-      ///
-      /// Gives back an integer greater or equal to the maximum Arc
-      /// id.
-      int maxArcId() const { return -1;}
-
-      template <typename _Digraph>
-      struct Constraints {
-
-        void constraints() {
-          checkConcept<Base, _Digraph >();
-          typename _Digraph::Node node;
-          int nid = digraph.id(node);
-          nid = digraph.id(node);
-          node = digraph.nodeFromId(nid);
-          typename _Digraph::Arc arc;
-          int eid = digraph.id(arc);
-          eid = digraph.id(arc);
-          arc = digraph.arcFromId(eid);
-
-          nid = digraph.maxNodeId();
-          ignore_unused_variable_warning(nid);
-          eid = digraph.maxArcId();
-          ignore_unused_variable_warning(eid);
-        }
-
-        const _Digraph& digraph;
-      };
-    };
-
-    /// \brief An empty idable base undirected graph class.
-    ///
-    /// This class provides beside the core undirected graph features
-    /// core id functions for the undirected graph structure.  The
-    /// most of the base undirected graphs should be conform to this
-    /// concept.  The id's are unique and immutable.
-    template <typename _Base = BaseGraphComponent>
-    class IDableGraphComponent : public IDableDigraphComponent<_Base> {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Edge Edge;
-
-      using IDableDigraphComponent<_Base>::id;
-
-      /// \brief Gives back an unique integer id for the Edge.
-      ///
-      /// Gives back an unique integer id for the Edge.
-      ///
-      int id(const Edge&) const { return -1;}
-
-      /// \brief Gives back the edge by the unique id.
-      ///
-      /// Gives back the edge by the unique id.  If the
-      /// graph does not contain arc with the given id then the
-      /// result of the function is undetermined.
-      Edge edgeFromId(int) const { return INVALID;}
-
-      /// \brief Gives back an integer greater or equal to the maximum
-      /// Edge id.
-      ///
-      /// Gives back an integer greater or equal to the maximum Edge
-      /// id.
-      int maxEdgeId() const { return -1;}
-
-      template <typename _Graph>
-      struct Constraints {
-
-        void constraints() {
-          checkConcept<Base, _Graph >();
-          checkConcept<IDableDigraphComponent<Base>, _Graph >();
-          typename _Graph::Edge edge;
-          int ueid = graph.id(edge);
-          ueid = graph.id(edge);
-          edge = graph.edgeFromId(ueid);
-          ueid = graph.maxEdgeId();
-          ignore_unused_variable_warning(ueid);
-        }
-
-        const _Graph& graph;
-      };
-    };
-
-    /// \brief Skeleton class for graph NodeIt and ArcIt
-    ///
-    /// Skeleton class for graph NodeIt and ArcIt.
-    ///
-    template <typename _Graph, typename _Item>
-    class GraphItemIt : public _Item {
-    public:
-      /// \brief Default constructor.
-      ///
-      /// @warning The default constructor sets the iterator
-      /// to an undefined value.
-      GraphItemIt() {}
-      /// \brief Copy constructor.
-      ///
-      /// Copy constructor.
-      ///
-      GraphItemIt(const GraphItemIt& ) {}
-      /// \brief Sets the iterator to the first item.
-      ///
-      /// Sets the iterator to the first item of \c the graph.
-      ///
-      explicit GraphItemIt(const _Graph&) {}
-      /// \brief Invalid constructor \& conversion.
-      ///
-      /// This constructor initializes the item to be invalid.
-      /// \sa Invalid for more details.
-      GraphItemIt(Invalid) {}
-      /// \brief Assign operator for items.
-      ///
-      /// The items are assignable.
-      ///
-      GraphItemIt& operator=(const GraphItemIt&) { return *this; }
-      /// \brief Next item.
-      ///
-      /// Assign the iterator to the next item.
-      ///
-      GraphItemIt& operator++() { return *this; }
-      /// \brief Equality operator
-      ///
-      /// Two iterators are equal if and only if they point to the
-      /// same object or both are invalid.
-      bool operator==(const GraphItemIt&) const { return true;}
-      /// \brief Inequality operator
-      ///
-      /// \sa operator==(Node n)
-      ///
-      bool operator!=(const GraphItemIt&) const { return true;}
-
-      template<typename _GraphItemIt>
-      struct Constraints {
-        void constraints() {
-          _GraphItemIt it1(g);
-          _GraphItemIt it2;
-
-          it2 = ++it1;
-          ++it2 = it1;
-          ++(++it1);
-
-          _Item bi = it1;
-          bi = it2;
-        }
-        _Graph& g;
-      };
-    };
-
-    /// \brief Skeleton class for graph InArcIt and OutArcIt
-    ///
-    /// \note Because InArcIt and OutArcIt may not inherit from the same
-    /// base class, the _selector is a additional template parameter. For
-    /// InArcIt you should instantiate it with character 'i' and for
-    /// OutArcIt with 'o'.
-    template <typename _Graph,
-              typename _Item = typename _Graph::Arc,
-              typename _Base = typename _Graph::Node,
-              char _selector = '0'>
-    class GraphIncIt : public _Item {
-    public:
-      /// \brief Default constructor.
-      ///
-      /// @warning The default constructor sets the iterator
-      /// to an undefined value.
-      GraphIncIt() {}
-      /// \brief Copy constructor.
-      ///
-      /// Copy constructor.
-      ///
-      GraphIncIt(GraphIncIt const& gi) : _Item(gi) {}
-      /// \brief Sets the iterator to the first arc incoming into or outgoing
-      /// from the node.
-      ///
-      /// Sets the iterator to the first arc incoming into or outgoing
-      /// from the node.
-      ///
-      explicit GraphIncIt(const _Graph&, const _Base&) {}
-      /// \brief Invalid constructor \& conversion.
-      ///
-      /// This constructor initializes the item to be invalid.
-      /// \sa Invalid for more details.
-      GraphIncIt(Invalid) {}
-      /// \brief Assign operator for iterators.
-      ///
-      /// The iterators are assignable.
-      ///
-      GraphIncIt& operator=(GraphIncIt const&) { return *this; }
-      /// \brief Next item.
-      ///
-      /// Assign the iterator to the next item.
-      ///
-      GraphIncIt& operator++() { return *this; }
-
-      /// \brief Equality operator
-      ///
-      /// Two iterators are equal if and only if they point to the
-      /// same object or both are invalid.
-      bool operator==(const GraphIncIt&) const { return true;}
-
-      /// \brief Inequality operator
-      ///
-      /// \sa operator==(Node n)
-      ///
-      bool operator!=(const GraphIncIt&) const { return true;}
-
-      template <typename _GraphIncIt>
-      struct Constraints {
-        void constraints() {
-          checkConcept<GraphItem<_selector>, _GraphIncIt>();
-          _GraphIncIt it1(graph, node);
-          _GraphIncIt it2;
-
-          it2 = ++it1;
-          ++it2 = it1;
-          ++(++it1);
-          _Item e = it1;
-          e = it2;
-
-        }
-
-        _Item arc;
-        _Base node;
-        _Graph graph;
-        _GraphIncIt it;
-      };
-    };
-
-
-    /// \brief An empty iterable digraph class.
-    ///
-    /// This class provides beside the core digraph features
-    /// iterator based iterable interface for the digraph structure.
-    /// This concept is part of the Digraph concept.
-    template <typename _Base = BaseDigraphComponent>
-    class IterableDigraphComponent : public _Base {
-
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-
-      typedef IterableDigraphComponent Digraph;
-
-      /// \name Base iteration
-      ///
-      /// This interface provides functions for iteration on digraph items
-      ///
-      /// @{
-
-      /// \brief Gives back the first node in the iterating order.
-      ///
-      /// Gives back the first node in the iterating order.
-      ///
-      void first(Node&) const {}
-
-      /// \brief Gives back the next node in the iterating order.
-      ///
-      /// Gives back the next node in the iterating order.
-      ///
-      void next(Node&) const {}
-
-      /// \brief Gives back the first arc in the iterating order.
-      ///
-      /// Gives back the first arc in the iterating order.
-      ///
-      void first(Arc&) const {}
-
-      /// \brief Gives back the next arc in the iterating order.
-      ///
-      /// Gives back the next arc in the iterating order.
-      ///
-      void next(Arc&) const {}
-
-
-      /// \brief Gives back the first of the arcs point to the given
-      /// node.
-      ///
-      /// Gives back the first of the arcs point to the given node.
-      ///
-      void firstIn(Arc&, const Node&) const {}
-
-      /// \brief Gives back the next of the arcs points to the given
-      /// node.
-      ///
-      /// Gives back the next of the arcs points to the given node.
-      ///
-      void nextIn(Arc&) const {}
-
-      /// \brief Gives back the first of the arcs start from the
-      /// given node.
-      ///
-      /// Gives back the first of the arcs start from the given node.
-      ///
-      void firstOut(Arc&, const Node&) const {}
-
-      /// \brief Gives back the next of the arcs start from the given
-      /// node.
-      ///
-      /// Gives back the next of the arcs start from the given node.
-      ///
-      void nextOut(Arc&) const {}
-
-      /// @}
-
-      /// \name Class based iteration
-      ///
-      /// This interface provides functions for iteration on digraph items
-      ///
-      /// @{
-
-      /// \brief This iterator goes through each node.
-      ///
-      /// This iterator goes through each node.
-      ///
-      typedef GraphItemIt<Digraph, Node> NodeIt;
-
-      /// \brief This iterator goes through each node.
-      ///
-      /// This iterator goes through each node.
-      ///
-      typedef GraphItemIt<Digraph, Arc> ArcIt;
-
-      /// \brief This iterator goes trough the incoming arcs of a node.
-      ///
-      /// This iterator goes trough the \e inccoming arcs of a certain node
-      /// of a digraph.
-      typedef GraphIncIt<Digraph, Arc, Node, 'i'> InArcIt;
-
-      /// \brief This iterator goes trough the outgoing arcs of a node.
-      ///
-      /// This iterator goes trough the \e outgoing arcs of a certain node
-      /// of a digraph.
-      typedef GraphIncIt<Digraph, Arc, Node, 'o'> OutArcIt;
-
-      /// \brief The base node of the iterator.
-      ///
-      /// Gives back the base node of the iterator.
-      /// It is always the target of the pointed arc.
-      Node baseNode(const InArcIt&) const { return INVALID; }
-
-      /// \brief The running node of the iterator.
-      ///
-      /// Gives back the running node of the iterator.
-      /// It is always the source of the pointed arc.
-      Node runningNode(const InArcIt&) const { return INVALID; }
-
-      /// \brief The base node of the iterator.
-      ///
-      /// Gives back the base node of the iterator.
-      /// It is always the source of the pointed arc.
-      Node baseNode(const OutArcIt&) const { return INVALID; }
-
-      /// \brief The running node of the iterator.
-      ///
-      /// Gives back the running node of the iterator.
-      /// It is always the target of the pointed arc.
-      Node runningNode(const OutArcIt&) const { return INVALID; }
-
-      /// @}
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-
-          {
-            typename _Digraph::Node node(INVALID);
-            typename _Digraph::Arc arc(INVALID);
-            {
-              digraph.first(node);
-              digraph.next(node);
-            }
-            {
-              digraph.first(arc);
-              digraph.next(arc);
-            }
-            {
-              digraph.firstIn(arc, node);
-              digraph.nextIn(arc);
-            }
-            {
-              digraph.firstOut(arc, node);
-              digraph.nextOut(arc);
-            }
-          }
-
-          {
-            checkConcept<GraphItemIt<_Digraph, typename _Digraph::Arc>,
-              typename _Digraph::ArcIt >();
-            checkConcept<GraphItemIt<_Digraph, typename _Digraph::Node>,
-              typename _Digraph::NodeIt >();
-            checkConcept<GraphIncIt<_Digraph, typename _Digraph::Arc,
-              typename _Digraph::Node, 'i'>, typename _Digraph::InArcIt>();
-            checkConcept<GraphIncIt<_Digraph, typename _Digraph::Arc,
-              typename _Digraph::Node, 'o'>, typename _Digraph::OutArcIt>();
-
-            typename _Digraph::Node n;
-            typename _Digraph::InArcIt ieit(INVALID);
-            typename _Digraph::OutArcIt oeit(INVALID);
-            n = digraph.baseNode(ieit);
-            n = digraph.runningNode(ieit);
-            n = digraph.baseNode(oeit);
-            n = digraph.runningNode(oeit);
-            ignore_unused_variable_warning(n);
-          }
-        }
-
-        const _Digraph& digraph;
-
-      };
-    };
-
-    /// \brief An empty iterable undirected graph class.
-    ///
-    /// This class provides beside the core graph features iterator
-    /// based iterable interface for the undirected graph structure.
-    /// This concept is part of the Graph concept.
-    template <typename _Base = BaseGraphComponent>
-    class IterableGraphComponent : public IterableDigraphComponent<_Base> {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-      typedef typename Base::Edge Edge;
-
-
-      typedef IterableGraphComponent Graph;
-
-      /// \name Base iteration
-      ///
-      /// This interface provides functions for iteration on graph items
-      /// @{
-
-      using IterableDigraphComponent<_Base>::first;
-      using IterableDigraphComponent<_Base>::next;
-
-      /// \brief Gives back the first edge in the iterating
-      /// order.
-      ///
-      /// Gives back the first edge in the iterating order.
-      ///
-      void first(Edge&) const {}
-
-      /// \brief Gives back the next edge in the iterating
-      /// order.
-      ///
-      /// Gives back the next edge in the iterating order.
-      ///
-      void next(Edge&) const {}
-
-
-      /// \brief Gives back the first of the edges from the
-      /// given node.
-      ///
-      /// Gives back the first of the edges from the given
-      /// node. The bool parameter gives back that direction which
-      /// gives a good direction of the edge so the source of the
-      /// directed arc is the given node.
-      void firstInc(Edge&, bool&, const Node&) const {}
-
-      /// \brief Gives back the next of the edges from the
-      /// given node.
-      ///
-      /// Gives back the next of the edges from the given
-      /// node. The bool parameter should be used as the \c firstInc()
-      /// use it.
-      void nextInc(Edge&, bool&) const {}
-
-      using IterableDigraphComponent<_Base>::baseNode;
-      using IterableDigraphComponent<_Base>::runningNode;
-
-      /// @}
-
-      /// \name Class based iteration
-      ///
-      /// This interface provides functions for iteration on graph items
-      ///
-      /// @{
-
-      /// \brief This iterator goes through each node.
-      ///
-      /// This iterator goes through each node.
-      typedef GraphItemIt<Graph, Edge> EdgeIt;
-      /// \brief This iterator goes trough the incident arcs of a
-      /// node.
-      ///
-      /// This iterator goes trough the incident arcs of a certain
-      /// node of a graph.
-      typedef GraphIncIt<Graph, Edge, Node, 'u'> IncEdgeIt;
-      /// \brief The base node of the iterator.
-      ///
-      /// Gives back the base node of the iterator.
-      Node baseNode(const IncEdgeIt&) const { return INVALID; }
-
-      /// \brief The running node of the iterator.
-      ///
-      /// Gives back the running node of the iterator.
-      Node runningNode(const IncEdgeIt&) const { return INVALID; }
-
-      /// @}
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<IterableDigraphComponent<Base>, _Graph>();
-
-          {
-            typename _Graph::Node node(INVALID);
-            typename _Graph::Edge edge(INVALID);
-            bool dir;
-            {
-              graph.first(edge);
-              graph.next(edge);
-            }
-            {
-              graph.firstInc(edge, dir, node);
-              graph.nextInc(edge, dir);
-            }
-
-          }
-
-          {
-            checkConcept<GraphItemIt<_Graph, typename _Graph::Edge>,
-              typename _Graph::EdgeIt >();
-            checkConcept<GraphIncIt<_Graph, typename _Graph::Edge,
-              typename _Graph::Node, 'u'>, typename _Graph::IncEdgeIt>();
-
-            typename _Graph::Node n;
-            typename _Graph::IncEdgeIt ueit(INVALID);
-            n = graph.baseNode(ueit);
-            n = graph.runningNode(ueit);
-          }
-        }
-
-        const _Graph& graph;
-
-      };
-    };
-
-    /// \brief An empty alteration notifier digraph class.
-    ///
-    /// This class provides beside the core digraph features alteration
-    /// notifier interface for the digraph structure.  This implements
-    /// an observer-notifier pattern for each digraph item. More
-    /// obsevers can be registered into the notifier and whenever an
-    /// alteration occured in the digraph all the observers will
-    /// notified about it.
-    template <typename _Base = BaseDigraphComponent>
-    class AlterableDigraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-
-
-      /// The node observer registry.
-      typedef AlterationNotifier<AlterableDigraphComponent, Node>
-      NodeNotifier;
-      /// The arc observer registry.
-      typedef AlterationNotifier<AlterableDigraphComponent, Arc>
-      ArcNotifier;
-
-      /// \brief Gives back the node alteration notifier.
-      ///
-      /// Gives back the node alteration notifier.
-      NodeNotifier& notifier(Node) const {
-        return NodeNotifier();
-      }
-
-      /// \brief Gives back the arc alteration notifier.
-      ///
-      /// Gives back the arc alteration notifier.
-      ArcNotifier& notifier(Arc) const {
-        return ArcNotifier();
-      }
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-          typename _Digraph::NodeNotifier& nn
-            = digraph.notifier(typename _Digraph::Node());
-
-          typename _Digraph::ArcNotifier& en
-            = digraph.notifier(typename _Digraph::Arc());
-
-          ignore_unused_variable_warning(nn);
-          ignore_unused_variable_warning(en);
-        }
-
-        const _Digraph& digraph;
-
-      };
-
-    };
-
-    /// \brief An empty alteration notifier undirected graph class.
-    ///
-    /// This class provides beside the core graph features alteration
-    /// notifier interface for the graph structure.  This implements
-    /// an observer-notifier pattern for each graph item. More
-    /// obsevers can be registered into the notifier and whenever an
-    /// alteration occured in the graph all the observers will
-    /// notified about it.
-    template <typename _Base = BaseGraphComponent>
-    class AlterableGraphComponent : public AlterableDigraphComponent<_Base> {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Edge Edge;
-
-
-      /// The arc observer registry.
-      typedef AlterationNotifier<AlterableGraphComponent, Edge>
-      EdgeNotifier;
-
-      /// \brief Gives back the arc alteration notifier.
-      ///
-      /// Gives back the arc alteration notifier.
-      EdgeNotifier& notifier(Edge) const {
-        return EdgeNotifier();
-      }
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<AlterableGraphComponent<Base>, _Graph>();
-          typename _Graph::EdgeNotifier& uen
-            = graph.notifier(typename _Graph::Edge());
-          ignore_unused_variable_warning(uen);
-        }
-
-        const _Graph& graph;
-
-      };
-
-    };
-
-    /// \brief Class describing the concept of graph maps
-    ///
-    /// This class describes the common interface of the graph maps
-    /// (NodeMap, ArcMap), that is maps that can be used to
-    /// associate data to graph descriptors (nodes or arcs).
-    template <typename _Graph, typename _Item, typename _Value>
-    class GraphMap : public ReadWriteMap<_Item, _Value> {
-    public:
-
-      typedef ReadWriteMap<_Item, _Value> Parent;
-
-      /// The graph type of the map.
-      typedef _Graph Graph;
-      /// The key type of the map.
-      typedef _Item Key;
-      /// The value type of the map.
-      typedef _Value Value;
-
-      /// \brief Construct a new map.
-      ///
-      /// Construct a new map for the graph.
-      explicit GraphMap(const Graph&) {}
-      /// \brief Construct a new map with default value.
-      ///
-      /// Construct a new map for the graph and initalise the values.
-      GraphMap(const Graph&, const Value&) {}
-
-    private:
-      /// \brief Copy constructor.
-      ///
-      /// Copy Constructor.
-      GraphMap(const GraphMap&) : Parent() {}
-
-      /// \brief Assign operator.
-      ///
-      /// Assign operator. It does not mofify the underlying graph,
-      /// it just iterates on the current item set and set the  map
-      /// with the value returned by the assigned map.
-      template <typename CMap>
-      GraphMap& operator=(const CMap&) {
-        checkConcept<ReadMap<Key, Value>, CMap>();
-        return *this;
-      }
-
-    public:
-      template<typename _Map>
-      struct Constraints {
-        void constraints() {
-          checkConcept<ReadWriteMap<Key, Value>, _Map >();
-          // Construction with a graph parameter
-          _Map a(g);
-          // Constructor with a graph and a default value parameter
-          _Map a2(g,t);
-          // Copy constructor.
-          // _Map b(c);
-
-          // ReadMap<Key, Value> cmap;
-          // b = cmap;
-
-          ignore_unused_variable_warning(a);
-          ignore_unused_variable_warning(a2);
-          // ignore_unused_variable_warning(b);
-        }
-
-        const _Map &c;
-        const Graph &g;
-        const typename GraphMap::Value &t;
-      };
-
-    };
-
-    /// \brief An empty mappable digraph class.
-    ///
-    /// This class provides beside the core digraph features
-    /// map interface for the digraph structure.
-    /// This concept is part of the Digraph concept.
-    template <typename _Base = BaseDigraphComponent>
-    class MappableDigraphComponent : public _Base  {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-
-      typedef MappableDigraphComponent Digraph;
-
-      /// \brief ReadWrite map of the nodes.
-      ///
-      /// ReadWrite map of the nodes.
-      ///
-      template <typename _Value>
-      class NodeMap : public GraphMap<Digraph, Node, _Value> {
-      public:
-        typedef GraphMap<MappableDigraphComponent, Node, _Value> Parent;
-
-        /// \brief Construct a new map.
-        ///
-        /// Construct a new map for the digraph.
-        explicit NodeMap(const MappableDigraphComponent& digraph)
-          : Parent(digraph) {}
-
-        /// \brief Construct a new map with default value.
-        ///
-        /// Construct a new map for the digraph and initalise the values.
-        NodeMap(const MappableDigraphComponent& digraph, const _Value& value)
-          : Parent(digraph, value) {}
-
-      private:
-        /// \brief Copy constructor.
-        ///
-        /// Copy Constructor.
-        NodeMap(const NodeMap& nm) : Parent(nm) {}
-
-        /// \brief Assign operator.
-        ///
-        /// Assign operator.
-        template <typename CMap>
-        NodeMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Node, _Value>, CMap>();
-          return *this;
-        }
-
-      };
-
-      /// \brief ReadWrite map of the arcs.
-      ///
-      /// ReadWrite map of the arcs.
-      ///
-      template <typename _Value>
-      class ArcMap : public GraphMap<Digraph, Arc, _Value> {
-      public:
-        typedef GraphMap<MappableDigraphComponent, Arc, _Value> Parent;
-
-        /// \brief Construct a new map.
-        ///
-        /// Construct a new map for the digraph.
-        explicit ArcMap(const MappableDigraphComponent& digraph)
-          : Parent(digraph) {}
-
-        /// \brief Construct a new map with default value.
-        ///
-        /// Construct a new map for the digraph and initalise the values.
-        ArcMap(const MappableDigraphComponent& digraph, const _Value& value)
-          : Parent(digraph, value) {}
-
-      private:
-        /// \brief Copy constructor.
-        ///
-        /// Copy Constructor.
-        ArcMap(const ArcMap& nm) : Parent(nm) {}
-
-        /// \brief Assign operator.
-        ///
-        /// Assign operator.
-        template <typename CMap>
-        ArcMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Arc, _Value>, CMap>();
-          return *this;
-        }
-
-      };
-
-
-      template <typename _Digraph>
-      struct Constraints {
-
-        struct Dummy {
-          int value;
-          Dummy() : value(0) {}
-          Dummy(int _v) : value(_v) {}
-        };
-
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-          { // int map test
-            typedef typename _Digraph::template NodeMap<int> IntNodeMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Node, int>,
-              IntNodeMap >();
-          } { // bool map test
-            typedef typename _Digraph::template NodeMap<bool> BoolNodeMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Node, bool>,
-              BoolNodeMap >();
-          } { // Dummy map test
-            typedef typename _Digraph::template NodeMap<Dummy> DummyNodeMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Node, Dummy>,
-              DummyNodeMap >();
-          }
-
-          { // int map test
-            typedef typename _Digraph::template ArcMap<int> IntArcMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Arc, int>,
-              IntArcMap >();
-          } { // bool map test
-            typedef typename _Digraph::template ArcMap<bool> BoolArcMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Arc, bool>,
-              BoolArcMap >();
-          } { // Dummy map test
-            typedef typename _Digraph::template ArcMap<Dummy> DummyArcMap;
-            checkConcept<GraphMap<_Digraph, typename _Digraph::Arc, Dummy>,
-              DummyArcMap >();
-          }
-        }
-
-        _Digraph& digraph;
-      };
-    };
-
-    /// \brief An empty mappable base bipartite graph class.
-    ///
-    /// This class provides beside the core graph features
-    /// map interface for the graph structure.
-    /// This concept is part of the Graph concept.
-    template <typename _Base = BaseGraphComponent>
-    class MappableGraphComponent : public MappableDigraphComponent<_Base>  {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Edge Edge;
-
-      typedef MappableGraphComponent Graph;
-
-      /// \brief ReadWrite map of the edges.
-      ///
-      /// ReadWrite map of the edges.
-      ///
-      template <typename _Value>
-      class EdgeMap : public GraphMap<Graph, Edge, _Value> {
-      public:
-        typedef GraphMap<MappableGraphComponent, Edge, _Value> Parent;
-
-        /// \brief Construct a new map.
-        ///
-        /// Construct a new map for the graph.
-        explicit EdgeMap(const MappableGraphComponent& graph)
-          : Parent(graph) {}
-
-        /// \brief Construct a new map with default value.
-        ///
-        /// Construct a new map for the graph and initalise the values.
-        EdgeMap(const MappableGraphComponent& graph, const _Value& value)
-          : Parent(graph, value) {}
-
-      private:
-        /// \brief Copy constructor.
-        ///
-        /// Copy Constructor.
-        EdgeMap(const EdgeMap& nm) : Parent(nm) {}
-
-        /// \brief Assign operator.
-        ///
-        /// Assign operator.
-        template <typename CMap>
-        EdgeMap& operator=(const CMap&) {
-          checkConcept<ReadMap<Edge, _Value>, CMap>();
-          return *this;
-        }
-
-      };
-
-
-      template <typename _Graph>
-      struct Constraints {
-
-        struct Dummy {
-          int value;
-          Dummy() : value(0) {}
-          Dummy(int _v) : value(_v) {}
-        };
-
-        void constraints() {
-          checkConcept<MappableGraphComponent<Base>, _Graph>();
-
-          { // int map test
-            typedef typename _Graph::template EdgeMap<int> IntEdgeMap;
-            checkConcept<GraphMap<_Graph, typename _Graph::Edge, int>,
-              IntEdgeMap >();
-          } { // bool map test
-            typedef typename _Graph::template EdgeMap<bool> BoolEdgeMap;
-            checkConcept<GraphMap<_Graph, typename _Graph::Edge, bool>,
-              BoolEdgeMap >();
-          } { // Dummy map test
-            typedef typename _Graph::template EdgeMap<Dummy> DummyEdgeMap;
-            checkConcept<GraphMap<_Graph, typename _Graph::Edge, Dummy>,
-              DummyEdgeMap >();
-          }
-        }
-
-        _Graph& graph;
-      };
-    };
-
-    /// \brief An empty extendable digraph class.
-    ///
-    /// This class provides beside the core digraph features digraph
-    /// extendable interface for the digraph structure.  The main
-    /// difference between the base and this interface is that the
-    /// digraph alterations should handled already on this level.
-    template <typename _Base = BaseDigraphComponent>
-    class ExtendableDigraphComponent : public _Base {
-    public:
-      typedef _Base Base;
-
-      typedef typename _Base::Node Node;
-      typedef typename _Base::Arc Arc;
-
-      /// \brief Adds a new node to the digraph.
-      ///
-      /// Adds a new node to the digraph.
-      ///
-      Node addNode() {
-        return INVALID;
-      }
-
-      /// \brief Adds a new arc connects the given two nodes.
-      ///
-      /// Adds a new arc connects the the given two nodes.
-      Arc addArc(const Node&, const Node&) {
-        return INVALID;
-      }
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-          typename _Digraph::Node node_a, node_b;
-          node_a = digraph.addNode();
-          node_b = digraph.addNode();
-          typename _Digraph::Arc arc;
-          arc = digraph.addArc(node_a, node_b);
-        }
-
-        _Digraph& digraph;
-      };
-    };
-
-    /// \brief An empty extendable base undirected graph class.
-    ///
-    /// This class provides beside the core undirected graph features
-    /// core undircted graph extend interface for the graph structure.
-    /// The main difference between the base and this interface is
-    /// that the graph alterations should handled already on this
-    /// level.
-    template <typename _Base = BaseGraphComponent>
-    class ExtendableGraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-      typedef typename _Base::Node Node;
-      typedef typename _Base::Edge Edge;
-
-      /// \brief Adds a new node to the graph.
-      ///
-      /// Adds a new node to the graph.
-      ///
-      Node addNode() {
-        return INVALID;
-      }
-
-      /// \brief Adds a new arc connects the given two nodes.
-      ///
-      /// Adds a new arc connects the the given two nodes.
-      Edge addArc(const Node&, const Node&) {
-        return INVALID;
-      }
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Graph>();
-          typename _Graph::Node node_a, node_b;
-          node_a = graph.addNode();
-          node_b = graph.addNode();
-          typename _Graph::Edge edge;
-          edge = graph.addEdge(node_a, node_b);
-        }
-
-        _Graph& graph;
-      };
-    };
-
-    /// \brief An empty erasable digraph class.
-    ///
-    /// This class provides beside the core digraph features core erase
-    /// functions for the digraph structure. The main difference between
-    /// the base and this interface is that the digraph alterations
-    /// should handled already on this level.
-    template <typename _Base = BaseDigraphComponent>
-    class ErasableDigraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Arc Arc;
-
-      /// \brief Erase a node from the digraph.
-      ///
-      /// Erase a node from the digraph. This function should
-      /// erase all arcs connecting to the node.
-      void erase(const Node&) {}
-
-      /// \brief Erase an arc from the digraph.
-      ///
-      /// Erase an arc from the digraph.
-      ///
-      void erase(const Arc&) {}
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-          typename _Digraph::Node node;
-          digraph.erase(node);
-          typename _Digraph::Arc arc;
-          digraph.erase(arc);
-        }
-
-        _Digraph& digraph;
-      };
-    };
-
-    /// \brief An empty erasable base undirected graph class.
-    ///
-    /// This class provides beside the core undirected graph features
-    /// core erase functions for the undirceted graph structure. The
-    /// main difference between the base and this interface is that
-    /// the graph alterations should handled already on this level.
-    template <typename _Base = BaseGraphComponent>
-    class ErasableGraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-      typedef typename Base::Node Node;
-      typedef typename Base::Edge Edge;
-
-      /// \brief Erase a node from the graph.
-      ///
-      /// Erase a node from the graph. This function should erase
-      /// arcs connecting to the node.
-      void erase(const Node&) {}
-
-      /// \brief Erase an arc from the graph.
-      ///
-      /// Erase an arc from the graph.
-      ///
-      void erase(const Edge&) {}
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Graph>();
-          typename _Graph::Node node;
-          graph.erase(node);
-          typename _Graph::Edge edge;
-          graph.erase(edge);
-        }
-
-        _Graph& graph;
-      };
-    };
-
-    /// \brief An empty clearable base digraph class.
-    ///
-    /// This class provides beside the core digraph features core clear
-    /// functions for the digraph structure. The main difference between
-    /// the base and this interface is that the digraph alterations
-    /// should handled already on this level.
-    template <typename _Base = BaseDigraphComponent>
-    class ClearableDigraphComponent : public _Base {
-    public:
-
-      typedef _Base Base;
-
-      /// \brief Erase all nodes and arcs from the digraph.
-      ///
-      /// Erase all nodes and arcs from the digraph.
-      ///
-      void clear() {}
-
-      template <typename _Digraph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<Base, _Digraph>();
-          digraph.clear();
-        }
-
-        _Digraph digraph;
-      };
-    };
-
-    /// \brief An empty clearable base undirected graph class.
-    ///
-    /// This class provides beside the core undirected graph features
-    /// core clear functions for the undirected graph structure. The
-    /// main difference between the base and this interface is that
-    /// the graph alterations should handled already on this level.
-    template <typename _Base = BaseGraphComponent>
-    class ClearableGraphComponent : public ClearableDigraphComponent<_Base> {
-    public:
-
-      typedef _Base Base;
-
-      template <typename _Graph>
-      struct Constraints {
-        void constraints() {
-          checkConcept<ClearableGraphComponent<Base>, _Graph>();
-        }
-
-        _Graph graph;
-      };
-    };
-
-  }
-
-}
-
-#endif
Index: mon/concepts/heap.h
===================================================================
--- lemon/concepts/heap.h	(revision 290)
+++ 	(revision )
@@ -1,245 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 concept
-///\file
-///\brief The concept of heaps.
-
-#ifndef LEMON_CONCEPT_HEAP_H
-#define LEMON_CONCEPT_HEAP_H
-
-#include <lemon/core.h>
-
-namespace lemon {
-
-  namespace concepts {
-
-    /// \addtogroup concept
-    /// @{
-
-    /// \brief The heap concept.
-    ///
-    /// Concept class describing the main interface of heaps.
-    template <typename Priority, typename ItemIntMap>
-    class Heap {
-    public:
-
-      /// Type of the items stored in the heap.
-      typedef typename ItemIntMap::Key Item;
-
-      /// Type of the priorities.
-      typedef Priority Prio;
-
-      /// \brief Type to represent the states of the items.
-      ///
-      /// Each item has a state associated to it. It can be "in heap",
-      /// "pre heap" or "post heap". The later two are indifferent
-      /// from the point of view of the heap, but may be useful for
-      /// the user.
-      ///
-      /// The \c ItemIntMap must be initialized in such a way, that it
-      /// assigns \c PRE_HEAP (<tt>-1</tt>) to every item.
-      enum State {
-        IN_HEAP = 0,
-        PRE_HEAP = -1,
-        POST_HEAP = -2
-      };
-
-      /// \brief The constructor.
-      ///
-      /// The constructor.
-      /// \param map A map that assigns \c int values to keys of type
-      /// \c Item. It is used internally by the heap implementations to
-      /// handle the cross references. The assigned value must be
-      /// \c PRE_HEAP (<tt>-1</tt>) for every item.
-      explicit Heap(ItemIntMap &map) {}
-
-      /// \brief The number of items stored in the heap.
-      ///
-      /// Returns the number of items stored in the heap.
-      int size() const { return 0; }
-
-      /// \brief Checks if the heap is empty.
-      ///
-      /// Returns \c true if the heap is empty.
-      bool empty() const { return false; }
-
-      /// \brief Makes the heap empty.
-      ///
-      /// Makes the heap empty.
-      void clear();
-
-      /// \brief Inserts an item into the heap with the given priority.
-      ///
-      /// Inserts the given item into the heap with the given priority.
-      /// \param i The item to insert.
-      /// \param p The priority of the item.
-      void push(const Item &i, const Prio &p) {}
-
-      /// \brief Returns the item having minimum priority.
-      ///
-      /// Returns the item having minimum priority.
-      /// \pre The heap must be non-empty.
-      Item top() const {}
-
-      /// \brief The minimum priority.
-      ///
-      /// Returns the minimum priority.
-      /// \pre The heap must be non-empty.
-      Prio prio() const {}
-
-      /// \brief Removes the item having minimum priority.
-      ///
-      /// Removes the item having minimum priority.
-      /// \pre The heap must be non-empty.
-      void pop() {}
-
-      /// \brief Removes an item from the heap.
-      ///
-      /// Removes the given item from the heap if it is already stored.
-      /// \param i The item to delete.
-      void erase(const Item &i) {}
-
-      /// \brief The priority of an item.
-      ///
-      /// Returns the priority of the given item.
-      /// \pre \c i must be in the heap.
-      /// \param i The item.
-      Prio operator[](const Item &i) const {}
-
-      /// \brief Sets the priority of an item or inserts it, if it is
-      /// not stored in the heap.
-      ///
-      /// This method sets the priority of the given item if it is
-      /// already stored in the heap.
-      /// Otherwise it inserts the given item with the given priority.
-      ///
-      /// \param i The item.
-      /// \param p The priority.
-      void set(const Item &i, const Prio &p) {}
-
-      /// \brief Decreases the priority of an item to the given value.
-      ///
-      /// Decreases the priority of an item to the given value.
-      /// \pre \c i must be stored in the heap with priority at least \c p.
-      /// \param i The item.
-      /// \param p The priority.
-      void decrease(const Item &i, const Prio &p) {}
-
-      /// \brief Increases the priority of an item to the given value.
-      ///
-      /// Increases the priority of an item to the given value.
-      /// \pre \c i must be stored in the heap with priority at most \c p.
-      /// \param i The item.
-      /// \param p The priority.
-      void increase(const Item &i, const Prio &p) {}
-
-      /// \brief Returns if an item is in, has already been in, or has
-      /// never been in the heap.
-      ///
-      /// This method returns \c PRE_HEAP if the given item has never
-      /// been in the heap, \c IN_HEAP if it is in the heap at the moment,
-      /// and \c POST_HEAP otherwise.
-      /// In the latter case it is possible that the item will get back
-      /// to the heap again.
-      /// \param i The item.
-      State state(const Item &i) const {}
-
-      /// \brief Sets the state of an item in the heap.
-      ///
-      /// Sets the state of the given item in the heap. It can be used
-      /// to manually clear the heap when it is important to achive the
-      /// better time complexity.
-      /// \param i The item.
-      /// \param st The state. It should not be \c IN_HEAP.
-      void state(const Item& i, State st) {}
-
-
-      template <typename _Heap>
-      struct Constraints {
-      public:
-        void constraints() {
-          typedef typename _Heap::Item OwnItem;
-          typedef typename _Heap::Prio OwnPrio;
-          typedef typename _Heap::State OwnState;
-
-          Item item;
-          Prio prio;
-          item=Item();
-          prio=Prio();
-          ignore_unused_variable_warning(item);
-          ignore_unused_variable_warning(prio);
-
-          OwnItem own_item;
-          OwnPrio own_prio;
-          OwnState own_state;
-          own_item=Item();
-          own_prio=Prio();
-          ignore_unused_variable_warning(own_item);
-          ignore_unused_variable_warning(own_prio);
-          ignore_unused_variable_warning(own_state);
-
-          _Heap heap1(map);
-          _Heap heap2 = heap1;
-          ignore_unused_variable_warning(heap1);
-          ignore_unused_variable_warning(heap2);
-
-          int s = heap.size();
-          ignore_unused_variable_warning(s);
-          bool e = heap.empty();
-          ignore_unused_variable_warning(e);
-
-          prio = heap.prio();
-          item = heap.top();
-          prio = heap[item];
-          own_prio = heap.prio();
-          own_item = heap.top();
-          own_prio = heap[own_item];
-
-          heap.push(item, prio);
-          heap.push(own_item, own_prio);
-          heap.pop();
-
-          heap.set(item, prio);
-          heap.decrease(item, prio);
-          heap.increase(item, prio);
-          heap.set(own_item, own_prio);
-          heap.decrease(own_item, own_prio);
-          heap.increase(own_item, own_prio);
-
-          heap.erase(item);
-          heap.erase(own_item);
-          heap.clear();
-
-          own_state = heap.state(own_item);
-          heap.state(own_item, own_state);
-
-          own_state = _Heap::PRE_HEAP;
-          own_state = _Heap::IN_HEAP;
-          own_state = _Heap::POST_HEAP;
-        }
-
-        _Heap& heap;
-        ItemIntMap& map;
-      };
-    };
-
-    /// @}
-  } // namespace lemon
-}
-#endif // LEMON_CONCEPT_PATH_H
Index: mon/concepts/maps.h
===================================================================
--- lemon/concepts/maps.h	(revision 318)
+++ 	(revision )
@@ -1,216 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_CONCEPT_MAPS_H
-#define LEMON_CONCEPT_MAPS_H
-
-#include <lemon/core.h>
-#include <lemon/concept_check.h>
-
-///\ingroup map_concepts
-///\file
-///\brief The concept of maps.
-
-namespace lemon {
-
-  namespace concepts {
-
-    /// \addtogroup map_concepts
-    /// @{
-
-    /// Readable map concept
-
-    /// Readable map concept.
-    ///
-    template<typename K, typename T>
-    class ReadMap
-    {
-    public:
-      /// The key type of the map.
-      typedef K Key;
-      /// \brief The value type of the map.
-      /// (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Returns the value associated with the given key.
-      Value operator[](const Key &) const {
-        return *static_cast<Value *>(0);
-      }
-
-      template<typename _ReadMap>
-      struct Constraints {
-        void constraints() {
-          Value val = m[key];
-          val = m[key];
-          typename _ReadMap::Value own_val = m[own_key];
-          own_val = m[own_key];
-
-          ignore_unused_variable_warning(key);
-          ignore_unused_variable_warning(val);
-          ignore_unused_variable_warning(own_key);
-          ignore_unused_variable_warning(own_val);
-        }
-        const Key& key;
-        const typename _ReadMap::Key& own_key;
-        const _ReadMap& m;
-      };
-
-    };
-
-
-    /// Writable map concept
-
-    /// Writable map concept.
-    ///
-    template<typename K, typename T>
-    class WriteMap
-    {
-    public:
-      /// The key type of the map.
-      typedef K Key;
-      /// \brief The value type of the map.
-      /// (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Sets the value associated with the given key.
-      void set(const Key &, const Value &) {}
-
-      /// Default constructor.
-      WriteMap() {}
-
-      template <typename _WriteMap>
-      struct Constraints {
-        void constraints() {
-          m.set(key, val);
-          m.set(own_key, own_val);
-
-          ignore_unused_variable_warning(key);
-          ignore_unused_variable_warning(val);
-          ignore_unused_variable_warning(own_key);
-          ignore_unused_variable_warning(own_val);
-        }
-        const Key& key;
-        const Value& val;
-        const typename _WriteMap::Key& own_key;
-        const typename _WriteMap::Value& own_val;
-        _WriteMap& m;
-      };
-    };
-
-    /// Read/writable map concept
-
-    /// Read/writable map concept.
-    ///
-    template<typename K, typename T>
-    class ReadWriteMap : public ReadMap<K,T>,
-                         public WriteMap<K,T>
-    {
-    public:
-      /// The key type of the map.
-      typedef K Key;
-      /// \brief The value type of the map.
-      /// (The type of objects associated with the keys).
-      typedef T Value;
-
-      /// Returns the value associated with the given key.
-      Value operator[](const Key &) const {
-        return *static_cast<Value *>(0);
-      }
-
-      /// Sets the value associated with the given key.
-      void set(const Key &, const Value &) {}
-
-      template<typename _ReadWriteMap>
-      struct Constraints {
-        void constraints() {
-          checkConcept<ReadMap<K, T>, _ReadWriteMap >();
-          checkConcept<WriteMap<K, T>, _ReadWriteMap >();
-        }
-      };
-    };
-
-
-    /// Dereferable map concept
-
-    /// Dereferable map concept.
-    ///
-    template<typename K, typename T, typename R, typename CR>
-    class ReferenceMap : public ReadWriteMap<K,T>
-    {
-    public:
-      /// Tag for reference maps.
-      typedef True ReferenceMapTag;
-      /// The key type of the map.
-      typedef K Key;
-      /// \brief The value type of the map.
-      /// (The type of objects associated with the keys).
-      typedef T Value;
-      /// The reference type of the map.
-      typedef R Reference;
-      /// The const reference type of the map.
-      typedef CR ConstReference;
-
-    public:
-
-      /// Returns a reference to the value associated with the given key.
-      Reference operator[](const Key &) {
-        return *static_cast<Value *>(0);
-      }
-
-      /// Returns a const reference to the value associated with the given key.
-      ConstReference operator[](const Key &) const {
-        return *static_cast<Value *>(0);
-      }
-
-      /// Sets the value associated with the given key.
-      void set(const Key &k,const Value &t) { operator[](k)=t; }
-
-      template<typename _ReferenceMap>
-      struct Constraints {
-        void constraints() {
-          checkConcept<ReadWriteMap<K, T>, _ReferenceMap >();
-          ref = m[key];
-          m[key] = val;
-          m[key] = ref;
-          m[key] = cref;
-          own_ref = m[own_key];
-          m[own_key] = own_val;
-          m[own_key] = own_ref;
-          m[own_key] = own_cref;
-          m[key] = m[own_key];
-          m[own_key] = m[key];
-        }
-        const Key& key;
-        Value& val;
-        Reference ref;
-        ConstReference cref;
-        const typename _ReferenceMap::Key& own_key;
-        typename _ReferenceMap::Value& own_val;
-        typename _ReferenceMap::Reference own_ref;
-        typename _ReferenceMap::ConstReference own_cref;
-        _ReferenceMap& m;
-      };
-    };
-
-    // @}
-
-  } //namespace concepts
-
-} //namespace lemon
-
-#endif // LEMON_CONCEPT_MAPS_H
Index: mon/concepts/path.h
===================================================================
--- lemon/concepts/path.h	(revision 281)
+++ 	(revision )
@@ -1,308 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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 concept
-///\file
-///\brief Classes for representing paths in digraphs.
-///
-
-#ifndef LEMON_CONCEPT_PATH_H
-#define LEMON_CONCEPT_PATH_H
-
-#include <lemon/core.h>
-#include <lemon/concept_check.h>
-
-namespace lemon {
-  namespace concepts {
-
-    /// \addtogroup concept
-    /// @{
-
-    /// \brief A skeleton structure for representing directed paths in
-    /// a digraph.
-    ///
-    /// A skeleton structure for representing directed paths in a
-    /// digraph.
-    /// \tparam _Digraph The digraph type in which the path is.
-    ///
-    /// In a sense, the path can be treated as a list of arcs. The
-    /// lemon path type stores just this list. As a consequence it
-    /// cannot enumerate the nodes in the path and the zero length
-    /// paths cannot store the source.
-    ///
-    template <typename _Digraph>
-    class Path {
-    public:
-
-      /// Type of the underlying digraph.
-      typedef _Digraph Digraph;
-      /// Arc type of the underlying digraph.
-      typedef typename Digraph::Arc Arc;
-
-      class ArcIt;
-
-      /// \brief Default constructor
-      Path() {}
-
-      /// \brief Template constructor
-      template <typename CPath>
-      Path(const CPath& cpath) {}
-
-      /// \brief Template assigment
-      template <typename CPath>
-      Path& operator=(const CPath& cpath) {
-        ignore_unused_variable_warning(cpath);
-        return *this;
-      }
-
-      /// Length of the path ie. the number of arcs in the path.
-      int length() const { return 0;}
-
-      /// Returns whether the path is empty.
-      bool empty() const { return true;}
-
-      /// Resets the path to an empty path.
-      void clear() {}
-
-      /// \brief LEMON style iterator for path arcs
-      ///
-      /// This class is used to iterate on the arcs of the paths.
-      class ArcIt {
-      public:
-        /// Default constructor
-        ArcIt() {}
-        /// Invalid constructor
-        ArcIt(Invalid) {}
-        /// Constructor for first arc
-        ArcIt(const Path &) {}
-
-        /// Conversion to Arc
-        operator Arc() const { return INVALID; }
-
-        /// Next arc
-        ArcIt& operator++() {return *this;}
-
-        /// Comparison operator
-        bool operator==(const ArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator!=(const ArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator<(const ArcIt&) const {return false;}
-
-      };
-
-      template <typename _Path>
-      struct Constraints {
-        void constraints() {
-          Path<Digraph> pc;
-          _Path p, pp(pc);
-          int l = p.length();
-          int e = p.empty();
-          p.clear();
-
-          p = pc;
-
-          typename _Path::ArcIt id, ii(INVALID), i(p);
-
-          ++i;
-          typename Digraph::Arc ed = i;
-
-          e = (i == ii);
-          e = (i != ii);
-          e = (i < ii);
-
-          ignore_unused_variable_warning(l);
-          ignore_unused_variable_warning(pp);
-          ignore_unused_variable_warning(e);
-          ignore_unused_variable_warning(id);
-          ignore_unused_variable_warning(ii);
-          ignore_unused_variable_warning(ed);
-        }
-      };
-
-    };
-
-    namespace _path_bits {
-
-      template <typename _Digraph, typename _Path, typename RevPathTag = void>
-      struct PathDumperConstraints {
-        void constraints() {
-          int l = p.length();
-          int e = p.empty();
-
-          typename _Path::ArcIt id, i(p);
-
-          ++i;
-          typename _Digraph::Arc ed = i;
-
-          e = (i == INVALID);
-          e = (i != INVALID);
-
-          ignore_unused_variable_warning(l);
-          ignore_unused_variable_warning(e);
-          ignore_unused_variable_warning(id);
-          ignore_unused_variable_warning(ed);
-        }
-        _Path& p;
-      };
-
-      template <typename _Digraph, typename _Path>
-      struct PathDumperConstraints<
-        _Digraph, _Path,
-        typename enable_if<typename _Path::RevPathTag, void>::type
-      > {
-        void constraints() {
-          int l = p.length();
-          int e = p.empty();
-
-          typename _Path::RevArcIt id, i(p);
-
-          ++i;
-          typename _Digraph::Arc ed = i;
-
-          e = (i == INVALID);
-          e = (i != INVALID);
-
-          ignore_unused_variable_warning(l);
-          ignore_unused_variable_warning(e);
-          ignore_unused_variable_warning(id);
-          ignore_unused_variable_warning(ed);
-        }
-        _Path& p;
-      };
-
-    }
-
-
-    /// \brief A skeleton structure for path dumpers.
-    ///
-    /// A skeleton structure for path dumpers. The path dumpers are
-    /// the generalization of the paths. The path dumpers can
-    /// enumerate the arcs of the path wheter in forward or in
-    /// backward order.  In most time these classes are not used
-    /// directly rather it used to assign a dumped class to a real
-    /// path type.
-    ///
-    /// The main purpose of this concept is that the shortest path
-    /// algorithms can enumerate easily the arcs in reverse order.
-    /// If we would like to give back a real path from these
-    /// algorithms then we should create a temporarly path object. In
-    /// LEMON such algorithms gives back a path dumper what can
-    /// assigned to a real path and the dumpers can be implemented as
-    /// an adaptor class to the predecessor map.
-
-    /// \tparam _Digraph  The digraph type in which the path is.
-    ///
-    /// The paths can be constructed from any path type by a
-    /// template constructor or a template assignment operator.
-    ///
-    template <typename _Digraph>
-    class PathDumper {
-    public:
-
-      /// Type of the underlying digraph.
-      typedef _Digraph Digraph;
-      /// Arc type of the underlying digraph.
-      typedef typename Digraph::Arc Arc;
-
-      /// Length of the path ie. the number of arcs in the path.
-      int length() const { return 0;}
-
-      /// Returns whether the path is empty.
-      bool empty() const { return true;}
-
-      /// \brief Forward or reverse dumping
-      ///
-      /// If the RevPathTag is defined and true then reverse dumping
-      /// is provided in the path dumper. In this case instead of the
-      /// ArcIt the RevArcIt iterator should be implemented in the
-      /// dumper.
-      typedef False RevPathTag;
-
-      /// \brief LEMON style iterator for path arcs
-      ///
-      /// This class is used to iterate on the arcs of the paths.
-      class ArcIt {
-      public:
-        /// Default constructor
-        ArcIt() {}
-        /// Invalid constructor
-        ArcIt(Invalid) {}
-        /// Constructor for first arc
-        ArcIt(const PathDumper&) {}
-
-        /// Conversion to Arc
-        operator Arc() const { return INVALID; }
-
-        /// Next arc
-        ArcIt& operator++() {return *this;}
-
-        /// Comparison operator
-        bool operator==(const ArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator!=(const ArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator<(const ArcIt&) const {return false;}
-
-      };
-
-      /// \brief LEMON style iterator for path arcs
-      ///
-      /// This class is used to iterate on the arcs of the paths in
-      /// reverse direction.
-      class RevArcIt {
-      public:
-        /// Default constructor
-        RevArcIt() {}
-        /// Invalid constructor
-        RevArcIt(Invalid) {}
-        /// Constructor for first arc
-        RevArcIt(const PathDumper &) {}
-
-        /// Conversion to Arc
-        operator Arc() const { return INVALID; }
-
-        /// Next arc
-        RevArcIt& operator++() {return *this;}
-
-        /// Comparison operator
-        bool operator==(const RevArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator!=(const RevArcIt&) const {return true;}
-        /// Comparison operator
-        bool operator<(const RevArcIt&) const {return false;}
-
-      };
-
-      template <typename _Path>
-      struct Constraints {
-        void constraints() {
-          function_requires<_path_bits::
-            PathDumperConstraints<Digraph, _Path> >();
-        }
-      };
-
-    };
-
-
-    ///@}
-  }
-
-} // namespace lemon
-
-#endif // LEMON_CONCEPT_PATH_H
Index: mon/config.h.cmake
===================================================================
--- lemon/config.h.cmake	(revision 395)
+++ 	(revision )
@@ -1,1 +1,0 @@
-#cmakedefine LEMON_HAVE_LONG_LONG 1
Index: mon/config.h.in
===================================================================
--- lemon/config.h.in	(revision 395)
+++ 	(revision )
@@ -1,8 +1,0 @@
-/* Define to 1 if you have CPLEX. */
-#undef LEMON_HAVE_CPLEX
-
-/* Define to 1 if you have GLPK. */
-#undef LEMON_HAVE_GLPK
-
-/* Define to 1 if you have long long */
-#undef LEMON_HAVE_LONG_LONG
Index: mon/core.h
===================================================================
--- lemon/core.h	(revision 427)
+++ 	(revision )
@@ -1,1848 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_CORE_H
-#define LEMON_CORE_H
-
-#include <vector>
-#include <algorithm>
-
-#include <lemon/config.h>
-#include <lemon/bits/enable_if.h>
-#include <lemon/bits/traits.h>
-#include <lemon/assert.h>
-
-///\file
-///\brief LEMON core utilities.
-///
-///This header file contains core utilities for LEMON.
-///It is automatically included by all graph types, therefore it usually
-///do not have to be included directly.
-
-namespace lemon {
-
-  /// \brief Dummy type to make it easier to create invalid iterators.
-  ///
-  /// Dummy type to make it easier to create invalid iterators.
-  /// See \ref INVALID for the usage.
-  struct Invalid {
-  public:
-    bool operator==(Invalid) { return true;  }
-    bool operator!=(Invalid) { return false; }
-    bool operator< (Invalid) { return false; }
-  };
-
-  /// \brief Invalid iterators.
-  ///
-  /// \ref Invalid is a global type that converts to each iterator
-  /// in such a way that the value of the target iterator will be invalid.
-#ifdef LEMON_ONLY_TEMPLATES
-  const Invalid INVALID = Invalid();
-#else
-  extern const Invalid INVALID;
-#endif
-
-  /// \addtogroup gutils
-  /// @{
-
-  ///Create convenience typedefs for the digraph types and iterators
-
-  ///This \c \#define creates convenient type definitions for the following
-  ///types of \c Digraph: \c Node,  \c NodeIt, \c Arc, \c ArcIt, \c InArcIt,
-  ///\c OutArcIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap,
-  ///\c BoolArcMap, \c IntArcMap, \c DoubleArcMap.
-  ///
-  ///\note If the graph type is a dependent type, ie. the graph type depend
-  ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS()
-  ///macro.
-#define DIGRAPH_TYPEDEFS(Digraph)                                       \
-  typedef Digraph::Node Node;                                           \
-  typedef Digraph::NodeIt NodeIt;                                       \
-  typedef Digraph::Arc Arc;                                             \
-  typedef Digraph::ArcIt ArcIt;                                         \
-  typedef Digraph::InArcIt InArcIt;                                     \
-  typedef Digraph::OutArcIt OutArcIt;                                   \
-  typedef Digraph::NodeMap<bool> BoolNodeMap;                           \
-  typedef Digraph::NodeMap<int> IntNodeMap;                             \
-  typedef Digraph::NodeMap<double> DoubleNodeMap;                       \
-  typedef Digraph::ArcMap<bool> BoolArcMap;                             \
-  typedef Digraph::ArcMap<int> IntArcMap;                               \
-  typedef Digraph::ArcMap<double> DoubleArcMap
-
-  ///Create convenience typedefs for the digraph types and iterators
-
-  ///\see DIGRAPH_TYPEDEFS
-  ///
-  ///\note Use this macro, if the graph type is a dependent type,
-  ///ie. the graph type depend on a template parameter.
-#define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph)                              \
-  typedef typename Digraph::Node Node;                                  \
-  typedef typename Digraph::NodeIt NodeIt;                              \
-  typedef typename Digraph::Arc Arc;                                    \
-  typedef typename Digraph::ArcIt ArcIt;                                \
-  typedef typename Digraph::InArcIt InArcIt;                            \
-  typedef typename Digraph::OutArcIt OutArcIt;                          \
-  typedef typename Digraph::template NodeMap<bool> BoolNodeMap;         \
-  typedef typename Digraph::template NodeMap<int> IntNodeMap;           \
-  typedef typename Digraph::template NodeMap<double> DoubleNodeMap;     \
-  typedef typename Digraph::template ArcMap<bool> BoolArcMap;           \
-  typedef typename Digraph::template ArcMap<int> IntArcMap;             \
-  typedef typename Digraph::template ArcMap<double> DoubleArcMap
-
-  ///Create convenience typedefs for the graph types and iterators
-
-  ///This \c \#define creates the same convenient type definitions as defined
-  ///by \ref DIGRAPH_TYPEDEFS(Graph) and six more, namely it creates
-  ///\c Edge, \c EdgeIt, \c IncEdgeIt, \c BoolEdgeMap, \c IntEdgeMap,
-  ///\c DoubleEdgeMap.
-  ///
-  ///\note If the graph type is a dependent type, ie. the graph type depend
-  ///on a template parameter, then use \c TEMPLATE_GRAPH_TYPEDEFS()
-  ///macro.
-#define GRAPH_TYPEDEFS(Graph)                                           \
-  DIGRAPH_TYPEDEFS(Graph);                                              \
-  typedef Graph::Edge Edge;                                             \
-  typedef Graph::EdgeIt EdgeIt;                                         \
-  typedef Graph::IncEdgeIt IncEdgeIt;                                   \
-  typedef Graph::EdgeMap<bool> BoolEdgeMap;                             \
-  typedef Graph::EdgeMap<int> IntEdgeMap;                               \
-  typedef Graph::EdgeMap<double> DoubleEdgeMap
-
-  ///Create convenience typedefs for the graph types and iterators
-
-  ///\see GRAPH_TYPEDEFS
-  ///
-  ///\note Use this macro, if the graph type is a dependent type,
-  ///ie. the graph type depend on a template parameter.
-#define TEMPLATE_GRAPH_TYPEDEFS(Graph)                                  \
-  TEMPLATE_DIGRAPH_TYPEDEFS(Graph);                                     \
-  typedef typename Graph::Edge Edge;                                    \
-  typedef typename Graph::EdgeIt EdgeIt;                                \
-  typedef typename Graph::IncEdgeIt IncEdgeIt;                          \
-  typedef typename Graph::template EdgeMap<bool> BoolEdgeMap;           \
-  typedef typename Graph::template EdgeMap<int> IntEdgeMap;             \
-  typedef typename Graph::template EdgeMap<double> DoubleEdgeMap
-
-  /// \brief Function to count the items in a graph.
-  ///
-  /// This function counts the items (nodes, arcs etc.) in a graph.
-  /// The complexity of the function is linear because
-  /// it iterates on all of the items.
-  template <typename Graph, typename Item>
-  inline int countItems(const Graph& g) {
-    typedef typename ItemSetTraits<Graph, Item>::ItemIt ItemIt;
-    int num = 0;
-    for (ItemIt it(g); it != INVALID; ++it) {
-      ++num;
-    }
-    return num;
-  }
-
-  // Node counting:
-
-  namespace _core_bits {
-
-    template <typename Graph, typename Enable = void>
-    struct CountNodesSelector {
-      static int count(const Graph &g) {
-        return countItems<Graph, typename Graph::Node>(g);
-      }
-    };
-
-    template <typename Graph>
-    struct CountNodesSelector<
-      Graph, typename
-      enable_if<typename Graph::NodeNumTag, void>::type>
-    {
-      static int count(const Graph &g) {
-        return g.nodeNum();
-      }
-    };
-  }
-
-  /// \brief Function to count the nodes in the graph.
-  ///
-  /// This function counts the nodes in the graph.
-  /// The complexity of the function is <em>O</em>(<em>n</em>), but for some
-  /// graph structures it is specialized to run in <em>O</em>(1).
-  ///
-  /// \note If the graph contains a \c nodeNum() member function and a
-  /// \c NodeNumTag tag then this function calls directly the member
-  /// function to query the cardinality of the node set.
-  template <typename Graph>
-  inline int countNodes(const Graph& g) {
-    return _core_bits::CountNodesSelector<Graph>::count(g);
-  }
-
-  // Arc counting:
-
-  namespace _core_bits {
-
-    template <typename Graph, typename Enable = void>
-    struct CountArcsSelector {
-      static int count(const Graph &g) {
-        return countItems<Graph, typename Graph::Arc>(g);
-      }
-    };
-
-    template <typename Graph>
-    struct CountArcsSelector<
-      Graph,
-      typename enable_if<typename Graph::ArcNumTag, void>::type>
-    {
-      static int count(const Graph &g) {
-        return g.arcNum();
-      }
-    };
-  }
-
-  /// \brief Function to count the arcs in the graph.
-  ///
-  /// This function counts the arcs in the graph.
-  /// The complexity of the function is <em>O</em>(<em>m</em>), but for some
-  /// graph structures it is specialized to run in <em>O</em>(1).
-  ///
-  /// \note If the graph contains a \c arcNum() member function and a
-  /// \c ArcNumTag tag then this function calls directly the member
-  /// function to query the cardinality of the arc set.
-  template <typename Graph>
-  inline int countArcs(const Graph& g) {
-    return _core_bits::CountArcsSelector<Graph>::count(g);
-  }
-
-  // Edge counting:
-
-  namespace _core_bits {
-
-    template <typename Graph, typename Enable = void>
-    struct CountEdgesSelector {
-      static int count(const Graph &g) {
-        return countItems<Graph, typename Graph::Edge>(g);
-      }
-    };
-
-    template <typename Graph>
-    struct CountEdgesSelector<
-      Graph,
-      typename enable_if<typename Graph::EdgeNumTag, void>::type>
-    {
-      static int count(const Graph &g) {
-        return g.edgeNum();
-      }
-    };
-  }
-
-  /// \brief Function to count the edges in the graph.
-  ///
-  /// This function counts the edges in the graph.
-  /// The complexity of the function is <em>O</em>(<em>m</em>), but for some
-  /// graph structures it is specialized to run in <em>O</em>(1).
-  ///
-  /// \note If the graph contains a \c edgeNum() member function and a
-  /// \c EdgeNumTag tag then this function calls directly the member
-  /// function to query the cardinality of the edge set.
-  template <typename Graph>
-  inline int countEdges(const Graph& g) {
-    return _core_bits::CountEdgesSelector<Graph>::count(g);
-
-  }
-
-
-  template <typename Graph, typename DegIt>
-  inline int countNodeDegree(const Graph& _g, const typename Graph::Node& _n) {
-    int num = 0;
-    for (DegIt it(_g, _n); it != INVALID; ++it) {
-      ++num;
-    }
-    return num;
-  }
-
-  /// \brief Function to count the number of the out-arcs from node \c n.
-  ///
-  /// This function counts the number of the out-arcs from node \c n
-  /// in the graph \c g.
-  template <typename Graph>
-  inline int countOutArcs(const Graph& g,  const typename Graph::Node& n) {
-    return countNodeDegree<Graph, typename Graph::OutArcIt>(g, n);
-  }
-
-  /// \brief Function to count the number of the in-arcs to node \c n.
-  ///
-  /// This function counts the number of the in-arcs to node \c n
-  /// in the graph \c g.
-  template <typename Graph>
-  inline int countInArcs(const Graph& g,  const typename Graph::Node& n) {
-    return countNodeDegree<Graph, typename Graph::InArcIt>(g, n);
-  }
-
-  /// \brief Function to count the number of the inc-edges to node \c n.
-  ///
-  /// This function counts the number of the inc-edges to node \c n
-  /// in the undirected graph \c g.
-  template <typename Graph>
-  inline int countIncEdges(const Graph& g,  const typename Graph::Node& n) {
-    return countNodeDegree<Graph, typename Graph::IncEdgeIt>(g, n);
-  }
-
-  namespace _core_bits {
-
-    template <typename Digraph, typename Item, typename RefMap>
-    class MapCopyBase {
-    public:
-      virtual void copy(const Digraph& from, const RefMap& refMap) = 0;
-
-      virtual ~MapCopyBase() {}
-    };
-
-    template <typename Digraph, typename Item, typename RefMap,
-              typename FromMap, typename ToMap>
-    class MapCopy : public MapCopyBase<Digraph, Item, RefMap> {
-    public:
-
-      MapCopy(const FromMap& map, ToMap& tmap)
-        : _map(map), _tmap(tmap) {}
-
-      virtual void copy(const Digraph& digraph, const RefMap& refMap) {
-        typedef typename ItemSetTraits<Digraph, Item>::ItemIt ItemIt;
-        for (ItemIt it(digraph); it != INVALID; ++it) {
-          _tmap.set(refMap[it], _map[it]);
-        }
-      }
-
-    private:
-      const FromMap& _map;
-      ToMap& _tmap;
-    };
-
-    template <typename Digraph, typename Item, typename RefMap, typename It>
-    class ItemCopy : public MapCopyBase<Digraph, Item, RefMap> {
-    public:
-
-      ItemCopy(const Item& item, It& it) : _item(item), _it(it) {}
-
-      virtual void copy(const Digraph&, const RefMap& refMap) {
-        _it = refMap[_item];
-      }
-
-    private:
-      Item _item;
-      It& _it;
-    };
-
-    template <typename Digraph, typename Item, typename RefMap, typename Ref>
-    class RefCopy : public MapCopyBase<Digraph, Item, RefMap> {
-    public:
-
-      RefCopy(Ref& map) : _map(map) {}
-
-      virtual void copy(const Digraph& digraph, const RefMap& refMap) {
-        typedef typename ItemSetTraits<Digraph, Item>::ItemIt ItemIt;
-        for (ItemIt it(digraph); it != INVALID; ++it) {
-          _map.set(it, refMap[it]);
-        }
-      }
-
-    private:
-      Ref& _map;
-    };
-
-    template <typename Digraph, typename Item, typename RefMap,
-              typename CrossRef>
-    class CrossRefCopy : public MapCopyBase<Digraph, Item, RefMap> {
-    public:
-
-      CrossRefCopy(CrossRef& cmap) : _cmap(cmap) {}
-
-      virtual void copy(const Digraph& digraph, const RefMap& refMap) {
-        typedef typename ItemSetTraits<Digraph, Item>::ItemIt ItemIt;
-        for (ItemIt it(digraph); it != INVALID; ++it) {
-          _cmap.set(refMap[it], it);
-        }
-      }
-
-    private:
-      CrossRef& _cmap;
-    };
-
-    template <typename Digraph, typename Enable = void>
-    struct DigraphCopySelector {
-      template <typename From, typename NodeRefMap, typename ArcRefMap>
-      static void copy(const From& from, Digraph &to,
-                       NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
-        to.clear();
-        for (typename From::NodeIt it(from); it != INVALID; ++it) {
-          nodeRefMap[it] = to.addNode();
-        }
-        for (typename From::ArcIt it(from); it != INVALID; ++it) {
-          arcRefMap[it] = to.addArc(nodeRefMap[from.source(it)],
-                                    nodeRefMap[from.target(it)]);
-        }
-      }
-    };
-
-    template <typename Digraph>
-    struct DigraphCopySelector<
-      Digraph,
-      typename enable_if<typename Digraph::BuildTag, void>::type>
-    {
-      template <typename From, typename NodeRefMap, typename ArcRefMap>
-      static void copy(const From& from, Digraph &to,
-                       NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
-        to.build(from, nodeRefMap, arcRefMap);
-      }
-    };
-
-    template <typename Graph, typename Enable = void>
-    struct GraphCopySelector {
-      template <typename From, typename NodeRefMap, typename EdgeRefMap>
-      static void copy(const From& from, Graph &to,
-                       NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
-        to.clear();
-        for (typename From::NodeIt it(from); it != INVALID; ++it) {
-          nodeRefMap[it] = to.addNode();
-        }
-        for (typename From::EdgeIt it(from); it != INVALID; ++it) {
-          edgeRefMap[it] = to.addEdge(nodeRefMap[from.u(it)],
-                                      nodeRefMap[from.v(it)]);
-        }
-      }
-    };
-
-    template <typename Graph>
-    struct GraphCopySelector<
-      Graph,
-      typename enable_if<typename Graph::BuildTag, void>::type>
-    {
-      template <typename From, typename NodeRefMap, typename EdgeRefMap>
-      static void copy(const From& from, Graph &to,
-                       NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
-        to.build(from, nodeRefMap, edgeRefMap);
-      }
-    };
-
-  }
-
-  /// \brief Class to copy a digraph.
-  ///
-  /// Class to copy a digraph to another digraph (duplicate a digraph). The
-  /// simplest way of using it is through the \c digraphCopy() function.
-  ///
-  /// This class not only make a copy of a digraph, but it can create
-  /// references and cross references between the nodes and arcs of
-  /// the two digraphs, and it can copy maps to use with the newly created
-  /// digraph.
-  ///
-  /// To make a copy from a digraph, first an instance of DigraphCopy
-  /// should be created, then the data belongs to the digraph should
-  /// assigned to copy. In the end, the \c run() member should be
-  /// called.
-  ///
-  /// The next code copies a digraph with several data:
-  ///\code
-  ///  DigraphCopy<OrigGraph, NewGraph> cg(orig_graph, new_graph);
-  ///  // Create references for the nodes
-  ///  OrigGraph::NodeMap<NewGraph::Node> nr(orig_graph);
-  ///  cg.nodeRef(nr);
-  ///  // Create cross references (inverse) for the arcs
-  ///  NewGraph::ArcMap<OrigGraph::Arc> acr(new_graph);
-  ///  cg.arcCrossRef(acr);
-  ///  // Copy an arc map
-  ///  OrigGraph::ArcMap<double> oamap(orig_graph);
-  ///  NewGraph::ArcMap<double> namap(new_graph);
-  ///  cg.arcMap(oamap, namap);
-  ///  // Copy a node
-  ///  OrigGraph::Node on;
-  ///  NewGraph::Node nn;
-  ///  cg.node(on, nn);
-  ///  // Execute copying
-  ///  cg.run();
-  ///\endcode
-  template <typename From, typename To>
-  class DigraphCopy {
-  private:
-
-    typedef typename From::Node Node;
-    typedef typename From::NodeIt NodeIt;
-    typedef typename From::Arc Arc;
-    typedef typename From::ArcIt ArcIt;
-
-    typedef typename To::Node TNode;
-    typedef typename To::Arc TArc;
-
-    typedef typename From::template NodeMap<TNode> NodeRefMap;
-    typedef typename From::template ArcMap<TArc> ArcRefMap;
-
-  public:
-
-    /// \brief Constructor of DigraphCopy.
-    ///
-    /// Constructor of DigraphCopy for copying the content of the
-    /// \c from digraph into the \c to digraph.
-    DigraphCopy(const From& from, To& to)
-      : _from(from), _to(to) {}
-
-    /// \brief Destructor of DigraphCopy
-    ///
-    /// Destructor of DigraphCopy.
-    ~DigraphCopy() {
-      for (int i = 0; i < int(_node_maps.size()); ++i) {
-        delete _node_maps[i];
-      }
-      for (int i = 0; i < int(_arc_maps.size()); ++i) {
-        delete _arc_maps[i];
-      }
-
-    }
-
-    /// \brief Copy the node references into the given map.
-    ///
-    /// This function copies the node references into the given map.
-    /// The parameter should be a map, whose key type is the Node type of
-    /// the source digraph, while the value type is the Node type of the
-    /// destination digraph.
-    template <typename NodeRef>
-    DigraphCopy& nodeRef(NodeRef& map) {
-      _node_maps.push_back(new _core_bits::RefCopy<From, Node,
-                           NodeRefMap, NodeRef>(map));
-      return *this;
-    }
-
-    /// \brief Copy the node cross references into the given map.
-    ///
-    /// This function copies the node cross references (reverse references)
-    /// into the given map. The parameter should be a map, whose key type
-    /// is the Node type of the destination digraph, while the value type is
-    /// the Node type of the source digraph.
-    template <typename NodeCrossRef>
-    DigraphCopy& nodeCrossRef(NodeCrossRef& map) {
-      _node_maps.push_back(new _core_bits::CrossRefCopy<From, Node,
-                           NodeRefMap, NodeCrossRef>(map));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given node map.
-    ///
-    /// This function makes a copy of the given node map for the newly
-    /// created digraph.
-    /// The key type of the new map \c tmap should be the Node type of the
-    /// destination digraph, and the key type of the original map \c map
-    /// should be the Node type of the source digraph.
-    template <typename FromMap, typename ToMap>
-    DigraphCopy& nodeMap(const FromMap& map, ToMap& tmap) {
-      _node_maps.push_back(new _core_bits::MapCopy<From, Node,
-                           NodeRefMap, FromMap, ToMap>(map, tmap));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given node.
-    ///
-    /// This function makes a copy of the given node.
-    DigraphCopy& node(const Node& node, TNode& tnode) {
-      _node_maps.push_back(new _core_bits::ItemCopy<From, Node,
-                           NodeRefMap, TNode>(node, tnode));
-      return *this;
-    }
-
-    /// \brief Copy the arc references into the given map.
-    ///
-    /// This function copies the arc references into the given map.
-    /// The parameter should be a map, whose key type is the Arc type of
-    /// the source digraph, while the value type is the Arc type of the
-    /// destination digraph.
-    template <typename ArcRef>
-    DigraphCopy& arcRef(ArcRef& map) {
-      _arc_maps.push_back(new _core_bits::RefCopy<From, Arc,
-                          ArcRefMap, ArcRef>(map));
-      return *this;
-    }
-
-    /// \brief Copy the arc cross references into the given map.
-    ///
-    /// This function copies the arc cross references (reverse references)
-    /// into the given map. The parameter should be a map, whose key type
-    /// is the Arc type of the destination digraph, while the value type is
-    /// the Arc type of the source digraph.
-    template <typename ArcCrossRef>
-    DigraphCopy& arcCrossRef(ArcCrossRef& map) {
-      _arc_maps.push_back(new _core_bits::CrossRefCopy<From, Arc,
-                          ArcRefMap, ArcCrossRef>(map));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given arc map.
-    ///
-    /// This function makes a copy of the given arc map for the newly
-    /// created digraph.
-    /// The key type of the new map \c tmap should be the Arc type of the
-    /// destination digraph, and the key type of the original map \c map
-    /// should be the Arc type of the source digraph.
-    template <typename FromMap, typename ToMap>
-    DigraphCopy& arcMap(const FromMap& map, ToMap& tmap) {
-      _arc_maps.push_back(new _core_bits::MapCopy<From, Arc,
-                          ArcRefMap, FromMap, ToMap>(map, tmap));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given arc.
-    ///
-    /// This function makes a copy of the given arc.
-    DigraphCopy& arc(const Arc& arc, TArc& tarc) {
-      _arc_maps.push_back(new _core_bits::ItemCopy<From, Arc,
-                          ArcRefMap, TArc>(arc, tarc));
-      return *this;
-    }
-
-    /// \brief Execute copying.
-    ///
-    /// This function executes the copying of the digraph along with the
-    /// copying of the assigned data.
-    void run() {
-      NodeRefMap nodeRefMap(_from);
-      ArcRefMap arcRefMap(_from);
-      _core_bits::DigraphCopySelector<To>::
-        copy(_from, _to, nodeRefMap, arcRefMap);
-      for (int i = 0; i < int(_node_maps.size()); ++i) {
-        _node_maps[i]->copy(_from, nodeRefMap);
-      }
-      for (int i = 0; i < int(_arc_maps.size()); ++i) {
-        _arc_maps[i]->copy(_from, arcRefMap);
-      }
-    }
-
-  protected:
-
-    const From& _from;
-    To& _to;
-
-    std::vector<_core_bits::MapCopyBase<From, Node, NodeRefMap>* >
-      _node_maps;
-
-    std::vector<_core_bits::MapCopyBase<From, Arc, ArcRefMap>* >
-      _arc_maps;
-
-  };
-
-  /// \brief Copy a digraph to another digraph.
-  ///
-  /// This function copies a digraph to another digraph.
-  /// The complete usage of it is detailed in the DigraphCopy class, but
-  /// a short example shows a basic work:
-  ///\code
-  /// digraphCopy(src, trg).nodeRef(nr).arcCrossRef(acr).run();
-  ///\endcode
-  ///
-  /// After the copy the \c nr map will contain the mapping from the
-  /// nodes of the \c from digraph to the nodes of the \c to digraph and
-  /// \c acr will contain the mapping from the arcs of the \c to digraph
-  /// to the arcs of the \c from digraph.
-  ///
-  /// \see DigraphCopy
-  template <typename From, typename To>
-  DigraphCopy<From, To> digraphCopy(const From& from, To& to) {
-    return DigraphCopy<From, To>(from, to);
-  }
-
-  /// \brief Class to copy a graph.
-  ///
-  /// Class to copy a graph to another graph (duplicate a graph). The
-  /// simplest way of using it is through the \c graphCopy() function.
-  ///
-  /// This class not only make a copy of a graph, but it can create
-  /// references and cross references between the nodes, edges and arcs of
-  /// the two graphs, and it can copy maps for using with the newly created
-  /// graph.
-  ///
-  /// To make a copy from a graph, first an instance of GraphCopy
-  /// should be created, then the data belongs to the graph should
-  /// assigned to copy. In the end, the \c run() member should be
-  /// called.
-  ///
-  /// The next code copies a graph with several data:
-  ///\code
-  ///  GraphCopy<OrigGraph, NewGraph> cg(orig_graph, new_graph);
-  ///  // Create references for the nodes
-  ///  OrigGraph::NodeMap<NewGraph::Node> nr(orig_graph);
-  ///  cg.nodeRef(nr);
-  ///  // Create cross references (inverse) for the edges
-  ///  NewGraph::EdgeMap<OrigGraph::Edge> ecr(new_graph);
-  ///  cg.edgeCrossRef(ecr);
-  ///  // Copy an edge map
-  ///  OrigGraph::EdgeMap<double> oemap(orig_graph);
-  ///  NewGraph::EdgeMap<double> nemap(new_graph);
-  ///  cg.edgeMap(oemap, nemap);
-  ///  // Copy a node
-  ///  OrigGraph::Node on;
-  ///  NewGraph::Node nn;
-  ///  cg.node(on, nn);
-  ///  // Execute copying
-  ///  cg.run();
-  ///\endcode
-  template <typename From, typename To>
-  class GraphCopy {
-  private:
-
-    typedef typename From::Node Node;
-    typedef typename From::NodeIt NodeIt;
-    typedef typename From::Arc Arc;
-    typedef typename From::ArcIt ArcIt;
-    typedef typename From::Edge Edge;
-    typedef typename From::EdgeIt EdgeIt;
-
-    typedef typename To::Node TNode;
-    typedef typename To::Arc TArc;
-    typedef typename To::Edge TEdge;
-
-    typedef typename From::template NodeMap<TNode> NodeRefMap;
-    typedef typename From::template EdgeMap<TEdge> EdgeRefMap;
-
-    struct ArcRefMap {
-      ArcRefMap(const From& from, const To& to,
-                const EdgeRefMap& edge_ref, const NodeRefMap& node_ref)
-        : _from(from), _to(to),
-          _edge_ref(edge_ref), _node_ref(node_ref) {}
-
-      typedef typename From::Arc Key;
-      typedef typename To::Arc Value;
-
-      Value operator[](const Key& key) const {
-        bool forward = _from.u(key) != _from.v(key) ?
-          _node_ref[_from.source(key)] ==
-          _to.source(_to.direct(_edge_ref[key], true)) :
-          _from.direction(key);
-        return _to.direct(_edge_ref[key], forward);
-      }
-
-      const From& _from;
-      const To& _to;
-      const EdgeRefMap& _edge_ref;
-      const NodeRefMap& _node_ref;
-    };
-
-  public:
-
-    /// \brief Constructor of GraphCopy.
-    ///
-    /// Constructor of GraphCopy for copying the content of the
-    /// \c from graph into the \c to graph.
-    GraphCopy(const From& from, To& to)
-      : _from(from), _to(to) {}
-
-    /// \brief Destructor of GraphCopy
-    ///
-    /// Destructor of GraphCopy.
-    ~GraphCopy() {
-      for (int i = 0; i < int(_node_maps.size()); ++i) {
-        delete _node_maps[i];
-      }
-      for (int i = 0; i < int(_arc_maps.size()); ++i) {
-        delete _arc_maps[i];
-      }
-      for (int i = 0; i < int(_edge_maps.size()); ++i) {
-        delete _edge_maps[i];
-      }
-    }
-
-    /// \brief Copy the node references into the given map.
-    ///
-    /// This function copies the node references into the given map.
-    /// The parameter should be a map, whose key type is the Node type of
-    /// the source graph, while the value type is the Node type of the
-    /// destination graph.
-    template <typename NodeRef>
-    GraphCopy& nodeRef(NodeRef& map) {
-      _node_maps.push_back(new _core_bits::RefCopy<From, Node,
-                           NodeRefMap, NodeRef>(map));
-      return *this;
-    }
-
-    /// \brief Copy the node cross references into the given map.
-    ///
-    /// This function copies the node cross references (reverse references)
-    /// into the given map. The parameter should be a map, whose key type
-    /// is the Node type of the destination graph, while the value type is
-    /// the Node type of the source graph.
-    template <typename NodeCrossRef>
-    GraphCopy& nodeCrossRef(NodeCrossRef& map) {
-      _node_maps.push_back(new _core_bits::CrossRefCopy<From, Node,
-                           NodeRefMap, NodeCrossRef>(map));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given node map.
-    ///
-    /// This function makes a copy of the given node map for the newly
-    /// created graph.
-    /// The key type of the new map \c tmap should be the Node type of the
-    /// destination graph, and the key type of the original map \c map
-    /// should be the Node type of the source graph.
-    template <typename FromMap, typename ToMap>
-    GraphCopy& nodeMap(const FromMap& map, ToMap& tmap) {
-      _node_maps.push_back(new _core_bits::MapCopy<From, Node,
-                           NodeRefMap, FromMap, ToMap>(map, tmap));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given node.
-    ///
-    /// This function makes a copy of the given node.
-    GraphCopy& node(const Node& node, TNode& tnode) {
-      _node_maps.push_back(new _core_bits::ItemCopy<From, Node,
-                           NodeRefMap, TNode>(node, tnode));
-      return *this;
-    }
-
-    /// \brief Copy the arc references into the given map.
-    ///
-    /// This function copies the arc references into the given map.
-    /// The parameter should be a map, whose key type is the Arc type of
-    /// the source graph, while the value type is the Arc type of the
-    /// destination graph.
-    template <typename ArcRef>
-    GraphCopy& arcRef(ArcRef& map) {
-      _arc_maps.push_back(new _core_bits::RefCopy<From, Arc,
-                          ArcRefMap, ArcRef>(map));
-      return *this;
-    }
-
-    /// \brief Copy the arc cross references into the given map.
-    ///
-    /// This function copies the arc cross references (reverse references)
-    /// into the given map. The parameter should be a map, whose key type
-    /// is the Arc type of the destination graph, while the value type is
-    /// the Arc type of the source graph.
-    template <typename ArcCrossRef>
-    GraphCopy& arcCrossRef(ArcCrossRef& map) {
-      _arc_maps.push_back(new _core_bits::CrossRefCopy<From, Arc,
-                          ArcRefMap, ArcCrossRef>(map));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given arc map.
-    ///
-    /// This function makes a copy of the given arc map for the newly
-    /// created graph.
-    /// The key type of the new map \c tmap should be the Arc type of the
-    /// destination graph, and the key type of the original map \c map
-    /// should be the Arc type of the source graph.
-    template <typename FromMap, typename ToMap>
-    GraphCopy& arcMap(const FromMap& map, ToMap& tmap) {
-      _arc_maps.push_back(new _core_bits::MapCopy<From, Arc,
-                          ArcRefMap, FromMap, ToMap>(map, tmap));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given arc.
-    ///
-    /// This function makes a copy of the given arc.
-    GraphCopy& arc(const Arc& arc, TArc& tarc) {
-      _arc_maps.push_back(new _core_bits::ItemCopy<From, Arc,
-                          ArcRefMap, TArc>(arc, tarc));
-      return *this;
-    }
-
-    /// \brief Copy the edge references into the given map.
-    ///
-    /// This function copies the edge references into the given map.
-    /// The parameter should be a map, whose key type is the Edge type of
-    /// the source graph, while the value type is the Edge type of the
-    /// destination graph.
-    template <typename EdgeRef>
-    GraphCopy& edgeRef(EdgeRef& map) {
-      _edge_maps.push_back(new _core_bits::RefCopy<From, Edge,
-                           EdgeRefMap, EdgeRef>(map));
-      return *this;
-    }
-
-    /// \brief Copy the edge cross references into the given map.
-    ///
-    /// This function copies the edge cross references (reverse references)
-    /// into the given map. The parameter should be a map, whose key type
-    /// is the Edge type of the destination graph, while the value type is
-    /// the Edge type of the source graph.
-    template <typename EdgeCrossRef>
-    GraphCopy& edgeCrossRef(EdgeCrossRef& map) {
-      _edge_maps.push_back(new _core_bits::CrossRefCopy<From,
-                           Edge, EdgeRefMap, EdgeCrossRef>(map));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given edge map.
-    ///
-    /// This function makes a copy of the given edge map for the newly
-    /// created graph.
-    /// The key type of the new map \c tmap should be the Edge type of the
-    /// destination graph, and the key type of the original map \c map
-    /// should be the Edge type of the source graph.
-    template <typename FromMap, typename ToMap>
-    GraphCopy& edgeMap(const FromMap& map, ToMap& tmap) {
-      _edge_maps.push_back(new _core_bits::MapCopy<From, Edge,
-                           EdgeRefMap, FromMap, ToMap>(map, tmap));
-      return *this;
-    }
-
-    /// \brief Make a copy of the given edge.
-    ///
-    /// This function makes a copy of the given edge.
-    GraphCopy& edge(const Edge& edge, TEdge& tedge) {
-      _edge_maps.push_back(new _core_bits::ItemCopy<From, Edge,
-                           EdgeRefMap, TEdge>(edge, tedge));
-      return *this;
-    }
-
-    /// \brief Execute copying.
-    ///
-    /// This function executes the copying of the graph along with the
-    /// copying of the assigned data.
-    void run() {
-      NodeRefMap nodeRefMap(_from);
-      EdgeRefMap edgeRefMap(_from);
-      ArcRefMap arcRefMap(_from, _to, edgeRefMap, nodeRefMap);
-      _core_bits::GraphCopySelector<To>::
-        copy(_from, _to, nodeRefMap, edgeRefMap);
-      for (int i = 0; i < int(_node_maps.size()); ++i) {
-        _node_maps[i]->copy(_from, nodeRefMap);
-      }
-      for (int i = 0; i < int(_edge_maps.size()); ++i) {
-        _edge_maps[i]->copy(_from, edgeRefMap);
-      }
-      for (int i = 0; i < int(_arc_maps.size()); ++i) {
-        _arc_maps[i]->copy(_from, arcRefMap);
-      }
-    }
-
-  private:
-
-    const From& _from;
-    To& _to;
-
-    std::vector<_core_bits::MapCopyBase<From, Node, NodeRefMap>* >
-      _node_maps;
-
-    std::vector<_core_bits::MapCopyBase<From, Arc, ArcRefMap>* >
-      _arc_maps;
-
-    std::vector<_core_bits::MapCopyBase<From, Edge, EdgeRefMap>* >
-      _edge_maps;
-
-  };
-
-  /// \brief Copy a graph to another graph.
-  ///
-  /// This function copies a graph to another graph.
-  /// The complete usage of it is detailed in the GraphCopy class,
-  /// but a short example shows a basic work:
-  ///\code
-  /// graphCopy(src, trg).nodeRef(nr).edgeCrossRef(ecr).run();
-  ///\endcode
-  ///
-  /// After the copy the \c nr map will contain the mapping from the
-  /// nodes of the \c from graph to the nodes of the \c to graph and
-  /// \c ecr will contain the mapping from the edges of the \c to graph
-  /// to the edges of the \c from graph.
-  ///
-  /// \see GraphCopy
-  template <typename From, typename To>
-  GraphCopy<From, To>
-  graphCopy(const From& from, To& to) {
-    return GraphCopy<From, To>(from, to);
-  }
-
-  namespace _core_bits {
-
-    template <typename Graph, typename Enable = void>
-    struct FindArcSelector {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Arc Arc;
-      static Arc find(const Graph &g, Node u, Node v, Arc e) {
-        if (e == INVALID) {
-          g.firstOut(e, u);
-        } else {
-          g.nextOut(e);
-        }
-        while (e != INVALID && g.target(e) != v) {
-          g.nextOut(e);
-        }
-        return e;
-      }
-    };
-
-    template <typename Graph>
-    struct FindArcSelector<
-      Graph,
-      typename enable_if<typename Graph::FindArcTag, void>::type>
-    {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Arc Arc;
-      static Arc find(const Graph &g, Node u, Node v, Arc prev) {
-        return g.findArc(u, v, prev);
-      }
-    };
-  }
-
-  /// \brief Find an arc between two nodes of a digraph.
-  ///
-  /// This function finds an arc from node \c u to node \c v in the
-  /// digraph \c g.
-  ///
-  /// If \c prev is \ref INVALID (this is the default value), then
-  /// it finds the first arc from \c u to \c v. Otherwise it looks for
-  /// the next arc from \c u to \c v after \c prev.
-  /// \return The found arc or \ref INVALID if there is no such an arc.
-  ///
-  /// Thus you can iterate through each arc from \c u to \c v as it follows.
-  ///\code
-  /// for(Arc e = findArc(g,u,v); e != INVALID; e = findArc(g,u,v,e)) {
-  ///   ...
-  /// }
-  ///\endcode
-  ///
-  /// \note \ref ConArcIt provides iterator interface for the same
-  /// functionality.
-  ///
-  ///\sa ConArcIt
-  ///\sa ArcLookUp, AllArcLookUp, DynArcLookUp
-  template <typename Graph>
-  inline typename Graph::Arc
-  findArc(const Graph &g, typename Graph::Node u, typename Graph::Node v,
-          typename Graph::Arc prev = INVALID) {
-    return _core_bits::FindArcSelector<Graph>::find(g, u, v, prev);
-  }
-
-  /// \brief Iterator for iterating on parallel arcs connecting the same nodes.
-  ///
-  /// Iterator for iterating on parallel arcs connecting the same nodes. It is
-  /// a higher level interface for the \ref findArc() function. You can
-  /// use it the following way:
-  ///\code
-  /// for (ConArcIt<Graph> it(g, src, trg); it != INVALID; ++it) {
-  ///   ...
-  /// }
-  ///\endcode
-  ///
-  ///\sa findArc()
-  ///\sa ArcLookUp, AllArcLookUp, DynArcLookUp
-  template <typename _Graph>
-  class ConArcIt : public _Graph::Arc {
-  public:
-
-    typedef _Graph Graph;
-    typedef typename Graph::Arc Parent;
-
-    typedef typename Graph::Arc Arc;
-    typedef typename Graph::Node Node;
-
-    /// \brief Constructor.
-    ///
-    /// Construct a new ConArcIt iterating on the arcs that
-    /// connects nodes \c u and \c v.
-    ConArcIt(const Graph& g, Node u, Node v) : _graph(g) {
-      Parent::operator=(findArc(_graph, u, v));
-    }
-
-    /// \brief Constructor.
-    ///
-    /// Construct a new ConArcIt that continues the iterating from arc \c a.
-    ConArcIt(const Graph& g, Arc a) : Parent(a), _graph(g) {}
-
-    /// \brief Increment operator.
-    ///
-    /// It increments the iterator and gives back the next arc.
-    ConArcIt& operator++() {
-      Parent::operator=(findArc(_graph, _graph.source(*this),
-                                _graph.target(*this), *this));
-      return *this;
-    }
-  private:
-    const Graph& _graph;
-  };
-
-  namespace _core_bits {
-
-    template <typename Graph, typename Enable = void>
-    struct FindEdgeSelector {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Edge Edge;
-      static Edge find(const Graph &g, Node u, Node v, Edge e) {
-        bool b;
-        if (u != v) {
-          if (e == INVALID) {
-            g.firstInc(e, b, u);
-          } else {
-            b = g.u(e) == u;
-            g.nextInc(e, b);
-          }
-          while (e != INVALID && (b ? g.v(e) : g.u(e)) != v) {
-            g.nextInc(e, b);
-          }
-        } else {
-          if (e == INVALID) {
-            g.firstInc(e, b, u);
-          } else {
-            b = true;
-            g.nextInc(e, b);
-          }
-          while (e != INVALID && (!b || g.v(e) != v)) {
-            g.nextInc(e, b);
-          }
-        }
-        return e;
-      }
-    };
-
-    template <typename Graph>
-    struct FindEdgeSelector<
-      Graph,
-      typename enable_if<typename Graph::FindEdgeTag, void>::type>
-    {
-      typedef typename Graph::Node Node;
-      typedef typename Graph::Edge Edge;
-      static Edge find(const Graph &g, Node u, Node v, Edge prev) {
-        return g.findEdge(u, v, prev);
-      }
-    };
-  }
-
-  /// \brief Find an edge between two nodes of a graph.
-  ///
-  /// This function finds an edge from node \c u to node \c v in graph \c g.
-  /// If node \c u and node \c v is equal then each loop edge
-  /// will be enumerated once.
-  ///
-  /// If \c prev is \ref INVALID (this is the default value), then
-  /// it finds the first edge from \c u to \c v. Otherwise it looks for
-  /// the next edge from \c u to \c v after \c prev.
-  /// \return The found edge or \ref INVALID if there is no such an edge.
-  ///
-  /// Thus you can iterate through each edge between \c u and \c v
-  /// as it follows.
-  ///\code
-  /// for(Edge e = findEdge(g,u,v); e != INVALID; e = findEdge(g,u,v,e)) {
-  ///   ...
-  /// }
-  ///\endcode
-  ///
-  /// \note \ref ConEdgeIt provides iterator interface for the same
-  /// functionality.
-  ///
-  ///\sa ConEdgeIt
-  template <typename Graph>
-  inline typename Graph::Edge
-  findEdge(const Graph &g, typename Graph::Node u, typename Graph::Node v,
-            typename Graph::Edge p = INVALID) {
-    return _core_bits::FindEdgeSelector<Graph>::find(g, u, v, p);
-  }
-
-  /// \brief Iterator for iterating on parallel edges connecting the same nodes.
-  ///
-  /// Iterator for iterating on parallel edges connecting the same nodes.
-  /// It is a higher level interface for the findEdge() function. You can
-  /// use it the following way:
-  ///\code
-  /// for (ConEdgeIt<Graph> it(g, u, v); it != INVALID; ++it) {
-  ///   ...
-  /// }
-  ///\endcode
-  ///
-  ///\sa findEdge()
-  template <typename _Graph>
-  class ConEdgeIt : public _Graph::Edge {
-  public:
-
-    typedef _Graph Graph;
-    typedef typename Graph::Edge Parent;
-
-    typedef typename Graph::Edge Edge;
-    typedef typename Graph::Node Node;
-
-    /// \brief Constructor.
-    ///
-    /// Construct a new ConEdgeIt iterating on the edges that
-    /// connects nodes \c u and \c v.
-    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
-      Parent::operator=(findEdge(_graph, _u, _v));
-    }
-
-    /// \brief Constructor.
-    ///
-    /// Construct a new ConEdgeIt that continues iterating from edge \c e.
-    ConEdgeIt(const Graph& g, Edge e) : Parent(e), _graph(g) {}
-
-    /// \brief Increment operator.
-    ///
-    /// It increments the iterator and gives back the next edge.
-    ConEdgeIt& operator++() {
-      Parent::operator=(findEdge(_graph, _u, _v, *this));
-      return *this;
-    }
-  private:
-    const Graph& _graph;
-    Node _u, _v;
-  };
-
-
-  ///Dynamic arc look-up between given endpoints.
-
-  ///Using this class, you can find an arc in a digraph from a given
-  ///source to a given target in amortized time <em>O</em>(log<em>d</em>),
-  ///where <em>d</em> is the out-degree of the source node.
-  ///
-  ///It is possible to find \e all parallel arcs between two nodes with
-  ///the \c operator() member.
-  ///
-  ///This is a dynamic data structure. Consider to use \ref ArcLookUp or
-  ///\ref AllArcLookUp if your digraph is not changed so frequently.
-  ///
-  ///This class uses a self-adjusting binary search tree, the Splay tree
-  ///of Sleator and Tarjan to guarantee the logarithmic amortized
-  ///time bound for arc look-ups. This class also guarantees the
-  ///optimal time bound in a constant factor for any distribution of
-  ///queries.
-  ///
-  ///\tparam G The type of the underlying digraph.
-  ///
-  ///\sa ArcLookUp
-  ///\sa AllArcLookUp
-  template<class G>
-  class DynArcLookUp
-    : protected ItemSetTraits<G, typename G::Arc>::ItemNotifier::ObserverBase
-  {
-  public:
-    typedef typename ItemSetTraits<G, typename G::Arc>
-    ::ItemNotifier::ObserverBase Parent;
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
-
-  protected:
-
-    class AutoNodeMap : public ItemSetTraits<G, Node>::template Map<Arc>::Type {
-    public:
-
-      typedef typename ItemSetTraits<G, Node>::template Map<Arc>::Type Parent;
-
-      AutoNodeMap(const G& digraph) : Parent(digraph, INVALID) {}
-
-      virtual void add(const Node& node) {
-        Parent::add(node);
-        Parent::set(node, INVALID);
-      }
-
-      virtual void add(const std::vector<Node>& nodes) {
-        Parent::add(nodes);
-        for (int i = 0; i < int(nodes.size()); ++i) {
-          Parent::set(nodes[i], INVALID);
-        }
-      }
-
-      virtual void build() {
-        Parent::build();
-        Node it;
-        typename Parent::Notifier* nf = Parent::notifier();
-        for (nf->first(it); it != INVALID; nf->next(it)) {
-          Parent::set(it, INVALID);
-        }
-      }
-    };
-
-    const Digraph &_g;
-    AutoNodeMap _head;
-    typename Digraph::template ArcMap<Arc> _parent;
-    typename Digraph::template ArcMap<Arc> _left;
-    typename Digraph::template ArcMap<Arc> _right;
-
-    class ArcLess {
-      const Digraph &g;
-    public:
-      ArcLess(const Digraph &_g) : g(_g) {}
-      bool operator()(Arc a,Arc b) const
-      {
-        return g.target(a)<g.target(b);
-      }
-    };
-
-  public:
-
-    ///Constructor
-
-    ///Constructor.
-    ///
-    ///It builds up the search database.
-    DynArcLookUp(const Digraph &g)
-      : _g(g),_head(g),_parent(g),_left(g),_right(g)
-    {
-      Parent::attach(_g.notifier(typename Digraph::Arc()));
-      refresh();
-    }
-
-  protected:
-
-    virtual void add(const Arc& arc) {
-      insert(arc);
-    }
-
-    virtual void add(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        insert(arcs[i]);
-      }
-    }
-
-    virtual void erase(const Arc& arc) {
-      remove(arc);
-    }
-
-    virtual void erase(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        remove(arcs[i]);
-      }
-    }
-
-    virtual void build() {
-      refresh();
-    }
-
-    virtual void clear() {
-      for(NodeIt n(_g);n!=INVALID;++n) {
-        _head.set(n, INVALID);
-      }
-    }
-
-    void insert(Arc arc) {
-      Node s = _g.source(arc);
-      Node t = _g.target(arc);
-      _left.set(arc, INVALID);
-      _right.set(arc, INVALID);
-
-      Arc e = _head[s];
-      if (e == INVALID) {
-        _head.set(s, arc);
-        _parent.set(arc, INVALID);
-        return;
-      }
-      while (true) {
-        if (t < _g.target(e)) {
-          if (_left[e] == INVALID) {
-            _left.set(e, arc);
-            _parent.set(arc, e);
-            splay(arc);
-            return;
-          } else {
-            e = _left[e];
-          }
-        } else {
-          if (_right[e] == INVALID) {
-            _right.set(e, arc);
-            _parent.set(arc, e);
-            splay(arc);
-            return;
-          } else {
-            e = _right[e];
-          }
-        }
-      }
-    }
-
-    void remove(Arc arc) {
-      if (_left[arc] == INVALID) {
-        if (_right[arc] != INVALID) {
-          _parent.set(_right[arc], _parent[arc]);
-        }
-        if (_parent[arc] != INVALID) {
-          if (_left[_parent[arc]] == arc) {
-            _left.set(_parent[arc], _right[arc]);
-          } else {
-            _right.set(_parent[arc], _right[arc]);
-          }
-        } else {
-          _head.set(_g.source(arc), _right[arc]);
-        }
-      } else if (_right[arc] == INVALID) {
-        _parent.set(_left[arc], _parent[arc]);
-        if (_parent[arc] != INVALID) {
-          if (_left[_parent[arc]] == arc) {
-            _left.set(_parent[arc], _left[arc]);
-          } else {
-            _right.set(_parent[arc], _left[arc]);
-          }
-        } else {
-          _head.set(_g.source(arc), _left[arc]);
-        }
-      } else {
-        Arc e = _left[arc];
-        if (_right[e] != INVALID) {
-          e = _right[e];
-          while (_right[e] != INVALID) {
-            e = _right[e];
-          }
-          Arc s = _parent[e];
-          _right.set(_parent[e], _left[e]);
-          if (_left[e] != INVALID) {
-            _parent.set(_left[e], _parent[e]);
-          }
-
-          _left.set(e, _left[arc]);
-          _parent.set(_left[arc], e);
-          _right.set(e, _right[arc]);
-          _parent.set(_right[arc], e);
-
-          _parent.set(e, _parent[arc]);
-          if (_parent[arc] != INVALID) {
-            if (_left[_parent[arc]] == arc) {
-              _left.set(_parent[arc], e);
-            } else {
-              _right.set(_parent[arc], e);
-            }
-          }
-          splay(s);
-        } else {
-          _right.set(e, _right[arc]);
-          _parent.set(_right[arc], e);
-          _parent.set(e, _parent[arc]);
-
-          if (_parent[arc] != INVALID) {
-            if (_left[_parent[arc]] == arc) {
-              _left.set(_parent[arc], e);
-            } else {
-              _right.set(_parent[arc], e);
-            }
-          } else {
-            _head.set(_g.source(arc), e);
-          }
-        }
-      }
-    }
-
-    Arc refreshRec(std::vector<Arc> &v,int a,int b)
-    {
-      int m=(a+b)/2;
-      Arc me=v[m];
-      if (a < m) {
-        Arc left = refreshRec(v,a,m-1);
-        _left.set(me, left);
-        _parent.set(left, me);
-      } else {
-        _left.set(me, INVALID);
-      }
-      if (m < b) {
-        Arc right = refreshRec(v,m+1,b);
-        _right.set(me, right);
-        _parent.set(right, me);
-      } else {
-        _right.set(me, INVALID);
-      }
-      return me;
-    }
-
-    void refresh() {
-      for(NodeIt n(_g);n!=INVALID;++n) {
-        std::vector<Arc> v;
-        for(OutArcIt a(_g,n);a!=INVALID;++a) v.push_back(a);
-        if (!v.empty()) {
-          std::sort(v.begin(),v.end(),ArcLess(_g));
-          Arc head = refreshRec(v,0,v.size()-1);
-          _head.set(n, head);
-          _parent.set(head, INVALID);
-        }
-        else _head.set(n, INVALID);
-      }
-    }
-
-    void zig(Arc v) {
-      Arc w = _parent[v];
-      _parent.set(v, _parent[w]);
-      _parent.set(w, v);
-      _left.set(w, _right[v]);
-      _right.set(v, w);
-      if (_parent[v] != INVALID) {
-        if (_right[_parent[v]] == w) {
-          _right.set(_parent[v], v);
-        } else {
-          _left.set(_parent[v], v);
-        }
-      }
-      if (_left[w] != INVALID){
-        _parent.set(_left[w], w);
-      }
-    }
-
-    void zag(Arc v) {
-      Arc w = _parent[v];
-      _parent.set(v, _parent[w]);
-      _parent.set(w, v);
-      _right.set(w, _left[v]);
-      _left.set(v, w);
-      if (_parent[v] != INVALID){
-        if (_left[_parent[v]] == w) {
-          _left.set(_parent[v], v);
-        } else {
-          _right.set(_parent[v], v);
-        }
-      }
-      if (_right[w] != INVALID){
-        _parent.set(_right[w], w);
-      }
-    }
-
-    void splay(Arc v) {
-      while (_parent[v] != INVALID) {
-        if (v == _left[_parent[v]]) {
-          if (_parent[_parent[v]] == INVALID) {
-            zig(v);
-          } else {
-            if (_parent[v] == _left[_parent[_parent[v]]]) {
-              zig(_parent[v]);
-              zig(v);
-            } else {
-              zig(v);
-              zag(v);
-            }
-          }
-        } else {
-          if (_parent[_parent[v]] == INVALID) {
-            zag(v);
-          } else {
-            if (_parent[v] == _left[_parent[_parent[v]]]) {
-              zag(v);
-              zig(v);
-            } else {
-              zag(_parent[v]);
-              zag(v);
-            }
-          }
-        }
-      }
-      _head[_g.source(v)] = v;
-    }
-
-
-  public:
-
-    ///Find an arc between two nodes.
-
-    ///Find an arc between two nodes.
-    ///\param s The source node.
-    ///\param t The target node.
-    ///\param p The previous arc between \c s and \c t. It it is INVALID or
-    ///not given, the operator finds the first appropriate arc.
-    ///\return An arc from \c s to \c t after \c p or
-    ///\ref INVALID if there is no more.
-    ///
-    ///For example, you can count the number of arcs from \c u to \c v in the
-    ///following way.
-    ///\code
-    ///DynArcLookUp<ListDigraph> ae(g);
-    ///...
-    ///int n = 0;
-    ///for(Arc a = ae(u,v); a != INVALID; a = ae(u,v,a)) n++;
-    ///\endcode
-    ///
-    ///Finding the arcs take at most <em>O</em>(log<em>d</em>)
-    ///amortized time, specifically, the time complexity of the lookups
-    ///is equal to the optimal search tree implementation for the
-    ///current query distribution in a constant factor.
-    ///
-    ///\note This is a dynamic data structure, therefore the data
-    ///structure is updated after each graph alteration. Thus although
-    ///this data structure is theoretically faster than \ref ArcLookUp
-    ///and \ref AllArcLookUp, it often provides worse performance than
-    ///them.
-    Arc operator()(Node s, Node t, Arc p = INVALID) const  {
-      if (p == INVALID) {
-        Arc a = _head[s];
-        if (a == INVALID) return INVALID;
-        Arc r = INVALID;
-        while (true) {
-          if (_g.target(a) < t) {
-            if (_right[a] == INVALID) {
-              const_cast<DynArcLookUp&>(*this).splay(a);
-              return r;
-            } else {
-              a = _right[a];
-            }
-          } else {
-            if (_g.target(a) == t) {
-              r = a;
-            }
-            if (_left[a] == INVALID) {
-              const_cast<DynArcLookUp&>(*this).splay(a);
-              return r;
-            } else {
-              a = _left[a];
-            }
-          }
-        }
-      } else {
-        Arc a = p;
-        if (_right[a] != INVALID) {
-          a = _right[a];
-          while (_left[a] != INVALID) {
-            a = _left[a];
-          }
-          const_cast<DynArcLookUp&>(*this).splay(a);
-        } else {
-          while (_parent[a] != INVALID && _right[_parent[a]] ==  a) {
-            a = _parent[a];
-          }
-          if (_parent[a] == INVALID) {
-            return INVALID;
-          } else {
-            a = _parent[a];
-            const_cast<DynArcLookUp&>(*this).splay(a);
-          }
-        }
-        if (_g.target(a) == t) return a;
-        else return INVALID;
-      }
-    }
-
-  };
-
-  ///Fast arc look-up between given endpoints.
-
-  ///Using this class, you can find an arc in a digraph from a given
-  ///source to a given target in time <em>O</em>(log<em>d</em>),
-  ///where <em>d</em> is the out-degree of the source node.
-  ///
-  ///It is not possible to find \e all parallel arcs between two nodes.
-  ///Use \ref AllArcLookUp for this purpose.
-  ///
-  ///\warning This class is static, so you should call refresh() (or at
-  ///least refresh(Node)) to refresh this data structure whenever the
-  ///digraph changes. This is a time consuming (superlinearly proportional
-  ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs).
-  ///
-  ///\tparam G The type of the underlying digraph.
-  ///
-  ///\sa DynArcLookUp
-  ///\sa AllArcLookUp
-  template<class G>
-  class ArcLookUp
-  {
-  public:
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
-
-  protected:
-    const Digraph &_g;
-    typename Digraph::template NodeMap<Arc> _head;
-    typename Digraph::template ArcMap<Arc> _left;
-    typename Digraph::template ArcMap<Arc> _right;
-
-    class ArcLess {
-      const Digraph &g;
-    public:
-      ArcLess(const Digraph &_g) : g(_g) {}
-      bool operator()(Arc a,Arc b) const
-      {
-        return g.target(a)<g.target(b);
-      }
-    };
-
-  public:
-
-    ///Constructor
-
-    ///Constructor.
-    ///
-    ///It builds up the search database, which remains valid until the digraph
-    ///changes.
-    ArcLookUp(const Digraph &g) :_g(g),_head(g),_left(g),_right(g) {refresh();}
-
-  private:
-    Arc refreshRec(std::vector<Arc> &v,int a,int b)
-    {
-      int m=(a+b)/2;
-      Arc me=v[m];
-      _left[me] = a<m?refreshRec(v,a,m-1):INVALID;
-      _right[me] = m<b?refreshRec(v,m+1,b):INVALID;
-      return me;
-    }
-  public:
-    ///Refresh the search data structure at a node.
-
-    ///Build up the search database of node \c n.
-    ///
-    ///It runs in time <em>O</em>(<em>d</em> log<em>d</em>), where <em>d</em>
-    ///is the number of the outgoing arcs of \c n.
-    void refresh(Node n)
-    {
-      std::vector<Arc> v;
-      for(OutArcIt e(_g,n);e!=INVALID;++e) v.push_back(e);
-      if(v.size()) {
-        std::sort(v.begin(),v.end(),ArcLess(_g));
-        _head[n]=refreshRec(v,0,v.size()-1);
-      }
-      else _head[n]=INVALID;
-    }
-    ///Refresh the full data structure.
-
-    ///Build up the full search database. In fact, it simply calls
-    ///\ref refresh(Node) "refresh(n)" for each node \c n.
-    ///
-    ///It runs in time <em>O</em>(<em>m</em> log<em>D</em>), where <em>m</em> is
-    ///the number of the arcs in the digraph and <em>D</em> is the maximum
-    ///out-degree of the digraph.
-    void refresh()
-    {
-      for(NodeIt n(_g);n!=INVALID;++n) refresh(n);
-    }
-
-    ///Find an arc between two nodes.
-
-    ///Find an arc between two nodes in time <em>O</em>(log<em>d</em>),
-    ///where <em>d</em> is the number of outgoing arcs of \c s.
-    ///\param s The source node.
-    ///\param t The target node.
-    ///\return An arc from \c s to \c t if there exists,
-    ///\ref INVALID otherwise.
-    ///
-    ///\warning If you change the digraph, refresh() must be called before using
-    ///this operator. If you change the outgoing arcs of
-    ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
-    Arc operator()(Node s, Node t) const
-    {
-      Arc e;
-      for(e=_head[s];
-          e!=INVALID&&_g.target(e)!=t;
-          e = t < _g.target(e)?_left[e]:_right[e]) ;
-      return e;
-    }
-
-  };
-
-  ///Fast look-up of all arcs between given endpoints.
-
-  ///This class is the same as \ref ArcLookUp, with the addition
-  ///that it makes it possible to find all parallel arcs between given
-  ///endpoints.
-  ///
-  ///\warning This class is static, so you should call refresh() (or at
-  ///least refresh(Node)) to refresh this data structure whenever the
-  ///digraph changes. This is a time consuming (superlinearly proportional
-  ///(<em>O</em>(<em>m</em> log<em>m</em>)) to the number of arcs).
-  ///
-  ///\tparam G The type of the underlying digraph.
-  ///
-  ///\sa DynArcLookUp
-  ///\sa ArcLookUp
-  template<class G>
-  class AllArcLookUp : public ArcLookUp<G>
-  {
-    using ArcLookUp<G>::_g;
-    using ArcLookUp<G>::_right;
-    using ArcLookUp<G>::_left;
-    using ArcLookUp<G>::_head;
-
-    TEMPLATE_DIGRAPH_TYPEDEFS(G);
-    typedef G Digraph;
-
-    typename Digraph::template ArcMap<Arc> _next;
-
-    Arc refreshNext(Arc head,Arc next=INVALID)
-    {
-      if(head==INVALID) return next;
-      else {
-        next=refreshNext(_right[head],next);
-        _next[head]=( next!=INVALID && _g.target(next)==_g.target(head))
-          ? next : INVALID;
-        return refreshNext(_left[head],head);
-      }
-    }
-
-    void refreshNext()
-    {
-      for(NodeIt n(_g);n!=INVALID;++n) refreshNext(_head[n]);
-    }
-
-  public:
-    ///Constructor
-
-    ///Constructor.
-    ///
-    ///It builds up the search database, which remains valid until the digraph
-    ///changes.
-    AllArcLookUp(const Digraph &g) : ArcLookUp<G>(g), _next(g) {refreshNext();}
-
-    ///Refresh the data structure at a node.
-
-    ///Build up the search database of node \c n.
-    ///
-    ///It runs in time <em>O</em>(<em>d</em> log<em>d</em>), where <em>d</em> is
-    ///the number of the outgoing arcs of \c n.
-    void refresh(Node n)
-    {
-      ArcLookUp<G>::refresh(n);
-      refreshNext(_head[n]);
-    }
-
-    ///Refresh the full data structure.
-
-    ///Build up the full search database. In fact, it simply calls
-    ///\ref refresh(Node) "refresh(n)" for each node \c n.
-    ///
-    ///It runs in time <em>O</em>(<em>m</em> log<em>D</em>), where <em>m</em> is
-    ///the number of the arcs in the digraph and <em>D</em> is the maximum
-    ///out-degree of the digraph.
-    void refresh()
-    {
-      for(NodeIt n(_g);n!=INVALID;++n) refresh(_head[n]);
-    }
-
-    ///Find an arc between two nodes.
-
-    ///Find an arc between two nodes.
-    ///\param s The source node.
-    ///\param t The target node.
-    ///\param prev The previous arc between \c s and \c t. It it is INVALID or
-    ///not given, the operator finds the first appropriate arc.
-    ///\return An arc from \c s to \c t after \c prev or
-    ///\ref INVALID if there is no more.
-    ///
-    ///For example, you can count the number of arcs from \c u to \c v in the
-    ///following way.
-    ///\code
-    ///AllArcLookUp<ListDigraph> ae(g);
-    ///...
-    ///int n = 0;
-    ///for(Arc a = ae(u,v); a != INVALID; a=ae(u,v,a)) n++;
-    ///\endcode
-    ///
-    ///Finding the first arc take <em>O</em>(log<em>d</em>) time,
-    ///where <em>d</em> is the number of outgoing arcs of \c s. Then the
-    ///consecutive arcs are found in constant time.
-    ///
-    ///\warning If you change the digraph, refresh() must be called before using
-    ///this operator. If you change the outgoing arcs of
-    ///a single node \c n, then \ref refresh(Node) "refresh(n)" is enough.
-    ///
-#ifdef DOXYGEN
-    Arc operator()(Node s, Node t, Arc prev=INVALID) const {}
-#else
-    using ArcLookUp<G>::operator() ;
-    Arc operator()(Node s, Node t, Arc prev) const
-    {
-      return prev==INVALID?(*this)(s,t):_next[prev];
-    }
-#endif
-
-  };
-
-  /// @}
-
-} //namespace lemon
-
-#endif
Index: mon/counter.h
===================================================================
--- lemon/counter.h	(revision 209)
+++ 	(revision )
@@ -1,249 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_COUNTER_H
-#define LEMON_COUNTER_H
-
-#include <string>
-#include <iostream>
-
-///\ingroup timecount
-///\file
-///\brief Tools for counting steps and events
-
-namespace lemon
-{
-
-  template<class P> class _NoSubCounter;
-
-  template<class P>
-  class _SubCounter
-  {
-    P &_parent;
-    std::string _title;
-    std::ostream &_os;
-    int count;
-  public:
-
-    typedef _SubCounter<_SubCounter<P> > SubCounter;
-    typedef _NoSubCounter<_SubCounter<P> > NoSubCounter;
-
-    _SubCounter(P &parent)
-      : _parent(parent), _title(), _os(std::cerr), count(0) {}
-    _SubCounter(P &parent,std::string title,std::ostream &os=std::cerr)
-      : _parent(parent), _title(title), _os(os), count(0) {}
-    _SubCounter(P &parent,const char *title,std::ostream &os=std::cerr)
-      : _parent(parent), _title(title), _os(os), count(0) {}
-    ~_SubCounter() {
-      _os << _title << count <<std::endl;
-      _parent+=count;
-    }
-    _SubCounter &operator++() { count++; return *this;}
-    int operator++(int) { return count++; }
-    _SubCounter &operator--() { count--; return *this;}
-    int operator--(int) { return count--; }
-    _SubCounter &operator+=(int c) { count+=c; return *this;}
-    _SubCounter &operator-=(int c) { count-=c; return *this;}
-    operator int() {return count;}
-  };
-
-  template<class P>
-  class _NoSubCounter
-  {
-    P &_parent;
-  public:
-    typedef _NoSubCounter<_NoSubCounter<P> > SubCounter;
-    typedef _NoSubCounter<_NoSubCounter<P> > NoSubCounter;
-
-    _NoSubCounter(P &parent) :_parent(parent) {}
-    _NoSubCounter(P &parent,std::string,std::ostream &)
-      :_parent(parent) {}
-    _NoSubCounter(P &parent,std::string)
-      :_parent(parent) {}
-    _NoSubCounter(P &parent,const char *,std::ostream &)
-      :_parent(parent) {}
-    _NoSubCounter(P &parent,const char *)
-      :_parent(parent) {}
-    ~_NoSubCounter() {}
-    _NoSubCounter &operator++() { ++_parent; return *this;}
-    int operator++(int) { _parent++; return 0;}
-    _NoSubCounter &operator--() { --_parent; return *this;}
-    int operator--(int) { _parent--; return 0;}
-    _NoSubCounter &operator+=(int c) { _parent+=c; return *this;}
-    _NoSubCounter &operator-=(int c) { _parent-=c; return *this;}
-    operator int() {return 0;}
-  };
-
-
-  /// \addtogroup timecount
-  /// @{
-
-  /// A counter class
-
-  /// This class makes it easier to count certain events (e.g. for debug
-  /// reasons).
-  /// You can increment or decrement the counter using \c operator++,
-  /// \c operator--, \c operator+= and \c operator-=. You can also
-  /// define subcounters for the different phases of the algorithm or
-  /// for different types of operations.
-  /// A report containing the given title and the value of the counter
-  /// is automatically printed on destruction.
-  ///
-  /// The following example shows the usage of counters and subcounters.
-  /// \code
-  /// // Bubble sort
-  /// std::vector<T> v;
-  /// ...
-  /// Counter op("Operations: ");
-  /// Counter::SubCounter as(op, "Assignments: ");
-  /// Counter::SubCounter co(op, "Comparisons: ");
-  /// for (int i = v.size()-1; i > 0; --i) {
-  ///   for (int j = 0; j < i; ++j) {
-  ///     if (v[j] > v[j+1]) {
-  ///       T tmp = v[j];
-  ///       v[j] = v[j+1];
-  ///       v[j+1] = tmp;
-  ///       as += 3;          // three assignments
-  ///     }
-  ///     ++co;               // one comparison
-  ///   }
-  /// }
-  /// \endcode
-  ///
-  /// This code prints out something like that:
-  /// \code
-  /// Comparisons: 45
-  /// Assignments: 57
-  /// Operations: 102
-  /// \endcode
-  ///
-  /// \sa NoCounter
-  class Counter
-  {
-    std::string _title;
-    std::ostream &_os;
-    int count;
-  public:
-
-    /// SubCounter class
-
-    /// This class can be used to setup subcounters for a \ref Counter
-    /// to have finer reports. A subcounter provides exactly the same
-    /// operations as the main \ref Counter, but it also increments and
-    /// decrements the value of its parent.
-    /// Subcounters can also have subcounters.
-    ///
-    /// The parent counter must be given as the first parameter of the
-    /// constructor. Apart from that a title and an \c ostream object
-    /// can also be given just like for the main \ref Counter.
-    ///
-    /// A report containing the given title and the value of the
-    /// subcounter is automatically printed on destruction. If you
-    /// would like to turn off this report, use \ref NoSubCounter
-    /// instead.
-    ///
-    /// \sa NoSubCounter
-    typedef _SubCounter<Counter> SubCounter;
-
-    /// SubCounter class without printing report on destruction
-
-    /// This class can be used to setup subcounters for a \ref Counter.
-    /// It is the same as \ref SubCounter but it does not print report
-    /// on destruction. (It modifies the value of its parent, so 'No'
-    /// only means 'do not print'.)
-    ///
-    /// Replacing \ref SubCounter "SubCounter"s with \ref NoSubCounter
-    /// "NoSubCounter"s makes it possible to turn off reporting
-    /// subcounter values without actually removing the definitions
-    /// and the increment or decrement operators.
-    ///
-    /// \sa SubCounter
-    typedef _NoSubCounter<Counter> NoSubCounter;
-
-    /// Constructor.
-    Counter() : _title(), _os(std::cerr), count(0) {}
-    /// Constructor.
-    Counter(std::string title,std::ostream &os=std::cerr)
-      : _title(title), _os(os), count(0) {}
-    /// Constructor.
-    Counter(const char *title,std::ostream &os=std::cerr)
-      : _title(title), _os(os), count(0) {}
-    /// Destructor. Prints the given title and the value of the counter.
-    ~Counter() {
-      _os << _title << count <<std::endl;
-    }
-    ///\e
-    Counter &operator++() { count++; return *this;}
-    ///\e
-    int operator++(int) { return count++;}
-    ///\e
-    Counter &operator--() { count--; return *this;}
-    ///\e
-    int operator--(int) { return count--;}
-    ///\e
-    Counter &operator+=(int c) { count+=c; return *this;}
-    ///\e
-    Counter &operator-=(int c) { count-=c; return *this;}
-    /// Resets the counter to the given value.
-
-    /// Resets the counter to the given value.
-    /// \note This function does not reset the values of
-    /// \ref SubCounter "SubCounter"s but it resets \ref NoSubCounter
-    /// "NoSubCounter"s along with the main counter.
-    void reset(int c=0) {count=c;}
-    /// Returns the value of the counter.
-    operator int() {return count;}
-  };
-
-  /// 'Do nothing' version of Counter.
-
-  /// This class can be used in the same way as \ref Counter however it
-  /// does not count at all and does not print report on destruction.
-  ///
-  /// Replacing a \ref Counter with a \ref NoCounter makes it possible
-  /// to turn off all counting and reporting (SubCounters should also
-  /// be replaced with NoSubCounters), so it does not affect the
-  /// efficiency of the program at all.
-  ///
-  /// \sa Counter
-  class NoCounter
-  {
-  public:
-    typedef _NoSubCounter<NoCounter> SubCounter;
-    typedef _NoSubCounter<NoCounter> NoSubCounter;
-
-    NoCounter() {}
-    NoCounter(std::string,std::ostream &) {}
-    NoCounter(const char *,std::ostream &) {}
-    NoCounter(std::string) {}
-    NoCounter(const char *) {}
-    NoCounter &operator++() { return *this; }
-    int operator++(int) { return 0; }
-    NoCounter &operator--() { return *this; }
-    int operator--(int) { return 0; }
-    NoCounter &operator+=(int) { return *this;}
-    NoCounter &operator-=(int) { return *this;}
-    void reset(int) {}
-    void reset() {}
-    operator int() {return 0;}
-  };
-
-  ///@}
-}
-
-#endif
Index: mon/dfs.h
===================================================================
--- lemon/dfs.h	(revision 427)
+++ 	(revision )
@@ -1,1639 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_DFS_H
-#define LEMON_DFS_H
-
-///\ingroup search
-///\file
-///\brief DFS algorithm.
-
-#include <lemon/list_graph.h>
-#include <lemon/bits/path_dump.h>
-#include <lemon/core.h>
-#include <lemon/error.h>
-#include <lemon/maps.h>
-#include <lemon/path.h>
-
-namespace lemon {
-
-  ///Default traits class of Dfs class.
-
-  ///Default traits class of Dfs class.
-  ///\tparam GR Digraph type.
-  template<class GR>
-  struct DfsDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the %DFS paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the %DFS paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that indicates which nodes are reached.
-
-    ///The type of the map that indicates which nodes are reached.
-    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-    ///Instantiates a ReachedMap.
-
-    ///This function instantiates a ReachedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &g)
-    {
-      return new ReachedMap(g);
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<int> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///DistMap.
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-  };
-
-  ///%DFS algorithm class.
-
-  ///\ingroup search
-  ///This class provides an efficient implementation of the %DFS algorithm.
-  ///
-  ///There is also a \ref dfs() "function-type interface" for the DFS
-  ///algorithm, which is convenient in the simplier cases and it can be
-  ///used easier.
-  ///
-  ///\tparam GR The type of the digraph the algorithm runs on.
-  ///The default value is \ref ListDigraph. The value of GR is not used
-  ///directly by \ref Dfs, it is only passed to \ref DfsDefaultTraits.
-  ///\tparam TR Traits class to set various data types used by the algorithm.
-  ///The default traits class is
-  ///\ref DfsDefaultTraits "DfsDefaultTraits<GR>".
-  ///See \ref DfsDefaultTraits for the documentation of
-  ///a Dfs traits class.
-#ifdef DOXYGEN
-  template <typename GR,
-            typename TR>
-#else
-  template <typename GR=ListDigraph,
-            typename TR=DfsDefaultTraits<GR> >
-#endif
-  class Dfs {
-  public:
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    ///\brief The type of the map that stores the predecessor arcs of the
-    ///DFS paths.
-    typedef typename TR::PredMap PredMap;
-    ///The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///The type of the map that indicates which nodes are reached.
-    typedef typename TR::ReachedMap ReachedMap;
-    ///The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the paths.
-    typedef PredMapPath<Digraph, PredMap> Path;
-
-    ///The traits class.
-    typedef TR Traits;
-
-  private:
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    //Pointer to the underlying digraph.
-    const Digraph *G;
-    //Pointer to the map of predecessor arcs.
-    PredMap *_pred;
-    //Indicates if _pred is locally allocated (true) or not.
-    bool local_pred;
-    //Pointer to the map of distances.
-    DistMap *_dist;
-    //Indicates if _dist is locally allocated (true) or not.
-    bool local_dist;
-    //Pointer to the map of reached status of the nodes.
-    ReachedMap *_reached;
-    //Indicates if _reached is locally allocated (true) or not.
-    bool local_reached;
-    //Pointer to the map of processed status of the nodes.
-    ProcessedMap *_processed;
-    //Indicates if _processed is locally allocated (true) or not.
-    bool local_processed;
-
-    std::vector<typename Digraph::OutArcIt> _stack;
-    int _stack_head;
-
-    //Creates the maps if necessary.
-    void create_maps()
-    {
-      if(!_pred) {
-        local_pred = true;
-        _pred = Traits::createPredMap(*G);
-      }
-      if(!_dist) {
-        local_dist = true;
-        _dist = Traits::createDistMap(*G);
-      }
-      if(!_reached) {
-        local_reached = true;
-        _reached = Traits::createReachedMap(*G);
-      }
-      if(!_processed) {
-        local_processed = true;
-        _processed = Traits::createProcessedMap(*G);
-      }
-    }
-
-  protected:
-
-    Dfs() {}
-
-  public:
-
-    typedef Dfs Create;
-
-    ///\name Named template parameters
-
-    ///@{
-
-    template <class T>
-    struct SetPredMapTraits : public Traits {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "PredMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    template <class T>
-    struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
-      typedef Dfs<Digraph, SetPredMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetDistMapTraits : public Traits {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "DistMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    template <class T>
-    struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
-      typedef Dfs<Digraph, SetDistMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetReachedMapTraits : public Traits {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "ReachedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ReachedMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ReachedMap type.
-    template <class T>
-    struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
-      typedef Dfs< Digraph, SetReachedMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetProcessedMapTraits : public Traits {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "ProcessedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    template <class T>
-    struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
-      typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create;
-    };
-
-    struct SetStandardProcessedMapTraits : public Traits {
-      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &g)
-      {
-        return new ProcessedMap(g);
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///If you don't set it explicitly, it will be automatically allocated.
-    struct SetStandardProcessedMap :
-      public Dfs< Digraph, SetStandardProcessedMapTraits > {
-      typedef Dfs< Digraph, SetStandardProcessedMapTraits > Create;
-    };
-
-    ///@}
-
-  public:
-
-    ///Constructor.
-
-    ///Constructor.
-    ///\param g The digraph the algorithm runs on.
-    Dfs(const Digraph &g) :
-      G(&g),
-      _pred(NULL), local_pred(false),
-      _dist(NULL), local_dist(false),
-      _reached(NULL), local_reached(false),
-      _processed(NULL), local_processed(false)
-    { }
-
-    ///Destructor.
-    ~Dfs()
-    {
-      if(local_pred) delete _pred;
-      if(local_dist) delete _dist;
-      if(local_reached) delete _reached;
-      if(local_processed) delete _processed;
-    }
-
-    ///Sets the map that stores the predecessor arcs.
-
-    ///Sets the map that stores the predecessor arcs.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dfs &predMap(PredMap &m)
-    {
-      if(local_pred) {
-        delete _pred;
-        local_pred=false;
-      }
-      _pred = &m;
-      return *this;
-    }
-
-    ///Sets the map that indicates which nodes are reached.
-
-    ///Sets the map that indicates which nodes are reached.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dfs &reachedMap(ReachedMap &m)
-    {
-      if(local_reached) {
-        delete _reached;
-        local_reached=false;
-      }
-      _reached = &m;
-      return *this;
-    }
-
-    ///Sets the map that indicates which nodes are processed.
-
-    ///Sets the map that indicates which nodes are processed.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dfs &processedMap(ProcessedMap &m)
-    {
-      if(local_processed) {
-        delete _processed;
-        local_processed=false;
-      }
-      _processed = &m;
-      return *this;
-    }
-
-    ///Sets the map that stores the distances of the nodes.
-
-    ///Sets the map that stores the distances of the nodes calculated by
-    ///the algorithm.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dfs &distMap(DistMap &m)
-    {
-      if(local_dist) {
-        delete _dist;
-        local_dist=false;
-      }
-      _dist = &m;
-      return *this;
-    }
-
-  public:
-
-    ///\name Execution control
-    ///The simplest way to execute the algorithm is to use
-    ///one of the member functions called \ref lemon::Dfs::run() "run()".
-    ///\n
-    ///If you need more control on the execution, first you must call
-    ///\ref lemon::Dfs::init() "init()", then you can add a source node
-    ///with \ref lemon::Dfs::addSource() "addSource()".
-    ///Finally \ref lemon::Dfs::start() "start()" will perform the
-    ///actual path computation.
-
-    ///@{
-
-    ///Initializes the internal data structures.
-
-    ///Initializes the internal data structures.
-    ///
-    void init()
-    {
-      create_maps();
-      _stack.resize(countNodes(*G));
-      _stack_head=-1;
-      for ( NodeIt u(*G) ; u!=INVALID ; ++u ) {
-        _pred->set(u,INVALID);
-        _reached->set(u,false);
-        _processed->set(u,false);
-      }
-    }
-
-    ///Adds a new source node.
-
-    ///Adds a new source node to the set of nodes to be processed.
-    ///
-    ///\pre The stack must be empty. (Otherwise the algorithm gives
-    ///false results.)
-    ///
-    ///\warning Distances will be wrong (or at least strange) in case of
-    ///multiple sources.
-    void addSource(Node s)
-    {
-      LEMON_DEBUG(emptyQueue(), "The stack is not empty.");
-      if(!(*_reached)[s])
-        {
-          _reached->set(s,true);
-          _pred->set(s,INVALID);
-          OutArcIt e(*G,s);
-          if(e!=INVALID) {
-            _stack[++_stack_head]=e;
-            _dist->set(s,_stack_head);
-          }
-          else {
-            _processed->set(s,true);
-            _dist->set(s,0);
-          }
-        }
-    }
-
-    ///Processes the next arc.
-
-    ///Processes the next arc.
-    ///
-    ///\return The processed arc.
-    ///
-    ///\pre The stack must not be empty.
-    Arc processNextArc()
-    {
-      Node m;
-      Arc e=_stack[_stack_head];
-      if(!(*_reached)[m=G->target(e)]) {
-        _pred->set(m,e);
-        _reached->set(m,true);
-        ++_stack_head;
-        _stack[_stack_head] = OutArcIt(*G, m);
-        _dist->set(m,_stack_head);
-      }
-      else {
-        m=G->source(e);
-        ++_stack[_stack_head];
-      }
-      while(_stack_head>=0 && _stack[_stack_head]==INVALID) {
-        _processed->set(m,true);
-        --_stack_head;
-        if(_stack_head>=0) {
-          m=G->source(_stack[_stack_head]);
-          ++_stack[_stack_head];
-        }
-      }
-      return e;
-    }
-
-    ///Next arc to be processed.
-
-    ///Next arc to be processed.
-    ///
-    ///\return The next arc to be processed or \c INVALID if the stack
-    ///is empty.
-    OutArcIt nextArc() const
-    {
-      return _stack_head>=0?_stack[_stack_head]:INVALID;
-    }
-
-    ///\brief Returns \c false if there are nodes
-    ///to be processed.
-    ///
-    ///Returns \c false if there are nodes
-    ///to be processed in the queue (stack).
-    bool emptyQueue() const { return _stack_head<0; }
-
-    ///Returns the number of the nodes to be processed.
-
-    ///Returns the number of the nodes to be processed in the queue (stack).
-    int queueSize() const { return _stack_head+1; }
-
-    ///Executes the algorithm.
-
-    ///Executes the algorithm.
-    ///
-    ///This method runs the %DFS algorithm from the root node
-    ///in order to compute the DFS path to each node.
-    ///
-    /// The algorithm computes
-    ///- the %DFS tree,
-    ///- the distance of each node from the root in the %DFS tree.
-    ///
-    ///\pre init() must be called and a root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\note <tt>d.start()</tt> is just a shortcut of the following code.
-    ///\code
-    ///  while ( !d.emptyQueue() ) {
-    ///    d.processNextArc();
-    ///  }
-    ///\endcode
-    void start()
-    {
-      while ( !emptyQueue() ) processNextArc();
-    }
-
-    ///Executes the algorithm until the given target node is reached.
-
-    ///Executes the algorithm until the given target node is reached.
-    ///
-    ///This method runs the %DFS algorithm from the root node
-    ///in order to compute the DFS path to \c t.
-    ///
-    ///The algorithm computes
-    ///- the %DFS path to \c t,
-    ///- the distance of \c t from the root in the %DFS tree.
-    ///
-    ///\pre init() must be called and a root node should be
-    ///added with addSource() before using this function.
-    void start(Node t)
-    {
-      while ( !emptyQueue() && !(*_reached)[t] )
-        processNextArc();
-    }
-
-    ///Executes the algorithm until a condition is met.
-
-    ///Executes the algorithm until a condition is met.
-    ///
-    ///This method runs the %DFS algorithm from the root node
-    ///until an arc \c a with <tt>am[a]</tt> true is found.
-    ///
-    ///\param am A \c bool (or convertible) arc map. The algorithm
-    ///will stop when it reaches an arc \c a with <tt>am[a]</tt> true.
-    ///
-    ///\return The reached arc \c a with <tt>am[a]</tt> true or
-    ///\c INVALID if no such arc was found.
-    ///
-    ///\pre init() must be called and a root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\warning Contrary to \ref Bfs and \ref Dijkstra, \c am is an arc map,
-    ///not a node map.
-    template<class ArcBoolMap>
-    Arc start(const ArcBoolMap &am)
-    {
-      while ( !emptyQueue() && !am[_stack[_stack_head]] )
-        processNextArc();
-      return emptyQueue() ? INVALID : _stack[_stack_head];
-    }
-
-    ///Runs the algorithm from the given source node.
-
-    ///This method runs the %DFS algorithm from node \c s
-    ///in order to compute the DFS path to each node.
-    ///
-    ///The algorithm computes
-    ///- the %DFS tree,
-    ///- the distance of each node from the root in the %DFS tree.
-    ///
-    ///\note <tt>d.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  d.init();
-    ///  d.addSource(s);
-    ///  d.start();
-    ///\endcode
-    void run(Node s) {
-      init();
-      addSource(s);
-      start();
-    }
-
-    ///Finds the %DFS path between \c s and \c t.
-
-    ///This method runs the %DFS algorithm from node \c s
-    ///in order to compute the DFS path to node \c t
-    ///(it stops searching when \c t is processed)
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    ///
-    ///\note Apart from the return value, <tt>d.run(s,t)</tt> is
-    ///just a shortcut of the following code.
-    ///\code
-    ///  d.init();
-    ///  d.addSource(s);
-    ///  d.start(t);
-    ///\endcode
-    bool run(Node s,Node t) {
-      init();
-      addSource(s);
-      start(t);
-      return reached(t);
-    }
-
-    ///Runs the algorithm to visit all nodes in the digraph.
-
-    ///This method runs the %DFS algorithm in order to compute the
-    ///%DFS path to each node.
-    ///
-    ///The algorithm computes
-    ///- the %DFS tree,
-    ///- the distance of each node from the root in the %DFS tree.
-    ///
-    ///\note <tt>d.run()</tt> is just a shortcut of the following code.
-    ///\code
-    ///  d.init();
-    ///  for (NodeIt n(digraph); n != INVALID; ++n) {
-    ///    if (!d.reached(n)) {
-    ///      d.addSource(n);
-    ///      d.start();
-    ///    }
-    ///  }
-    ///\endcode
-    void run() {
-      init();
-      for (NodeIt it(*G); it != INVALID; ++it) {
-        if (!reached(it)) {
-          addSource(it);
-          start();
-        }
-      }
-    }
-
-    ///@}
-
-    ///\name Query Functions
-    ///The result of the %DFS algorithm can be obtained using these
-    ///functions.\n
-    ///Either \ref lemon::Dfs::run() "run()" or \ref lemon::Dfs::start()
-    ///"start()" must be called before using them.
-
-    ///@{
-
-    ///The DFS path to a node.
-
-    ///Returns the DFS path to a node.
-    ///
-    ///\warning \c t should be reachable from the root.
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Path path(Node t) const { return Path(*G, *_pred, t); }
-
-    ///The distance of a node from the root.
-
-    ///Returns the distance of a node from the root.
-    ///
-    ///\warning If node \c v is not reachable from the root, then
-    ///the return value of this function is undefined.
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    int dist(Node v) const { return (*_dist)[v]; }
-
-    ///Returns the 'previous arc' of the %DFS tree for a node.
-
-    ///This function returns the 'previous arc' of the %DFS tree for the
-    ///node \c v, i.e. it returns the last arc of a %DFS path from the
-    ///root to \c v. It is \c INVALID
-    ///if \c v is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The %DFS tree used here is equal to the %DFS tree used in
-    ///\ref predNode().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before using
-    ///this function.
-    Arc predArc(Node v) const { return (*_pred)[v];}
-
-    ///Returns the 'previous node' of the %DFS tree.
-
-    ///This function returns the 'previous node' of the %DFS
-    ///tree for the node \c v, i.e. it returns the last but one node
-    ///from a %DFS path from the root to \c v. It is \c INVALID
-    ///if \c v is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The %DFS tree used here is equal to the %DFS tree used in
-    ///\ref predArc().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Node predNode(Node v) const { return (*_pred)[v]==INVALID ? INVALID:
-                                  G->source((*_pred)[v]); }
-
-    ///\brief Returns a const reference to the node map that stores the
-    ///distances of the nodes.
-    ///
-    ///Returns a const reference to the node map that stores the
-    ///distances of the nodes calculated by the algorithm.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const DistMap &distMap() const { return *_dist;}
-
-    ///\brief Returns a const reference to the node map that stores the
-    ///predecessor arcs.
-    ///
-    ///Returns a const reference to the node map that stores the predecessor
-    ///arcs, which form the DFS tree.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const PredMap &predMap() const { return *_pred;}
-
-    ///Checks if a node is reachable from the root(s).
-
-    ///Returns \c true if \c v is reachable from the root(s).
-    ///\pre Either \ref run() or \ref start()
-    ///must be called before using this function.
-    bool reached(Node v) const { return (*_reached)[v]; }
-
-    ///@}
-  };
-
-  ///Default traits class of dfs() function.
-
-  ///Default traits class of dfs() function.
-  ///\tparam GR Digraph type.
-  template<class GR>
-  struct DfsWizardDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the %DFS paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the %DFS paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default it is a NullMap.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap.
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that indicates which nodes are reached.
-
-    ///The type of the map that indicates which nodes are reached.
-    ///It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-    ///Instantiates a ReachedMap.
-
-    ///This function instantiates a ReachedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &g)
-    {
-      return new ReachedMap(g);
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<int> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define
-    ///the DistMap
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-
-    ///The type of the DFS paths.
-
-    ///The type of the DFS paths.
-    ///It must meet the \ref concepts::Path "Path" concept.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  /// Default traits class used by DfsWizard
-
-  /// To make it easier to use Dfs algorithm
-  /// we have created a wizard class.
-  /// This \ref DfsWizard class needs default traits,
-  /// as well as the \ref Dfs class.
-  /// The \ref DfsWizardBase is a class to be the default traits of the
-  /// \ref DfsWizard class.
-  template<class GR>
-  class DfsWizardBase : public DfsWizardDefaultTraits<GR>
-  {
-
-    typedef DfsWizardDefaultTraits<GR> Base;
-  protected:
-    //The type of the nodes in the digraph.
-    typedef typename Base::Digraph::Node Node;
-
-    //Pointer to the digraph the algorithm runs on.
-    void *_g;
-    //Pointer to the map of reached nodes.
-    void *_reached;
-    //Pointer to the map of processed nodes.
-    void *_processed;
-    //Pointer to the map of predecessors arcs.
-    void *_pred;
-    //Pointer to the map of distances.
-    void *_dist;
-    //Pointer to the DFS path to the target node.
-    void *_path;
-    //Pointer to the distance of the target node.
-    int *_di;
-
-    public:
-    /// Constructor.
-
-    /// This constructor does not require parameters, therefore it initiates
-    /// all of the attributes to \c 0.
-    DfsWizardBase() : _g(0), _reached(0), _processed(0), _pred(0),
-                      _dist(0), _path(0), _di(0) {}
-
-    /// Constructor.
-
-    /// This constructor requires one parameter,
-    /// others are initiated to \c 0.
-    /// \param g The digraph the algorithm runs on.
-    DfsWizardBase(const GR &g) :
-      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))),
-      _reached(0), _processed(0), _pred(0), _dist(0),  _path(0), _di(0) {}
-
-  };
-
-  /// Auxiliary class for the function-type interface of DFS algorithm.
-
-  /// This auxiliary class is created to implement the
-  /// \ref dfs() "function-type interface" of \ref Dfs algorithm.
-  /// It does not have own \ref run() method, it uses the functions
-  /// and features of the plain \ref Dfs.
-  ///
-  /// This class should only be used through the \ref dfs() function,
-  /// which makes it easier to use the algorithm.
-  template<class TR>
-  class DfsWizard : public TR
-  {
-    typedef TR Base;
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the DFS paths.
-    typedef typename TR::PredMap PredMap;
-    ///\brief The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///\brief The type of the map that indicates which nodes are reached.
-    typedef typename TR::ReachedMap ReachedMap;
-    ///\brief The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the DFS paths
-    typedef typename TR::Path Path;
-
-  public:
-
-    /// Constructor.
-    DfsWizard() : TR() {}
-
-    /// Constructor that requires parameters.
-
-    /// Constructor that requires parameters.
-    /// These parameters will be the default values for the traits class.
-    /// \param g The digraph the algorithm runs on.
-    DfsWizard(const Digraph &g) :
-      TR(g) {}
-
-    ///Copy constructor
-    DfsWizard(const TR &b) : TR(b) {}
-
-    ~DfsWizard() {}
-
-    ///Runs DFS algorithm from the given source node.
-
-    ///This method runs DFS algorithm from node \c s
-    ///in order to compute the DFS path to each node.
-    void run(Node s)
-    {
-      Dfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
-      if (Base::_pred)
-        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_reached)
-        alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
-      if (Base::_processed)
-        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      if (s!=INVALID)
-        alg.run(s);
-      else
-        alg.run();
-    }
-
-    ///Finds the DFS path between \c s and \c t.
-
-    ///This method runs DFS algorithm from node \c s
-    ///in order to compute the DFS path to node \c t
-    ///(it stops searching when \c t is processed).
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    bool run(Node s, Node t)
-    {
-      Dfs<Digraph,TR> alg(*reinterpret_cast<const Digraph*>(Base::_g));
-      if (Base::_pred)
-        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_reached)
-        alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
-      if (Base::_processed)
-        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      alg.run(s,t);
-      if (Base::_path)
-        *reinterpret_cast<Path*>(Base::_path) = alg.path(t);
-      if (Base::_di)
-        *Base::_di = alg.dist(t);
-      return alg.reached(t);
-      }
-
-    ///Runs DFS algorithm to visit all nodes in the digraph.
-
-    ///This method runs DFS algorithm in order to compute
-    ///the DFS path to each node.
-    void run()
-    {
-      run(INVALID);
-    }
-
-    template<class T>
-    struct SetPredMapBase : public Base {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &) { return 0; };
-      SetPredMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    template<class T>
-    DfsWizard<SetPredMapBase<T> > predMap(const T &t)
-    {
-      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DfsWizard<SetPredMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetReachedMapBase : public Base {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
-      SetReachedMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting ReachedMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting ReachedMap object.
-    template<class T>
-    DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
-    {
-      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DfsWizard<SetReachedMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetDistMapBase : public Base {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &) { return 0; };
-      SetDistMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    template<class T>
-    DfsWizard<SetDistMapBase<T> > distMap(const T &t)
-    {
-      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DfsWizard<SetDistMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetProcessedMapBase : public Base {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
-      SetProcessedMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    template<class T>
-    DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
-    {
-      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DfsWizard<SetProcessedMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetPathBase : public Base {
-      typedef T Path;
-      SetPathBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the DFS path to the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the DFS path to the target node.
-    template<class T>
-    DfsWizard<SetPathBase<T> > path(const T &t)
-    {
-      Base::_path=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DfsWizard<SetPathBase<T> >(*this);
-    }
-
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    DfsWizard dist(const int &d)
-    {
-      Base::_di=const_cast<int*>(&d);
-      return *this;
-    }
-
-  };
-
-  ///Function-type interface for DFS algorithm.
-
-  ///\ingroup search
-  ///Function-type interface for DFS algorithm.
-  ///
-  ///This function also has several \ref named-func-param "named parameters",
-  ///they are declared as the members of class \ref DfsWizard.
-  ///The following examples show how to use these parameters.
-  ///\code
-  ///  // Compute the DFS tree
-  ///  dfs(g).predMap(preds).distMap(dists).run(s);
-  ///
-  ///  // Compute the DFS path from s to t
-  ///  bool reached = dfs(g).path(p).dist(d).run(s,t);
-  ///\endcode
-
-  ///\warning Don't forget to put the \ref DfsWizard::run() "run()"
-  ///to the end of the parameter list.
-  ///\sa DfsWizard
-  ///\sa Dfs
-  template<class GR>
-  DfsWizard<DfsWizardBase<GR> >
-  dfs(const GR &digraph)
-  {
-    return DfsWizard<DfsWizardBase<GR> >(digraph);
-  }
-
-#ifdef DOXYGEN
-  /// \brief Visitor class for DFS.
-  ///
-  /// This class defines the interface of the DfsVisit events, and
-  /// it could be the base of a real visitor class.
-  template <typename _Digraph>
-  struct DfsVisitor {
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::Node Node;
-    /// \brief Called for the source node of the DFS.
-    ///
-    /// This function is called for the source node of the DFS.
-    void start(const Node& node) {}
-    /// \brief Called when the source node is leaved.
-    ///
-    /// This function is called when the source node is leaved.
-    void stop(const Node& node) {}
-    /// \brief Called when a node is reached first time.
-    ///
-    /// This function is called when a node is reached first time.
-    void reach(const Node& node) {}
-    /// \brief Called when an arc reaches a new node.
-    ///
-    /// This function is called when the DFS finds an arc whose target node
-    /// is not reached yet.
-    void discover(const Arc& arc) {}
-    /// \brief Called when an arc is examined but its target node is
-    /// already discovered.
-    ///
-    /// This function is called when an arc is examined but its target node is
-    /// already discovered.
-    void examine(const Arc& arc) {}
-    /// \brief Called when the DFS steps back from a node.
-    ///
-    /// This function is called when the DFS steps back from a node.
-    void leave(const Node& node) {}
-    /// \brief Called when the DFS steps back on an arc.
-    ///
-    /// This function is called when the DFS steps back on an arc.
-    void backtrack(const Arc& arc) {}
-  };
-#else
-  template <typename _Digraph>
-  struct DfsVisitor {
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::Node Node;
-    void start(const Node&) {}
-    void stop(const Node&) {}
-    void reach(const Node&) {}
-    void discover(const Arc&) {}
-    void examine(const Arc&) {}
-    void leave(const Node&) {}
-    void backtrack(const Arc&) {}
-
-    template <typename _Visitor>
-    struct Constraints {
-      void constraints() {
-        Arc arc;
-        Node node;
-        visitor.start(node);
-        visitor.stop(arc);
-        visitor.reach(node);
-        visitor.discover(arc);
-        visitor.examine(arc);
-        visitor.leave(node);
-        visitor.backtrack(arc);
-      }
-      _Visitor& visitor;
-    };
-  };
-#endif
-
-  /// \brief Default traits class of DfsVisit class.
-  ///
-  /// Default traits class of DfsVisit class.
-  /// \tparam _Digraph The type of the digraph the algorithm runs on.
-  template<class _Digraph>
-  struct DfsVisitDefaultTraits {
-
-    /// \brief The type of the digraph the algorithm runs on.
-    typedef _Digraph Digraph;
-
-    /// \brief The type of the map that indicates which nodes are reached.
-    ///
-    /// The type of the map that indicates which nodes are reached.
-    /// It must meet the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-    typedef typename Digraph::template NodeMap<bool> ReachedMap;
-
-    /// \brief Instantiates a ReachedMap.
-    ///
-    /// This function instantiates a ReachedMap.
-    /// \param digraph is the digraph, to which
-    /// we would like to define the ReachedMap.
-    static ReachedMap *createReachedMap(const Digraph &digraph) {
-      return new ReachedMap(digraph);
-    }
-
-  };
-
-  /// \ingroup search
-  ///
-  /// \brief %DFS algorithm class with visitor interface.
-  ///
-  /// This class provides an efficient implementation of the %DFS algorithm
-  /// with visitor interface.
-  ///
-  /// The %DfsVisit class provides an alternative interface to the Dfs
-  /// class. It works with callback mechanism, the DfsVisit object calls
-  /// the member functions of the \c Visitor class on every DFS event.
-  ///
-  /// This interface of the DFS algorithm should be used in special cases
-  /// when extra actions have to be performed in connection with certain
-  /// events of the DFS algorithm. Otherwise consider to use Dfs or dfs()
-  /// instead.
-  ///
-  /// \tparam _Digraph The type of the digraph the algorithm runs on.
-  /// The default value is
-  /// \ref ListDigraph. The value of _Digraph is not used directly by
-  /// \ref DfsVisit, it is only passed to \ref DfsVisitDefaultTraits.
-  /// \tparam _Visitor The Visitor type that is used by the algorithm.
-  /// \ref DfsVisitor "DfsVisitor<_Digraph>" is an empty visitor, which
-  /// does not observe the DFS events. If you want to observe the DFS
-  /// events, you should implement your own visitor class.
-  /// \tparam _Traits Traits class to set various data types used by the
-  /// algorithm. The default traits class is
-  /// \ref DfsVisitDefaultTraits "DfsVisitDefaultTraits<_Digraph>".
-  /// See \ref DfsVisitDefaultTraits for the documentation of
-  /// a DFS visit traits class.
-#ifdef DOXYGEN
-  template <typename _Digraph, typename _Visitor, typename _Traits>
-#else
-  template <typename _Digraph = ListDigraph,
-            typename _Visitor = DfsVisitor<_Digraph>,
-            typename _Traits = DfsVisitDefaultTraits<_Digraph> >
-#endif
-  class DfsVisit {
-  public:
-
-    ///The traits class.
-    typedef _Traits Traits;
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename Traits::Digraph Digraph;
-
-    ///The visitor type used by the algorithm.
-    typedef _Visitor Visitor;
-
-    ///The type of the map that indicates which nodes are reached.
-    typedef typename Traits::ReachedMap ReachedMap;
-
-  private:
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    //Pointer to the underlying digraph.
-    const Digraph *_digraph;
-    //Pointer to the visitor object.
-    Visitor *_visitor;
-    //Pointer to the map of reached status of the nodes.
-    ReachedMap *_reached;
-    //Indicates if _reached is locally allocated (true) or not.
-    bool local_reached;
-
-    std::vector<typename Digraph::Arc> _stack;
-    int _stack_head;
-
-    //Creates the maps if necessary.
-    void create_maps() {
-      if(!_reached) {
-        local_reached = true;
-        _reached = Traits::createReachedMap(*_digraph);
-      }
-    }
-
-  protected:
-
-    DfsVisit() {}
-
-  public:
-
-    typedef DfsVisit Create;
-
-    /// \name Named template parameters
-
-    ///@{
-    template <class T>
-    struct SetReachedMapTraits : public Traits {
-      typedef T ReachedMap;
-      static ReachedMap *createReachedMap(const Digraph &digraph) {
-        LEMON_ASSERT(false, "ReachedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    /// ReachedMap type.
-    ///
-    /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
-    template <class T>
-    struct SetReachedMap : public DfsVisit< Digraph, Visitor,
-                                            SetReachedMapTraits<T> > {
-      typedef DfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
-    };
-    ///@}
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// Constructor.
-    ///
-    /// \param digraph The digraph the algorithm runs on.
-    /// \param visitor The visitor object of the algorithm.
-    DfsVisit(const Digraph& digraph, Visitor& visitor)
-      : _digraph(&digraph), _visitor(&visitor),
-        _reached(0), local_reached(false) {}
-
-    /// \brief Destructor.
-    ~DfsVisit() {
-      if(local_reached) delete _reached;
-    }
-
-    /// \brief Sets the map that indicates which nodes are reached.
-    ///
-    /// Sets the map that indicates which nodes are reached.
-    /// If you don't use this function before calling \ref run(),
-    /// it will allocate one. The destructor deallocates this
-    /// automatically allocated map, of course.
-    /// \return <tt> (*this) </tt>
-    DfsVisit &reachedMap(ReachedMap &m) {
-      if(local_reached) {
-        delete _reached;
-        local_reached=false;
-      }
-      _reached = &m;
-      return *this;
-    }
-
-  public:
-
-    /// \name Execution control
-    /// The simplest way to execute the algorithm is to use
-    /// one of the member functions called \ref lemon::DfsVisit::run()
-    /// "run()".
-    /// \n
-    /// If you need more control on the execution, first you must call
-    /// \ref lemon::DfsVisit::init() "init()", then you can add several
-    /// source nodes with \ref lemon::DfsVisit::addSource() "addSource()".
-    /// Finally \ref lemon::DfsVisit::start() "start()" will perform the
-    /// actual path computation.
-
-    /// @{
-
-    /// \brief Initializes the internal data structures.
-    ///
-    /// Initializes the internal data structures.
-    void init() {
-      create_maps();
-      _stack.resize(countNodes(*_digraph));
-      _stack_head = -1;
-      for (NodeIt u(*_digraph) ; u != INVALID ; ++u) {
-        _reached->set(u, false);
-      }
-    }
-
-    ///Adds a new source node.
-
-    ///Adds a new source node to the set of nodes to be processed.
-    ///
-    ///\pre The stack must be empty. (Otherwise the algorithm gives
-    ///false results.)
-    ///
-    ///\warning Distances will be wrong (or at least strange) in case of
-    ///multiple sources.
-    void addSource(Node s)
-    {
-      LEMON_DEBUG(emptyQueue(), "The stack is not empty.");
-      if(!(*_reached)[s]) {
-          _reached->set(s,true);
-          _visitor->start(s);
-          _visitor->reach(s);
-          Arc e;
-          _digraph->firstOut(e, s);
-          if (e != INVALID) {
-            _stack[++_stack_head] = e;
-          } else {
-            _visitor->leave(s);
-            _visitor->stop(s);
-          }
-        }
-    }
-
-    /// \brief Processes the next arc.
-    ///
-    /// Processes the next arc.
-    ///
-    /// \return The processed arc.
-    ///
-    /// \pre The stack must not be empty.
-    Arc processNextArc() {
-      Arc e = _stack[_stack_head];
-      Node m = _digraph->target(e);
-      if(!(*_reached)[m]) {
-        _visitor->discover(e);
-        _visitor->reach(m);
-        _reached->set(m, true);
-        _digraph->firstOut(_stack[++_stack_head], m);
-      } else {
-        _visitor->examine(e);
-        m = _digraph->source(e);
-        _digraph->nextOut(_stack[_stack_head]);
-      }
-      while (_stack_head>=0 && _stack[_stack_head] == INVALID) {
-        _visitor->leave(m);
-        --_stack_head;
-        if (_stack_head >= 0) {
-          _visitor->backtrack(_stack[_stack_head]);
-          m = _digraph->source(_stack[_stack_head]);
-          _digraph->nextOut(_stack[_stack_head]);
-        } else {
-          _visitor->stop(m);
-        }
-      }
-      return e;
-    }
-
-    /// \brief Next arc to be processed.
-    ///
-    /// Next arc to be processed.
-    ///
-    /// \return The next arc to be processed or INVALID if the stack is
-    /// empty.
-    Arc nextArc() const {
-      return _stack_head >= 0 ? _stack[_stack_head] : INVALID;
-    }
-
-    /// \brief Returns \c false if there are nodes
-    /// to be processed.
-    ///
-    /// Returns \c false if there are nodes
-    /// to be processed in the queue (stack).
-    bool emptyQueue() const { return _stack_head < 0; }
-
-    /// \brief Returns the number of the nodes to be processed.
-    ///
-    /// Returns the number of the nodes to be processed in the queue (stack).
-    int queueSize() const { return _stack_head + 1; }
-
-    /// \brief Executes the algorithm.
-    ///
-    /// Executes the algorithm.
-    ///
-    /// This method runs the %DFS algorithm from the root node
-    /// in order to compute the %DFS path to each node.
-    ///
-    /// The algorithm computes
-    /// - the %DFS tree,
-    /// - the distance of each node from the root in the %DFS tree.
-    ///
-    /// \pre init() must be called and a root node should be
-    /// added with addSource() before using this function.
-    ///
-    /// \note <tt>d.start()</tt> is just a shortcut of the following code.
-    /// \code
-    ///   while ( !d.emptyQueue() ) {
-    ///     d.processNextArc();
-    ///   }
-    /// \endcode
-    void start() {
-      while ( !emptyQueue() ) processNextArc();
-    }
-
-    /// \brief Executes the algorithm until the given target node is reached.
-    ///
-    /// Executes the algorithm until the given target node is reached.
-    ///
-    /// This method runs the %DFS algorithm from the root node
-    /// in order to compute the DFS path to \c t.
-    ///
-    /// The algorithm computes
-    /// - the %DFS path to \c t,
-    /// - the distance of \c t from the root in the %DFS tree.
-    ///
-    /// \pre init() must be called and a root node should be added
-    /// with addSource() before using this function.
-    void start(Node t) {
-      while ( !emptyQueue() && !(*_reached)[t] )
-        processNextArc();
-    }
-
-    /// \brief Executes the algorithm until a condition is met.
-    ///
-    /// Executes the algorithm until a condition is met.
-    ///
-    /// This method runs the %DFS algorithm from the root node
-    /// until an arc \c a with <tt>am[a]</tt> true is found.
-    ///
-    /// \param am A \c bool (or convertible) arc map. The algorithm
-    /// will stop when it reaches an arc \c a with <tt>am[a]</tt> true.
-    ///
-    /// \return The reached arc \c a with <tt>am[a]</tt> true or
-    /// \c INVALID if no such arc was found.
-    ///
-    /// \pre init() must be called and a root node should be added
-    /// with addSource() before using this function.
-    ///
-    /// \warning Contrary to \ref Bfs and \ref Dijkstra, \c am is an arc map,
-    /// not a node map.
-    template <typename AM>
-    Arc start(const AM &am) {
-      while ( !emptyQueue() && !am[_stack[_stack_head]] )
-        processNextArc();
-      return emptyQueue() ? INVALID : _stack[_stack_head];
-    }
-
-    /// \brief Runs the algorithm from the given source node.
-    ///
-    /// This method runs the %DFS algorithm from node \c s.
-    /// in order to compute the DFS path to each node.
-    ///
-    /// The algorithm computes
-    /// - the %DFS tree,
-    /// - the distance of each node from the root in the %DFS tree.
-    ///
-    /// \note <tt>d.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///   d.init();
-    ///   d.addSource(s);
-    ///   d.start();
-    ///\endcode
-    void run(Node s) {
-      init();
-      addSource(s);
-      start();
-    }
-
-    /// \brief Finds the %DFS path between \c s and \c t.
-
-    /// This method runs the %DFS algorithm from node \c s
-    /// in order to compute the DFS path to node \c t
-    /// (it stops searching when \c t is processed).
-    ///
-    /// \return \c true if \c t is reachable form \c s.
-    ///
-    /// \note Apart from the return value, <tt>d.run(s,t)</tt> is
-    /// just a shortcut of the following code.
-    ///\code
-    ///   d.init();
-    ///   d.addSource(s);
-    ///   d.start(t);
-    ///\endcode
-    bool run(Node s,Node t) {
-      init();
-      addSource(s);
-      start(t);
-      return reached(t);
-    }
-
-    /// \brief Runs the algorithm to visit all nodes in the digraph.
-
-    /// This method runs the %DFS algorithm in order to
-    /// compute the %DFS path to each node.
-    ///
-    /// The algorithm computes
-    /// - the %DFS tree,
-    /// - the distance of each node from the root in the %DFS tree.
-    ///
-    /// \note <tt>d.run()</tt> is just a shortcut of the following code.
-    ///\code
-    ///   d.init();
-    ///   for (NodeIt n(digraph); n != INVALID; ++n) {
-    ///     if (!d.reached(n)) {
-    ///       d.addSource(n);
-    ///       d.start();
-    ///     }
-    ///   }
-    ///\endcode
-    void run() {
-      init();
-      for (NodeIt it(*_digraph); it != INVALID; ++it) {
-        if (!reached(it)) {
-          addSource(it);
-          start();
-        }
-      }
-    }
-
-    ///@}
-
-    /// \name Query Functions
-    /// The result of the %DFS algorithm can be obtained using these
-    /// functions.\n
-    /// Either \ref lemon::DfsVisit::run() "run()" or
-    /// \ref lemon::DfsVisit::start() "start()" must be called before
-    /// using them.
-    ///@{
-
-    /// \brief Checks if a node is reachable from the root(s).
-    ///
-    /// Returns \c true if \c v is reachable from the root(s).
-    /// \pre Either \ref run() or \ref start()
-    /// must be called before using this function.
-    bool reached(Node v) { return (*_reached)[v]; }
-
-    ///@}
-
-  };
-
-} //END OF NAMESPACE LEMON
-
-#endif
Index: mon/dijkstra.h
===================================================================
--- lemon/dijkstra.h	(revision 342)
+++ 	(revision )
@@ -1,1283 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_DIJKSTRA_H
-#define LEMON_DIJKSTRA_H
-
-///\ingroup shortest_path
-///\file
-///\brief Dijkstra algorithm.
-
-#include <limits>
-#include <lemon/list_graph.h>
-#include <lemon/bin_heap.h>
-#include <lemon/bits/path_dump.h>
-#include <lemon/core.h>
-#include <lemon/error.h>
-#include <lemon/maps.h>
-#include <lemon/path.h>
-
-namespace lemon {
-
-  /// \brief Default operation traits for the Dijkstra algorithm class.
-  ///
-  /// This operation traits class defines all computational operations and
-  /// constants which are used in the Dijkstra algorithm.
-  template <typename Value>
-  struct DijkstraDefaultOperationTraits {
-    /// \brief Gives back the zero value of the type.
-    static Value zero() {
-      return static_cast<Value>(0);
-    }
-    /// \brief Gives back the sum of the given two elements.
-    static Value plus(const Value& left, const Value& right) {
-      return left + right;
-    }
-    /// \brief Gives back true only if the first value is less than the second.
-    static bool less(const Value& left, const Value& right) {
-      return left < right;
-    }
-  };
-
-  ///Default traits class of Dijkstra class.
-
-  ///Default traits class of Dijkstra class.
-  ///\tparam GR The type of the digraph.
-  ///\tparam LM The type of the length map.
-  template<class GR, class LM>
-  struct DijkstraDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-
-    ///The type of the map that stores the arc lengths.
-
-    ///The type of the map that stores the arc lengths.
-    ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
-    typedef LM LengthMap;
-    ///The type of the length of the arcs.
-    typedef typename LM::Value Value;
-
-    /// Operation traits for Dijkstra algorithm.
-
-    /// This class defines the operations that are used in the algorithm.
-    /// \see DijkstraDefaultOperationTraits
-    typedef DijkstraDefaultOperationTraits<Value> OperationTraits;
-
-    /// The cross reference type used by the heap.
-
-    /// The cross reference type used by the heap.
-    /// Usually it is \c Digraph::NodeMap<int>.
-    typedef typename Digraph::template NodeMap<int> HeapCrossRef;
-    ///Instantiates a \ref HeapCrossRef.
-
-    ///This function instantiates a \ref HeapCrossRef.
-    /// \param g is the digraph, to which we would like to define the
-    /// \ref HeapCrossRef.
-    static HeapCrossRef *createHeapCrossRef(const Digraph &g)
-    {
-      return new HeapCrossRef(g);
-    }
-
-    ///The heap type used by the Dijkstra algorithm.
-
-    ///The heap type used by the Dijkstra algorithm.
-    ///
-    ///\sa BinHeap
-    ///\sa Dijkstra
-    typedef BinHeap<typename LM::Value, HeapCrossRef, std::less<Value> > Heap;
-    ///Instantiates a \ref Heap.
-
-    ///This function instantiates a \ref Heap.
-    static Heap *createHeap(HeapCrossRef& r)
-    {
-      return new Heap(r);
-    }
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default it is a NullMap.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename LM::Value> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define
-    ///the DistMap
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-  };
-
-  ///%Dijkstra algorithm class.
-
-  /// \ingroup shortest_path
-  ///This class provides an efficient implementation of the %Dijkstra algorithm.
-  ///
-  ///The arc lengths are passed to the algorithm using a
-  ///\ref concepts::ReadMap "ReadMap",
-  ///so it is easy to change it to any kind of length.
-  ///The type of the length is determined by the
-  ///\ref concepts::ReadMap::Value "Value" of the length map.
-  ///It is also possible to change the underlying priority heap.
-  ///
-  ///There is also a \ref dijkstra() "function-type interface" for the
-  ///%Dijkstra algorithm, which is convenient in the simplier cases and
-  ///it can be used easier.
-  ///
-  ///\tparam GR The type of the digraph the algorithm runs on.
-  ///The default value is \ref ListDigraph.
-  ///The value of GR is not used directly by \ref Dijkstra, it is only
-  ///passed to \ref DijkstraDefaultTraits.
-  ///\tparam LM A readable arc map that determines the lengths of the
-  ///arcs. It is read once for each arc, so the map may involve in
-  ///relatively time consuming process to compute the arc lengths if
-  ///it is necessary. The default map type is \ref
-  ///concepts::Digraph::ArcMap "Digraph::ArcMap<int>".
-  ///The value of LM is not used directly by \ref Dijkstra, it is only
-  ///passed to \ref DijkstraDefaultTraits.
-  ///\tparam TR Traits class to set various data types used by the algorithm.
-  ///The default traits class is \ref DijkstraDefaultTraits
-  ///"DijkstraDefaultTraits<GR,LM>". See \ref DijkstraDefaultTraits
-  ///for the documentation of a Dijkstra traits class.
-#ifdef DOXYGEN
-  template <typename GR, typename LM, typename TR>
-#else
-  template <typename GR=ListDigraph,
-            typename LM=typename GR::template ArcMap<int>,
-            typename TR=DijkstraDefaultTraits<GR,LM> >
-#endif
-  class Dijkstra {
-  public:
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    ///The type of the length of the arcs.
-    typedef typename TR::LengthMap::Value Value;
-    ///The type of the map that stores the arc lengths.
-    typedef typename TR::LengthMap LengthMap;
-    ///\brief The type of the map that stores the predecessor arcs of the
-    ///shortest paths.
-    typedef typename TR::PredMap PredMap;
-    ///The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the paths.
-    typedef PredMapPath<Digraph, PredMap> Path;
-    ///The cross reference type used for the current heap.
-    typedef typename TR::HeapCrossRef HeapCrossRef;
-    ///The heap type used by the algorithm.
-    typedef typename TR::Heap Heap;
-    ///The operation traits class.
-    typedef typename TR::OperationTraits OperationTraits;
-
-    ///The traits class.
-    typedef TR Traits;
-
-  private:
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    //Pointer to the underlying digraph.
-    const Digraph *G;
-    //Pointer to the length map.
-    const LengthMap *length;
-    //Pointer to the map of predecessors arcs.
-    PredMap *_pred;
-    //Indicates if _pred is locally allocated (true) or not.
-    bool local_pred;
-    //Pointer to the map of distances.
-    DistMap *_dist;
-    //Indicates if _dist is locally allocated (true) or not.
-    bool local_dist;
-    //Pointer to the map of processed status of the nodes.
-    ProcessedMap *_processed;
-    //Indicates if _processed is locally allocated (true) or not.
-    bool local_processed;
-    //Pointer to the heap cross references.
-    HeapCrossRef *_heap_cross_ref;
-    //Indicates if _heap_cross_ref is locally allocated (true) or not.
-    bool local_heap_cross_ref;
-    //Pointer to the heap.
-    Heap *_heap;
-    //Indicates if _heap is locally allocated (true) or not.
-    bool local_heap;
-
-    //Creates the maps if necessary.
-    void create_maps()
-    {
-      if(!_pred) {
-        local_pred = true;
-        _pred = Traits::createPredMap(*G);
-      }
-      if(!_dist) {
-        local_dist = true;
-        _dist = Traits::createDistMap(*G);
-      }
-      if(!_processed) {
-        local_processed = true;
-        _processed = Traits::createProcessedMap(*G);
-      }
-      if (!_heap_cross_ref) {
-        local_heap_cross_ref = true;
-        _heap_cross_ref = Traits::createHeapCrossRef(*G);
-      }
-      if (!_heap) {
-        local_heap = true;
-        _heap = Traits::createHeap(*_heap_cross_ref);
-      }
-    }
-
-  public:
-
-    typedef Dijkstra Create;
-
-    ///\name Named template parameters
-
-    ///@{
-
-    template <class T>
-    struct SetPredMapTraits : public Traits {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "PredMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///PredMap type.
-    template <class T>
-    struct SetPredMap
-      : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > {
-      typedef Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetDistMapTraits : public Traits {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "DistMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///DistMap type.
-    template <class T>
-    struct SetDistMap
-      : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > {
-      typedef Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > Create;
-    };
-
-    template <class T>
-    struct SetProcessedMapTraits : public Traits {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &)
-      {
-        LEMON_ASSERT(false, "ProcessedMap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type.
-    template <class T>
-    struct SetProcessedMap
-      : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > {
-      typedef Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > Create;
-    };
-
-    struct SetStandardProcessedMapTraits : public Traits {
-      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &g)
-      {
-        return new ProcessedMap(g);
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
-    ///If you don't set it explicitly, it will be automatically allocated.
-    struct SetStandardProcessedMap
-      : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > {
-      typedef Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits >
-      Create;
-    };
-
-    template <class H, class CR>
-    struct SetHeapTraits : public Traits {
-      typedef CR HeapCrossRef;
-      typedef H Heap;
-      static HeapCrossRef *createHeapCrossRef(const Digraph &) {
-        LEMON_ASSERT(false, "HeapCrossRef is not initialized");
-        return 0; // ignore warnings
-      }
-      static Heap *createHeap(HeapCrossRef &)
-      {
-        LEMON_ASSERT(false, "Heap is not initialized");
-        return 0; // ignore warnings
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///heap and cross reference type
-    ///
-    ///\ref named-templ-param "Named parameter" for setting heap and cross
-    ///reference type.
-    template <class H, class CR = typename Digraph::template NodeMap<int> >
-    struct SetHeap
-      : public Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > {
-      typedef Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > Create;
-    };
-
-    template <class H, class CR>
-    struct SetStandardHeapTraits : public Traits {
-      typedef CR HeapCrossRef;
-      typedef H Heap;
-      static HeapCrossRef *createHeapCrossRef(const Digraph &G) {
-        return new HeapCrossRef(G);
-      }
-      static Heap *createHeap(HeapCrossRef &R)
-      {
-        return new Heap(R);
-      }
-    };
-    ///\brief \ref named-templ-param "Named parameter" for setting
-    ///heap and cross reference type with automatic allocation
-    ///
-    ///\ref named-templ-param "Named parameter" for setting heap and cross
-    ///reference type. It can allocate the heap and the cross reference
-    ///object if the cross reference's constructor waits for the digraph as
-    ///parameter and the heap's constructor waits for the cross reference.
-    template <class H, class CR = typename Digraph::template NodeMap<int> >
-    struct SetStandardHeap
-      : public Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > {
-      typedef Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> >
-      Create;
-    };
-
-    template <class T>
-    struct SetOperationTraitsTraits : public Traits {
-      typedef T OperationTraits;
-    };
-
-    /// \brief \ref named-templ-param "Named parameter" for setting
-    ///\c OperationTraits type
-    ///
-    ///\ref named-templ-param "Named parameter" for setting
-    ///\ref OperationTraits type.
-    template <class T>
-    struct SetOperationTraits
-      : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > {
-      typedef Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> >
-      Create;
-    };
-
-    ///@}
-
-  protected:
-
-    Dijkstra() {}
-
-  public:
-
-    ///Constructor.
-
-    ///Constructor.
-    ///\param _g The digraph the algorithm runs on.
-    ///\param _length The length map used by the algorithm.
-    Dijkstra(const Digraph& _g, const LengthMap& _length) :
-      G(&_g), length(&_length),
-      _pred(NULL), local_pred(false),
-      _dist(NULL), local_dist(false),
-      _processed(NULL), local_processed(false),
-      _heap_cross_ref(NULL), local_heap_cross_ref(false),
-      _heap(NULL), local_heap(false)
-    { }
-
-    ///Destructor.
-    ~Dijkstra()
-    {
-      if(local_pred) delete _pred;
-      if(local_dist) delete _dist;
-      if(local_processed) delete _processed;
-      if(local_heap_cross_ref) delete _heap_cross_ref;
-      if(local_heap) delete _heap;
-    }
-
-    ///Sets the length map.
-
-    ///Sets the length map.
-    ///\return <tt> (*this) </tt>
-    Dijkstra &lengthMap(const LengthMap &m)
-    {
-      length = &m;
-      return *this;
-    }
-
-    ///Sets the map that stores the predecessor arcs.
-
-    ///Sets the map that stores the predecessor arcs.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dijkstra &predMap(PredMap &m)
-    {
-      if(local_pred) {
-        delete _pred;
-        local_pred=false;
-      }
-      _pred = &m;
-      return *this;
-    }
-
-    ///Sets the map that indicates which nodes are processed.
-
-    ///Sets the map that indicates which nodes are processed.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dijkstra &processedMap(ProcessedMap &m)
-    {
-      if(local_processed) {
-        delete _processed;
-        local_processed=false;
-      }
-      _processed = &m;
-      return *this;
-    }
-
-    ///Sets the map that stores the distances of the nodes.
-
-    ///Sets the map that stores the distances of the nodes calculated by the
-    ///algorithm.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated map, of course.
-    ///\return <tt> (*this) </tt>
-    Dijkstra &distMap(DistMap &m)
-    {
-      if(local_dist) {
-        delete _dist;
-        local_dist=false;
-      }
-      _dist = &m;
-      return *this;
-    }
-
-    ///Sets the heap and the cross reference used by algorithm.
-
-    ///Sets the heap and the cross reference used by algorithm.
-    ///If you don't use this function before calling \ref run(),
-    ///it will allocate one. The destructor deallocates this
-    ///automatically allocated heap and cross reference, of course.
-    ///\return <tt> (*this) </tt>
-    Dijkstra &heap(Heap& hp, HeapCrossRef &cr)
-    {
-      if(local_heap_cross_ref) {
-        delete _heap_cross_ref;
-        local_heap_cross_ref=false;
-      }
-      _heap_cross_ref = &cr;
-      if(local_heap) {
-        delete _heap;
-        local_heap=false;
-      }
-      _heap = &hp;
-      return *this;
-    }
-
-  private:
-
-    void finalizeNodeData(Node v,Value dst)
-    {
-      _processed->set(v,true);
-      _dist->set(v, dst);
-    }
-
-  public:
-
-    ///\name Execution control
-    ///The simplest way to execute the algorithm is to use one of the
-    ///member functions called \ref lemon::Dijkstra::run() "run()".
-    ///\n
-    ///If you need more control on the execution, first you must call
-    ///\ref lemon::Dijkstra::init() "init()", then you can add several
-    ///source nodes with \ref lemon::Dijkstra::addSource() "addSource()".
-    ///Finally \ref lemon::Dijkstra::start() "start()" will perform the
-    ///actual path computation.
-
-    ///@{
-
-    ///Initializes the internal data structures.
-
-    ///Initializes the internal data structures.
-    ///
-    void init()
-    {
-      create_maps();
-      _heap->clear();
-      for ( NodeIt u(*G) ; u!=INVALID ; ++u ) {
-        _pred->set(u,INVALID);
-        _processed->set(u,false);
-        _heap_cross_ref->set(u,Heap::PRE_HEAP);
-      }
-    }
-
-    ///Adds a new source node.
-
-    ///Adds a new source node to the priority heap.
-    ///The optional second parameter is the initial distance of the node.
-    ///
-    ///The function checks if the node has already been added to the heap and
-    ///it is pushed to the heap only if either it was not in the heap
-    ///or the shortest path found till then is shorter than \c dst.
-    void addSource(Node s,Value dst=OperationTraits::zero())
-    {
-      if(_heap->state(s) != Heap::IN_HEAP) {
-        _heap->push(s,dst);
-      } else if(OperationTraits::less((*_heap)[s], dst)) {
-        _heap->set(s,dst);
-        _pred->set(s,INVALID);
-      }
-    }
-
-    ///Processes the next node in the priority heap
-
-    ///Processes the next node in the priority heap.
-    ///
-    ///\return The processed node.
-    ///
-    ///\warning The priority heap must not be empty.
-    Node processNextNode()
-    {
-      Node v=_heap->top();
-      Value oldvalue=_heap->prio();
-      _heap->pop();
-      finalizeNodeData(v,oldvalue);
-
-      for(OutArcIt e(*G,v); e!=INVALID; ++e) {
-        Node w=G->target(e);
-        switch(_heap->state(w)) {
-        case Heap::PRE_HEAP:
-          _heap->push(w,OperationTraits::plus(oldvalue, (*length)[e]));
-          _pred->set(w,e);
-          break;
-        case Heap::IN_HEAP:
-          {
-            Value newvalue = OperationTraits::plus(oldvalue, (*length)[e]);
-            if ( OperationTraits::less(newvalue, (*_heap)[w]) ) {
-              _heap->decrease(w, newvalue);
-              _pred->set(w,e);
-            }
-          }
-          break;
-        case Heap::POST_HEAP:
-          break;
-        }
-      }
-      return v;
-    }
-
-    ///The next node to be processed.
-
-    ///Returns the next node to be processed or \c INVALID if the
-    ///priority heap is empty.
-    Node nextNode() const
-    {
-      return !_heap->empty()?_heap->top():INVALID;
-    }
-
-    ///\brief Returns \c false if there are nodes
-    ///to be processed.
-    ///
-    ///Returns \c false if there are nodes
-    ///to be processed in the priority heap.
-    bool emptyQueue() const { return _heap->empty(); }
-
-    ///Returns the number of the nodes to be processed in the priority heap
-
-    ///Returns the number of the nodes to be processed in the priority heap.
-    ///
-    int queueSize() const { return _heap->size(); }
-
-    ///Executes the algorithm.
-
-    ///Executes the algorithm.
-    ///
-    ///This method runs the %Dijkstra algorithm from the root node(s)
-    ///in order to compute the shortest path to each node.
-    ///
-    ///The algorithm computes
-    ///- the shortest path tree (forest),
-    ///- the distance of each node from the root(s).
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    ///
-    ///\note <tt>d.start()</tt> is just a shortcut of the following code.
-    ///\code
-    ///  while ( !d.emptyQueue() ) {
-    ///    d.processNextNode();
-    ///  }
-    ///\endcode
-    void start()
-    {
-      while ( !emptyQueue() ) processNextNode();
-    }
-
-    ///Executes the algorithm until the given target node is processed.
-
-    ///Executes the algorithm until the given target node is processed.
-    ///
-    ///This method runs the %Dijkstra algorithm from the root node(s)
-    ///in order to compute the shortest path to \c t.
-    ///
-    ///The algorithm computes
-    ///- the shortest path to \c t,
-    ///- the distance of \c t from the root(s).
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    void start(Node t)
-    {
-      while ( !_heap->empty() && _heap->top()!=t ) processNextNode();
-      if ( !_heap->empty() ) {
-        finalizeNodeData(_heap->top(),_heap->prio());
-        _heap->pop();
-      }
-    }
-
-    ///Executes the algorithm until a condition is met.
-
-    ///Executes the algorithm until a condition is met.
-    ///
-    ///This method runs the %Dijkstra algorithm from the root node(s) in
-    ///order to compute the shortest path to a node \c v with
-    /// <tt>nm[v]</tt> true, if such a node can be found.
-    ///
-    ///\param nm A \c bool (or convertible) node map. The algorithm
-    ///will stop when it reaches a node \c v with <tt>nm[v]</tt> true.
-    ///
-    ///\return The reached node \c v with <tt>nm[v]</tt> true or
-    ///\c INVALID if no such node was found.
-    ///
-    ///\pre init() must be called and at least one root node should be
-    ///added with addSource() before using this function.
-    template<class NodeBoolMap>
-    Node start(const NodeBoolMap &nm)
-    {
-      while ( !_heap->empty() && !nm[_heap->top()] ) processNextNode();
-      if ( _heap->empty() ) return INVALID;
-      finalizeNodeData(_heap->top(),_heap->prio());
-      return _heap->top();
-    }
-
-    ///Runs the algorithm from the given source node.
-
-    ///This method runs the %Dijkstra algorithm from node \c s
-    ///in order to compute the shortest path to each node.
-    ///
-    ///The algorithm computes
-    ///- the shortest path tree,
-    ///- the distance of each node from the root.
-    ///
-    ///\note <tt>d.run(s)</tt> is just a shortcut of the following code.
-    ///\code
-    ///  d.init();
-    ///  d.addSource(s);
-    ///  d.start();
-    ///\endcode
-    void run(Node s) {
-      init();
-      addSource(s);
-      start();
-    }
-
-    ///Finds the shortest path between \c s and \c t.
-
-    ///This method runs the %Dijkstra algorithm from node \c s
-    ///in order to compute the shortest path to node \c t
-    ///(it stops searching when \c t is processed).
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    ///
-    ///\note Apart from the return value, <tt>d.run(s,t)</tt> is just a
-    ///shortcut of the following code.
-    ///\code
-    ///  d.init();
-    ///  d.addSource(s);
-    ///  d.start(t);
-    ///\endcode
-    bool run(Node s,Node t) {
-      init();
-      addSource(s);
-      start(t);
-      return (*_heap_cross_ref)[t] == Heap::POST_HEAP;
-    }
-
-    ///@}
-
-    ///\name Query Functions
-    ///The result of the %Dijkstra algorithm can be obtained using these
-    ///functions.\n
-    ///Either \ref lemon::Dijkstra::run() "run()" or
-    ///\ref lemon::Dijkstra::start() "start()" must be called before
-    ///using them.
-
-    ///@{
-
-    ///The shortest path to a node.
-
-    ///Returns the shortest path to a node.
-    ///
-    ///\warning \c t should be reachable from the root(s).
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Path path(Node t) const { return Path(*G, *_pred, t); }
-
-    ///The distance of a node from the root(s).
-
-    ///Returns the distance of a node from the root(s).
-    ///
-    ///\warning If node \c v is not reachable from the root(s), then
-    ///the return value of this function is undefined.
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Value dist(Node v) const { return (*_dist)[v]; }
-
-    ///Returns the 'previous arc' of the shortest path tree for a node.
-
-    ///This function returns the 'previous arc' of the shortest path
-    ///tree for the node \c v, i.e. it returns the last arc of a
-    ///shortest path from the root(s) to \c v. It is \c INVALID if \c v
-    ///is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The shortest path tree used here is equal to the shortest path
-    ///tree used in \ref predNode().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Arc predArc(Node v) const { return (*_pred)[v]; }
-
-    ///Returns the 'previous node' of the shortest path tree for a node.
-
-    ///This function returns the 'previous node' of the shortest path
-    ///tree for the node \c v, i.e. it returns the last but one node
-    ///from a shortest path from the root(s) to \c v. It is \c INVALID
-    ///if \c v is not reachable from the root(s) or if \c v is a root.
-    ///
-    ///The shortest path tree used here is equal to the shortest path
-    ///tree used in \ref predArc().
-    ///
-    ///\pre Either \ref run() or \ref start() must be called before
-    ///using this function.
-    Node predNode(Node v) const { return (*_pred)[v]==INVALID ? INVALID:
-                                  G->source((*_pred)[v]); }
-
-    ///\brief Returns a const reference to the node map that stores the
-    ///distances of the nodes.
-    ///
-    ///Returns a const reference to the node map that stores the distances
-    ///of the nodes calculated by the algorithm.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const DistMap &distMap() const { return *_dist;}
-
-    ///\brief Returns a const reference to the node map that stores the
-    ///predecessor arcs.
-    ///
-    ///Returns a const reference to the node map that stores the predecessor
-    ///arcs, which form the shortest path tree.
-    ///
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    const PredMap &predMap() const { return *_pred;}
-
-    ///Checks if a node is reachable from the root(s).
-
-    ///Returns \c true if \c v is reachable from the root(s).
-    ///\pre Either \ref run() or \ref start()
-    ///must be called before using this function.
-    bool reached(Node v) const { return (*_heap_cross_ref)[v] !=
-                                        Heap::PRE_HEAP; }
-
-    ///Checks if a node is processed.
-
-    ///Returns \c true if \c v is processed, i.e. the shortest
-    ///path to \c v has already found.
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function.
-    bool processed(Node v) const { return (*_heap_cross_ref)[v] ==
-                                          Heap::POST_HEAP; }
-
-    ///The current distance of a node from the root(s).
-
-    ///Returns the current distance of a node from the root(s).
-    ///It may be decreased in the following processes.
-    ///\pre Either \ref run() or \ref init()
-    ///must be called before using this function and
-    ///node \c v must be reached but not necessarily processed.
-    Value currentDist(Node v) const {
-      return processed(v) ? (*_dist)[v] : (*_heap)[v];
-    }
-
-    ///@}
-  };
-
-
-  ///Default traits class of dijkstra() function.
-
-  ///Default traits class of dijkstra() function.
-  ///\tparam GR The type of the digraph.
-  ///\tparam LM The type of the length map.
-  template<class GR, class LM>
-  struct DijkstraWizardDefaultTraits
-  {
-    ///The type of the digraph the algorithm runs on.
-    typedef GR Digraph;
-    ///The type of the map that stores the arc lengths.
-
-    ///The type of the map that stores the arc lengths.
-    ///It must meet the \ref concepts::ReadMap "ReadMap" concept.
-    typedef LM LengthMap;
-    ///The type of the length of the arcs.
-    typedef typename LM::Value Value;
-
-    /// Operation traits for Dijkstra algorithm.
-
-    /// This class defines the operations that are used in the algorithm.
-    /// \see DijkstraDefaultOperationTraits
-    typedef DijkstraDefaultOperationTraits<Value> OperationTraits;
-
-    /// The cross reference type used by the heap.
-
-    /// The cross reference type used by the heap.
-    /// Usually it is \c Digraph::NodeMap<int>.
-    typedef typename Digraph::template NodeMap<int> HeapCrossRef;
-    ///Instantiates a \ref HeapCrossRef.
-
-    ///This function instantiates a \ref HeapCrossRef.
-    /// \param g is the digraph, to which we would like to define the
-    /// HeapCrossRef.
-    static HeapCrossRef *createHeapCrossRef(const Digraph &g)
-    {
-      return new HeapCrossRef(g);
-    }
-
-    ///The heap type used by the Dijkstra algorithm.
-
-    ///The heap type used by the Dijkstra algorithm.
-    ///
-    ///\sa BinHeap
-    ///\sa Dijkstra
-    typedef BinHeap<Value, typename Digraph::template NodeMap<int>,
-                    std::less<Value> > Heap;
-
-    ///Instantiates a \ref Heap.
-
-    ///This function instantiates a \ref Heap.
-    /// \param r is the HeapCrossRef which is used.
-    static Heap *createHeap(HeapCrossRef& r)
-    {
-      return new Heap(r);
-    }
-
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///
-    ///The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
-    ///Instantiates a PredMap.
-
-    ///This function instantiates a PredMap.
-    ///\param g is the digraph, to which we would like to define the
-    ///PredMap.
-    static PredMap *createPredMap(const Digraph &g)
-    {
-      return new PredMap(g);
-    }
-
-    ///The type of the map that indicates which nodes are processed.
-
-    ///The type of the map that indicates which nodes are processed.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    ///By default it is a NullMap.
-    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
-    ///Instantiates a ProcessedMap.
-
-    ///This function instantiates a ProcessedMap.
-    ///\param g is the digraph, to which
-    ///we would like to define the ProcessedMap.
-#ifdef DOXYGEN
-    static ProcessedMap *createProcessedMap(const Digraph &g)
-#else
-    static ProcessedMap *createProcessedMap(const Digraph &)
-#endif
-    {
-      return new ProcessedMap();
-    }
-
-    ///The type of the map that stores the distances of the nodes.
-
-    ///The type of the map that stores the distances of the nodes.
-    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
-    typedef typename Digraph::template NodeMap<typename LM::Value> DistMap;
-    ///Instantiates a DistMap.
-
-    ///This function instantiates a DistMap.
-    ///\param g is the digraph, to which we would like to define
-    ///the DistMap
-    static DistMap *createDistMap(const Digraph &g)
-    {
-      return new DistMap(g);
-    }
-
-    ///The type of the shortest paths.
-
-    ///The type of the shortest paths.
-    ///It must meet the \ref concepts::Path "Path" concept.
-    typedef lemon::Path<Digraph> Path;
-  };
-
-  /// Default traits class used by DijkstraWizard
-
-  /// To make it easier to use Dijkstra algorithm
-  /// we have created a wizard class.
-  /// This \ref DijkstraWizard class needs default traits,
-  /// as well as the \ref Dijkstra class.
-  /// The \ref DijkstraWizardBase is a class to be the default traits of the
-  /// \ref DijkstraWizard class.
-  template<class GR,class LM>
-  class DijkstraWizardBase : public DijkstraWizardDefaultTraits<GR,LM>
-  {
-    typedef DijkstraWizardDefaultTraits<GR,LM> Base;
-  protected:
-    //The type of the nodes in the digraph.
-    typedef typename Base::Digraph::Node Node;
-
-    //Pointer to the digraph the algorithm runs on.
-    void *_g;
-    //Pointer to the length map.
-    void *_length;
-    //Pointer to the map of processed nodes.
-    void *_processed;
-    //Pointer to the map of predecessors arcs.
-    void *_pred;
-    //Pointer to the map of distances.
-    void *_dist;
-    //Pointer to the shortest path to the target node.
-    void *_path;
-    //Pointer to the distance of the target node.
-    void *_di;
-
-  public:
-    /// Constructor.
-
-    /// This constructor does not require parameters, therefore it initiates
-    /// all of the attributes to \c 0.
-    DijkstraWizardBase() : _g(0), _length(0), _processed(0), _pred(0),
-                           _dist(0), _path(0), _di(0) {}
-
-    /// Constructor.
-
-    /// This constructor requires two parameters,
-    /// others are initiated to \c 0.
-    /// \param g The digraph the algorithm runs on.
-    /// \param l The length map.
-    DijkstraWizardBase(const GR &g,const LM &l) :
-      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))),
-      _length(reinterpret_cast<void*>(const_cast<LM*>(&l))),
-      _processed(0), _pred(0), _dist(0), _path(0), _di(0) {}
-
-  };
-
-  /// Auxiliary class for the function-type interface of Dijkstra algorithm.
-
-  /// This auxiliary class is created to implement the
-  /// \ref dijkstra() "function-type interface" of \ref Dijkstra algorithm.
-  /// It does not have own \ref run() method, it uses the functions
-  /// and features of the plain \ref Dijkstra.
-  ///
-  /// This class should only be used through the \ref dijkstra() function,
-  /// which makes it easier to use the algorithm.
-  template<class TR>
-  class DijkstraWizard : public TR
-  {
-    typedef TR Base;
-
-    ///The type of the digraph the algorithm runs on.
-    typedef typename TR::Digraph Digraph;
-
-    typedef typename Digraph::Node Node;
-    typedef typename Digraph::NodeIt NodeIt;
-    typedef typename Digraph::Arc Arc;
-    typedef typename Digraph::OutArcIt OutArcIt;
-
-    ///The type of the map that stores the arc lengths.
-    typedef typename TR::LengthMap LengthMap;
-    ///The type of the length of the arcs.
-    typedef typename LengthMap::Value Value;
-    ///\brief The type of the map that stores the predecessor
-    ///arcs of the shortest paths.
-    typedef typename TR::PredMap PredMap;
-    ///The type of the map that stores the distances of the nodes.
-    typedef typename TR::DistMap DistMap;
-    ///The type of the map that indicates which nodes are processed.
-    typedef typename TR::ProcessedMap ProcessedMap;
-    ///The type of the shortest paths
-    typedef typename TR::Path Path;
-    ///The heap type used by the dijkstra algorithm.
-    typedef typename TR::Heap Heap;
-
-  public:
-
-    /// Constructor.
-    DijkstraWizard() : TR() {}
-
-    /// Constructor that requires parameters.
-
-    /// Constructor that requires parameters.
-    /// These parameters will be the default values for the traits class.
-    /// \param g The digraph the algorithm runs on.
-    /// \param l The length map.
-    DijkstraWizard(const Digraph &g, const LengthMap &l) :
-      TR(g,l) {}
-
-    ///Copy constructor
-    DijkstraWizard(const TR &b) : TR(b) {}
-
-    ~DijkstraWizard() {}
-
-    ///Runs Dijkstra algorithm from the given source node.
-
-    ///This method runs %Dijkstra algorithm from the given source node
-    ///in order to compute the shortest path to each node.
-    void run(Node s)
-    {
-      Dijkstra<Digraph,LengthMap,TR>
-        dijk(*reinterpret_cast<const Digraph*>(Base::_g),
-             *reinterpret_cast<const LengthMap*>(Base::_length));
-      if (Base::_pred)
-        dijk.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        dijk.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_processed)
-        dijk.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      dijk.run(s);
-    }
-
-    ///Finds the shortest path between \c s and \c t.
-
-    ///This method runs the %Dijkstra algorithm from node \c s
-    ///in order to compute the shortest path to node \c t
-    ///(it stops searching when \c t is processed).
-    ///
-    ///\return \c true if \c t is reachable form \c s.
-    bool run(Node s, Node t)
-    {
-      Dijkstra<Digraph,LengthMap,TR>
-        dijk(*reinterpret_cast<const Digraph*>(Base::_g),
-             *reinterpret_cast<const LengthMap*>(Base::_length));
-      if (Base::_pred)
-        dijk.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
-      if (Base::_dist)
-        dijk.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
-      if (Base::_processed)
-        dijk.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
-      dijk.run(s,t);
-      if (Base::_path)
-        *reinterpret_cast<Path*>(Base::_path) = dijk.path(t);
-      if (Base::_di)
-        *reinterpret_cast<Value*>(Base::_di) = dijk.dist(t);
-      return dijk.reached(t);
-    }
-
-    template<class T>
-    struct SetPredMapBase : public Base {
-      typedef T PredMap;
-      static PredMap *createPredMap(const Digraph &) { return 0; };
-      SetPredMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for setting PredMap object.
-    template<class T>
-    DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
-    {
-      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DijkstraWizard<SetPredMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetDistMapBase : public Base {
-      typedef T DistMap;
-      static DistMap *createDistMap(const Digraph &) { return 0; };
-      SetDistMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for setting DistMap object.
-    template<class T>
-    DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
-    {
-      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DijkstraWizard<SetDistMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetProcessedMapBase : public Base {
-      typedef T ProcessedMap;
-      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
-      SetProcessedMapBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    ///
-    /// \ref named-func-param "Named parameter"
-    ///for setting ProcessedMap object.
-    template<class T>
-    DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
-    {
-      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DijkstraWizard<SetProcessedMapBase<T> >(*this);
-    }
-
-    template<class T>
-    struct SetPathBase : public Base {
-      typedef T Path;
-      SetPathBase(const TR &b) : TR(b) {}
-    };
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the shortest path to the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the shortest path to the target node.
-    template<class T>
-    DijkstraWizard<SetPathBase<T> > path(const T &t)
-    {
-      Base::_path=reinterpret_cast<void*>(const_cast<T*>(&t));
-      return DijkstraWizard<SetPathBase<T> >(*this);
-    }
-
-    ///\brief \ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    ///
-    ///\ref named-func-param "Named parameter"
-    ///for getting the distance of the target node.
-    DijkstraWizard dist(const Value &d)
-    {
-      Base::_di=reinterpret_cast<void*>(const_cast<Value*>(&d));
-      return *this;
-    }
-
-  };
-
-  ///Function-type interface for Dijkstra algorithm.
-
-  /// \ingroup shortest_path
-  ///Function-type interface for Dijkstra algorithm.
-  ///
-  ///This function also has several \ref named-func-param "named parameters",
-  ///they are declared as the members of class \ref DijkstraWizard.
-  ///The following examples show how to use these parameters.
-  ///\code
-  ///  // Compute shortest path from node s to each node
-  ///  dijkstra(g,length).predMap(preds).distMap(dists).run(s);
-  ///
-  ///  // Compute shortest path from s to t
-  ///  bool reached = dijkstra(g,length).path(p).dist(d).run(s,t);
-  ///\endcode
-  ///\warning Don't forget to put the \ref DijkstraWizard::run() "run()"
-  ///to the end of the parameter list.
-  ///\sa DijkstraWizard
-  ///\sa Dijkstra
-  template<class GR, class LM>
-  DijkstraWizard<DijkstraWizardBase<GR,LM> >
-  dijkstra(const GR &digraph, const LM &length)
-  {
-    return DijkstraWizard<DijkstraWizardBase<GR,LM> >(digraph,length);
-  }
-
-} //END OF NAMESPACE LEMON
-
-#endif
Index: mon/dim2.h
===================================================================
--- lemon/dim2.h	(revision 318)
+++ 	(revision )
@@ -1,732 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_DIM2_H
-#define LEMON_DIM2_H
-
-#include <iostream>
-
-///\ingroup misc
-///\file
-///\brief A simple two dimensional vector and a bounding box implementation
-///
-/// The class \ref lemon::dim2::Point "dim2::Point" implements
-/// a two dimensional vector with the usual operations.
-///
-/// The class \ref lemon::dim2::Box "dim2::Box" can be used to determine
-/// the rectangular bounding box of a set of
-/// \ref lemon::dim2::Point "dim2::Point"'s.
-
-namespace lemon {
-
-  ///Tools for handling two dimensional coordinates
-
-  ///This namespace is a storage of several
-  ///tools for handling two dimensional coordinates
-  namespace dim2 {
-
-  /// \addtogroup misc
-  /// @{
-
-  /// Two dimensional vector (plain vector)
-
-  /// A simple two dimensional vector (plain vector) implementation
-  /// with the usual vector operations.
-  template<typename T>
-    class Point {
-
-    public:
-
-      typedef T Value;
-
-      ///First coordinate
-      T x;
-      ///Second coordinate
-      T y;
-
-      ///Default constructor
-      Point() {}
-
-      ///Construct an instance from coordinates
-      Point(T a, T b) : x(a), y(b) { }
-
-      ///Returns the dimension of the vector (i.e. returns 2).
-
-      ///The dimension of the vector.
-      ///This function always returns 2.
-      int size() const { return 2; }
-
-      ///Subscripting operator
-
-      ///\c p[0] is \c p.x and \c p[1] is \c p.y
-      ///
-      T& operator[](int idx) { return idx == 0 ? x : y; }
-
-      ///Const subscripting operator
-
-      ///\c p[0] is \c p.x and \c p[1] is \c p.y
-      ///
-      const T& operator[](int idx) const { return idx == 0 ? x : y; }
-
-      ///Conversion constructor
-      template<class TT> Point(const Point<TT> &p) : x(p.x), y(p.y) {}
-
-      ///Give back the square of the norm of the vector
-      T normSquare() const {
-        return x*x+y*y;
-      }
-
-      ///Increment the left hand side by \c u
-      Point<T>& operator +=(const Point<T>& u) {
-        x += u.x;
-        y += u.y;
-        return *this;
-      }
-
-      ///Decrement the left hand side by \c u
-      Point<T>& operator -=(const Point<T>& u) {
-        x -= u.x;
-        y -= u.y;
-        return *this;
-      }
-
-      ///Multiply the left hand side with a scalar
-      Point<T>& operator *=(const T &u) {
-        x *= u;
-        y *= u;
-        return *this;
-      }
-
-      ///Divide the left hand side by a scalar
-      Point<T>& operator /=(const T &u) {
-        x /= u;
-        y /= u;
-        return *this;
-      }
-
-      ///Return the scalar product of two vectors
-      T operator *(const Point<T>& u) const {
-        return x*u.x+y*u.y;
-      }
-
-      ///Return the sum of two vectors
-      Point<T> operator+(const Point<T> &u) const {
-        Point<T> b=*this;
-        return b+=u;
-      }
-
-      ///Return the negative of the vector
-      Point<T> operator-() const {
-        Point<T> b=*this;
-        b.x=-b.x; b.y=-b.y;
-        return b;
-      }
-
-      ///Return the difference of two vectors
-      Point<T> operator-(const Point<T> &u) const {
-        Point<T> b=*this;
-        return b-=u;
-      }
-
-      ///Return a vector multiplied by a scalar
-      Point<T> operator*(const T &u) const {
-        Point<T> b=*this;
-        return b*=u;
-      }
-
-      ///Return a vector divided by a scalar
-      Point<T> operator/(const T &u) const {
-        Point<T> b=*this;
-        return b/=u;
-      }
-
-      ///Test equality
-      bool operator==(const Point<T> &u) const {
-        return (x==u.x) && (y==u.y);
-      }
-
-      ///Test inequality
-      bool operator!=(Point u) const {
-        return  (x!=u.x) || (y!=u.y);
-      }
-
-    };
-
-  ///Return a Point
-
-  ///Return a Point.
-  ///\relates Point
-  template <typename T>
-  inline Point<T> makePoint(const T& x, const T& y) {
-    return Point<T>(x, y);
-  }
-
-  ///Return a vector multiplied by a scalar
-
-  ///Return a vector multiplied by a scalar.
-  ///\relates Point
-  template<typename T> Point<T> operator*(const T &u,const Point<T> &x) {
-    return x*u;
-  }
-
-  ///Read a plain vector from a stream
-
-  ///Read a plain vector from a stream.
-  ///\relates Point
-  ///
-  template<typename T>
-  inline std::istream& operator>>(std::istream &is, Point<T> &z) {
-    char c;
-    if (is >> c) {
-      if (c != '(') is.putback(c);
-    } else {
-      is.clear();
-    }
-    if (!(is >> z.x)) return is;
-    if (is >> c) {
-      if (c != ',') is.putback(c);
-    } else {
-      is.clear();
-    }
-    if (!(is >> z.y)) return is;
-    if (is >> c) {
-      if (c != ')') is.putback(c);
-    } else {
-      is.clear();
-    }
-    return is;
-  }
-
-  ///Write a plain vector to a stream
-
-  ///Write a plain vector to a stream.
-  ///\relates Point
-  ///
-  template<typename T>
-  inline std::ostream& operator<<(std::ostream &os, const Point<T>& z)
-  {
-    os << "(" << z.x << "," << z.y << ")";
-    return os;
-  }
-
-  ///Rotate by 90 degrees
-
-  ///Returns the parameter rotated by 90 degrees in positive direction.
-  ///\relates Point
-  ///
-  template<typename T>
-  inline Point<T> rot90(const Point<T> &z)
-  {
-    return Point<T>(-z.y,z.x);
-  }
-
-  ///Rotate by 180 degrees
-
-  ///Returns the parameter rotated by 180 degrees.
-  ///\relates Point
-  ///
-  template<typename T>
-  inline Point<T> rot180(const Point<T> &z)
-  {
-    return Point<T>(-z.x,-z.y);
-  }
-
-  ///Rotate by 270 degrees
-
-  ///Returns the parameter rotated by 90 degrees in negative direction.
-  ///\relates Point
-  ///
-  template<typename T>
-  inline Point<T> rot270(const Point<T> &z)
-  {
-    return Point<T>(z.y,-z.x);
-  }
-
-
-
-  /// Bounding box of plain vectors (points).
-
-  /// A class to calculate or store the bounding box of plain vectors
-  /// (\ref Point "points").
-  template<typename T>
-  class Box {
-      Point<T> _bottom_left, _top_right;
-      bool _empty;
-    public:
-
-      ///Default constructor: creates an empty box
-      Box() { _empty = true; }
-
-      ///Construct a box from one point
-      Box(Point<T> a) {
-        _bottom_left = _top_right = a;
-        _empty = false;
-      }
-
-      ///Construct a box from two points
-
-      ///Construct a box from two points.
-      ///\param a The bottom left corner.
-      ///\param b The top right corner.
-      ///\warning The coordinates of the bottom left corner must be no more
-      ///than those of the top right one.
-      Box(Point<T> a,Point<T> b)
-      {
-        _bottom_left = a;
-        _top_right = b;
-        _empty = false;
-      }
-
-      ///Construct a box from four numbers
-
-      ///Construct a box from four numbers.
-      ///\param l The left side of the box.
-      ///\param b The bottom of the box.
-      ///\param r The right side of the box.
-      ///\param t The top of the box.
-      ///\warning The left side must be no more than the right side and
-      ///bottom must be no more than the top.
-      Box(T l,T b,T r,T t)
-      {
-        _bottom_left=Point<T>(l,b);
-        _top_right=Point<T>(r,t);
-        _empty = false;
-      }
-
-      ///Return \c true if the box is empty.
-
-      ///Return \c true if the box is empty (i.e. return \c false
-      ///if at least one point was added to the box or the coordinates of
-      ///the box were set).
-      ///
-      ///The coordinates of an empty box are not defined.
-      bool empty() const {
-        return _empty;
-      }
-
-      ///Make the box empty
-      void clear() {
-        _empty = true;
-      }
-
-      ///Give back the bottom left corner of the box
-
-      ///Give back the bottom left corner of the box.
-      ///If the box is empty, then the return value is not defined.
-      Point<T> bottomLeft() const {
-        return _bottom_left;
-      }
-
-      ///Set the bottom left corner of the box
-
-      ///Set the bottom left corner of the box.
-      ///\pre The box must not be empty.
-      void bottomLeft(Point<T> p) {
-        _bottom_left = p;
-      }
-
-      ///Give back the top right corner of the box
-
-      ///Give back the top right corner of the box.
-      ///If the box is empty, then the return value is not defined.
-      Point<T> topRight() const {
-        return _top_right;
-      }
-
-      ///Set the top right corner of the box
-
-      ///Set the top right corner of the box.
-      ///\pre The box must not be empty.
-      void topRight(Point<T> p) {
-        _top_right = p;
-      }
-
-      ///Give back the bottom right corner of the box
-
-      ///Give back the bottom right corner of the box.
-      ///If the box is empty, then the return value is not defined.
-      Point<T> bottomRight() const {
-        return Point<T>(_top_right.x,_bottom_left.y);
-      }
-
-      ///Set the bottom right corner of the box
-
-      ///Set the bottom right corner of the box.
-      ///\pre The box must not be empty.
-      void bottomRight(Point<T> p) {
-        _top_right.x = p.x;
-        _bottom_left.y = p.y;
-      }
-
-      ///Give back the top left corner of the box
-
-      ///Give back the top left corner of the box.
-      ///If the box is empty, then the return value is not defined.
-      Point<T> topLeft() const {
-        return Point<T>(_bottom_left.x,_top_right.y);
-      }
-
-      ///Set the top left corner of the box
-
-      ///Set the top left corner of the box.
-      ///\pre The box must not be empty.
-      void topLeft(Point<T> p) {
-        _top_right.y = p.y;
-        _bottom_left.x = p.x;
-      }
-
-      ///Give back the bottom of the box
-
-      ///Give back the bottom of the box.
-      ///If the box is empty, then the return value is not defined.
-      T bottom() const {
-        return _bottom_left.y;
-      }
-
-      ///Set the bottom of the box
-
-      ///Set the bottom of the box.
-      ///\pre The box must not be empty.
-      void bottom(T t) {
-        _bottom_left.y = t;
-      }
-
-      ///Give back the top of the box
-
-      ///Give back the top of the box.
-      ///If the box is empty, then the return value is not defined.
-      T top() const {
-        return _top_right.y;
-      }
-
-      ///Set the top of the box
-
-      ///Set the top of the box.
-      ///\pre The box must not be empty.
-      void top(T t) {
-        _top_right.y = t;
-      }
-
-      ///Give back the left side of the box
-
-      ///Give back the left side of the box.
-      ///If the box is empty, then the return value is not defined.
-      T left() const {
-        return _bottom_left.x;
-      }
-
-      ///Set the left side of the box
-
-      ///Set the left side of the box.
-      ///\pre The box must not be empty.
-      void left(T t) {
-        _bottom_left.x = t;
-      }
-
-      /// Give back the right side of the box
-
-      /// Give back the right side of the box.
-      ///If the box is empty, then the return value is not defined.
-      T right() const {
-        return _top_right.x;
-      }
-
-      ///Set the right side of the box
-
-      ///Set the right side of the box.
-      ///\pre The box must not be empty.
-      void right(T t) {
-        _top_right.x = t;
-      }
-
-      ///Give back the height of the box
-
-      ///Give back the height of the box.
-      ///If the box is empty, then the return value is not defined.
-      T height() const {
-        return _top_right.y-_bottom_left.y;
-      }
-
-      ///Give back the width of the box
-
-      ///Give back the width of the box.
-      ///If the box is empty, then the return value is not defined.
-      T width() const {
-        return _top_right.x-_bottom_left.x;
-      }
-
-      ///Checks whether a point is inside the box
-      bool inside(const Point<T>& u) const {
-        if (_empty)
-          return false;
-        else {
-          return ( (u.x-_bottom_left.x)*(_top_right.x-u.x) >= 0 &&
-                   (u.y-_bottom_left.y)*(_top_right.y-u.y) >= 0 );
-        }
-      }
-
-      ///Increments the box with a point
-
-      ///Increments the box with a point.
-      ///
-      Box& add(const Point<T>& u){
-        if (_empty) {
-          _bottom_left = _top_right = u;
-          _empty = false;
-        }
-        else {
-          if (_bottom_left.x > u.x) _bottom_left.x = u.x;
-          if (_bottom_left.y > u.y) _bottom_left.y = u.y;
-          if (_top_right.x < u.x) _top_right.x = u.x;
-          if (_top_right.y < u.y) _top_right.y = u.y;
-        }
-        return *this;
-      }
-
-      ///Increments the box to contain another box
-
-      ///Increments the box to contain another box.
-      ///
-      Box& add(const Box &u){
-        if ( !u.empty() ){
-          add(u._bottom_left);
-          add(u._top_right);
-        }
-        return *this;
-      }
-
-      ///Intersection of two boxes
-
-      ///Intersection of two boxes.
-      ///
-      Box operator&(const Box& u) const {
-        Box b;
-        if (_empty || u._empty) {
-          b._empty = true;
-        } else {
-          b._bottom_left.x = std::max(_bottom_left.x, u._bottom_left.x);
-          b._bottom_left.y = std::max(_bottom_left.y, u._bottom_left.y);
-          b._top_right.x = std::min(_top_right.x, u._top_right.x);
-          b._top_right.y = std::min(_top_right.y, u._top_right.y);
-          b._empty = b._bottom_left.x > b._top_right.x ||
-                     b._bottom_left.y > b._top_right.y;
-        }
-        return b;
-      }
-
-  };//class Box
-
-
-  ///Read a box from a stream
-
-  ///Read a box from a stream.
-  ///\relates Box
-  template<typename T>
-  inline std::istream& operator>>(std::istream &is, Box<T>& b) {
-    char c;
-    Point<T> p;
-    if (is >> c) {
-      if (c != '(') is.putback(c);
-    } else {
-      is.clear();
-    }
-    if (!(is >> p)) return is;
-    b.bottomLeft(p);
-    if (is >> c) {
-      if (c != ',') is.putback(c);
-    } else {
-      is.clear();
-    }
-    if (!(is >> p)) return is;
-    b.topRight(p);
-    if (is >> c) {
-      if (c != ')') is.putback(c);
-    } else {
-      is.clear();
-    }
-    return is;
-  }
-
-  ///Write a box to a stream
-
-  ///Write a box to a stream.
-  ///\relates Box
-  template<typename T>
-  inline std::ostream& operator<<(std::ostream &os, const Box<T>& b)
-  {
-    os << "(" << b.bottomLeft() << "," << b.topRight() << ")";
-    return os;
-  }
-
-  ///Map of x-coordinates of a <tt>Point</tt>-map
-
-  ///Map of x-coordinates of a \ref Point "Point"-map.
-  ///
-  template<class M>
-  class XMap
-  {
-    M& _map;
-  public:
-
-    typedef typename M::Value::Value Value;
-    typedef typename M::Key Key;
-    ///\e
-    XMap(M& map) : _map(map) {}
-    Value operator[](Key k) const {return _map[k].x;}
-    void set(Key k,Value v) {_map.set(k,typename M::Value(v,_map[k].y));}
-  };
-
-  ///Returns an XMap class
-
-  ///This function just returns an XMap class.
-  ///\relates XMap
-  template<class M>
-  inline XMap<M> xMap(M &m)
-  {
-    return XMap<M>(m);
-  }
-
-  template<class M>
-  inline XMap<M> xMap(const M &m)
-  {
-    return XMap<M>(m);
-  }
-
-  ///Constant (read only) version of XMap
-
-  ///Constant (read only) version of XMap.
-  ///
-  template<class M>
-  class ConstXMap
-  {
-    const M& _map;
-  public:
-
-    typedef typename M::Value::Value Value;
-    typedef typename M::Key Key;
-    ///\e
-    ConstXMap(const M &map) : _map(map) {}
-    Value operator[](Key k) const {return _map[k].x;}
-  };
-
-  ///Returns a ConstXMap class
-
-  ///This function just returns a ConstXMap class.
-  ///\relates ConstXMap
-  template<class M>
-  inline ConstXMap<M> xMap(const M &m)
-  {
-    return ConstXMap<M>(m);
-  }
-
-  ///Map of y-coordinates of a <tt>Point</tt>-map
-
-  ///Map of y-coordinates of a \ref Point "Point"-map.
-  ///
-  template<class M>
-  class YMap
-  {
-    M& _map;
-  public:
-
-    typedef typename M::Value::Value Value;
-    typedef typename M::Key Key;
-    ///\e
-    YMap(M& map) : _map(map) {}
-    Value operator[](Key k) const {return _map[k].y;}
-    void set(Key k,Value v) {_map.set(k,typename M::Value(_map[k].x,v));}
-  };
-
-  ///Returns a YMap class
-
-  ///This function just returns a YMap class.
-  ///\relates YMap
-  template<class M>
-  inline YMap<M> yMap(M &m)
-  {
-    return YMap<M>(m);
-  }
-
-  template<class M>
-  inline YMap<M> yMap(const M &m)
-  {
-    return YMap<M>(m);
-  }
-
-  ///Constant (read only) version of YMap
-
-  ///Constant (read only) version of YMap.
-  ///
-  template<class M>
-  class ConstYMap
-  {
-    const M& _map;
-  public:
-
-    typedef typename M::Value::Value Value;
-    typedef typename M::Key Key;
-    ///\e
-    ConstYMap(const M &map) : _map(map) {}
-    Value operator[](Key k) const {return _map[k].y;}
-  };
-
-  ///Returns a ConstYMap class
-
-  ///This function just returns a ConstYMap class.
-  ///\relates ConstYMap
-  template<class M>
-  inline ConstYMap<M> yMap(const M &m)
-  {
-    return ConstYMap<M>(m);
-  }
-
-
-  ///\brief Map of the normSquare() of a <tt>Point</tt>-map
-  ///
-  ///Map of the \ref Point::normSquare() "normSquare()"
-  ///of a \ref Point "Point"-map.
-  template<class M>
-  class NormSquareMap
-  {
-    const M& _map;
-  public:
-
-    typedef typename M::Value::Value Value;
-    typedef typename M::Key Key;
-    ///\e
-    NormSquareMap(const M &map) : _map(map) {}
-    Value operator[](Key k) const {return _map[k].normSquare();}
-  };
-
-  ///Returns a NormSquareMap class
-
-  ///This function just returns a NormSquareMap class.
-  ///\relates NormSquareMap
-  template<class M>
-  inline NormSquareMap<M> normSquareMap(const M &m)
-  {
-    return NormSquareMap<M>(m);
-  }
-
-  /// @}
-
-  } //namespce dim2
-
-} //namespace lemon
-
-#endif //LEMON_DIM2_H
Index: mon/error.h
===================================================================
--- lemon/error.h	(revision 291)
+++ 	(revision )
@@ -1,276 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_ERROR_H
-#define LEMON_ERROR_H
-
-/// \ingroup exceptions
-/// \file
-/// \brief Basic exception classes and error handling.
-
-#include <exception>
-#include <string>
-#include <sstream>
-#include <iostream>
-#include <cstdlib>
-#include <memory>
-
-namespace lemon {
-
-  /// \addtogroup exceptions
-  /// @{
-
-  /// \brief Generic exception class.
-  ///
-  /// Base class for exceptions used in LEMON.
-  ///
-  class Exception : public std::exception {
-  public:
-    ///Constructor
-    Exception() throw() {}
-    ///Virtual destructor
-    virtual ~Exception() throw() {}
-    ///A short description of the exception
-    virtual const char* what() const throw() {
-      return "lemon::Exception";
-    }
-  };
-
-  /// \brief Input-Output error
-  ///
-  /// This exception is thrown when a file operation cannot be
-  /// succeeded.
-  class IoError : public Exception {
-  protected:
-    std::string _message;
-    std::string _file;
-
-    mutable std::string _what;
-  public:
-
-    /// Copy constructor
-    IoError(const IoError &error) throw() : Exception() {
-      message(error._message);
-      file(error._file);
-    }
-
-    /// Constructor
-    explicit IoError(const char *message) throw() {
-      IoError::message(message);
-    }
-
-    /// Constructor
-    explicit IoError(const std::string &message) throw() {
-      IoError::message(message);
-    }
-
-    /// Constructor
-    explicit IoError(const char *message,
-                     const std::string &file) throw() {
-      IoError::message(message);
-      IoError::file(file);
-    }
-
-    /// Constructor
-    explicit IoError(const std::string &message,
-                     const std::string &file) throw() {
-      IoError::message(message);
-      IoError::file(file);
-    }
-
-    /// Virtual destructor
-    virtual ~IoError() throw() {}
-
-    /// Set the error message
-    void message(const char *message) throw() {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the error message
-    void message(const std::string& message) throw() {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the file name
-    void file(const std::string &file) throw() {
-      try {
-        _file = file;
-      } catch (...) {}
-    }
-
-    /// Returns the error message
-    const std::string& message() const throw() {
-      return _message;
-    }
-
-    /// \brief Returns the filename
-    ///
-    /// Returns the filename or an empty string if it was not specified.
-    const std::string& file() const throw() {
-      return _file;
-    }
-
-    /// \brief Returns a short error message
-    ///
-    /// Returns a short error message which contains the message and the
-    /// file name.
-    virtual const char* what() const throw() {
-      try {
-        _what.clear();
-        std::ostringstream oss;
-        oss << "lemon:IoError" << ": ";
-        oss << _message;
-        if (!_file.empty()) {
-          oss << " ('" << _file << "')";
-        }
-        _what = oss.str();
-      }
-      catch (...) {}
-      if (!_what.empty()) return _what.c_str();
-      else return "lemon:IoError";
-    }
-
-  };
-
-  /// \brief Format error
-  ///
-  /// This exception is thrown when an input file has wrong
-  /// format or a data representation is not legal.
-  class FormatError : public Exception {
-  protected:
-    std::string _message;
-    std::string _file;
-    int _line;
-
-    mutable std::string _what;
-  public:
-
-    /// Copy constructor
-    FormatError(const FormatError &error) throw() : Exception() {
-      message(error._message);
-      file(error._file);
-      line(error._line);
-    }
-
-    /// Constructor
-    explicit FormatError(const char *message) throw() {
-      FormatError::message(message);
-      _line = 0;
-    }
-
-    /// Constructor
-    explicit FormatError(const std::string &message) throw() {
-      FormatError::message(message);
-      _line = 0;
-    }
-
-    /// Constructor
-    explicit FormatError(const char *message,
-                         const std::string &file, int line = 0) throw() {
-      FormatError::message(message);
-      FormatError::file(file);
-      FormatError::line(line);
-    }
-
-    /// Constructor
-    explicit FormatError(const std::string &message,
-                         const std::string &file, int line = 0) throw() {
-      FormatError::message(message);
-      FormatError::file(file);
-      FormatError::line(line);
-    }
-
-    /// Virtual destructor
-    virtual ~FormatError() throw() {}
-
-    /// Set the line number
-    void line(int line) throw() { _line = line; }
-
-    /// Set the error message
-    void message(const char *message) throw() {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the error message
-    void message(const std::string& message) throw() {
-      try {
-        _message = message;
-      } catch (...) {}
-    }
-
-    /// Set the file name
-    void file(const std::string &file) throw() {
-      try {
-        _file = file;
-      } catch (...) {}
-    }
-
-    /// \brief Returns the line number
-    ///
-    /// Returns the line number or zero if it was not specified.
-    int line() const throw() { return _line; }
-
-    /// Returns the error message
-    const std::string& message() const throw() {
-      return _message;
-    }
-
-    /// \brief Returns the filename
-    ///
-    /// Returns the filename or an empty string if it was not specified.
-    const std::string& file() const throw() {
-      return _file;
-    }
-
-    /// \brief Returns a short error message
-    ///
-    /// Returns a short error message which contains the message, the
-    /// file name and the line number.
-    virtual const char* what() const throw() {
-      try {
-        _what.clear();
-        std::ostringstream oss;
-        oss << "lemon:FormatError" << ": ";
-        oss << _message;
-        if (!_file.empty() || _line != 0) {
-          oss << " (";
-          if (!_file.empty()) oss << "in file '" << _file << "'";
-          if (!_file.empty() && _line != 0) oss << " ";
-          if (_line != 0) oss << "at line " << _line;
-          oss << ")";
-        }
-        _what = oss.str();
-      }
-      catch (...) {}
-      if (!_what.empty()) return _what.c_str();
-      else return "lemon:FormatError";
-    }
-
-  };
-
-  /// @}
-
-}
-
-#endif // LEMON_ERROR_H
Index: mon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 427)
+++ 	(revision )
@@ -1,1190 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_GRAPH_TO_EPS_H
-#define LEMON_GRAPH_TO_EPS_H
-
-#include<iostream>
-#include<fstream>
-#include<sstream>
-#include<algorithm>
-#include<vector>
-
-#ifndef WIN32
-#include<sys/time.h>
-#include<ctime>
-#else
-#include<lemon/bits/windows.h>
-#endif
-
-#include<lemon/math.h>
-#include<lemon/core.h>
-#include<lemon/dim2.h>
-#include<lemon/maps.h>
-#include<lemon/color.h>
-#include<lemon/bits/bezier.h>
-#include<lemon/error.h>
-
-
-///\ingroup eps_io
-///\file
-///\brief A well configurable tool for visualizing graphs
-
-namespace lemon {
-
-  namespace _graph_to_eps_bits {
-    template<class MT>
-    class _NegY {
-    public:
-      typedef typename MT::Key Key;
-      typedef typename MT::Value Value;
-      const MT &map;
-      int yscale;
-      _NegY(const MT &m,bool b) : map(m), yscale(1-b*2) {}
-      Value operator[](Key n) { return Value(map[n].x,map[n].y*yscale);}
-    };
-  }
-
-///Default traits class of GraphToEps
-
-///Default traits class of \ref GraphToEps.
-///
-///\c G is the type of the underlying graph.
-template<class G>
-struct DefaultGraphToEpsTraits
-{
-  typedef G Graph;
-  typedef typename Graph::Node Node;
-  typedef typename Graph::NodeIt NodeIt;
-  typedef typename Graph::Arc Arc;
-  typedef typename Graph::ArcIt ArcIt;
-  typedef typename Graph::InArcIt InArcIt;
-  typedef typename Graph::OutArcIt OutArcIt;
-
-
-  const Graph &g;
-
-  std::ostream& os;
-
-  typedef ConstMap<typename Graph::Node,dim2::Point<double> > CoordsMapType;
-  CoordsMapType _coords;
-  ConstMap<typename Graph::Node,double > _nodeSizes;
-  ConstMap<typename Graph::Node,int > _nodeShapes;
-
-  ConstMap<typename Graph::Node,Color > _nodeColors;
-  ConstMap<typename Graph::Arc,Color > _arcColors;
-
-  ConstMap<typename Graph::Arc,double > _arcWidths;
-
-  double _arcWidthScale;
-
-  double _nodeScale;
-  double _xBorder, _yBorder;
-  double _scale;
-  double _nodeBorderQuotient;
-
-  bool _drawArrows;
-  double _arrowLength, _arrowWidth;
-
-  bool _showNodes, _showArcs;
-
-  bool _enableParallel;
-  double _parArcDist;
-
-  bool _showNodeText;
-  ConstMap<typename Graph::Node,bool > _nodeTexts;
-  double _nodeTextSize;
-
-  bool _showNodePsText;
-  ConstMap<typename Graph::Node,bool > _nodePsTexts;
-  char *_nodePsTextsPreamble;
-
-  bool _undirected;
-
-  bool _pleaseRemoveOsStream;
-
-  bool _scaleToA4;
-
-  std::string _title;
-  std::string _copyright;
-
-  enum NodeTextColorType
-    { DIST_COL=0, DIST_BW=1, CUST_COL=2, SAME_COL=3 } _nodeTextColorType;
-  ConstMap<typename Graph::Node,Color > _nodeTextColors;
-
-  bool _autoNodeScale;
-  bool _autoArcWidthScale;
-
-  bool _absoluteNodeSizes;
-  bool _absoluteArcWidths;
-
-  bool _negY;
-
-  bool _preScale;
-  ///Constructor
-
-  ///Constructor
-  ///\param _g  Reference to the graph to be printed.
-  ///\param _os Reference to the output stream.
-  ///\param _os Reference to the output stream.
-  ///By default it is <tt>std::cout</tt>.
-  ///\param _pros If it is \c true, then the \c ostream referenced by \c _os
-  ///will be explicitly deallocated by the destructor.
-  DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout,
-                          bool _pros=false) :
-    g(_g), os(_os),
-    _coords(dim2::Point<double>(1,1)), _nodeSizes(1), _nodeShapes(0),
-    _nodeColors(WHITE), _arcColors(BLACK),
-    _arcWidths(1.0), _arcWidthScale(0.003),
-    _nodeScale(.01), _xBorder(10), _yBorder(10), _scale(1.0),
-    _nodeBorderQuotient(.1),
-    _drawArrows(false), _arrowLength(1), _arrowWidth(0.3),
-    _showNodes(true), _showArcs(true),
-    _enableParallel(false), _parArcDist(1),
-    _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
-    _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
-    _undirected(lemon::UndirectedTagIndicator<G>::value),
-    _pleaseRemoveOsStream(_pros), _scaleToA4(false),
-    _nodeTextColorType(SAME_COL), _nodeTextColors(BLACK),
-    _autoNodeScale(false),
-    _autoArcWidthScale(false),
-    _absoluteNodeSizes(false),
-    _absoluteArcWidths(false),
-    _negY(false),
-    _preScale(true)
-  {}
-};
-
-///Auxiliary class to implement the named parameters of \ref graphToEps()
-
-///Auxiliary class to implement the named parameters of \ref graphToEps().
-///
-///For detailed examples see the \ref graph_to_eps_demo.cc demo file.
-template<class T> class GraphToEps : public T
-{
-  // Can't believe it is required by the C++ standard
-  using T::g;
-  using T::os;
-
-  using T::_coords;
-  using T::_nodeSizes;
-  using T::_nodeShapes;
-  using T::_nodeColors;
-  using T::_arcColors;
-  using T::_arcWidths;
-
-  using T::_arcWidthScale;
-  using T::_nodeScale;
-  using T::_xBorder;
-  using T::_yBorder;
-  using T::_scale;
-  using T::_nodeBorderQuotient;
-
-  using T::_drawArrows;
-  using T::_arrowLength;
-  using T::_arrowWidth;
-
-  using T::_showNodes;
-  using T::_showArcs;
-
-  using T::_enableParallel;
-  using T::_parArcDist;
-
-  using T::_showNodeText;
-  using T::_nodeTexts;
-  using T::_nodeTextSize;
-
-  using T::_showNodePsText;
-  using T::_nodePsTexts;
-  using T::_nodePsTextsPreamble;
-
-  using T::_undirected;
-
-  using T::_pleaseRemoveOsStream;
-
-  using T::_scaleToA4;
-
-  using T::_title;
-  using T::_copyright;
-
-  using T::NodeTextColorType;
-  using T::CUST_COL;
-  using T::DIST_COL;
-  using T::DIST_BW;
-  using T::_nodeTextColorType;
-  using T::_nodeTextColors;
-
-  using T::_autoNodeScale;
-  using T::_autoArcWidthScale;
-
-  using T::_absoluteNodeSizes;
-  using T::_absoluteArcWidths;
-
-
-  using T::_negY;
-  using T::_preScale;
-
-  // dradnats ++C eht yb deriuqer si ti eveileb t'naC
-
-  typedef typename T::Graph Graph;
-  typedef typename Graph::Node Node;
-  typedef typename Graph::NodeIt NodeIt;
-  typedef typename Graph::Arc Arc;
-  typedef typename Graph::ArcIt ArcIt;
-  typedef typename Graph::InArcIt InArcIt;
-  typedef typename Graph::OutArcIt OutArcIt;
-
-  static const int INTERPOL_PREC;
-  static const double A4HEIGHT;
-  static const double A4WIDTH;
-  static const double A4BORDER;
-
-  bool dontPrint;
-
-public:
-  ///Node shapes
-
-  ///Node shapes.
-  ///
-  enum NodeShapes {
-    /// = 0
-    ///\image html nodeshape_0.png
-    ///\image latex nodeshape_0.eps "CIRCLE shape (0)" width=2cm
-    CIRCLE=0,
-    /// = 1
-    ///\image html nodeshape_1.png
-    ///\image latex nodeshape_1.eps "SQUARE shape (1)" width=2cm
-    ///
-    SQUARE=1,
-    /// = 2
-    ///\image html nodeshape_2.png
-    ///\image latex nodeshape_2.eps "DIAMOND shape (2)" width=2cm
-    ///
-    DIAMOND=2,
-    /// = 3
-    ///\image html nodeshape_3.png
-    ///\image latex nodeshape_2.eps "MALE shape (4)" width=2cm
-    ///
-    MALE=3,
-    /// = 4
-    ///\image html nodeshape_4.png
-    ///\image latex nodeshape_2.eps "FEMALE shape (4)" width=2cm
-    ///
-    FEMALE=4
-  };
-
-private:
-  class arcLess {
-    const Graph &g;
-  public:
-    arcLess(const Graph &_g) : g(_g) {}
-    bool operator()(Arc a,Arc b) const
-    {
-      Node ai=std::min(g.source(a),g.target(a));
-      Node aa=std::max(g.source(a),g.target(a));
-      Node bi=std::min(g.source(b),g.target(b));
-      Node ba=std::max(g.source(b),g.target(b));
-      return ai<bi ||
-        (ai==bi && (aa < ba ||
-                    (aa==ba && ai==g.source(a) && bi==g.target(b))));
-    }
-  };
-  bool isParallel(Arc e,Arc f) const
-  {
-    return (g.source(e)==g.source(f)&&
-            g.target(e)==g.target(f)) ||
-      (g.source(e)==g.target(f)&&
-       g.target(e)==g.source(f));
-  }
-  template<class TT>
-  static std::string psOut(const dim2::Point<TT> &p)
-    {
-      std::ostringstream os;
-      os << p.x << ' ' << p.y;
-      return os.str();
-    }
-  static std::string psOut(const Color &c)
-    {
-      std::ostringstream os;
-      os << c.red() << ' ' << c.green() << ' ' << c.blue();
-      return os.str();
-    }
-
-public:
-  GraphToEps(const T &t) : T(t), dontPrint(false) {};
-
-  template<class X> struct CoordsTraits : public T {
-  typedef X CoordsMapType;
-    const X &_coords;
-    CoordsTraits(const T &t,const X &x) : T(t), _coords(x) {}
-  };
-  ///Sets the map of the node coordinates
-
-  ///Sets the map of the node coordinates.
-  ///\param x must be a node map with \ref dim2::Point "dim2::Point<double>" or
-  ///\ref dim2::Point "dim2::Point<int>" values.
-  template<class X> GraphToEps<CoordsTraits<X> > coords(const X &x) {
-    dontPrint=true;
-    return GraphToEps<CoordsTraits<X> >(CoordsTraits<X>(*this,x));
-  }
-  template<class X> struct NodeSizesTraits : public T {
-    const X &_nodeSizes;
-    NodeSizesTraits(const T &t,const X &x) : T(t), _nodeSizes(x) {}
-  };
-  ///Sets the map of the node sizes
-
-  ///Sets the map of the node sizes.
-  ///\param x must be a node map with \c double (or convertible) values.
-  template<class X> GraphToEps<NodeSizesTraits<X> > nodeSizes(const X &x)
-  {
-    dontPrint=true;
-    return GraphToEps<NodeSizesTraits<X> >(NodeSizesTraits<X>(*this,x));
-  }
-  template<class X> struct NodeShapesTraits : public T {
-    const X &_nodeShapes;
-    NodeShapesTraits(const T &t,const X &x) : T(t), _nodeShapes(x) {}
-  };
-  ///Sets the map of the node shapes
-
-  ///Sets the map of the node shapes.
-  ///The available shape values
-  ///can be found in \ref NodeShapes "enum NodeShapes".
-  ///\param x must be a node map with \c int (or convertible) values.
-  ///\sa NodeShapes
-  template<class X> GraphToEps<NodeShapesTraits<X> > nodeShapes(const X &x)
-  {
-    dontPrint=true;
-    return GraphToEps<NodeShapesTraits<X> >(NodeShapesTraits<X>(*this,x));
-  }
-  template<class X> struct NodeTextsTraits : public T {
-    const X &_nodeTexts;
-    NodeTextsTraits(const T &t,const X &x) : T(t), _nodeTexts(x) {}
-  };
-  ///Sets the text printed on the nodes
-
-  ///Sets the text printed on the nodes.
-  ///\param x must be a node map with type that can be pushed to a standard
-  ///\c ostream.
-  template<class X> GraphToEps<NodeTextsTraits<X> > nodeTexts(const X &x)
-  {
-    dontPrint=true;
-    _showNodeText=true;
-    return GraphToEps<NodeTextsTraits<X> >(NodeTextsTraits<X>(*this,x));
-  }
-  template<class X> struct NodePsTextsTraits : public T {
-    const X &_nodePsTexts;
-    NodePsTextsTraits(const T &t,const X &x) : T(t), _nodePsTexts(x) {}
-  };
-  ///Inserts a PostScript block to the nodes
-
-  ///With this command it is possible to insert a verbatim PostScript
-  ///block to the nodes.
-  ///The PS current point will be moved to the center of the node before
-  ///the PostScript block inserted.
-  ///
-  ///Before and after the block a newline character is inserted so you
-  ///don't have to bother with the separators.
-  ///
-  ///\param x must be a node map with type that can be pushed to a standard
-  ///\c ostream.
-  ///
-  ///\sa nodePsTextsPreamble()
-  template<class X> GraphToEps<NodePsTextsTraits<X> > nodePsTexts(const X &x)
-  {
-    dontPrint=true;
-    _showNodePsText=true;
-    return GraphToEps<NodePsTextsTraits<X> >(NodePsTextsTraits<X>(*this,x));
-  }
-  template<class X> struct ArcWidthsTraits : public T {
-    const X &_arcWidths;
-    ArcWidthsTraits(const T &t,const X &x) : T(t), _arcWidths(x) {}
-  };
-  ///Sets the map of the arc widths
-
-  ///Sets the map of the arc widths.
-  ///\param x must be an arc map with \c double (or convertible) values.
-  template<class X> GraphToEps<ArcWidthsTraits<X> > arcWidths(const X &x)
-  {
-    dontPrint=true;
-    return GraphToEps<ArcWidthsTraits<X> >(ArcWidthsTraits<X>(*this,x));
-  }
-
-  template<class X> struct NodeColorsTraits : public T {
-    const X &_nodeColors;
-    NodeColorsTraits(const T &t,const X &x) : T(t), _nodeColors(x) {}
-  };
-  ///Sets the map of the node colors
-
-  ///Sets the map of the node colors.
-  ///\param x must be a node map with \ref Color values.
-  ///
-  ///\sa Palette
-  template<class X> GraphToEps<NodeColorsTraits<X> >
-  nodeColors(const X &x)
-  {
-    dontPrint=true;
-    return GraphToEps<NodeColorsTraits<X> >(NodeColorsTraits<X>(*this,x));
-  }
-  template<class X> struct NodeTextColorsTraits : public T {
-    const X &_nodeTextColors;
-    NodeTextColorsTraits(const T &t,const X &x) : T(t), _nodeTextColors(x) {}
-  };
-  ///Sets the map of the node text colors
-
-  ///Sets the map of the node text colors.
-  ///\param x must be a node map with \ref Color values.
-  ///
-  ///\sa Palette
-  template<class X> GraphToEps<NodeTextColorsTraits<X> >
-  nodeTextColors(const X &x)
-  {
-    dontPrint=true;
-    _nodeTextColorType=CUST_COL;
-    return GraphToEps<NodeTextColorsTraits<X> >
-      (NodeTextColorsTraits<X>(*this,x));
-  }
-  template<class X> struct ArcColorsTraits : public T {
-    const X &_arcColors;
-    ArcColorsTraits(const T &t,const X &x) : T(t), _arcColors(x) {}
-  };
-  ///Sets the map of the arc colors
-
-  ///Sets the map of the arc colors.
-  ///\param x must be an arc map with \ref Color values.
-  ///
-  ///\sa Palette
-  template<class X> GraphToEps<ArcColorsTraits<X> >
-  arcColors(const X &x)
-  {
-    dontPrint=true;
-    return GraphToEps<ArcColorsTraits<X> >(ArcColorsTraits<X>(*this,x));
-  }
-  ///Sets a global scale factor for node sizes
-
-  ///Sets a global scale factor for node sizes.
-  ///
-  /// If nodeSizes() is not given, this function simply sets the node
-  /// sizes to \c d.  If nodeSizes() is given, but
-  /// autoNodeScale() is not, then the node size given by
-  /// nodeSizes() will be multiplied by the value \c d.
-  /// If both nodeSizes() and autoNodeScale() are used, then the
-  /// node sizes will be scaled in such a way that the greatest size will be
-  /// equal to \c d.
-  /// \sa nodeSizes()
-  /// \sa autoNodeScale()
-  GraphToEps<T> &nodeScale(double d=.01) {_nodeScale=d;return *this;}
-  ///Turns on/off the automatic node size scaling.
-
-  ///Turns on/off the automatic node size scaling.
-  ///
-  ///\sa nodeScale()
-  ///
-  GraphToEps<T> &autoNodeScale(bool b=true) {
-    _autoNodeScale=b;return *this;
-  }
-
-  ///Turns on/off the absolutematic node size scaling.
-
-  ///Turns on/off the absolutematic node size scaling.
-  ///
-  ///\sa nodeScale()
-  ///
-  GraphToEps<T> &absoluteNodeSizes(bool b=true) {
-    _absoluteNodeSizes=b;return *this;
-  }
-
-  ///Negates the Y coordinates.
-  GraphToEps<T> &negateY(bool b=true) {
-    _negY=b;return *this;
-  }
-
-  ///Turn on/off pre-scaling
-
-  ///By default graphToEps() rescales the whole image in order to avoid
-  ///very big or very small bounding boxes.
-  ///
-  ///This (p)rescaling can be turned off with this function.
-  ///
-  GraphToEps<T> &preScale(bool b=true) {
-    _preScale=b;return *this;
-  }
-
-  ///Sets a global scale factor for arc widths
-
-  /// Sets a global scale factor for arc widths.
-  ///
-  /// If arcWidths() is not given, this function simply sets the arc
-  /// widths to \c d.  If arcWidths() is given, but
-  /// autoArcWidthScale() is not, then the arc withs given by
-  /// arcWidths() will be multiplied by the value \c d.
-  /// If both arcWidths() and autoArcWidthScale() are used, then the
-  /// arc withs will be scaled in such a way that the greatest width will be
-  /// equal to \c d.
-  GraphToEps<T> &arcWidthScale(double d=.003) {_arcWidthScale=d;return *this;}
-  ///Turns on/off the automatic arc width scaling.
-
-  ///Turns on/off the automatic arc width scaling.
-  ///
-  ///\sa arcWidthScale()
-  ///
-  GraphToEps<T> &autoArcWidthScale(bool b=true) {
-    _autoArcWidthScale=b;return *this;
-  }
-  ///Turns on/off the absolutematic arc width scaling.
-
-  ///Turns on/off the absolutematic arc width scaling.
-  ///
-  ///\sa arcWidthScale()
-  ///
-  GraphToEps<T> &absoluteArcWidths(bool b=true) {
-    _absoluteArcWidths=b;return *this;
-  }
-  ///Sets a global scale factor for the whole picture
-  GraphToEps<T> &scale(double d) {_scale=d;return *this;}
-  ///Sets the width of the border around the picture
-  GraphToEps<T> &border(double b=10) {_xBorder=_yBorder=b;return *this;}
-  ///Sets the width of the border around the picture
-  GraphToEps<T> &border(double x, double y) {
-    _xBorder=x;_yBorder=y;return *this;
-  }
-  ///Sets whether to draw arrows
-  GraphToEps<T> &drawArrows(bool b=true) {_drawArrows=b;return *this;}
-  ///Sets the length of the arrowheads
-  GraphToEps<T> &arrowLength(double d=1.0) {_arrowLength*=d;return *this;}
-  ///Sets the width of the arrowheads
-  GraphToEps<T> &arrowWidth(double d=.3) {_arrowWidth*=d;return *this;}
-
-  ///Scales the drawing to fit to A4 page
-  GraphToEps<T> &scaleToA4() {_scaleToA4=true;return *this;}
-
-  ///Enables parallel arcs
-  GraphToEps<T> &enableParallel(bool b=true) {_enableParallel=b;return *this;}
-
-  ///Sets the distance between parallel arcs
-  GraphToEps<T> &parArcDist(double d) {_parArcDist*=d;return *this;}
-
-  ///Hides the arcs
-  GraphToEps<T> &hideArcs(bool b=true) {_showArcs=!b;return *this;}
-  ///Hides the nodes
-  GraphToEps<T> &hideNodes(bool b=true) {_showNodes=!b;return *this;}
-
-  ///Sets the size of the node texts
-  GraphToEps<T> &nodeTextSize(double d) {_nodeTextSize=d;return *this;}
-
-  ///Sets the color of the node texts to be different from the node color
-
-  ///Sets the color of the node texts to be as different from the node color
-  ///as it is possible.
-  GraphToEps<T> &distantColorNodeTexts()
-  {_nodeTextColorType=DIST_COL;return *this;}
-  ///Sets the color of the node texts to be black or white and always visible.
-
-  ///Sets the color of the node texts to be black or white according to
-  ///which is more different from the node color.
-  GraphToEps<T> &distantBWNodeTexts()
-  {_nodeTextColorType=DIST_BW;return *this;}
-
-  ///Gives a preamble block for node Postscript block.
-
-  ///Gives a preamble block for node Postscript block.
-  ///
-  ///\sa nodePsTexts()
-  GraphToEps<T> & nodePsTextsPreamble(const char *str) {
-    _nodePsTextsPreamble=str ;return *this;
-  }
-  ///Sets whether the graph is undirected
-
-  ///Sets whether the graph is undirected.
-  ///
-  ///This setting is the default for undirected graphs.
-  ///
-  ///\sa directed()
-   GraphToEps<T> &undirected(bool b=true) {_undirected=b;return *this;}
-
-  ///Sets whether the graph is directed
-
-  ///Sets whether the graph is directed.
-  ///Use it to show the edges as a pair of directed ones.
-  ///
-  ///This setting is the default for digraphs.
-  ///
-  ///\sa undirected()
-  GraphToEps<T> &directed(bool b=true) {_undirected=!b;return *this;}
-
-  ///Sets the title.
-
-  ///Sets the title of the generated image,
-  ///namely it inserts a <tt>%%Title:</tt> DSC field to the header of
-  ///the EPS file.
-  GraphToEps<T> &title(const std::string &t) {_title=t;return *this;}
-  ///Sets the copyright statement.
-
-  ///Sets the copyright statement of the generated image,
-  ///namely it inserts a <tt>%%Copyright:</tt> DSC field to the header of
-  ///the EPS file.
-  GraphToEps<T> &copyright(const std::string &t) {_copyright=t;return *this;}
-
-protected:
-  bool isInsideNode(dim2::Point<double> p, double r,int t)
-  {
-    switch(t) {
-    case CIRCLE:
-    case MALE:
-    case FEMALE:
-      return p.normSquare()<=r*r;
-    case SQUARE:
-      return p.x<=r&&p.x>=-r&&p.y<=r&&p.y>=-r;
-    case DIAMOND:
-      return p.x+p.y<=r && p.x-p.y<=r && -p.x+p.y<=r && -p.x-p.y<=r;
-    }
-    return false;
-  }
-
-public:
-  ~GraphToEps() { }
-
-  ///Draws the graph.
-
-  ///Like other functions using
-  ///\ref named-templ-func-param "named template parameters",
-  ///this function calls the algorithm itself, i.e. in this case
-  ///it draws the graph.
-  void run() {
-    const double EPSILON=1e-9;
-    if(dontPrint) return;
-
-    _graph_to_eps_bits::_NegY<typename T::CoordsMapType>
-      mycoords(_coords,_negY);
-
-    os << "%!PS-Adobe-2.0 EPSF-2.0\n";
-    if(_title.size()>0) os << "%%Title: " << _title << '\n';
-     if(_copyright.size()>0) os << "%%Copyright: " << _copyright << '\n';
-    os << "%%Creator: LEMON, graphToEps()\n";
-
-    {
-      os << "%%CreationDate: ";
-#ifndef WIN32
-      timeval tv;
-      gettimeofday(&tv, 0);
-
-      char cbuf[26];
-      ctime_r(&tv.tv_sec,cbuf);
-      os << cbuf;
-#else
-      os << bits::getWinFormattedDate();
-      os << std::endl;
-#endif
-    }
-
-    if (_autoArcWidthScale) {
-      double max_w=0;
-      for(ArcIt e(g);e!=INVALID;++e)
-        max_w=std::max(double(_arcWidths[e]),max_w);
-      if(max_w>EPSILON) {
-        _arcWidthScale/=max_w;
-      }
-    }
-
-    if (_autoNodeScale) {
-      double max_s=0;
-      for(NodeIt n(g);n!=INVALID;++n)
-        max_s=std::max(double(_nodeSizes[n]),max_s);
-      if(max_s>EPSILON) {
-        _nodeScale/=max_s;
-      }
-    }
-
-    double diag_len = 1;
-    if(!(_absoluteNodeSizes&&_absoluteArcWidths)) {
-      dim2::Box<double> bb;
-      for(NodeIt n(g);n!=INVALID;++n) bb.add(mycoords[n]);
-      if (bb.empty()) {
-        bb = dim2::Box<double>(dim2::Point<double>(0,0));
-      }
-      diag_len = std::sqrt((bb.bottomLeft()-bb.topRight()).normSquare());
-      if(diag_len<EPSILON) diag_len = 1;
-      if(!_absoluteNodeSizes) _nodeScale*=diag_len;
-      if(!_absoluteArcWidths) _arcWidthScale*=diag_len;
-    }
-
-    dim2::Box<double> bb;
-    for(NodeIt n(g);n!=INVALID;++n) {
-      double ns=_nodeSizes[n]*_nodeScale;
-      dim2::Point<double> p(ns,ns);
-      switch(_nodeShapes[n]) {
-      case CIRCLE:
-      case SQUARE:
-      case DIAMOND:
-        bb.add(p+mycoords[n]);
-        bb.add(-p+mycoords[n]);
-        break;
-      case MALE:
-        bb.add(-p+mycoords[n]);
-        bb.add(dim2::Point<double>(1.5*ns,1.5*std::sqrt(3.0)*ns)+mycoords[n]);
-        break;
-      case FEMALE:
-        bb.add(p+mycoords[n]);
-        bb.add(dim2::Point<double>(-ns,-3.01*ns)+mycoords[n]);
-        break;
-      }
-    }
-    if (bb.empty()) {
-      bb = dim2::Box<double>(dim2::Point<double>(0,0));
-    }
-
-    if(_scaleToA4)
-      os <<"%%BoundingBox: 0 0 596 842\n%%DocumentPaperSizes: a4\n";
-    else {
-      if(_preScale) {
-        //Rescale so that BoundingBox won't be neither to big nor too small.
-        while(bb.height()*_scale>1000||bb.width()*_scale>1000) _scale/=10;
-        while(bb.height()*_scale<100||bb.width()*_scale<100) _scale*=10;
-      }
-
-      os << "%%BoundingBox: "
-         << int(floor(bb.left()   * _scale - _xBorder)) << ' '
-         << int(floor(bb.bottom() * _scale - _yBorder)) << ' '
-         << int(ceil(bb.right()  * _scale + _xBorder)) << ' '
-         << int(ceil(bb.top()    * _scale + _yBorder)) << '\n';
-    }
-
-    os << "%%EndComments\n";
-
-    //x1 y1 x2 y2 x3 y3 cr cg cb w
-    os << "/lb { setlinewidth setrgbcolor newpath moveto\n"
-       << "      4 2 roll 1 index 1 index curveto stroke } bind def\n";
-    os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke }"
-       << " bind def\n";
-    //x y r
-    os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath }"
-       << " bind def\n";
-    //x y r
-    os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n"
-       << "      2 index 1 index sub 2 index 2 index add lineto\n"
-       << "      2 index 1 index sub 2 index 2 index sub lineto\n"
-       << "      2 index 1 index add 2 index 2 index sub lineto\n"
-       << "      closepath pop pop pop} bind def\n";
-    //x y r
-    os << "/di { newpath 2 index 1 index add 2 index moveto\n"
-       << "      2 index             2 index 2 index add lineto\n"
-       << "      2 index 1 index sub 2 index             lineto\n"
-       << "      2 index             2 index 2 index sub lineto\n"
-       << "      closepath pop pop pop} bind def\n";
-    // x y r cr cg cb
-    os << "/nc { 0 0 0 setrgbcolor 5 index 5 index 5 index c fill\n"
-       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
-       << "   } bind def\n";
-    os << "/nsq { 0 0 0 setrgbcolor 5 index 5 index 5 index sq fill\n"
-       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div sq fill\n"
-       << "   } bind def\n";
-    os << "/ndi { 0 0 0 setrgbcolor 5 index 5 index 5 index di fill\n"
-       << "     setrgbcolor " << 1+_nodeBorderQuotient << " div di fill\n"
-       << "   } bind def\n";
-    os << "/nfemale { 0 0 0 setrgbcolor 3 index "
-       << _nodeBorderQuotient/(1+_nodeBorderQuotient)
-       << " 1.5 mul mul setlinewidth\n"
-       << "  newpath 5 index 5 index moveto "
-       << "5 index 5 index 5 index 3.01 mul sub\n"
-       << "  lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub"
-       << " moveto\n"
-       << "  5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto "
-       << "stroke\n"
-       << "  5 index 5 index 5 index c fill\n"
-       << "  setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
-       << "  } bind def\n";
-    os << "/nmale {\n"
-       << "  0 0 0 setrgbcolor 3 index "
-       << _nodeBorderQuotient/(1+_nodeBorderQuotient)
-       <<" 1.5 mul mul setlinewidth\n"
-       << "  newpath 5 index 5 index moveto\n"
-       << "  5 index 4 index 1 mul 1.5 mul add\n"
-       << "  5 index 5 index 3 sqrt 1.5 mul mul add\n"
-       << "  1 index 1 index lineto\n"
-       << "  1 index 1 index 7 index sub moveto\n"
-       << "  1 index 1 index lineto\n"
-       << "  exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub"
-       << " lineto\n"
-       << "  stroke\n"
-       << "  5 index 5 index 5 index c fill\n"
-       << "  setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n"
-       << "  } bind def\n";
-
-
-    os << "/arrl " << _arrowLength << " def\n";
-    os << "/arrw " << _arrowWidth << " def\n";
-    // l dx_norm dy_norm
-    os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n";
-    //len w dx_norm dy_norm x1 y1 cr cg cb
-    os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx "
-       << "exch def\n"
-       << "       /w exch def /len exch def\n"
-      //<< "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"
-       << "       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto\n"
-       << "       len w sub arrl sub dx dy lrl\n"
-       << "       arrw dy dx neg lrl\n"
-       << "       dx arrl w add mul dy w 2 div arrw add mul sub\n"
-       << "       dy arrl w add mul dx w 2 div arrw add mul add rlineto\n"
-       << "       dx arrl w add mul neg dy w 2 div arrw add mul sub\n"
-       << "       dy arrl w add mul neg dx w 2 div arrw add mul add rlineto\n"
-       << "       arrw dy dx neg lrl\n"
-       << "       len w sub arrl sub neg dx dy lrl\n"
-       << "       closepath fill } bind def\n";
-    os << "/cshow { 2 index 2 index moveto dup stringwidth pop\n"
-       << "         neg 2 div fosi .35 mul neg rmoveto show pop pop} def\n";
-
-    os << "\ngsave\n";
-    if(_scaleToA4)
-      if(bb.height()>bb.width()) {
-        double sc= std::min((A4HEIGHT-2*A4BORDER)/bb.height(),
-                  (A4WIDTH-2*A4BORDER)/bb.width());
-        os << ((A4WIDTH -2*A4BORDER)-sc*bb.width())/2 + A4BORDER << ' '
-           << ((A4HEIGHT-2*A4BORDER)-sc*bb.height())/2 + A4BORDER
-           << " translate\n"
-           << sc << " dup scale\n"
-           << -bb.left() << ' ' << -bb.bottom() << " translate\n";
-      }
-      else {
-        double sc= std::min((A4HEIGHT-2*A4BORDER)/bb.width(),
-                  (A4WIDTH-2*A4BORDER)/bb.height());
-        os << ((A4WIDTH -2*A4BORDER)-sc*bb.height())/2 + A4BORDER << ' '
-           << ((A4HEIGHT-2*A4BORDER)-sc*bb.width())/2 + A4BORDER
-           << " translate\n"
-           << sc << " dup scale\n90 rotate\n"
-           << -bb.left() << ' ' << -bb.top() << " translate\n";
-        }
-    else if(_scale!=1.0) os << _scale << " dup scale\n";
-
-    if(_showArcs) {
-      os << "%Arcs:\ngsave\n";
-      if(_enableParallel) {
-        std::vector<Arc> el;
-        for(ArcIt e(g);e!=INVALID;++e)
-          if((!_undirected||g.source(e)<g.target(e))&&_arcWidths[e]>0
-             &&g.source(e)!=g.target(e))
-            el.push_back(e);
-        std::sort(el.begin(),el.end(),arcLess(g));
-
-        typename std::vector<Arc>::iterator j;
-        for(typename std::vector<Arc>::iterator i=el.begin();i!=el.end();i=j) {
-          for(j=i+1;j!=el.end()&&isParallel(*i,*j);++j) ;
-
-          double sw=0;
-          for(typename std::vector<Arc>::iterator e=i;e!=j;++e)
-            sw+=_arcWidths[*e]*_arcWidthScale+_parArcDist;
-          sw-=_parArcDist;
-          sw/=-2.0;
-          dim2::Point<double>
-            dvec(mycoords[g.target(*i)]-mycoords[g.source(*i)]);
-          double l=std::sqrt(dvec.normSquare());
-          dim2::Point<double> d(dvec/std::max(l,EPSILON));
-          dim2::Point<double> m;
-//           m=dim2::Point<double>(mycoords[g.target(*i)]+
-//                                 mycoords[g.source(*i)])/2.0;
-
-//            m=dim2::Point<double>(mycoords[g.source(*i)])+
-//             dvec*(double(_nodeSizes[g.source(*i)])/
-//                (_nodeSizes[g.source(*i)]+_nodeSizes[g.target(*i)]));
-
-          m=dim2::Point<double>(mycoords[g.source(*i)])+
-            d*(l+_nodeSizes[g.source(*i)]-_nodeSizes[g.target(*i)])/2.0;
-
-          for(typename std::vector<Arc>::iterator e=i;e!=j;++e) {
-            sw+=_arcWidths[*e]*_arcWidthScale/2.0;
-            dim2::Point<double> mm=m+rot90(d)*sw/.75;
-            if(_drawArrows) {
-              int node_shape;
-              dim2::Point<double> s=mycoords[g.source(*e)];
-              dim2::Point<double> t=mycoords[g.target(*e)];
-              double rn=_nodeSizes[g.target(*e)]*_nodeScale;
-              node_shape=_nodeShapes[g.target(*e)];
-              dim2::Bezier3 bez(s,mm,mm,t);
-              double t1=0,t2=1;
-              for(int ii=0;ii<INTERPOL_PREC;++ii)
-                if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t2=(t1+t2)/2;
-                else t1=(t1+t2)/2;
-              dim2::Point<double> apoint=bez((t1+t2)/2);
-              rn = _arrowLength+_arcWidths[*e]*_arcWidthScale;
-              rn*=rn;
-              t2=(t1+t2)/2;t1=0;
-              for(int ii=0;ii<INTERPOL_PREC;++ii)
-                if((bez((t1+t2)/2)-apoint).normSquare()>rn) t1=(t1+t2)/2;
-                else t2=(t1+t2)/2;
-              dim2::Point<double> linend=bez((t1+t2)/2);
-              bez=bez.before((t1+t2)/2);
-//               rn=_nodeSizes[g.source(*e)]*_nodeScale;
-//               node_shape=_nodeShapes[g.source(*e)];
-//               t1=0;t2=1;
-//               for(int i=0;i<INTERPOL_PREC;++i)
-//                 if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape))
-//                   t1=(t1+t2)/2;
-//                 else t2=(t1+t2)/2;
-//               bez=bez.after((t1+t2)/2);
-              os << _arcWidths[*e]*_arcWidthScale << " setlinewidth "
-                 << _arcColors[*e].red() << ' '
-                 << _arcColors[*e].green() << ' '
-                 << _arcColors[*e].blue() << " setrgbcolor newpath\n"
-                 << bez.p1.x << ' ' <<  bez.p1.y << " moveto\n"
-                 << bez.p2.x << ' ' << bez.p2.y << ' '
-                 << bez.p3.x << ' ' << bez.p3.y << ' '
-                 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
-              dim2::Point<double> dd(rot90(linend-apoint));
-              dd*=(.5*_arcWidths[*e]*_arcWidthScale+_arrowWidth)/
-                std::sqrt(dd.normSquare());
-              os << "newpath " << psOut(apoint) << " moveto "
-                 << psOut(linend+dd) << " lineto "
-                 << psOut(linend-dd) << " lineto closepath fill\n";
-            }
-            else {
-              os << mycoords[g.source(*e)].x << ' '
-                 << mycoords[g.source(*e)].y << ' '
-                 << mm.x << ' ' << mm.y << ' '
-                 << mycoords[g.target(*e)].x << ' '
-                 << mycoords[g.target(*e)].y << ' '
-                 << _arcColors[*e].red() << ' '
-                 << _arcColors[*e].green() << ' '
-                 << _arcColors[*e].blue() << ' '
-                 << _arcWidths[*e]*_arcWidthScale << " lb\n";
-            }
-            sw+=_arcWidths[*e]*_arcWidthScale/2.0+_parArcDist;
-          }
-        }
-      }
-      else for(ArcIt e(g);e!=INVALID;++e)
-        if((!_undirected||g.source(e)<g.target(e))&&_arcWidths[e]>0
-           &&g.source(e)!=g.target(e)) {
-          if(_drawArrows) {
-            dim2::Point<double> d(mycoords[g.target(e)]-mycoords[g.source(e)]);
-            double rn=_nodeSizes[g.target(e)]*_nodeScale;
-            int node_shape=_nodeShapes[g.target(e)];
-            double t1=0,t2=1;
-            for(int i=0;i<INTERPOL_PREC;++i)
-              if(isInsideNode((-(t1+t2)/2)*d,rn,node_shape)) t1=(t1+t2)/2;
-              else t2=(t1+t2)/2;
-            double l=std::sqrt(d.normSquare());
-            d/=l;
-
-            os << l*(1-(t1+t2)/2) << ' '
-               << _arcWidths[e]*_arcWidthScale << ' '
-               << d.x << ' ' << d.y << ' '
-               << mycoords[g.source(e)].x << ' '
-               << mycoords[g.source(e)].y << ' '
-               << _arcColors[e].red() << ' '
-               << _arcColors[e].green() << ' '
-               << _arcColors[e].blue() << " arr\n";
-          }
-          else os << mycoords[g.source(e)].x << ' '
-                  << mycoords[g.source(e)].y << ' '
-                  << mycoords[g.target(e)].x << ' '
-                  << mycoords[g.target(e)].y << ' '
-                  << _arcColors[e].red() << ' '
-                  << _arcColors[e].green() << ' '
-                  << _arcColors[e].blue() << ' '
-                  << _arcWidths[e]*_arcWidthScale << " l\n";
-        }
-      os << "grestore\n";
-    }
-    if(_showNodes) {
-      os << "%Nodes:\ngsave\n";
-      for(NodeIt n(g);n!=INVALID;++n) {
-        os << mycoords[n].x << ' ' << mycoords[n].y << ' '
-           << _nodeSizes[n]*_nodeScale << ' '
-           << _nodeColors[n].red() << ' '
-           << _nodeColors[n].green() << ' '
-           << _nodeColors[n].blue() << ' ';
-        switch(_nodeShapes[n]) {
-        case CIRCLE:
-          os<< "nc";break;
-        case SQUARE:
-          os<< "nsq";break;
-        case DIAMOND:
-          os<< "ndi";break;
-        case MALE:
-          os<< "nmale";break;
-        case FEMALE:
-          os<< "nfemale";break;
-        }
-        os<<'\n';
-      }
-      os << "grestore\n";
-    }
-    if(_showNodeText) {
-      os << "%Node texts:\ngsave\n";
-      os << "/fosi " << _nodeTextSize << " def\n";
-      os << "(Helvetica) findfont fosi scalefont setfont\n";
-      for(NodeIt n(g);n!=INVALID;++n) {
-        switch(_nodeTextColorType) {
-        case DIST_COL:
-          os << psOut(distantColor(_nodeColors[n])) << " setrgbcolor\n";
-          break;
-        case DIST_BW:
-          os << psOut(distantBW(_nodeColors[n])) << " setrgbcolor\n";
-          break;
-        case CUST_COL:
-          os << psOut(distantColor(_nodeTextColors[n])) << " setrgbcolor\n";
-          break;
-        default:
-          os << "0 0 0 setrgbcolor\n";
-        }
-        os << mycoords[n].x << ' ' << mycoords[n].y
-           << " (" << _nodeTexts[n] << ") cshow\n";
-      }
-      os << "grestore\n";
-    }
-    if(_showNodePsText) {
-      os << "%Node PS blocks:\ngsave\n";
-      for(NodeIt n(g);n!=INVALID;++n)
-        os << mycoords[n].x << ' ' << mycoords[n].y
-           << " moveto\n" << _nodePsTexts[n] << "\n";
-      os << "grestore\n";
-    }
-
-    os << "grestore\nshowpage\n";
-
-    //CleanUp:
-    if(_pleaseRemoveOsStream) {delete &os;}
-  }
-
-  ///\name Aliases
-  ///These are just some aliases to other parameter setting functions.
-
-  ///@{
-
-  ///An alias for arcWidths()
-  template<class X> GraphToEps<ArcWidthsTraits<X> > edgeWidths(const X &x)
-  {
-    return arcWidths(x);
-  }
-
-  ///An alias for arcColors()
-  template<class X> GraphToEps<ArcColorsTraits<X> >
-  edgeColors(const X &x)
-  {
-    return arcColors(x);
-  }
-
-  ///An alias for arcWidthScale()
-  GraphToEps<T> &edgeWidthScale(double d) {return arcWidthScale(d);}
-
-  ///An alias for autoArcWidthScale()
-  GraphToEps<T> &autoEdgeWidthScale(bool b=true)
-  {
-    return autoArcWidthScale(b);
-  }
-
-  ///An alias for absoluteArcWidths()
-  GraphToEps<T> &absoluteEdgeWidths(bool b=true)
-  {
-    return absoluteArcWidths(b);
-  }
-
-  ///An alias for parArcDist()
-  GraphToEps<T> &parEdgeDist(double d) {return parArcDist(d);}
-
-  ///An alias for hideArcs()
-  GraphToEps<T> &hideEdges(bool b=true) {return hideArcs(b);}
-
-  ///@}
-};
-
-template<class T>
-const int GraphToEps<T>::INTERPOL_PREC = 20;
-template<class T>
-const double GraphToEps<T>::A4HEIGHT = 841.8897637795276;
-template<class T>
-const double GraphToEps<T>::A4WIDTH  = 595.275590551181;
-template<class T>
-const double GraphToEps<T>::A4BORDER = 15;
-
-
-///Generates an EPS file from a graph
-
-///\ingroup eps_io
-///Generates an EPS file from a graph.
-///\param g Reference to the graph to be printed.
-///\param os Reference to the output stream.
-///By default it is <tt>std::cout</tt>.
-///
-///This function also has a lot of
-///\ref named-templ-func-param "named parameters",
-///they are declared as the members of class \ref GraphToEps. The following
-///example shows how to use these parameters.
-///\code
-/// graphToEps(g,os).scale(10).coords(coords)
-///              .nodeScale(2).nodeSizes(sizes)
-///              .arcWidthScale(.4).run();
-///\endcode
-///
-///For more detailed examples see the \ref graph_to_eps_demo.cc demo file.
-///
-///\warning Don't forget to put the \ref GraphToEps::run() "run()"
-///to the end of the parameter list.
-///\sa GraphToEps
-///\sa graphToEps(G &g, const char *file_name)
-template<class G>
-GraphToEps<DefaultGraphToEpsTraits<G> >
-graphToEps(G &g, std::ostream& os=std::cout)
-{
-  return
-    GraphToEps<DefaultGraphToEpsTraits<G> >(DefaultGraphToEpsTraits<G>(g,os));
-}
-
-///Generates an EPS file from a graph
-
-///\ingroup eps_io
-///This function does the same as
-///\ref graphToEps(G &g,std::ostream& os)
-///but it writes its output into the file \c file_name
-///instead of a stream.
-///\sa graphToEps(G &g, std::ostream& os)
-template<class G>
-GraphToEps<DefaultGraphToEpsTraits<G> >
-graphToEps(G &g,const char *file_name)
-{
-  std::ostream* os = new std::ofstream(file_name);
-  if (!(*os)) {
-    delete os;
-    throw IoError("Cannot write file", file_name);
-  }
-  return GraphToEps<DefaultGraphToEpsTraits<G> >
-    (DefaultGraphToEpsTraits<G>(g,*os,true));
-}
-
-///Generates an EPS file from a graph
-
-///\ingroup eps_io
-///This function does the same as
-///\ref graphToEps(G &g,std::ostream& os)
-///but it writes its output into the file \c file_name
-///instead of a stream.
-///\sa graphToEps(G &g, std::ostream& os)
-template<class G>
-GraphToEps<DefaultGraphToEpsTraits<G> >
-graphToEps(G &g,const std::string& file_name)
-{
-  std::ostream* os = new std::ofstream(file_name.c_str());
-  if (!(*os)) {
-    delete os;
-    throw IoError("Cannot write file", file_name);
-  }
-  return GraphToEps<DefaultGraphToEpsTraits<G> >
-    (DefaultGraphToEpsTraits<G>(g,*os,true));
-}
-
-} //END OF NAMESPACE LEMON
-
-#endif // LEMON_GRAPH_TO_EPS_H
Index: mon/kruskal.h
===================================================================
--- lemon/kruskal.h	(revision 220)
+++ 	(revision )
@@ -1,329 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_KRUSKAL_H
-#define LEMON_KRUSKAL_H
-
-#include <algorithm>
-#include <vector>
-#include <lemon/unionfind.h>
-#include <lemon/maps.h>
-
-#include <lemon/core.h>
-#include <lemon/bits/traits.h>
-
-///\ingroup spantree
-///\file
-///\brief Kruskal's algorithm to compute a minimum cost spanning tree
-///
-///Kruskal's algorithm to compute a minimum cost spanning tree.
-///
-
-namespace lemon {
-
-  namespace _kruskal_bits {
-
-    // Kruskal for directed graphs.
-
-    template <typename Digraph, typename In, typename Out>
-    typename disable_if<lemon::UndirectedTagIndicator<Digraph>,
-                       typename In::value_type::second_type >::type
-    kruskal(const Digraph& digraph, const In& in, Out& out,dummy<0> = 0) {
-      typedef typename In::value_type::second_type Value;
-      typedef typename Digraph::template NodeMap<int> IndexMap;
-      typedef typename Digraph::Node Node;
-
-      IndexMap index(digraph);
-      UnionFind<IndexMap> uf(index);
-      for (typename Digraph::NodeIt it(digraph); it != INVALID; ++it) {
-        uf.insert(it);
-      }
-
-      Value tree_value = 0;
-      for (typename In::const_iterator it = in.begin(); it != in.end(); ++it) {
-        if (uf.join(digraph.target(it->first),digraph.source(it->first))) {
-          out.set(it->first, true);
-          tree_value += it->second;
-        }
-        else {
-          out.set(it->first, false);
-        }
-      }
-      return tree_value;
-    }
-
-    // Kruskal for undirected graphs.
-
-    template <typename Graph, typename In, typename Out>
-    typename enable_if<lemon::UndirectedTagIndicator<Graph>,
-                       typename In::value_type::second_type >::type
-    kruskal(const Graph& graph, const In& in, Out& out,dummy<1> = 1) {
-      typedef typename In::value_type::second_type Value;
-      typedef typename Graph::template NodeMap<int> IndexMap;
-      typedef typename Graph::Node Node;
-
-      IndexMap index(graph);
-      UnionFind<IndexMap> uf(index);
-      for (typename Graph::NodeIt it(graph); it != INVALID; ++it) {
-        uf.insert(it);
-      }
-
-      Value tree_value = 0;
-      for (typename In::const_iterator it = in.begin(); it != in.end(); ++it) {
-        if (uf.join(graph.u(it->first),graph.v(it->first))) {
-          out.set(it->first, true);
-          tree_value += it->second;
-        }
-        else {
-          out.set(it->first, false);
-        }
-      }
-      return tree_value;
-    }
-
-
-    template <typename Sequence>
-    struct PairComp {
-      typedef typename Sequence::value_type Value;
-      bool operator()(const Value& left, const Value& right) {
-        return left.second < right.second;
-      }
-    };
-
-    template <typename In, typename Enable = void>
-    struct SequenceInputIndicator {
-      static const bool value = false;
-    };
-
-    template <typename In>
-    struct SequenceInputIndicator<In,
-      typename exists<typename In::value_type::first_type>::type> {
-      static const bool value = true;
-    };
-
-    template <typename In, typename Enable = void>
-    struct MapInputIndicator {
-      static const bool value = false;
-    };
-
-    template <typename In>
-    struct MapInputIndicator<In,
-      typename exists<typename In::Value>::type> {
-      static const bool value = true;
-    };
-
-    template <typename In, typename Enable = void>
-    struct SequenceOutputIndicator {
-      static const bool value = false;
-    };
-
-    template <typename Out>
-    struct SequenceOutputIndicator<Out,
-      typename exists<typename Out::value_type>::type> {
-      static const bool value = true;
-    };
-
-    template <typename Out, typename Enable = void>
-    struct MapOutputIndicator {
-      static const bool value = false;
-    };
-
-    template <typename Out>
-    struct MapOutputIndicator<Out,
-      typename exists<typename Out::Value>::type> {
-      static const bool value = true;
-    };
-
-    template <typename In, typename InEnable = void>
-    struct KruskalValueSelector {};
-
-    template <typename In>
-    struct KruskalValueSelector<In,
-      typename enable_if<SequenceInputIndicator<In>, void>::type>
-    {
-      typedef typename In::value_type::second_type Value;
-    };
-
-    template <typename In>
-    struct KruskalValueSelector<In,
-      typename enable_if<MapInputIndicator<In>, void>::type>
-    {
-      typedef typename In::Value Value;
-    };
-
-    template <typename Graph, typename In, typename Out,
-              typename InEnable = void>
-    struct KruskalInputSelector {};
-
-    template <typename Graph, typename In, typename Out,
-              typename InEnable = void>
-    struct KruskalOutputSelector {};
-
-    template <typename Graph, typename In, typename Out>
-    struct KruskalInputSelector<Graph, In, Out,
-      typename enable_if<SequenceInputIndicator<In>, void>::type >
-    {
-      typedef typename In::value_type::second_type Value;
-
-      static Value kruskal(const Graph& graph, const In& in, Out& out) {
-        return KruskalOutputSelector<Graph, In, Out>::
-          kruskal(graph, in, out);
-      }
-
-    };
-
-    template <typename Graph, typename In, typename Out>
-    struct KruskalInputSelector<Graph, In, Out,
-      typename enable_if<MapInputIndicator<In>, void>::type >
-    {
-      typedef typename In::Value Value;
-      static Value kruskal(const Graph& graph, const In& in, Out& out) {
-        typedef typename In::Key MapArc;
-        typedef typename In::Value Value;
-        typedef typename ItemSetTraits<Graph, MapArc>::ItemIt MapArcIt;
-        typedef std::vector<std::pair<MapArc, Value> > Sequence;
-        Sequence seq;
-
-        for (MapArcIt it(graph); it != INVALID; ++it) {
-          seq.push_back(std::make_pair(it, in[it]));
-        }
-
-        std::sort(seq.begin(), seq.end(), PairComp<Sequence>());
-        return KruskalOutputSelector<Graph, Sequence, Out>::
-          kruskal(graph, seq, out);
-      }
-    };
-
-    template <typename T>
-    struct RemoveConst {
-      typedef T type;
-    };
-
-    template <typename T>
-    struct RemoveConst<const T> {
-      typedef T type;
-    };
-
-    template <typename Graph, typename In, typename Out>
-    struct KruskalOutputSelector<Graph, In, Out,
-      typename enable_if<SequenceOutputIndicator<Out>, void>::type >
-    {
-      typedef typename In::value_type::second_type Value;
-
-      static Value kruskal(const Graph& graph, const In& in, Out& out) {
-        typedef LoggerBoolMap<typename RemoveConst<Out>::type> Map;
-        Map map(out);
-        return _kruskal_bits::kruskal(graph, in, map);
-      }
-
-    };
-
-    template <typename Graph, typename In, typename Out>
-    struct KruskalOutputSelector<Graph, In, Out,
-      typename enable_if<MapOutputIndicator<Out>, void>::type >
-    {
-      typedef typename In::value_type::second_type Value;
-
-      static Value kruskal(const Graph& graph, const In& in, Out& out) {
-        return _kruskal_bits::kruskal(graph, in, out);
-      }
-    };
-
-  }
-
-  /// \ingroup spantree
-  ///
-  /// \brief Kruskal algorithm to find a minimum cost spanning tree of
-  /// a graph.
-  ///
-  /// This function runs Kruskal's algorithm to find a minimum cost
-  /// spanning tree.
-  /// Due to some C++ hacking, it accepts various input and output types.
-  ///
-  /// \param g The graph the algorithm runs on.
-  /// It can be either \ref concepts::Digraph "directed" or
-  /// \ref concepts::Graph "undirected".
-  /// If the graph is directed, the algorithm consider it to be
-  /// undirected by disregarding the direction of the arcs.
-  ///
-  /// \param in This object is used to describe the arc/edge costs.
-  /// It can be one of the following choices.
-  /// - An STL compatible 'Forward Container' with
-  /// <tt>std::pair<GR::Arc,X></tt> or
-  /// <tt>std::pair<GR::Edge,X></tt> as its <tt>value_type</tt>, where
-  /// \c X is the type of the costs. The pairs indicates the arcs/edges
-  /// along with the assigned cost. <em>They must be in a
-  /// cost-ascending order.</em>
-  /// - Any readable arc/edge map. The values of the map indicate the
-  /// arc/edge costs.
-  ///
-  /// \retval out Here we also have a choice.
-  /// - It can be a writable \c bool arc/edge map. After running the
-  /// algorithm it will contain the found minimum cost spanning
-  /// tree: the value of an arc/edge will be set to \c true if it belongs
-  /// to the tree, otherwise it will be set to \c false. The value of
-  /// each arc/edge will be set exactly once.
-  /// - It can also be an iteraror of an STL Container with
-  /// <tt>GR::Arc</tt> or <tt>GR::Edge</tt> as its
-  /// <tt>value_type</tt>.  The algorithm copies the elements of the
-  /// found tree into this sequence.  For example, if we know that the
-  /// spanning tree of the graph \c g has say 53 arcs, then we can
-  /// put its arcs into an STL vector \c tree with a code like this.
-  ///\code
-  /// std::vector<Arc> tree(53);
-  /// kruskal(g,cost,tree.begin());
-  ///\endcode
-  /// Or if we don't know in advance the size of the tree, we can
-  /// write this.
-  ///\code
-  /// std::vector<Arc> tree;
-  /// kruskal(g,cost,std::back_inserter(tree));
-  ///\endcode
-  ///
-  /// \return The total cost of the found spanning tree.
-  ///
-  /// \note If the input graph is not (weakly) connected, a spanning
-  /// forest is calculated instead of a spanning tree.
-
-#ifdef DOXYGEN
-  template <class Graph, class In, class Out>
-  Value kruskal(GR const& g, const In& in, Out& out)
-#else
-  template <class Graph, class In, class Out>
-  inline typename _kruskal_bits::KruskalValueSelector<In>::Value
-  kruskal(const Graph& graph, const In& in, Out& out)
-#endif
-  {
-    return _kruskal_bits::KruskalInputSelector<Graph, In, Out>::
-      kruskal(graph, in, out);
-  }
-
-
-
-
-  template <class Graph, class In, class Out>
-  inline typename _kruskal_bits::KruskalValueSelector<In>::Value
-  kruskal(const Graph& graph, const In& in, const Out& out)
-  {
-    return _kruskal_bits::KruskalInputSelector<Graph, In, const Out>::
-      kruskal(graph, in, out);
-  }
-
-} //namespace lemon
-
-#endif //LEMON_KRUSKAL_H
Index: mon/lemon.pc.in
===================================================================
--- lemon/lemon.pc.in	(revision 259)
+++ 	(revision )
@@ -1,10 +1,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Description: Library of Efficient Models and Optimization in Networks
-Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lemon
-Cflags: -I${includedir}
Index: mon/lgf_reader.h
===================================================================
--- lemon/lgf_reader.h	(revision 427)
+++ 	(revision )
@@ -1,2688 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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 lemon_io
-///\file
-///\brief \ref lgf-format "LEMON Graph Format" reader.
-
-
-#ifndef LEMON_LGF_READER_H
-#define LEMON_LGF_READER_H
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-
-#include <set>
-#include <map>
-
-#include <lemon/core.h>
-
-#include <lemon/lgf_writer.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-namespace lemon {
-
-  namespace _reader_bits {
-
-    template <typename Value>
-    struct DefaultConverter {
-      Value operator()(const std::string& str) {
-        std::istringstream is(str);
-        Value value;
-        if (!(is >> value)) {
-          throw FormatError("Cannot read token");
-        }
-
-        char c;
-        if (is >> std::ws >> c) {
-          throw FormatError("Remaining characters in token");
-        }
-        return value;
-      }
-    };
-
-    template <>
-    struct DefaultConverter<std::string> {
-      std::string operator()(const std::string& str) {
-        return str;
-      }
-    };
-
-    template <typename _Item>
-    class MapStorageBase {
-    public:
-      typedef _Item Item;
-
-    public:
-      MapStorageBase() {}
-      virtual ~MapStorageBase() {}
-
-      virtual void set(const Item& item, const std::string& value) = 0;
-
-    };
-
-    template <typename _Item, typename _Map,
-              typename _Converter = DefaultConverter<typename _Map::Value> >
-    class MapStorage : public MapStorageBase<_Item> {
-    public:
-      typedef _Map Map;
-      typedef _Converter Converter;
-      typedef _Item Item;
-
-    private:
-      Map& _map;
-      Converter _converter;
-
-    public:
-      MapStorage(Map& map, const Converter& converter = Converter())
-        : _map(map), _converter(converter) {}
-      virtual ~MapStorage() {}
-
-      virtual void set(const Item& item ,const std::string& value) {
-        _map.set(item, _converter(value));
-      }
-    };
-
-    template <typename _Graph, bool _dir, typename _Map,
-              typename _Converter = DefaultConverter<typename _Map::Value> >
-    class GraphArcMapStorage : public MapStorageBase<typename _Graph::Edge> {
-    public:
-      typedef _Map Map;
-      typedef _Converter Converter;
-      typedef _Graph Graph;
-      typedef typename Graph::Edge Item;
-      static const bool dir = _dir;
-
-    private:
-      const Graph& _graph;
-      Map& _map;
-      Converter _converter;
-
-    public:
-      GraphArcMapStorage(const Graph& graph, Map& map,
-                         const Converter& converter = Converter())
-        : _graph(graph), _map(map), _converter(converter) {}
-      virtual ~GraphArcMapStorage() {}
-
-      virtual void set(const Item& item ,const std::string& value) {
-        _map.set(_graph.direct(item, dir), _converter(value));
-      }
-    };
-
-    class ValueStorageBase {
-    public:
-      ValueStorageBase() {}
-      virtual ~ValueStorageBase() {}
-
-      virtual void set(const std::string&) = 0;
-    };
-
-    template <typename _Value, typename _Converter = DefaultConverter<_Value> >
-    class ValueStorage : public ValueStorageBase {
-    public:
-      typedef _Value Value;
-      typedef _Converter Converter;
-
-    private:
-      Value& _value;
-      Converter _converter;
-
-    public:
-      ValueStorage(Value& value, const Converter& converter = Converter())
-        : _value(value), _converter(converter) {}
-
-      virtual void set(const std::string& value) {
-        _value = _converter(value);
-      }
-    };
-
-    template <typename Value>
-    struct MapLookUpConverter {
-      const std::map<std::string, Value>& _map;
-
-      MapLookUpConverter(const std::map<std::string, Value>& map)
-        : _map(map) {}
-
-      Value operator()(const std::string& str) {
-        typename std::map<std::string, Value>::const_iterator it =
-          _map.find(str);
-        if (it == _map.end()) {
-          std::ostringstream msg;
-          msg << "Item not found: " << str;
-          throw FormatError(msg.str());
-        }
-        return it->second;
-      }
-    };
-
-    template <typename Graph>
-    struct GraphArcLookUpConverter {
-      const Graph& _graph;
-      const std::map<std::string, typename Graph::Edge>& _map;
-
-      GraphArcLookUpConverter(const Graph& graph,
-                              const std::map<std::string,
-                                             typename Graph::Edge>& map)
-        : _graph(graph), _map(map) {}
-
-      typename Graph::Arc operator()(const std::string& str) {
-        if (str.empty() || (str[0] != '+' && str[0] != '-')) {
-          throw FormatError("Item must start with '+' or '-'");
-        }
-        typename std::map<std::string, typename Graph::Edge>
-          ::const_iterator it = _map.find(str.substr(1));
-        if (it == _map.end()) {
-          throw FormatError("Item not found");
-        }
-        return _graph.direct(it->second, str[0] == '+');
-      }
-    };
-
-    inline bool isWhiteSpace(char c) {
-      return c == ' ' || c == '\t' || c == '\v' ||
-        c == '\n' || c == '\r' || c == '\f';
-    }
-
-    inline bool isOct(char c) {
-      return '0' <= c && c <='7';
-    }
-
-    inline int valueOct(char c) {
-      LEMON_ASSERT(isOct(c), "The character is not octal.");
-      return c - '0';
-    }
-
-    inline bool isHex(char c) {
-      return ('0' <= c && c <= '9') ||
-        ('a' <= c && c <= 'z') ||
-        ('A' <= c && c <= 'Z');
-    }
-
-    inline int valueHex(char c) {
-      LEMON_ASSERT(isHex(c), "The character is not hexadecimal.");
-      if ('0' <= c && c <= '9') return c - '0';
-      if ('a' <= c && c <= 'z') return c - 'a' + 10;
-      return c - 'A' + 10;
-    }
-
-    inline bool isIdentifierFirstChar(char c) {
-      return ('a' <= c && c <= 'z') ||
-        ('A' <= c && c <= 'Z') || c == '_';
-    }
-
-    inline bool isIdentifierChar(char c) {
-      return isIdentifierFirstChar(c) ||
-        ('0' <= c && c <= '9');
-    }
-
-    inline char readEscape(std::istream& is) {
-      char c;
-      if (!is.get(c))
-        throw FormatError("Escape format error");
-
-      switch (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 FormatError("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 FormatError("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;
-        }
-      }
-    }
-
-    inline std::istream& readToken(std::istream& is, std::string& str) {
-      std::ostringstream os;
-
-      char c;
-      is >> std::ws;
-
-      if (!is.get(c))
-        return is;
-
-      if (c == '\"') {
-        while (is.get(c) && c != '\"') {
-          if (c == '\\')
-            c = readEscape(is);
-          os << c;
-        }
-        if (!is)
-          throw FormatError("Quoted format error");
-      } else {
-        is.putback(c);
-        while (is.get(c) && !isWhiteSpace(c)) {
-          if (c == '\\')
-            c = readEscape(is);
-          os << c;
-        }
-        if (!is) {
-          is.clear();
-        } else {
-          is.putback(c);
-        }
-      }
-      str = os.str();
-      return is;
-    }
-
-    class Section {
-    public:
-      virtual ~Section() {}
-      virtual void process(std::istream& is, int& line_num) = 0;
-    };
-
-    template <typename Functor>
-    class LineSection : public Section {
-    private:
-
-      Functor _functor;
-
-    public:
-
-      LineSection(const Functor& functor) : _functor(functor) {}
-      virtual ~LineSection() {}
-
-      virtual void process(std::istream& is, int& line_num) {
-        char c;
-        std::string line;
-        while (is.get(c) && c != '@') {
-          if (c == '\n') {
-            ++line_num;
-          } else if (c == '#') {
-            getline(is, line);
-            ++line_num;
-          } else if (!isWhiteSpace(c)) {
-            is.putback(c);
-            getline(is, line);
-            _functor(line);
-            ++line_num;
-          }
-        }
-        if (is) is.putback(c);
-        else if (is.eof()) is.clear();
-      }
-    };
-
-    template <typename Functor>
-    class StreamSection : public Section {
-    private:
-
-      Functor _functor;
-
-    public:
-
-      StreamSection(const Functor& functor) : _functor(functor) {}
-      virtual ~StreamSection() {}
-
-      virtual void process(std::istream& is, int& line_num) {
-        _functor(is, line_num);
-        char c;
-        std::string line;
-        while (is.get(c) && c != '@') {
-          if (c == '\n') {
-            ++line_num;
-          } else if (!isWhiteSpace(c)) {
-            getline(is, line);
-            ++line_num;
-          }
-        }
-        if (is) is.putback(c);
-        else if (is.eof()) is.clear();
-      }
-    };
-
-  }
-
-  template <typename Digraph>
-  class DigraphReader;
-
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       std::istream& is = std::cin);
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn);
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char *fn);
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief \ref lgf-format "LGF" reader for directed graphs
-  ///
-  /// This utility reads an \ref lgf-format "LGF" file.
-  ///
-  /// The reading method does a batch processing. The user creates a
-  /// reader object, then various reading rules can be added to the
-  /// reader, and eventually the reading is executed with the \c run()
-  /// member function. A map reading rule can be added to the reader
-  /// with the \c nodeMap() or \c arcMap() members. An optional
-  /// converter parameter can also be added as a standard functor
-  /// converting from \c std::string to the value type of the map. If it
-  /// is set, it will determine how the tokens in the file should be
-  /// converted to the value type of the map. If the functor is not set,
-  /// then a default conversion will be used. One map can be read into
-  /// multiple map objects at the same time. The \c attribute(), \c
-  /// node() and \c arc() functions are used to add attribute reading
-  /// rules.
-  ///
-  ///\code
-  /// DigraphReader<Digraph>(digraph, std::cin).
-  ///   nodeMap("coordinates", coord_map).
-  ///   arcMap("capacity", cap_map).
-  ///   node("source", src).
-  ///   node("target", trg).
-  ///   attribute("caption", caption).
-  ///   run();
-  ///\endcode
-  ///
-  /// By default the reader uses the first section in the file of the
-  /// proper type. If a section has an optional name, then it can be
-  /// selected for reading by giving an optional name parameter to the
-  /// \c nodes(), \c arcs() or \c attributes() functions.
-  ///
-  /// The \c useNodes() and \c useArcs() functions are used to tell the reader
-  /// that the nodes or arcs should not be constructed (added to the
-  /// graph) during the reading, but instead the label map of the items
-  /// are given as a parameter of these functions. An
-  /// application of these functions is multipass reading, which is
-  /// important if two \c \@arcs sections must be read from the
-  /// file. In this case the first phase would read the node set and one
-  /// of the arc sets, while the second phase would read the second arc
-  /// set into an \e ArcSet class (\c SmartArcSet or \c ListArcSet).
-  /// The previously read label node map should be passed to the \c
-  /// useNodes() functions. Another application of multipass reading when
-  /// paths are given as a node map or an arc map.
-  /// It is impossible to read this in
-  /// a single pass, because the arcs are not constructed when the node
-  /// maps are read.
-  template <typename _Digraph>
-  class DigraphReader {
-  public:
-
-    typedef _Digraph Digraph;
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  private:
-
-
-    std::istream* _is;
-    bool local_is;
-    std::string _filename;
-
-    Digraph& _digraph;
-
-    std::string _nodes_caption;
-    std::string _arcs_caption;
-    std::string _attributes_caption;
-
-    typedef std::map<std::string, Node> NodeIndex;
-    NodeIndex _node_index;
-    typedef std::map<std::string, Arc> ArcIndex;
-    ArcIndex _arc_index;
-
-    typedef std::vector<std::pair<std::string,
-      _reader_bits::MapStorageBase<Node>*> > NodeMaps;
-    NodeMaps _node_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _reader_bits::MapStorageBase<Arc>*> >ArcMaps;
-    ArcMaps _arc_maps;
-
-    typedef std::multimap<std::string, _reader_bits::ValueStorageBase*>
-      Attributes;
-    Attributes _attributes;
-
-    bool _use_nodes;
-    bool _use_arcs;
-
-    bool _skip_nodes;
-    bool _skip_arcs;
-
-    int line_num;
-    std::istringstream line;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph reader, which reads from the given
-    /// input stream.
-    DigraphReader(Digraph& digraph, std::istream& is = std::cin)
-      : _is(&is), local_is(false), _digraph(digraph),
-        _use_nodes(false), _use_arcs(false),
-        _skip_nodes(false), _skip_arcs(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph reader, which reads from the given
-    /// file.
-    DigraphReader(Digraph& digraph, const std::string& fn)
-      : _is(new std::ifstream(fn.c_str())), local_is(true),
-        _filename(fn), _digraph(digraph),
-        _use_nodes(false), _use_arcs(false),
-        _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph reader, which reads from the given
-    /// file.
-    DigraphReader(Digraph& digraph, const char* fn)
-      : _is(new std::ifstream(fn)), local_is(true),
-        _filename(fn), _digraph(digraph),
-        _use_nodes(false), _use_arcs(false),
-        _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~DigraphReader() {
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename ArcMaps::iterator it = _arc_maps.begin();
-           it != _arc_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_is) {
-        delete _is;
-      }
-
-    }
-
-  private:
-
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph, std::istream& is);
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph,
-                                            const std::string& fn);
-    template <typename DGR>
-    friend DigraphReader<DGR> digraphReader(DGR& digraph, const char *fn);
-
-    DigraphReader(DigraphReader& other)
-      : _is(other._is), local_is(other.local_is), _digraph(other._digraph),
-        _use_nodes(other._use_nodes), _use_arcs(other._use_arcs),
-        _skip_nodes(other._skip_nodes), _skip_arcs(other._skip_arcs) {
-
-      other._is = 0;
-      other.local_is = false;
-
-      _node_index.swap(other._node_index);
-      _arc_index.swap(other._arc_index);
-
-      _node_maps.swap(other._node_maps);
-      _arc_maps.swap(other._arc_maps);
-      _attributes.swap(other._attributes);
-
-      _nodes_caption = other._nodes_caption;
-      _arcs_caption = other._arcs_caption;
-      _attributes_caption = other._attributes_caption;
-
-    }
-
-    DigraphReader& operator=(const DigraphReader&);
-
-  public:
-
-    /// \name Reading rules
-    /// @{
-
-    /// \brief Node map reading rule
-    ///
-    /// Add a node map reading rule to the reader.
-    template <typename Map>
-    DigraphReader& nodeMap(const std::string& caption, Map& map) {
-      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Node>* storage =
-        new _reader_bits::MapStorage<Node, Map>(map);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node map reading rule
-    ///
-    /// Add a node map reading rule with specialized converter to the
-    /// reader.
-    template <typename Map, typename Converter>
-    DigraphReader& nodeMap(const std::string& caption, Map& map,
-                           const Converter& converter = Converter()) {
-      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Node>* storage =
-        new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map reading rule
-    ///
-    /// Add an arc map reading rule to the reader.
-    template <typename Map>
-    DigraphReader& arcMap(const std::string& caption, Map& map) {
-      checkConcept<concepts::WriteMap<Arc, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Arc>* storage =
-        new _reader_bits::MapStorage<Arc, Map>(map);
-      _arc_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map reading rule
-    ///
-    /// Add an arc map reading rule with specialized converter to the
-    /// reader.
-    template <typename Map, typename Converter>
-    DigraphReader& arcMap(const std::string& caption, Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::WriteMap<Arc, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Arc>* storage =
-        new _reader_bits::MapStorage<Arc, Map, Converter>(map, converter);
-      _arc_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute reading rule
-    ///
-    /// Add an attribute reading rule to the reader.
-    template <typename Value>
-    DigraphReader& attribute(const std::string& caption, Value& value) {
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Value>(value);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute reading rule
-    ///
-    /// Add an attribute reading rule with specialized converter to the
-    /// reader.
-    template <typename Value, typename Converter>
-    DigraphReader& attribute(const std::string& caption, Value& value,
-                             const Converter& converter = Converter()) {
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Value, Converter>(value, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node reading rule
-    ///
-    /// Add a node reading rule to reader.
-    DigraphReader& node(const std::string& caption, Node& node) {
-      typedef _reader_bits::MapLookUpConverter<Node> Converter;
-      Converter converter(_node_index);
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Node, Converter>(node, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc reading rule
-    ///
-    /// Add an arc reading rule to reader.
-    DigraphReader& arc(const std::string& caption, Arc& arc) {
-      typedef _reader_bits::MapLookUpConverter<Arc> Converter;
-      Converter converter(_arc_index);
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Arc, Converter>(arc, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// @}
-
-    /// \name Select section by name
-    /// @{
-
-    /// \brief Set \c \@nodes section to be read
-    ///
-    /// Set \c \@nodes section to be read
-    DigraphReader& nodes(const std::string& caption) {
-      _nodes_caption = caption;
-      return *this;
-    }
-
-    /// \brief Set \c \@arcs section to be read
-    ///
-    /// Set \c \@arcs section to be read
-    DigraphReader& arcs(const std::string& caption) {
-      _arcs_caption = caption;
-      return *this;
-    }
-
-    /// \brief Set \c \@attributes section to be read
-    ///
-    /// Set \c \@attributes section to be read
-    DigraphReader& attributes(const std::string& caption) {
-      _attributes_caption = caption;
-      return *this;
-    }
-
-    /// @}
-
-    /// \name Using previously constructed node or arc set
-    /// @{
-
-    /// \brief Use previously constructed node set
-    ///
-    /// Use previously constructed node set, and specify the node
-    /// label map.
-    template <typename Map>
-    DigraphReader& useNodes(const Map& map) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_nodes, "Multiple usage of useNodes() member");
-      _use_nodes = true;
-      _writer_bits::DefaultConverter<typename Map::Value> converter;
-      for (NodeIt n(_digraph); n != INVALID; ++n) {
-        _node_index.insert(std::make_pair(converter(map[n]), n));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed node set
-    ///
-    /// Use previously constructed node set, and specify the node
-    /// label map and a functor which converts the label map values to
-    /// \c std::string.
-    template <typename Map, typename Converter>
-    DigraphReader& useNodes(const Map& map,
-                            const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_nodes, "Multiple usage of useNodes() member");
-      _use_nodes = true;
-      for (NodeIt n(_digraph); n != INVALID; ++n) {
-        _node_index.insert(std::make_pair(converter(map[n]), n));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed arc set
-    ///
-    /// Use previously constructed arc set, and specify the arc
-    /// label map.
-    template <typename Map>
-    DigraphReader& useArcs(const Map& map) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_arcs, "Multiple usage of useArcs() member");
-      _use_arcs = true;
-      _writer_bits::DefaultConverter<typename Map::Value> converter;
-      for (ArcIt a(_digraph); a != INVALID; ++a) {
-        _arc_index.insert(std::make_pair(converter(map[a]), a));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed arc set
-    ///
-    /// Use previously constructed arc set, and specify the arc
-    /// label map and a functor which converts the label map values to
-    /// \c std::string.
-    template <typename Map, typename Converter>
-    DigraphReader& useArcs(const Map& map,
-                           const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_arcs, "Multiple usage of useArcs() member");
-      _use_arcs = true;
-      for (ArcIt a(_digraph); a != INVALID; ++a) {
-        _arc_index.insert(std::make_pair(converter(map[a]), a));
-      }
-      return *this;
-    }
-
-    /// \brief Skips the reading of node section
-    ///
-    /// Omit the reading of the node section. This implies that each node
-    /// map reading rule will be abandoned, and the nodes of the graph
-    /// will not be constructed, which usually cause that the arc set
-    /// could not be read due to lack of node name resolving.
-    /// Therefore \c skipArcs() function should also be used, or
-    /// \c useNodes() should be used to specify the label of the nodes.
-    DigraphReader& skipNodes() {
-      LEMON_ASSERT(!_skip_nodes, "Skip nodes already set");
-      _skip_nodes = true;
-      return *this;
-    }
-
-    /// \brief Skips the reading of arc section
-    ///
-    /// Omit the reading of the arc section. This implies that each arc
-    /// map reading rule will be abandoned, and the arcs of the graph
-    /// will not be constructed.
-    DigraphReader& skipArcs() {
-      LEMON_ASSERT(!_skip_arcs, "Skip arcs already set");
-      _skip_arcs = true;
-      return *this;
-    }
-
-    /// @}
-
-  private:
-
-    bool readLine() {
-      std::string str;
-      while(++line_num, std::getline(*_is, str)) {
-        line.clear(); line.str(str);
-        char c;
-        if (line >> std::ws >> c && c != '#') {
-          line.putback(c);
-          return true;
-        }
-      }
-      return false;
-    }
-
-    bool readSuccess() {
-      return static_cast<bool>(*_is);
-    }
-
-    void skipSection() {
-      char c;
-      while (readSuccess() && line >> c && c != '@') {
-        readLine();
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readNodes() {
-
-      std::vector<int> map_index(_node_maps.size());
-      int map_num, label_index;
-
-      char c;
-      if (!readLine() || !(line >> c) || c == '@') {
-        if (readSuccess() && line) line.putback(c);
-        if (!_node_maps.empty())
-          throw FormatError("Cannot find map names");
-        return;
-      }
-      line.putback(c);
-
-      {
-        std::map<std::string, int> maps;
-
-        std::string map;
-        int index = 0;
-        while (_reader_bits::readToken(line, map)) {
-          if (maps.find(map) != maps.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of node map: " << map;
-            throw FormatError(msg.str());
-          }
-          maps.insert(std::make_pair(map, index));
-          ++index;
-        }
-
-        for (int i = 0; i < static_cast<int>(_node_maps.size()); ++i) {
-          std::map<std::string, int>::iterator jt =
-            maps.find(_node_maps[i].first);
-          if (jt == maps.end()) {
-            std::ostringstream msg;
-            msg << "Map not found: " << _node_maps[i].first;
-            throw FormatError(msg.str());
-          }
-          map_index[i] = jt->second;
-        }
-
-        {
-          std::map<std::string, int>::iterator jt = maps.find("label");
-          if (jt != maps.end()) {
-            label_index = jt->second;
-          } else {
-            label_index = -1;
-          }
-        }
-        map_num = maps.size();
-      }
-
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::vector<std::string> tokens(map_num);
-        for (int i = 0; i < map_num; ++i) {
-          if (!_reader_bits::readToken(line, tokens[i])) {
-            std::ostringstream msg;
-            msg << "Column not found (" << i + 1 << ")";
-            throw FormatError(msg.str());
-          }
-        }
-        if (line >> std::ws >> c)
-          throw FormatError("Extra character at the end of line");
-
-        Node n;
-        if (!_use_nodes) {
-          n = _digraph.addNode();
-          if (label_index != -1)
-            _node_index.insert(std::make_pair(tokens[label_index], n));
-        } else {
-          if (label_index == -1)
-            throw FormatError("Label map not found");
-          typename std::map<std::string, Node>::iterator it =
-            _node_index.find(tokens[label_index]);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Node with label not found: " << tokens[label_index];
-            throw FormatError(msg.str());
-          }
-          n = it->second;
-        }
-
-        for (int i = 0; i < static_cast<int>(_node_maps.size()); ++i) {
-          _node_maps[i].second->set(n, tokens[map_index[i]]);
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readArcs() {
-
-      std::vector<int> map_index(_arc_maps.size());
-      int map_num, label_index;
-
-      char c;
-      if (!readLine() || !(line >> c) || c == '@') {
-        if (readSuccess() && line) line.putback(c);
-        if (!_arc_maps.empty())
-          throw FormatError("Cannot find map names");
-        return;
-      }
-      line.putback(c);
-
-      {
-        std::map<std::string, int> maps;
-
-        std::string map;
-        int index = 0;
-        while (_reader_bits::readToken(line, map)) {
-          if(map == "-") {
-              if(index!=0)
-                throw FormatError("'-' is not allowed as a map name");
-              else if (line >> std::ws >> c)
-                throw FormatError("Extra character at the end of line");
-              else break;
-            }
-          if (maps.find(map) != maps.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of arc map: " << map;
-            throw FormatError(msg.str());
-          }
-          maps.insert(std::make_pair(map, index));
-          ++index;
-        }
-
-        for (int i = 0; i < static_cast<int>(_arc_maps.size()); ++i) {
-          std::map<std::string, int>::iterator jt =
-            maps.find(_arc_maps[i].first);
-          if (jt == maps.end()) {
-            std::ostringstream msg;
-            msg << "Map not found: " << _arc_maps[i].first;
-            throw FormatError(msg.str());
-          }
-          map_index[i] = jt->second;
-        }
-
-        {
-          std::map<std::string, int>::iterator jt = maps.find("label");
-          if (jt != maps.end()) {
-            label_index = jt->second;
-          } else {
-            label_index = -1;
-          }
-        }
-        map_num = maps.size();
-      }
-
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::string source_token;
-        std::string target_token;
-
-        if (!_reader_bits::readToken(line, source_token))
-          throw FormatError("Source not found");
-
-        if (!_reader_bits::readToken(line, target_token))
-          throw FormatError("Target not found");
-
-        std::vector<std::string> tokens(map_num);
-        for (int i = 0; i < map_num; ++i) {
-          if (!_reader_bits::readToken(line, tokens[i])) {
-            std::ostringstream msg;
-            msg << "Column not found (" << i + 1 << ")";
-            throw FormatError(msg.str());
-          }
-        }
-        if (line >> std::ws >> c)
-          throw FormatError("Extra character at the end of line");
-
-        Arc a;
-        if (!_use_arcs) {
-
-          typename NodeIndex::iterator it;
-
-          it = _node_index.find(source_token);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Item not found: " << source_token;
-            throw FormatError(msg.str());
-          }
-          Node source = it->second;
-
-          it = _node_index.find(target_token);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Item not found: " << target_token;
-            throw FormatError(msg.str());
-          }
-          Node target = it->second;
-
-          a = _digraph.addArc(source, target);
-          if (label_index != -1)
-            _arc_index.insert(std::make_pair(tokens[label_index], a));
-        } else {
-          if (label_index == -1)
-            throw FormatError("Label map not found");
-          typename std::map<std::string, Arc>::iterator it =
-            _arc_index.find(tokens[label_index]);
-          if (it == _arc_index.end()) {
-            std::ostringstream msg;
-            msg << "Arc with label not found: " << tokens[label_index];
-            throw FormatError(msg.str());
-          }
-          a = it->second;
-        }
-
-        for (int i = 0; i < static_cast<int>(_arc_maps.size()); ++i) {
-          _arc_maps[i].second->set(a, tokens[map_index[i]]);
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readAttributes() {
-
-      std::set<std::string> read_attr;
-
-      char c;
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::string attr, token;
-        if (!_reader_bits::readToken(line, attr))
-          throw FormatError("Attribute name not found");
-        if (!_reader_bits::readToken(line, token))
-          throw FormatError("Attribute value not found");
-        if (line >> c)
-          throw FormatError("Extra character at the end of line");
-
-        {
-          std::set<std::string>::iterator it = read_attr.find(attr);
-          if (it != read_attr.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of attribute: " << attr;
-            throw FormatError(msg.str());
-          }
-          read_attr.insert(attr);
-        }
-
-        {
-          typename Attributes::iterator it = _attributes.lower_bound(attr);
-          while (it != _attributes.end() && it->first == attr) {
-            it->second->set(token);
-            ++it;
-          }
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        if (read_attr.find(it->first) == read_attr.end()) {
-          std::ostringstream msg;
-          msg << "Attribute not found: " << it->first;
-          throw FormatError(msg.str());
-        }
-      }
-    }
-
-  public:
-
-    /// \name Execution of the reader
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing
-    void run() {
-      LEMON_ASSERT(_is != 0, "This reader assigned to an other reader");
-
-      bool nodes_done = _skip_nodes;
-      bool arcs_done = _skip_arcs;
-      bool attributes_done = false;
-
-      line_num = 0;
-      readLine();
-      skipSection();
-
-      while (readSuccess()) {
-        try {
-          char c;
-          std::string section, caption;
-          line >> c;
-          _reader_bits::readToken(line, section);
-          _reader_bits::readToken(line, caption);
-
-          if (line >> c)
-            throw FormatError("Extra character at the end of line");
-
-          if (section == "nodes" && !nodes_done) {
-            if (_nodes_caption.empty() || _nodes_caption == caption) {
-              readNodes();
-              nodes_done = true;
-            }
-          } else if ((section == "arcs" || section == "edges") &&
-                     !arcs_done) {
-            if (_arcs_caption.empty() || _arcs_caption == caption) {
-              readArcs();
-              arcs_done = true;
-            }
-          } else if (section == "attributes" && !attributes_done) {
-            if (_attributes_caption.empty() || _attributes_caption == caption) {
-              readAttributes();
-              attributes_done = true;
-            }
-          } else {
-            readLine();
-            skipSection();
-          }
-        } catch (FormatError& error) {
-          error.line(line_num);
-          error.file(_filename);
-          throw;
-        }
-      }
-
-      if (!nodes_done) {
-        throw FormatError("Section @nodes not found");
-      }
-
-      if (!arcs_done) {
-        throw FormatError("Section @arcs not found");
-      }
-
-      if (!attributes_done && !_attributes.empty()) {
-        throw FormatError("Section @attributes not found");
-      }
-
-    }
-
-    /// @}
-
-  };
-
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, std::istream& is) {
-    DigraphReader<Digraph> tmp(digraph, is);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph,
-                                       const std::string& fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphReader class
-  ///
-  /// This function just returns a \ref DigraphReader class.
-  /// \relates DigraphReader
-  template <typename Digraph>
-  DigraphReader<Digraph> digraphReader(Digraph& digraph, const char* fn) {
-    DigraphReader<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  template <typename Graph>
-  class GraphReader;
-
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph,
-                                 std::istream& is = std::cin);
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn);
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const char *fn);
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief \ref lgf-format "LGF" reader for undirected graphs
-  ///
-  /// This utility reads an \ref lgf-format "LGF" file.
-  ///
-  /// It can be used almost the same way as \c DigraphReader.
-  /// The only difference is that this class can handle edges and
-  /// edge maps as well as arcs and arc maps.
-  ///
-  /// The columns in the \c \@edges (or \c \@arcs) section are the
-  /// edge maps. However, if there are two maps with the same name
-  /// prefixed with \c '+' and \c '-', then these can be read into an
-  /// arc map.  Similarly, an attribute can be read into an arc, if
-  /// it's value is an edge label prefixed with \c '+' or \c '-'.
-  template <typename _Graph>
-  class GraphReader {
-  public:
-
-    typedef _Graph Graph;
-    TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  private:
-
-    std::istream* _is;
-    bool local_is;
-    std::string _filename;
-
-    Graph& _graph;
-
-    std::string _nodes_caption;
-    std::string _edges_caption;
-    std::string _attributes_caption;
-
-    typedef std::map<std::string, Node> NodeIndex;
-    NodeIndex _node_index;
-    typedef std::map<std::string, Edge> EdgeIndex;
-    EdgeIndex _edge_index;
-
-    typedef std::vector<std::pair<std::string,
-      _reader_bits::MapStorageBase<Node>*> > NodeMaps;
-    NodeMaps _node_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _reader_bits::MapStorageBase<Edge>*> > EdgeMaps;
-    EdgeMaps _edge_maps;
-
-    typedef std::multimap<std::string, _reader_bits::ValueStorageBase*>
-      Attributes;
-    Attributes _attributes;
-
-    bool _use_nodes;
-    bool _use_edges;
-
-    bool _skip_nodes;
-    bool _skip_edges;
-
-    int line_num;
-    std::istringstream line;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct an undirected graph reader, which reads from the given
-    /// input stream.
-    GraphReader(Graph& graph, std::istream& is = std::cin)
-      : _is(&is), local_is(false), _graph(graph),
-        _use_nodes(false), _use_edges(false),
-        _skip_nodes(false), _skip_edges(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct an undirected graph reader, which reads from the given
-    /// file.
-    GraphReader(Graph& graph, const std::string& fn)
-      : _is(new std::ifstream(fn.c_str())), local_is(true),
-        _filename(fn), _graph(graph),
-        _use_nodes(false), _use_edges(false),
-        _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct an undirected graph reader, which reads from the given
-    /// file.
-    GraphReader(Graph& graph, const char* fn)
-      : _is(new std::ifstream(fn)), local_is(true),
-        _filename(fn), _graph(graph),
-        _use_nodes(false), _use_edges(false),
-        _skip_nodes(false), _skip_edges(false) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~GraphReader() {
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename EdgeMaps::iterator it = _edge_maps.begin();
-           it != _edge_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_is) {
-        delete _is;
-      }
-
-    }
-
-  private:
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, std::istream& is);
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, const std::string& fn);
-    template <typename GR>
-    friend GraphReader<GR> graphReader(GR& graph, const char *fn);
-
-    GraphReader(GraphReader& other)
-      : _is(other._is), local_is(other.local_is), _graph(other._graph),
-        _use_nodes(other._use_nodes), _use_edges(other._use_edges),
-        _skip_nodes(other._skip_nodes), _skip_edges(other._skip_edges) {
-
-      other._is = 0;
-      other.local_is = false;
-
-      _node_index.swap(other._node_index);
-      _edge_index.swap(other._edge_index);
-
-      _node_maps.swap(other._node_maps);
-      _edge_maps.swap(other._edge_maps);
-      _attributes.swap(other._attributes);
-
-      _nodes_caption = other._nodes_caption;
-      _edges_caption = other._edges_caption;
-      _attributes_caption = other._attributes_caption;
-
-    }
-
-    GraphReader& operator=(const GraphReader&);
-
-  public:
-
-    /// \name Reading rules
-    /// @{
-
-    /// \brief Node map reading rule
-    ///
-    /// Add a node map reading rule to the reader.
-    template <typename Map>
-    GraphReader& nodeMap(const std::string& caption, Map& map) {
-      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Node>* storage =
-        new _reader_bits::MapStorage<Node, Map>(map);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node map reading rule
-    ///
-    /// Add a node map reading rule with specialized converter to the
-    /// reader.
-    template <typename Map, typename Converter>
-    GraphReader& nodeMap(const std::string& caption, Map& map,
-                           const Converter& converter = Converter()) {
-      checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Node>* storage =
-        new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge map reading rule
-    ///
-    /// Add an edge map reading rule to the reader.
-    template <typename Map>
-    GraphReader& edgeMap(const std::string& caption, Map& map) {
-      checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Edge>* storage =
-        new _reader_bits::MapStorage<Edge, Map>(map);
-      _edge_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge map reading rule
-    ///
-    /// Add an edge map reading rule with specialized converter to the
-    /// reader.
-    template <typename Map, typename Converter>
-    GraphReader& edgeMap(const std::string& caption, Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Edge>* storage =
-        new _reader_bits::MapStorage<Edge, Map, Converter>(map, converter);
-      _edge_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map reading rule
-    ///
-    /// Add an arc map reading rule to the reader.
-    template <typename Map>
-    GraphReader& arcMap(const std::string& caption, Map& map) {
-      checkConcept<concepts::WriteMap<Arc, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Edge>* forward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, true, Map>(_graph, map);
-      _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
-      _reader_bits::MapStorageBase<Edge>* backward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, false, Map>(_graph, map);
-      _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
-      return *this;
-    }
-
-    /// \brief Arc map reading rule
-    ///
-    /// Add an arc map reading rule with specialized converter to the
-    /// reader.
-    template <typename Map, typename Converter>
-    GraphReader& arcMap(const std::string& caption, Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::WriteMap<Arc, typename Map::Value>, Map>();
-      _reader_bits::MapStorageBase<Edge>* forward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, true, Map, Converter>
-        (_graph, map, converter);
-      _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
-      _reader_bits::MapStorageBase<Edge>* backward_storage =
-        new _reader_bits::GraphArcMapStorage<Graph, false, Map, Converter>
-        (_graph, map, converter);
-      _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
-      return *this;
-    }
-
-    /// \brief Attribute reading rule
-    ///
-    /// Add an attribute reading rule to the reader.
-    template <typename Value>
-    GraphReader& attribute(const std::string& caption, Value& value) {
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Value>(value);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute reading rule
-    ///
-    /// Add an attribute reading rule with specialized converter to the
-    /// reader.
-    template <typename Value, typename Converter>
-    GraphReader& attribute(const std::string& caption, Value& value,
-                             const Converter& converter = Converter()) {
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Value, Converter>(value, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node reading rule
-    ///
-    /// Add a node reading rule to reader.
-    GraphReader& node(const std::string& caption, Node& node) {
-      typedef _reader_bits::MapLookUpConverter<Node> Converter;
-      Converter converter(_node_index);
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Node, Converter>(node, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge reading rule
-    ///
-    /// Add an edge reading rule to reader.
-    GraphReader& edge(const std::string& caption, Edge& edge) {
-      typedef _reader_bits::MapLookUpConverter<Edge> Converter;
-      Converter converter(_edge_index);
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Edge, Converter>(edge, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc reading rule
-    ///
-    /// Add an arc reading rule to reader.
-    GraphReader& arc(const std::string& caption, Arc& arc) {
-      typedef _reader_bits::GraphArcLookUpConverter<Graph> Converter;
-      Converter converter(_graph, _edge_index);
-      _reader_bits::ValueStorageBase* storage =
-        new _reader_bits::ValueStorage<Arc, Converter>(arc, converter);
-      _attributes.insert(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// @}
-
-    /// \name Select section by name
-    /// @{
-
-    /// \brief Set \c \@nodes section to be read
-    ///
-    /// Set \c \@nodes section to be read.
-    GraphReader& nodes(const std::string& caption) {
-      _nodes_caption = caption;
-      return *this;
-    }
-
-    /// \brief Set \c \@edges section to be read
-    ///
-    /// Set \c \@edges section to be read.
-    GraphReader& edges(const std::string& caption) {
-      _edges_caption = caption;
-      return *this;
-    }
-
-    /// \brief Set \c \@attributes section to be read
-    ///
-    /// Set \c \@attributes section to be read.
-    GraphReader& attributes(const std::string& caption) {
-      _attributes_caption = caption;
-      return *this;
-    }
-
-    /// @}
-
-    /// \name Using previously constructed node or edge set
-    /// @{
-
-    /// \brief Use previously constructed node set
-    ///
-    /// Use previously constructed node set, and specify the node
-    /// label map.
-    template <typename Map>
-    GraphReader& useNodes(const Map& map) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_nodes, "Multiple usage of useNodes() member");
-      _use_nodes = true;
-      _writer_bits::DefaultConverter<typename Map::Value> converter;
-      for (NodeIt n(_graph); n != INVALID; ++n) {
-        _node_index.insert(std::make_pair(converter(map[n]), n));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed node set
-    ///
-    /// Use previously constructed node set, and specify the node
-    /// label map and a functor which converts the label map values to
-    /// \c std::string.
-    template <typename Map, typename Converter>
-    GraphReader& useNodes(const Map& map,
-                            const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_nodes, "Multiple usage of useNodes() member");
-      _use_nodes = true;
-      for (NodeIt n(_graph); n != INVALID; ++n) {
-        _node_index.insert(std::make_pair(converter(map[n]), n));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed edge set
-    ///
-    /// Use previously constructed edge set, and specify the edge
-    /// label map.
-    template <typename Map>
-    GraphReader& useEdges(const Map& map) {
-      checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_edges, "Multiple usage of useEdges() member");
-      _use_edges = true;
-      _writer_bits::DefaultConverter<typename Map::Value> converter;
-      for (EdgeIt a(_graph); a != INVALID; ++a) {
-        _edge_index.insert(std::make_pair(converter(map[a]), a));
-      }
-      return *this;
-    }
-
-    /// \brief Use previously constructed edge set
-    ///
-    /// Use previously constructed edge set, and specify the edge
-    /// label map and a functor which converts the label map values to
-    /// \c std::string.
-    template <typename Map, typename Converter>
-    GraphReader& useEdges(const Map& map,
-                            const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
-      LEMON_ASSERT(!_use_edges, "Multiple usage of useEdges() member");
-      _use_edges = true;
-      for (EdgeIt a(_graph); a != INVALID; ++a) {
-        _edge_index.insert(std::make_pair(converter(map[a]), a));
-      }
-      return *this;
-    }
-
-    /// \brief Skip the reading of node section
-    ///
-    /// Omit the reading of the node section. This implies that each node
-    /// map reading rule will be abandoned, and the nodes of the graph
-    /// will not be constructed, which usually cause that the edge set
-    /// could not be read due to lack of node name
-    /// could not be read due to lack of node name resolving.
-    /// Therefore \c skipEdges() function should also be used, or
-    /// \c useNodes() should be used to specify the label of the nodes.
-    GraphReader& skipNodes() {
-      LEMON_ASSERT(!_skip_nodes, "Skip nodes already set");
-      _skip_nodes = true;
-      return *this;
-    }
-
-    /// \brief Skip the reading of edge section
-    ///
-    /// Omit the reading of the edge section. This implies that each edge
-    /// map reading rule will be abandoned, and the edges of the graph
-    /// will not be constructed.
-    GraphReader& skipEdges() {
-      LEMON_ASSERT(!_skip_edges, "Skip edges already set");
-      _skip_edges = true;
-      return *this;
-    }
-
-    /// @}
-
-  private:
-
-    bool readLine() {
-      std::string str;
-      while(++line_num, std::getline(*_is, str)) {
-        line.clear(); line.str(str);
-        char c;
-        if (line >> std::ws >> c && c != '#') {
-          line.putback(c);
-          return true;
-        }
-      }
-      return false;
-    }
-
-    bool readSuccess() {
-      return static_cast<bool>(*_is);
-    }
-
-    void skipSection() {
-      char c;
-      while (readSuccess() && line >> c && c != '@') {
-        readLine();
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readNodes() {
-
-      std::vector<int> map_index(_node_maps.size());
-      int map_num, label_index;
-
-      char c;
-      if (!readLine() || !(line >> c) || c == '@') {
-        if (readSuccess() && line) line.putback(c);
-        if (!_node_maps.empty())
-          throw FormatError("Cannot find map names");
-        return;
-      }
-      line.putback(c);
-
-      {
-        std::map<std::string, int> maps;
-
-        std::string map;
-        int index = 0;
-        while (_reader_bits::readToken(line, map)) {
-          if (maps.find(map) != maps.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of node map: " << map;
-            throw FormatError(msg.str());
-          }
-          maps.insert(std::make_pair(map, index));
-          ++index;
-        }
-
-        for (int i = 0; i < static_cast<int>(_node_maps.size()); ++i) {
-          std::map<std::string, int>::iterator jt =
-            maps.find(_node_maps[i].first);
-          if (jt == maps.end()) {
-            std::ostringstream msg;
-            msg << "Map not found: " << _node_maps[i].first;
-            throw FormatError(msg.str());
-          }
-          map_index[i] = jt->second;
-        }
-
-        {
-          std::map<std::string, int>::iterator jt = maps.find("label");
-          if (jt != maps.end()) {
-            label_index = jt->second;
-          } else {
-            label_index = -1;
-          }
-        }
-        map_num = maps.size();
-      }
-
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::vector<std::string> tokens(map_num);
-        for (int i = 0; i < map_num; ++i) {
-          if (!_reader_bits::readToken(line, tokens[i])) {
-            std::ostringstream msg;
-            msg << "Column not found (" << i + 1 << ")";
-            throw FormatError(msg.str());
-          }
-        }
-        if (line >> std::ws >> c)
-          throw FormatError("Extra character at the end of line");
-
-        Node n;
-        if (!_use_nodes) {
-          n = _graph.addNode();
-          if (label_index != -1)
-            _node_index.insert(std::make_pair(tokens[label_index], n));
-        } else {
-          if (label_index == -1)
-            throw FormatError("Label map not found");
-          typename std::map<std::string, Node>::iterator it =
-            _node_index.find(tokens[label_index]);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Node with label not found: " << tokens[label_index];
-            throw FormatError(msg.str());
-          }
-          n = it->second;
-        }
-
-        for (int i = 0; i < static_cast<int>(_node_maps.size()); ++i) {
-          _node_maps[i].second->set(n, tokens[map_index[i]]);
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readEdges() {
-
-      std::vector<int> map_index(_edge_maps.size());
-      int map_num, label_index;
-
-      char c;
-      if (!readLine() || !(line >> c) || c == '@') {
-        if (readSuccess() && line) line.putback(c);
-        if (!_edge_maps.empty())
-          throw FormatError("Cannot find map names");
-        return;
-      }
-      line.putback(c);
-
-      {
-        std::map<std::string, int> maps;
-
-        std::string map;
-        int index = 0;
-        while (_reader_bits::readToken(line, map)) {
-          if(map == "-") {
-              if(index!=0)
-                throw FormatError("'-' is not allowed as a map name");
-              else if (line >> std::ws >> c)
-                throw FormatError("Extra character at the end of line");
-              else break;
-            }
-          if (maps.find(map) != maps.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of edge map: " << map;
-            throw FormatError(msg.str());
-          }
-          maps.insert(std::make_pair(map, index));
-          ++index;
-        }
-
-        for (int i = 0; i < static_cast<int>(_edge_maps.size()); ++i) {
-          std::map<std::string, int>::iterator jt =
-            maps.find(_edge_maps[i].first);
-          if (jt == maps.end()) {
-            std::ostringstream msg;
-            msg << "Map not found: " << _edge_maps[i].first;
-            throw FormatError(msg.str());
-          }
-          map_index[i] = jt->second;
-        }
-
-        {
-          std::map<std::string, int>::iterator jt = maps.find("label");
-          if (jt != maps.end()) {
-            label_index = jt->second;
-          } else {
-            label_index = -1;
-          }
-        }
-        map_num = maps.size();
-      }
-
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::string source_token;
-        std::string target_token;
-
-        if (!_reader_bits::readToken(line, source_token))
-          throw FormatError("Node u not found");
-
-        if (!_reader_bits::readToken(line, target_token))
-          throw FormatError("Node v not found");
-
-        std::vector<std::string> tokens(map_num);
-        for (int i = 0; i < map_num; ++i) {
-          if (!_reader_bits::readToken(line, tokens[i])) {
-            std::ostringstream msg;
-            msg << "Column not found (" << i + 1 << ")";
-            throw FormatError(msg.str());
-          }
-        }
-        if (line >> std::ws >> c)
-          throw FormatError("Extra character at the end of line");
-
-        Edge e;
-        if (!_use_edges) {
-
-          typename NodeIndex::iterator it;
-
-          it = _node_index.find(source_token);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Item not found: " << source_token;
-            throw FormatError(msg.str());
-          }
-          Node source = it->second;
-
-          it = _node_index.find(target_token);
-          if (it == _node_index.end()) {
-            std::ostringstream msg;
-            msg << "Item not found: " << target_token;
-            throw FormatError(msg.str());
-          }
-          Node target = it->second;
-
-          e = _graph.addEdge(source, target);
-          if (label_index != -1)
-            _edge_index.insert(std::make_pair(tokens[label_index], e));
-        } else {
-          if (label_index == -1)
-            throw FormatError("Label map not found");
-          typename std::map<std::string, Edge>::iterator it =
-            _edge_index.find(tokens[label_index]);
-          if (it == _edge_index.end()) {
-            std::ostringstream msg;
-            msg << "Edge with label not found: " << tokens[label_index];
-            throw FormatError(msg.str());
-          }
-          e = it->second;
-        }
-
-        for (int i = 0; i < static_cast<int>(_edge_maps.size()); ++i) {
-          _edge_maps[i].second->set(e, tokens[map_index[i]]);
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readAttributes() {
-
-      std::set<std::string> read_attr;
-
-      char c;
-      while (readLine() && line >> c && c != '@') {
-        line.putback(c);
-
-        std::string attr, token;
-        if (!_reader_bits::readToken(line, attr))
-          throw FormatError("Attribute name not found");
-        if (!_reader_bits::readToken(line, token))
-          throw FormatError("Attribute value not found");
-        if (line >> c)
-          throw FormatError("Extra character at the end of line");
-
-        {
-          std::set<std::string>::iterator it = read_attr.find(attr);
-          if (it != read_attr.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of attribute: " << attr;
-            throw FormatError(msg.str());
-          }
-          read_attr.insert(attr);
-        }
-
-        {
-          typename Attributes::iterator it = _attributes.lower_bound(attr);
-          while (it != _attributes.end() && it->first == attr) {
-            it->second->set(token);
-            ++it;
-          }
-        }
-
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        if (read_attr.find(it->first) == read_attr.end()) {
-          std::ostringstream msg;
-          msg << "Attribute not found: " << it->first;
-          throw FormatError(msg.str());
-        }
-      }
-    }
-
-  public:
-
-    /// \name Execution of the reader
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing
-    void run() {
-
-      LEMON_ASSERT(_is != 0, "This reader assigned to an other reader");
-
-      bool nodes_done = _skip_nodes;
-      bool edges_done = _skip_edges;
-      bool attributes_done = false;
-
-      line_num = 0;
-      readLine();
-      skipSection();
-
-      while (readSuccess()) {
-        try {
-          char c;
-          std::string section, caption;
-          line >> c;
-          _reader_bits::readToken(line, section);
-          _reader_bits::readToken(line, caption);
-
-          if (line >> c)
-            throw FormatError("Extra character at the end of line");
-
-          if (section == "nodes" && !nodes_done) {
-            if (_nodes_caption.empty() || _nodes_caption == caption) {
-              readNodes();
-              nodes_done = true;
-            }
-          } else if ((section == "edges" || section == "arcs") &&
-                     !edges_done) {
-            if (_edges_caption.empty() || _edges_caption == caption) {
-              readEdges();
-              edges_done = true;
-            }
-          } else if (section == "attributes" && !attributes_done) {
-            if (_attributes_caption.empty() || _attributes_caption == caption) {
-              readAttributes();
-              attributes_done = true;
-            }
-          } else {
-            readLine();
-            skipSection();
-          }
-        } catch (FormatError& error) {
-          error.line(line_num);
-          error.file(_filename);
-          throw;
-        }
-      }
-
-      if (!nodes_done) {
-        throw FormatError("Section @nodes not found");
-      }
-
-      if (!edges_done) {
-        throw FormatError("Section @edges not found");
-      }
-
-      if (!attributes_done && !_attributes.empty()) {
-        throw FormatError("Section @attributes not found");
-      }
-
-    }
-
-    /// @}
-
-  };
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, std::istream& is) {
-    GraphReader<Graph> tmp(graph, is);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const std::string& fn) {
-    GraphReader<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphReader class
-  ///
-  /// This function just returns a \ref GraphReader class.
-  /// \relates GraphReader
-  template <typename Graph>
-  GraphReader<Graph> graphReader(Graph& graph, const char* fn) {
-    GraphReader<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  class SectionReader;
-
-  SectionReader sectionReader(std::istream& is);
-  SectionReader sectionReader(const std::string& fn);
-  SectionReader sectionReader(const char* fn);
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief Section reader class
-  ///
-  /// In the \ref lgf-format "LGF" file extra sections can be placed,
-  /// which contain any data in arbitrary format. Such sections can be
-  /// read with this class. A reading rule can be added to the class
-  /// with two different functions. With the \c sectionLines() function a
-  /// functor can process the section line-by-line, while with the \c
-  /// sectionStream() member the section can be read from an input
-  /// stream.
-  class SectionReader {
-  private:
-
-    std::istream* _is;
-    bool local_is;
-    std::string _filename;
-
-    typedef std::map<std::string, _reader_bits::Section*> Sections;
-    Sections _sections;
-
-    int line_num;
-    std::istringstream line;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct a section reader, which reads from the given input
-    /// stream.
-    SectionReader(std::istream& is)
-      : _is(&is), local_is(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct a section reader, which reads from the given file.
-    SectionReader(const std::string& fn)
-      : _is(new std::ifstream(fn.c_str())), local_is(true),
-        _filename(fn) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct a section reader, which reads from the given file.
-    SectionReader(const char* fn)
-      : _is(new std::ifstream(fn)), local_is(true),
-        _filename(fn) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~SectionReader() {
-      for (Sections::iterator it = _sections.begin();
-           it != _sections.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_is) {
-        delete _is;
-      }
-
-    }
-
-  private:
-
-    friend SectionReader sectionReader(std::istream& is);
-    friend SectionReader sectionReader(const std::string& fn);
-    friend SectionReader sectionReader(const char* fn);
-
-    SectionReader(SectionReader& other)
-      : _is(other._is), local_is(other.local_is) {
-
-      other._is = 0;
-      other.local_is = false;
-
-      _sections.swap(other._sections);
-    }
-
-    SectionReader& operator=(const SectionReader&);
-
-  public:
-
-    /// \name Section readers
-    /// @{
-
-    /// \brief Add a section processor with line oriented reading
-    ///
-    /// The first parameter is the type descriptor of the section, the
-    /// second is a functor, which takes just one \c std::string
-    /// parameter. At the reading process, each line of the section
-    /// will be given to the functor object. However, the empty lines
-    /// and the comment lines are filtered out, and the leading
-    /// whitespaces are trimmed from each processed string.
-    ///
-    /// For example let's see a section, which contain several
-    /// integers, which should be inserted into a vector.
-    ///\code
-    ///  @numbers
-    ///  12 45 23
-    ///  4
-    ///  23 6
-    ///\endcode
-    ///
-    /// The functor is implemented as a struct:
-    ///\code
-    ///  struct NumberSection {
-    ///    std::vector<int>& _data;
-    ///    NumberSection(std::vector<int>& data) : _data(data) {}
-    ///    void operator()(const std::string& line) {
-    ///      std::istringstream ls(line);
-    ///      int value;
-    ///      while (ls >> value) _data.push_back(value);
-    ///    }
-    ///  };
-    ///
-    ///  // ...
-    ///
-    ///  reader.sectionLines("numbers", NumberSection(vec));
-    ///\endcode
-    template <typename Functor>
-    SectionReader& sectionLines(const std::string& type, Functor functor) {
-      LEMON_ASSERT(!type.empty(), "Type is empty.");
-      LEMON_ASSERT(_sections.find(type) == _sections.end(),
-                   "Multiple reading of section.");
-      _sections.insert(std::make_pair(type,
-        new _reader_bits::LineSection<Functor>(functor)));
-      return *this;
-    }
-
-
-    /// \brief Add a section processor with stream oriented reading
-    ///
-    /// The first parameter is the type of the section, the second is
-    /// a functor, which takes an \c std::istream& and an \c int&
-    /// parameter, the latter regard to the line number of stream. The
-    /// functor can read the input while the section go on, and the
-    /// line number should be modified accordingly.
-    template <typename Functor>
-    SectionReader& sectionStream(const std::string& type, Functor functor) {
-      LEMON_ASSERT(!type.empty(), "Type is empty.");
-      LEMON_ASSERT(_sections.find(type) == _sections.end(),
-                   "Multiple reading of section.");
-      _sections.insert(std::make_pair(type,
-         new _reader_bits::StreamSection<Functor>(functor)));
-      return *this;
-    }
-
-    /// @}
-
-  private:
-
-    bool readLine() {
-      std::string str;
-      while(++line_num, std::getline(*_is, str)) {
-        line.clear(); line.str(str);
-        char c;
-        if (line >> std::ws >> c && c != '#') {
-          line.putback(c);
-          return true;
-        }
-      }
-      return false;
-    }
-
-    bool readSuccess() {
-      return static_cast<bool>(*_is);
-    }
-
-    void skipSection() {
-      char c;
-      while (readSuccess() && line >> c && c != '@') {
-        readLine();
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-  public:
-
-
-    /// \name Execution of the reader
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing.
-    void run() {
-
-      LEMON_ASSERT(_is != 0, "This reader assigned to an other reader");
-
-      std::set<std::string> extra_sections;
-
-      line_num = 0;
-      readLine();
-      skipSection();
-
-      while (readSuccess()) {
-        try {
-          char c;
-          std::string section, caption;
-          line >> c;
-          _reader_bits::readToken(line, section);
-          _reader_bits::readToken(line, caption);
-
-          if (line >> c)
-            throw FormatError("Extra character at the end of line");
-
-          if (extra_sections.find(section) != extra_sections.end()) {
-            std::ostringstream msg;
-            msg << "Multiple occurence of section: " << section;
-            throw FormatError(msg.str());
-          }
-          Sections::iterator it = _sections.find(section);
-          if (it != _sections.end()) {
-            extra_sections.insert(section);
-            it->second->process(*_is, line_num);
-          }
-          readLine();
-          skipSection();
-        } catch (FormatError& error) {
-          error.line(line_num);
-          error.file(_filename);
-          throw;
-        }
-      }
-      for (Sections::iterator it = _sections.begin();
-           it != _sections.end(); ++it) {
-        if (extra_sections.find(it->first) == extra_sections.end()) {
-          std::ostringstream os;
-          os << "Cannot find section: " << it->first;
-          throw FormatError(os.str());
-        }
-      }
-    }
-
-    /// @}
-
-  };
-
-  /// \brief Return a \ref SectionReader class
-  ///
-  /// This function just returns a \ref SectionReader class.
-  /// \relates SectionReader
-  inline SectionReader sectionReader(std::istream& is) {
-    SectionReader tmp(is);
-    return tmp;
-  }
-
-  /// \brief Return a \ref SectionReader class
-  ///
-  /// This function just returns a \ref SectionReader class.
-  /// \relates SectionReader
-  inline SectionReader sectionReader(const std::string& fn) {
-    SectionReader tmp(fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref SectionReader class
-  ///
-  /// This function just returns a \ref SectionReader class.
-  /// \relates SectionReader
-  inline SectionReader sectionReader(const char* fn) {
-    SectionReader tmp(fn);
-    return tmp;
-  }
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief Reader for the contents of the \ref lgf-format "LGF" file
-  ///
-  /// This class can be used to read the sections, the map names and
-  /// the attributes from a file. Usually, the LEMON programs know
-  /// that, which type of graph, which maps and which attributes
-  /// should be read from a file, but in general tools (like glemon)
-  /// the contents of an LGF file should be guessed somehow. This class
-  /// reads the graph and stores the appropriate information for
-  /// reading the graph.
-  ///
-  ///\code
-  /// LgfContents contents("graph.lgf");
-  /// contents.run();
-  ///
-  /// // Does it contain any node section and arc section?
-  /// if (contents.nodeSectionNum() == 0 || contents.arcSectionNum()) {
-  ///   std::cerr << "Failure, cannot find graph." << std::endl;
-  ///   return -1;
-  /// }
-  /// std::cout << "The name of the default node section: "
-  ///           << contents.nodeSection(0) << std::endl;
-  /// std::cout << "The number of the arc maps: "
-  ///           << contents.arcMaps(0).size() << std::endl;
-  /// std::cout << "The name of second arc map: "
-  ///           << contents.arcMaps(0)[1] << std::endl;
-  ///\endcode
-  class LgfContents {
-  private:
-
-    std::istream* _is;
-    bool local_is;
-
-    std::vector<std::string> _node_sections;
-    std::vector<std::string> _edge_sections;
-    std::vector<std::string> _attribute_sections;
-    std::vector<std::string> _extra_sections;
-
-    std::vector<bool> _arc_sections;
-
-    std::vector<std::vector<std::string> > _node_maps;
-    std::vector<std::vector<std::string> > _edge_maps;
-
-    std::vector<std::vector<std::string> > _attributes;
-
-
-    int line_num;
-    std::istringstream line;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct an \e LGF contents reader, which reads from the given
-    /// input stream.
-    LgfContents(std::istream& is)
-      : _is(&is), local_is(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct an \e LGF contents reader, which reads from the given
-    /// file.
-    LgfContents(const std::string& fn)
-      : _is(new std::ifstream(fn.c_str())), local_is(true) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct an \e LGF contents reader, which reads from the given
-    /// file.
-    LgfContents(const char* fn)
-      : _is(new std::ifstream(fn)), local_is(true) {
-      if (!(*_is)) {
-        delete _is;
-        throw IoError("Cannot open file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~LgfContents() {
-      if (local_is) delete _is;
-    }
-
-  private:
-
-    LgfContents(const LgfContents&);
-    LgfContents& operator=(const LgfContents&);
-
-  public:
-
-
-    /// \name Node sections
-    /// @{
-
-    /// \brief Gives back the number of node sections in the file.
-    ///
-    /// Gives back the number of node sections in the file.
-    int nodeSectionNum() const {
-      return _node_sections.size();
-    }
-
-    /// \brief Returns the node section name at the given position.
-    ///
-    /// Returns the node section name at the given position.
-    const std::string& nodeSection(int i) const {
-      return _node_sections[i];
-    }
-
-    /// \brief Gives back the node maps for the given section.
-    ///
-    /// Gives back the node maps for the given section.
-    const std::vector<std::string>& nodeMapNames(int i) const {
-      return _node_maps[i];
-    }
-
-    /// @}
-
-    /// \name Arc/Edge sections
-    /// @{
-
-    /// \brief Gives back the number of arc/edge sections in the file.
-    ///
-    /// Gives back the number of arc/edge sections in the file.
-    /// \note It is synonym of \c edgeSectionNum().
-    int arcSectionNum() const {
-      return _edge_sections.size();
-    }
-
-    /// \brief Returns the arc/edge section name at the given position.
-    ///
-    /// Returns the arc/edge section name at the given position.
-    /// \note It is synonym of \c edgeSection().
-    const std::string& arcSection(int i) const {
-      return _edge_sections[i];
-    }
-
-    /// \brief Gives back the arc/edge maps for the given section.
-    ///
-    /// Gives back the arc/edge maps for the given section.
-    /// \note It is synonym of \c edgeMapNames().
-    const std::vector<std::string>& arcMapNames(int i) const {
-      return _edge_maps[i];
-    }
-
-    /// @}
-
-    /// \name Synonyms
-    /// @{
-
-    /// \brief Gives back the number of arc/edge sections in the file.
-    ///
-    /// Gives back the number of arc/edge sections in the file.
-    /// \note It is synonym of \c arcSectionNum().
-    int edgeSectionNum() const {
-      return _edge_sections.size();
-    }
-
-    /// \brief Returns the section name at the given position.
-    ///
-    /// Returns the section name at the given position.
-    /// \note It is synonym of \c arcSection().
-    const std::string& edgeSection(int i) const {
-      return _edge_sections[i];
-    }
-
-    /// \brief Gives back the edge maps for the given section.
-    ///
-    /// Gives back the edge maps for the given section.
-    /// \note It is synonym of \c arcMapNames().
-    const std::vector<std::string>& edgeMapNames(int i) const {
-      return _edge_maps[i];
-    }
-
-    /// @}
-
-    /// \name Attribute sections
-    /// @{
-
-    /// \brief Gives back the number of attribute sections in the file.
-    ///
-    /// Gives back the number of attribute sections in the file.
-    int attributeSectionNum() const {
-      return _attribute_sections.size();
-    }
-
-    /// \brief Returns the attribute section name at the given position.
-    ///
-    /// Returns the attribute section name at the given position.
-    const std::string& attributeSectionNames(int i) const {
-      return _attribute_sections[i];
-    }
-
-    /// \brief Gives back the attributes for the given section.
-    ///
-    /// Gives back the attributes for the given section.
-    const std::vector<std::string>& attributes(int i) const {
-      return _attributes[i];
-    }
-
-    /// @}
-
-    /// \name Extra sections
-    /// @{
-
-    /// \brief Gives back the number of extra sections in the file.
-    ///
-    /// Gives back the number of extra sections in the file.
-    int extraSectionNum() const {
-      return _extra_sections.size();
-    }
-
-    /// \brief Returns the extra section type at the given position.
-    ///
-    /// Returns the section type at the given position.
-    const std::string& extraSection(int i) const {
-      return _extra_sections[i];
-    }
-
-    /// @}
-
-  private:
-
-    bool readLine() {
-      std::string str;
-      while(++line_num, std::getline(*_is, str)) {
-        line.clear(); line.str(str);
-        char c;
-        if (line >> std::ws >> c && c != '#') {
-          line.putback(c);
-          return true;
-        }
-      }
-      return false;
-    }
-
-    bool readSuccess() {
-      return static_cast<bool>(*_is);
-    }
-
-    void skipSection() {
-      char c;
-      while (readSuccess() && line >> c && c != '@') {
-        readLine();
-      }
-      if (readSuccess()) {
-        line.putback(c);
-      }
-    }
-
-    void readMaps(std::vector<std::string>& maps) {
-      char c;
-      if (!readLine() || !(line >> c) || c == '@') {
-        if (readSuccess() && line) line.putback(c);
-        return;
-      }
-      line.putback(c);
-      std::string map;
-      while (_reader_bits::readToken(line, map)) {
-        maps.push_back(map);
-      }
-    }
-
-    void readAttributes(std::vector<std::string>& attrs) {
-      readLine();
-      char c;
-      while (readSuccess() && line >> c && c != '@') {
-        line.putback(c);
-        std::string attr;
-        _reader_bits::readToken(line, attr);
-        attrs.push_back(attr);
-        readLine();
-      }
-      line.putback(c);
-    }
-
-  public:
-
-    /// \name Execution of the contents reader
-    /// @{
-
-    /// \brief Starts the reading
-    ///
-    /// This function starts the reading.
-    void run() {
-
-      readLine();
-      skipSection();
-
-      while (readSuccess()) {
-
-        char c;
-        line >> c;
-
-        std::string section, caption;
-        _reader_bits::readToken(line, section);
-        _reader_bits::readToken(line, caption);
-
-        if (section == "nodes") {
-          _node_sections.push_back(caption);
-          _node_maps.push_back(std::vector<std::string>());
-          readMaps(_node_maps.back());
-          readLine(); skipSection();
-        } else if (section == "arcs" || section == "edges") {
-          _edge_sections.push_back(caption);
-          _arc_sections.push_back(section == "arcs");
-          _edge_maps.push_back(std::vector<std::string>());
-          readMaps(_edge_maps.back());
-          readLine(); skipSection();
-        } else if (section == "attributes") {
-          _attribute_sections.push_back(caption);
-          _attributes.push_back(std::vector<std::string>());
-          readAttributes(_attributes.back());
-        } else {
-          _extra_sections.push_back(section);
-          readLine(); skipSection();
-        }
-      }
-    }
-
-    /// @}
-
-  };
-}
-
-#endif
Index: mon/lgf_writer.h
===================================================================
--- lemon/lgf_writer.h	(revision 427)
+++ 	(revision )
@@ -1,1777 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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 lemon_io
-///\file
-///\brief \ref lgf-format "LEMON Graph Format" writer.
-
-
-#ifndef LEMON_LGF_WRITER_H
-#define LEMON_LGF_WRITER_H
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-
-#include <algorithm>
-
-#include <vector>
-#include <functional>
-
-#include <lemon/core.h>
-#include <lemon/maps.h>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-
-namespace lemon {
-
-  namespace _writer_bits {
-
-    template <typename Value>
-    struct DefaultConverter {
-      std::string operator()(const Value& value) {
-        std::ostringstream os;
-        os << value;
-        return os.str();
-      }
-    };
-
-    template <typename T>
-    bool operator<(const T&, const T&) {
-      throw FormatError("Label map is not comparable");
-    }
-
-    template <typename _Map>
-    class MapLess {
-    public:
-      typedef _Map Map;
-      typedef typename Map::Key Item;
-
-    private:
-      const Map& _map;
-
-    public:
-      MapLess(const Map& map) : _map(map) {}
-
-      bool operator()(const Item& left, const Item& right) {
-        return _map[left] < _map[right];
-      }
-    };
-
-    template <typename _Graph, bool _dir, typename _Map>
-    class GraphArcMapLess {
-    public:
-      typedef _Map Map;
-      typedef _Graph Graph;
-      typedef typename Graph::Edge Item;
-
-    private:
-      const Graph& _graph;
-      const Map& _map;
-
-    public:
-      GraphArcMapLess(const Graph& graph, const Map& map)
-        : _graph(graph), _map(map) {}
-
-      bool operator()(const Item& left, const Item& right) {
-        return _map[_graph.direct(left, _dir)] <
-          _map[_graph.direct(right, _dir)];
-      }
-    };
-
-    template <typename _Item>
-    class MapStorageBase {
-    public:
-      typedef _Item Item;
-
-    public:
-      MapStorageBase() {}
-      virtual ~MapStorageBase() {}
-
-      virtual std::string get(const Item& item) = 0;
-      virtual void sort(std::vector<Item>&) = 0;
-    };
-
-    template <typename _Item, typename _Map,
-              typename _Converter = DefaultConverter<typename _Map::Value> >
-    class MapStorage : public MapStorageBase<_Item> {
-    public:
-      typedef _Map Map;
-      typedef _Converter Converter;
-      typedef _Item Item;
-
-    private:
-      const Map& _map;
-      Converter _converter;
-
-    public:
-      MapStorage(const Map& map, const Converter& converter = Converter())
-        : _map(map), _converter(converter) {}
-      virtual ~MapStorage() {}
-
-      virtual std::string get(const Item& item) {
-        return _converter(_map[item]);
-      }
-      virtual void sort(std::vector<Item>& items) {
-        MapLess<Map> less(_map);
-        std::sort(items.begin(), items.end(), less);
-      }
-    };
-
-    template <typename _Graph, bool _dir, typename _Map,
-              typename _Converter = DefaultConverter<typename _Map::Value> >
-    class GraphArcMapStorage : public MapStorageBase<typename _Graph::Edge> {
-    public:
-      typedef _Map Map;
-      typedef _Converter Converter;
-      typedef _Graph Graph;
-      typedef typename Graph::Edge Item;
-      static const bool dir = _dir;
-
-    private:
-      const Graph& _graph;
-      const Map& _map;
-      Converter _converter;
-
-    public:
-      GraphArcMapStorage(const Graph& graph, const Map& map,
-                         const Converter& converter = Converter())
-        : _graph(graph), _map(map), _converter(converter) {}
-      virtual ~GraphArcMapStorage() {}
-
-      virtual std::string get(const Item& item) {
-        return _converter(_map[_graph.direct(item, dir)]);
-      }
-      virtual void sort(std::vector<Item>& items) {
-        GraphArcMapLess<Graph, dir, Map> less(_graph, _map);
-        std::sort(items.begin(), items.end(), less);
-      }
-    };
-
-    class ValueStorageBase {
-    public:
-      ValueStorageBase() {}
-      virtual ~ValueStorageBase() {}
-
-      virtual std::string get() = 0;
-    };
-
-    template <typename _Value, typename _Converter = DefaultConverter<_Value> >
-    class ValueStorage : public ValueStorageBase {
-    public:
-      typedef _Value Value;
-      typedef _Converter Converter;
-
-    private:
-      const Value& _value;
-      Converter _converter;
-
-    public:
-      ValueStorage(const Value& value, const Converter& converter = Converter())
-        : _value(value), _converter(converter) {}
-
-      virtual std::string get() {
-        return _converter(_value);
-      }
-    };
-
-    template <typename Value>
-    struct MapLookUpConverter {
-      const std::map<Value, std::string>& _map;
-
-      MapLookUpConverter(const std::map<Value, std::string>& map)
-        : _map(map) {}
-
-      std::string operator()(const Value& str) {
-        typename std::map<Value, std::string>::const_iterator it =
-          _map.find(str);
-        if (it == _map.end()) {
-          throw FormatError("Item not found");
-        }
-        return it->second;
-      }
-    };
-
-    template <typename Graph>
-    struct GraphArcLookUpConverter {
-      const Graph& _graph;
-      const std::map<typename Graph::Edge, std::string>& _map;
-
-      GraphArcLookUpConverter(const Graph& graph,
-                              const std::map<typename Graph::Edge,
-                                             std::string>& map)
-        : _graph(graph), _map(map) {}
-
-      std::string operator()(const typename Graph::Arc& val) {
-        typename std::map<typename Graph::Edge, std::string>
-          ::const_iterator it = _map.find(val);
-        if (it == _map.end()) {
-          throw FormatError("Item not found");
-        }
-        return (_graph.direction(val) ? '+' : '-') + it->second;
-      }
-    };
-
-    inline bool isWhiteSpace(char c) {
-      return c == ' ' || c == '\t' || c == '\v' ||
-        c == '\n' || c == '\r' || c == '\f';
-    }
-
-    inline bool isEscaped(char c) {
-      return c == '\\' || c == '\"' || c == '\'' ||
-        c == '\a' || c == '\b';
-    }
-
-    inline static void writeEscape(std::ostream& os, char c) {
-      switch (c) {
-      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) {
-          std::ios::fmtflags flags = os.flags();
-          os << '\\' << std::oct << static_cast<int>(c);
-          os.flags(flags);
-        } else {
-          os << c;
-        }
-        return;
-      }
-    }
-
-    inline bool requireEscape(const std::string& str) {
-      if (str.empty() || str[0] == '@') return true;
-      std::istringstream is(str);
-      char c;
-      while (is.get(c)) {
-        if (isWhiteSpace(c) || isEscaped(c)) {
-          return true;
-        }
-      }
-      return false;
-    }
-
-    inline std::ostream& writeToken(std::ostream& os, const std::string& str) {
-
-      if (requireEscape(str)) {
-        os << '\"';
-        for (std::string::const_iterator it = str.begin();
-             it != str.end(); ++it) {
-          writeEscape(os, *it);
-        }
-        os << '\"';
-      } else {
-        os << str;
-      }
-      return os;
-    }
-
-    class Section {
-    public:
-      virtual ~Section() {}
-      virtual void process(std::ostream& os) = 0;
-    };
-
-    template <typename Functor>
-    class LineSection : public Section {
-    private:
-
-      Functor _functor;
-
-    public:
-
-      LineSection(const Functor& functor) : _functor(functor) {}
-      virtual ~LineSection() {}
-
-      virtual void process(std::ostream& os) {
-        std::string line;
-        while (!(line = _functor()).empty()) os << line << std::endl;
-      }
-    };
-
-    template <typename Functor>
-    class StreamSection : public Section {
-    private:
-
-      Functor _functor;
-
-    public:
-
-      StreamSection(const Functor& functor) : _functor(functor) {}
-      virtual ~StreamSection() {}
-
-      virtual void process(std::ostream& os) {
-        _functor(os);
-      }
-    };
-
-  }
-
-  template <typename Digraph>
-  class DigraphWriter;
-
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       std::ostream& os = std::cout);
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       const std::string& fn);
-
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       const char* fn);
-
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief \ref lgf-format "LGF" writer for directed graphs
-  ///
-  /// This utility writes an \ref lgf-format "LGF" file.
-  ///
-  /// The writing method does a batch processing. The user creates a
-  /// writer object, then various writing rules can be added to the
-  /// writer, and eventually the writing is executed with the \c run()
-  /// member function. A map writing rule can be added to the writer
-  /// with the \c nodeMap() or \c arcMap() members. An optional
-  /// converter parameter can also be added as a standard functor
-  /// converting from the value type of the map to \c std::string. If it
-  /// is set, it will determine how the value type of the map is written to
-  /// the output stream. If the functor is not set, then a default
-  /// conversion will be used. The \c attribute(), \c node() and \c
-  /// arc() functions are used to add attribute writing rules.
-  ///
-  ///\code
-  /// DigraphWriter<Digraph>(digraph, std::cout).
-  ///   nodeMap("coordinates", coord_map).
-  ///   nodeMap("size", size).
-  ///   nodeMap("title", title).
-  ///   arcMap("capacity", cap_map).
-  ///   node("source", src).
-  ///   node("target", trg).
-  ///   attribute("caption", caption).
-  ///   run();
-  ///\endcode
-  ///
-  ///
-  /// By default, the writer does not write additional captions to the
-  /// sections, but they can be give as an optional parameter of
-  /// the \c nodes(), \c arcs() or \c
-  /// attributes() functions.
-  ///
-  /// The \c skipNodes() and \c skipArcs() functions forbid the
-  /// writing of the sections. If two arc sections should be written
-  /// to the output, it can be done in two passes, the first pass
-  /// writes the node section and the first arc section, then the
-  /// second pass skips the node section and writes just the arc
-  /// section to the stream. The output stream can be retrieved with
-  /// the \c ostream() function, hence the second pass can append its
-  /// output to the output of the first pass.
-  template <typename _Digraph>
-  class DigraphWriter {
-  public:
-
-    typedef _Digraph Digraph;
-    TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  private:
-
-
-    std::ostream* _os;
-    bool local_os;
-
-    const Digraph& _digraph;
-
-    std::string _nodes_caption;
-    std::string _arcs_caption;
-    std::string _attributes_caption;
-
-    typedef std::map<Node, std::string> NodeIndex;
-    NodeIndex _node_index;
-    typedef std::map<Arc, std::string> ArcIndex;
-    ArcIndex _arc_index;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::MapStorageBase<Node>* > > NodeMaps;
-    NodeMaps _node_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::MapStorageBase<Arc>* > >ArcMaps;
-    ArcMaps _arc_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::ValueStorageBase*> > Attributes;
-    Attributes _attributes;
-
-    bool _skip_nodes;
-    bool _skip_arcs;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output stream.
-    DigraphWriter(const Digraph& digraph, std::ostream& os = std::cout)
-      : _os(&os), local_os(false), _digraph(digraph),
-        _skip_nodes(false), _skip_arcs(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output file.
-    DigraphWriter(const Digraph& digraph, const std::string& fn)
-      : _os(new std::ofstream(fn.c_str())), local_os(true), _digraph(digraph),
-        _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output file.
-    DigraphWriter(const Digraph& digraph, const char* fn)
-      : _os(new std::ofstream(fn)), local_os(true), _digraph(digraph),
-        _skip_nodes(false), _skip_arcs(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~DigraphWriter() {
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename ArcMaps::iterator it = _arc_maps.begin();
-           it != _arc_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_os) {
-        delete _os;
-      }
-    }
-
-  private:
-
-    template <typename DGR>
-    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
-                                            std::ostream& os);
-    template <typename DGR>
-    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
-                                            const std::string& fn);
-    template <typename DGR>
-    friend DigraphWriter<DGR> digraphWriter(const DGR& digraph,
-                                            const char *fn);
-
-    DigraphWriter(DigraphWriter& other)
-      : _os(other._os), local_os(other.local_os), _digraph(other._digraph),
-        _skip_nodes(other._skip_nodes), _skip_arcs(other._skip_arcs) {
-
-      other._os = 0;
-      other.local_os = false;
-
-      _node_index.swap(other._node_index);
-      _arc_index.swap(other._arc_index);
-
-      _node_maps.swap(other._node_maps);
-      _arc_maps.swap(other._arc_maps);
-      _attributes.swap(other._attributes);
-
-      _nodes_caption = other._nodes_caption;
-      _arcs_caption = other._arcs_caption;
-      _attributes_caption = other._attributes_caption;
-    }
-
-    DigraphWriter& operator=(const DigraphWriter&);
-
-  public:
-
-    /// \name Writing rules
-    /// @{
-
-    /// \brief Node map writing rule
-    ///
-    /// Add a node map writing rule to the writer.
-    template <typename Map>
-    DigraphWriter& nodeMap(const std::string& caption, const Map& map) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Node>* storage =
-        new _writer_bits::MapStorage<Node, Map>(map);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node map writing rule
-    ///
-    /// Add a node map writing rule with specialized converter to the
-    /// writer.
-    template <typename Map, typename Converter>
-    DigraphWriter& nodeMap(const std::string& caption, const Map& map,
-                           const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Node>* storage =
-        new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map writing rule
-    ///
-    /// Add an arc map writing rule to the writer.
-    template <typename Map>
-    DigraphWriter& arcMap(const std::string& caption, const Map& map) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Arc>* storage =
-        new _writer_bits::MapStorage<Arc, Map>(map);
-      _arc_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map writing rule
-    ///
-    /// Add an arc map writing rule with specialized converter to the
-    /// writer.
-    template <typename Map, typename Converter>
-    DigraphWriter& arcMap(const std::string& caption, const Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Arc>* storage =
-        new _writer_bits::MapStorage<Arc, Map, Converter>(map, converter);
-      _arc_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute writing rule
-    ///
-    /// Add an attribute writing rule to the writer.
-    template <typename Value>
-    DigraphWriter& attribute(const std::string& caption, const Value& value) {
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Value>(value);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute writing rule
-    ///
-    /// Add an attribute writing rule with specialized converter to the
-    /// writer.
-    template <typename Value, typename Converter>
-    DigraphWriter& attribute(const std::string& caption, const Value& value,
-                             const Converter& converter = Converter()) {
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Value, Converter>(value, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node writing rule
-    ///
-    /// Add a node writing rule to the writer.
-    DigraphWriter& node(const std::string& caption, const Node& node) {
-      typedef _writer_bits::MapLookUpConverter<Node> Converter;
-      Converter converter(_node_index);
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Node, Converter>(node, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc writing rule
-    ///
-    /// Add an arc writing rule to writer.
-    DigraphWriter& arc(const std::string& caption, const Arc& arc) {
-      typedef _writer_bits::MapLookUpConverter<Arc> Converter;
-      Converter converter(_arc_index);
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Arc, Converter>(arc, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \name Section captions
-    /// @{
-
-    /// \brief Add an additional caption to the \c \@nodes section
-    ///
-    /// Add an additional caption to the \c \@nodes section.
-    DigraphWriter& nodes(const std::string& caption) {
-      _nodes_caption = caption;
-      return *this;
-    }
-
-    /// \brief Add an additional caption to the \c \@arcs section
-    ///
-    /// Add an additional caption to the \c \@arcs section.
-    DigraphWriter& arcs(const std::string& caption) {
-      _arcs_caption = caption;
-      return *this;
-    }
-
-    /// \brief Add an additional caption to the \c \@attributes section
-    ///
-    /// Add an additional caption to the \c \@attributes section.
-    DigraphWriter& attributes(const std::string& caption) {
-      _attributes_caption = caption;
-      return *this;
-    }
-
-    /// \name Skipping section
-    /// @{
-
-    /// \brief Skip writing the node set
-    ///
-    /// The \c \@nodes section will not be written to the stream.
-    DigraphWriter& skipNodes() {
-      LEMON_ASSERT(!_skip_nodes, "Multiple usage of skipNodes() member");
-      _skip_nodes = true;
-      return *this;
-    }
-
-    /// \brief Skip writing arc set
-    ///
-    /// The \c \@arcs section will not be written to the stream.
-    DigraphWriter& skipArcs() {
-      LEMON_ASSERT(!_skip_arcs, "Multiple usage of skipArcs() member");
-      _skip_arcs = true;
-      return *this;
-    }
-
-    /// @}
-
-  private:
-
-    void writeNodes() {
-      _writer_bits::MapStorageBase<Node>* label = 0;
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      *_os << "@nodes";
-      if (!_nodes_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _nodes_caption);
-      }
-      *_os << std::endl;
-
-      if (label == 0) {
-        *_os << "label" << '\t';
-      }
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << '\t';
-      }
-      *_os << std::endl;
-
-      std::vector<Node> nodes;
-      for (NodeIt n(_digraph); n != INVALID; ++n) {
-        nodes.push_back(n);
-      }
-
-      if (label == 0) {
-        IdMap<Digraph, Node> id_map(_digraph);
-        _writer_bits::MapLess<IdMap<Digraph, Node> > id_less(id_map);
-        std::sort(nodes.begin(), nodes.end(), id_less);
-      } else {
-        label->sort(nodes);
-      }
-
-      for (int i = 0; i < static_cast<int>(nodes.size()); ++i) {
-        Node n = nodes[i];
-        if (label == 0) {
-          std::ostringstream os;
-          os << _digraph.id(n);
-          _writer_bits::writeToken(*_os, os.str());
-          *_os << '\t';
-          _node_index.insert(std::make_pair(n, os.str()));
-        }
-        for (typename NodeMaps::iterator it = _node_maps.begin();
-             it != _node_maps.end(); ++it) {
-          std::string value = it->second->get(n);
-          _writer_bits::writeToken(*_os, value);
-          if (it->first == "label") {
-            _node_index.insert(std::make_pair(n, value));
-          }
-          *_os << '\t';
-        }
-        *_os << std::endl;
-      }
-    }
-
-    void createNodeIndex() {
-      _writer_bits::MapStorageBase<Node>* label = 0;
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      if (label == 0) {
-        for (NodeIt n(_digraph); n != INVALID; ++n) {
-          std::ostringstream os;
-          os << _digraph.id(n);
-          _node_index.insert(std::make_pair(n, os.str()));
-        }
-      } else {
-        for (NodeIt n(_digraph); n != INVALID; ++n) {
-          std::string value = label->get(n);
-          _node_index.insert(std::make_pair(n, value));
-        }
-      }
-    }
-
-    void writeArcs() {
-      _writer_bits::MapStorageBase<Arc>* label = 0;
-      for (typename ArcMaps::iterator it = _arc_maps.begin();
-           it != _arc_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      *_os << "@arcs";
-      if (!_arcs_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _arcs_caption);
-      }
-      *_os << std::endl;
-
-      *_os << '\t' << '\t';
-      if (label == 0) {
-        *_os << "label" << '\t';
-      }
-      for (typename ArcMaps::iterator it = _arc_maps.begin();
-           it != _arc_maps.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << '\t';
-      }
-      *_os << std::endl;
-
-      std::vector<Arc> arcs;
-      for (ArcIt n(_digraph); n != INVALID; ++n) {
-        arcs.push_back(n);
-      }
-
-      if (label == 0) {
-        IdMap<Digraph, Arc> id_map(_digraph);
-        _writer_bits::MapLess<IdMap<Digraph, Arc> > id_less(id_map);
-        std::sort(arcs.begin(), arcs.end(), id_less);
-      } else {
-        label->sort(arcs);
-      }
-
-      for (int i = 0; i < static_cast<int>(arcs.size()); ++i) {
-        Arc a = arcs[i];
-        _writer_bits::writeToken(*_os, _node_index.
-                                 find(_digraph.source(a))->second);
-        *_os << '\t';
-        _writer_bits::writeToken(*_os, _node_index.
-                                 find(_digraph.target(a))->second);
-        *_os << '\t';
-        if (label == 0) {
-          std::ostringstream os;
-          os << _digraph.id(a);
-          _writer_bits::writeToken(*_os, os.str());
-          *_os << '\t';
-          _arc_index.insert(std::make_pair(a, os.str()));
-        }
-        for (typename ArcMaps::iterator it = _arc_maps.begin();
-             it != _arc_maps.end(); ++it) {
-          std::string value = it->second->get(a);
-          _writer_bits::writeToken(*_os, value);
-          if (it->first == "label") {
-            _arc_index.insert(std::make_pair(a, value));
-          }
-          *_os << '\t';
-        }
-        *_os << std::endl;
-      }
-    }
-
-    void createArcIndex() {
-      _writer_bits::MapStorageBase<Arc>* label = 0;
-      for (typename ArcMaps::iterator it = _arc_maps.begin();
-           it != _arc_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      if (label == 0) {
-        for (ArcIt a(_digraph); a != INVALID; ++a) {
-          std::ostringstream os;
-          os << _digraph.id(a);
-          _arc_index.insert(std::make_pair(a, os.str()));
-        }
-      } else {
-        for (ArcIt a(_digraph); a != INVALID; ++a) {
-          std::string value = label->get(a);
-          _arc_index.insert(std::make_pair(a, value));
-        }
-      }
-    }
-
-    void writeAttributes() {
-      if (_attributes.empty()) return;
-      *_os << "@attributes";
-      if (!_attributes_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _attributes_caption);
-      }
-      *_os << std::endl;
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << ' ';
-        _writer_bits::writeToken(*_os, it->second->get());
-        *_os << std::endl;
-      }
-    }
-
-  public:
-
-    /// \name Execution of the writer
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing.
-    void run() {
-      if (!_skip_nodes) {
-        writeNodes();
-      } else {
-        createNodeIndex();
-      }
-      if (!_skip_arcs) {
-        writeArcs();
-      } else {
-        createArcIndex();
-      }
-      writeAttributes();
-    }
-
-    /// \brief Give back the stream of the writer
-    ///
-    /// Give back the stream of the writer.
-    std::ostream& ostream() {
-      return *_os;
-    }
-
-    /// @}
-  };
-
-  /// \brief Return a \ref DigraphWriter class
-  ///
-  /// This function just returns a \ref DigraphWriter class.
-  /// \relates DigraphWriter
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       std::ostream& os) {
-    DigraphWriter<Digraph> tmp(digraph, os);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphWriter class
-  ///
-  /// This function just returns a \ref DigraphWriter class.
-  /// \relates DigraphWriter
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       const std::string& fn) {
-    DigraphWriter<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref DigraphWriter class
-  ///
-  /// This function just returns a \ref DigraphWriter class.
-  /// \relates DigraphWriter
-  template <typename Digraph>
-  DigraphWriter<Digraph> digraphWriter(const Digraph& digraph,
-                                       const char* fn) {
-    DigraphWriter<Digraph> tmp(digraph, fn);
-    return tmp;
-  }
-
-  template <typename Graph>
-  class GraphWriter;
-
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph,
-                                 std::ostream& os = std::cout);
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn);
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn);
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief \ref lgf-format "LGF" writer for directed graphs
-  ///
-  /// This utility writes an \ref lgf-format "LGF" file.
-  ///
-  /// It can be used almost the same way as \c DigraphWriter.
-  /// The only difference is that this class can handle edges and
-  /// edge maps as well as arcs and arc maps.
-  ///
-  /// The arc maps are written into the file as two columns, the
-  /// caption of the columns are the name of the map prefixed with \c
-  /// '+' and \c '-'. The arcs are written into the \c \@attributes
-  /// section as a \c '+' or a \c '-' prefix (depends on the direction
-  /// of the arc) and the label of corresponding edge.
-  template <typename _Graph>
-  class GraphWriter {
-  public:
-
-    typedef _Graph Graph;
-    TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  private:
-
-
-    std::ostream* _os;
-    bool local_os;
-
-    const Graph& _graph;
-
-    std::string _nodes_caption;
-    std::string _edges_caption;
-    std::string _attributes_caption;
-
-    typedef std::map<Node, std::string> NodeIndex;
-    NodeIndex _node_index;
-    typedef std::map<Edge, std::string> EdgeIndex;
-    EdgeIndex _edge_index;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::MapStorageBase<Node>* > > NodeMaps;
-    NodeMaps _node_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::MapStorageBase<Edge>* > >EdgeMaps;
-    EdgeMaps _edge_maps;
-
-    typedef std::vector<std::pair<std::string,
-      _writer_bits::ValueStorageBase*> > Attributes;
-    Attributes _attributes;
-
-    bool _skip_nodes;
-    bool _skip_edges;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output stream.
-    GraphWriter(const Graph& graph, std::ostream& os = std::cout)
-      : _os(&os), local_os(false), _graph(graph),
-        _skip_nodes(false), _skip_edges(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output file.
-    GraphWriter(const Graph& graph, const std::string& fn)
-      : _os(new std::ofstream(fn.c_str())), local_os(true), _graph(graph),
-        _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct a directed graph writer, which writes to the given
-    /// output file.
-    GraphWriter(const Graph& graph, const char* fn)
-      : _os(new std::ofstream(fn)), local_os(true), _graph(graph),
-        _skip_nodes(false), _skip_edges(false) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~GraphWriter() {
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename EdgeMaps::iterator it = _edge_maps.begin();
-           it != _edge_maps.end(); ++it) {
-        delete it->second;
-      }
-
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_os) {
-        delete _os;
-      }
-    }
-
-  private:
-
-    template <typename GR>
-    friend GraphWriter<GR> graphWriter(const GR& graph,
-                                       std::ostream& os);
-    template <typename GR>
-    friend GraphWriter<GR> graphWriter(const GR& graph,
-                                       const std::string& fn);
-    template <typename GR>
-    friend GraphWriter<GR> graphWriter(const GR& graph,
-                                       const char *fn);
-
-    GraphWriter(GraphWriter& other)
-      : _os(other._os), local_os(other.local_os), _graph(other._graph),
-        _skip_nodes(other._skip_nodes), _skip_edges(other._skip_edges) {
-
-      other._os = 0;
-      other.local_os = false;
-
-      _node_index.swap(other._node_index);
-      _edge_index.swap(other._edge_index);
-
-      _node_maps.swap(other._node_maps);
-      _edge_maps.swap(other._edge_maps);
-      _attributes.swap(other._attributes);
-
-      _nodes_caption = other._nodes_caption;
-      _edges_caption = other._edges_caption;
-      _attributes_caption = other._attributes_caption;
-    }
-
-    GraphWriter& operator=(const GraphWriter&);
-
-  public:
-
-    /// \name Writing rules
-    /// @{
-
-    /// \brief Node map writing rule
-    ///
-    /// Add a node map writing rule to the writer.
-    template <typename Map>
-    GraphWriter& nodeMap(const std::string& caption, const Map& map) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Node>* storage =
-        new _writer_bits::MapStorage<Node, Map>(map);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node map writing rule
-    ///
-    /// Add a node map writing rule with specialized converter to the
-    /// writer.
-    template <typename Map, typename Converter>
-    GraphWriter& nodeMap(const std::string& caption, const Map& map,
-                           const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Node>* storage =
-        new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
-      _node_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge map writing rule
-    ///
-    /// Add an edge map writing rule to the writer.
-    template <typename Map>
-    GraphWriter& edgeMap(const std::string& caption, const Map& map) {
-      checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Edge>* storage =
-        new _writer_bits::MapStorage<Edge, Map>(map);
-      _edge_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge map writing rule
-    ///
-    /// Add an edge map writing rule with specialized converter to the
-    /// writer.
-    template <typename Map, typename Converter>
-    GraphWriter& edgeMap(const std::string& caption, const Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Edge>* storage =
-        new _writer_bits::MapStorage<Edge, Map, Converter>(map, converter);
-      _edge_maps.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc map writing rule
-    ///
-    /// Add an arc map writing rule to the writer.
-    template <typename Map>
-    GraphWriter& arcMap(const std::string& caption, const Map& map) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Edge>* forward_storage =
-        new _writer_bits::GraphArcMapStorage<Graph, true, Map>(_graph, map);
-      _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
-      _writer_bits::MapStorageBase<Edge>* backward_storage =
-        new _writer_bits::GraphArcMapStorage<Graph, false, Map>(_graph, map);
-      _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
-      return *this;
-    }
-
-    /// \brief Arc map writing rule
-    ///
-    /// Add an arc map writing rule with specialized converter to the
-    /// writer.
-    template <typename Map, typename Converter>
-    GraphWriter& arcMap(const std::string& caption, const Map& map,
-                          const Converter& converter = Converter()) {
-      checkConcept<concepts::ReadMap<Arc, typename Map::Value>, Map>();
-      _writer_bits::MapStorageBase<Edge>* forward_storage =
-        new _writer_bits::GraphArcMapStorage<Graph, true, Map, Converter>
-        (_graph, map, converter);
-      _edge_maps.push_back(std::make_pair('+' + caption, forward_storage));
-      _writer_bits::MapStorageBase<Edge>* backward_storage =
-        new _writer_bits::GraphArcMapStorage<Graph, false, Map, Converter>
-        (_graph, map, converter);
-      _edge_maps.push_back(std::make_pair('-' + caption, backward_storage));
-      return *this;
-    }
-
-    /// \brief Attribute writing rule
-    ///
-    /// Add an attribute writing rule to the writer.
-    template <typename Value>
-    GraphWriter& attribute(const std::string& caption, const Value& value) {
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Value>(value);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Attribute writing rule
-    ///
-    /// Add an attribute writing rule with specialized converter to the
-    /// writer.
-    template <typename Value, typename Converter>
-    GraphWriter& attribute(const std::string& caption, const Value& value,
-                             const Converter& converter = Converter()) {
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Value, Converter>(value, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Node writing rule
-    ///
-    /// Add a node writing rule to the writer.
-    GraphWriter& node(const std::string& caption, const Node& node) {
-      typedef _writer_bits::MapLookUpConverter<Node> Converter;
-      Converter converter(_node_index);
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Node, Converter>(node, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Edge writing rule
-    ///
-    /// Add an edge writing rule to writer.
-    GraphWriter& edge(const std::string& caption, const Edge& edge) {
-      typedef _writer_bits::MapLookUpConverter<Edge> Converter;
-      Converter converter(_edge_index);
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Edge, Converter>(edge, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \brief Arc writing rule
-    ///
-    /// Add an arc writing rule to writer.
-    GraphWriter& arc(const std::string& caption, const Arc& arc) {
-      typedef _writer_bits::GraphArcLookUpConverter<Graph> Converter;
-      Converter converter(_graph, _edge_index);
-      _writer_bits::ValueStorageBase* storage =
-        new _writer_bits::ValueStorage<Arc, Converter>(arc, converter);
-      _attributes.push_back(std::make_pair(caption, storage));
-      return *this;
-    }
-
-    /// \name Section captions
-    /// @{
-
-    /// \brief Add an additional caption to the \c \@nodes section
-    ///
-    /// Add an additional caption to the \c \@nodes section.
-    GraphWriter& nodes(const std::string& caption) {
-      _nodes_caption = caption;
-      return *this;
-    }
-
-    /// \brief Add an additional caption to the \c \@arcs section
-    ///
-    /// Add an additional caption to the \c \@arcs section.
-    GraphWriter& edges(const std::string& caption) {
-      _edges_caption = caption;
-      return *this;
-    }
-
-    /// \brief Add an additional caption to the \c \@attributes section
-    ///
-    /// Add an additional caption to the \c \@attributes section.
-    GraphWriter& attributes(const std::string& caption) {
-      _attributes_caption = caption;
-      return *this;
-    }
-
-    /// \name Skipping section
-    /// @{
-
-    /// \brief Skip writing the node set
-    ///
-    /// The \c \@nodes section will not be written to the stream.
-    GraphWriter& skipNodes() {
-      LEMON_ASSERT(!_skip_nodes, "Multiple usage of skipNodes() member");
-      _skip_nodes = true;
-      return *this;
-    }
-
-    /// \brief Skip writing edge set
-    ///
-    /// The \c \@edges section will not be written to the stream.
-    GraphWriter& skipEdges() {
-      LEMON_ASSERT(!_skip_edges, "Multiple usage of skipEdges() member");
-      _skip_edges = true;
-      return *this;
-    }
-
-    /// @}
-
-  private:
-
-    void writeNodes() {
-      _writer_bits::MapStorageBase<Node>* label = 0;
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      *_os << "@nodes";
-      if (!_nodes_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _nodes_caption);
-      }
-      *_os << std::endl;
-
-      if (label == 0) {
-        *_os << "label" << '\t';
-      }
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << '\t';
-      }
-      *_os << std::endl;
-
-      std::vector<Node> nodes;
-      for (NodeIt n(_graph); n != INVALID; ++n) {
-        nodes.push_back(n);
-      }
-
-      if (label == 0) {
-        IdMap<Graph, Node> id_map(_graph);
-        _writer_bits::MapLess<IdMap<Graph, Node> > id_less(id_map);
-        std::sort(nodes.begin(), nodes.end(), id_less);
-      } else {
-        label->sort(nodes);
-      }
-
-      for (int i = 0; i < static_cast<int>(nodes.size()); ++i) {
-        Node n = nodes[i];
-        if (label == 0) {
-          std::ostringstream os;
-          os << _graph.id(n);
-          _writer_bits::writeToken(*_os, os.str());
-          *_os << '\t';
-          _node_index.insert(std::make_pair(n, os.str()));
-        }
-        for (typename NodeMaps::iterator it = _node_maps.begin();
-             it != _node_maps.end(); ++it) {
-          std::string value = it->second->get(n);
-          _writer_bits::writeToken(*_os, value);
-          if (it->first == "label") {
-            _node_index.insert(std::make_pair(n, value));
-          }
-          *_os << '\t';
-        }
-        *_os << std::endl;
-      }
-    }
-
-    void createNodeIndex() {
-      _writer_bits::MapStorageBase<Node>* label = 0;
-      for (typename NodeMaps::iterator it = _node_maps.begin();
-           it != _node_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      if (label == 0) {
-        for (NodeIt n(_graph); n != INVALID; ++n) {
-          std::ostringstream os;
-          os << _graph.id(n);
-          _node_index.insert(std::make_pair(n, os.str()));
-        }
-      } else {
-        for (NodeIt n(_graph); n != INVALID; ++n) {
-          std::string value = label->get(n);
-          _node_index.insert(std::make_pair(n, value));
-        }
-      }
-    }
-
-    void writeEdges() {
-      _writer_bits::MapStorageBase<Edge>* label = 0;
-      for (typename EdgeMaps::iterator it = _edge_maps.begin();
-           it != _edge_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      *_os << "@edges";
-      if (!_edges_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _edges_caption);
-      }
-      *_os << std::endl;
-
-      *_os << '\t' << '\t';
-      if (label == 0) {
-        *_os << "label" << '\t';
-      }
-      for (typename EdgeMaps::iterator it = _edge_maps.begin();
-           it != _edge_maps.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << '\t';
-      }
-      *_os << std::endl;
-
-      std::vector<Edge> edges;
-      for (EdgeIt n(_graph); n != INVALID; ++n) {
-        edges.push_back(n);
-      }
-
-      if (label == 0) {
-        IdMap<Graph, Edge> id_map(_graph);
-        _writer_bits::MapLess<IdMap<Graph, Edge> > id_less(id_map);
-        std::sort(edges.begin(), edges.end(), id_less);
-      } else {
-        label->sort(edges);
-      }
-
-      for (int i = 0; i < static_cast<int>(edges.size()); ++i) {
-        Edge e = edges[i];
-        _writer_bits::writeToken(*_os, _node_index.
-                                 find(_graph.u(e))->second);
-        *_os << '\t';
-        _writer_bits::writeToken(*_os, _node_index.
-                                 find(_graph.v(e))->second);
-        *_os << '\t';
-        if (label == 0) {
-          std::ostringstream os;
-          os << _graph.id(e);
-          _writer_bits::writeToken(*_os, os.str());
-          *_os << '\t';
-          _edge_index.insert(std::make_pair(e, os.str()));
-        }
-        for (typename EdgeMaps::iterator it = _edge_maps.begin();
-             it != _edge_maps.end(); ++it) {
-          std::string value = it->second->get(e);
-          _writer_bits::writeToken(*_os, value);
-          if (it->first == "label") {
-            _edge_index.insert(std::make_pair(e, value));
-          }
-          *_os << '\t';
-        }
-        *_os << std::endl;
-      }
-    }
-
-    void createEdgeIndex() {
-      _writer_bits::MapStorageBase<Edge>* label = 0;
-      for (typename EdgeMaps::iterator it = _edge_maps.begin();
-           it != _edge_maps.end(); ++it) {
-        if (it->first == "label") {
-          label = it->second;
-          break;
-        }
-      }
-
-      if (label == 0) {
-        for (EdgeIt e(_graph); e != INVALID; ++e) {
-          std::ostringstream os;
-          os << _graph.id(e);
-          _edge_index.insert(std::make_pair(e, os.str()));
-        }
-      } else {
-        for (EdgeIt e(_graph); e != INVALID; ++e) {
-          std::string value = label->get(e);
-          _edge_index.insert(std::make_pair(e, value));
-        }
-      }
-    }
-
-    void writeAttributes() {
-      if (_attributes.empty()) return;
-      *_os << "@attributes";
-      if (!_attributes_caption.empty()) {
-        _writer_bits::writeToken(*_os << ' ', _attributes_caption);
-      }
-      *_os << std::endl;
-      for (typename Attributes::iterator it = _attributes.begin();
-           it != _attributes.end(); ++it) {
-        _writer_bits::writeToken(*_os, it->first) << ' ';
-        _writer_bits::writeToken(*_os, it->second->get());
-        *_os << std::endl;
-      }
-    }
-
-  public:
-
-    /// \name Execution of the writer
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing.
-    void run() {
-      if (!_skip_nodes) {
-        writeNodes();
-      } else {
-        createNodeIndex();
-      }
-      if (!_skip_edges) {
-        writeEdges();
-      } else {
-        createEdgeIndex();
-      }
-      writeAttributes();
-    }
-
-    /// \brief Give back the stream of the writer
-    ///
-    /// Give back the stream of the writer
-    std::ostream& ostream() {
-      return *_os;
-    }
-
-    /// @}
-  };
-
-  /// \brief Return a \ref GraphWriter class
-  ///
-  /// This function just returns a \ref GraphWriter class.
-  /// \relates GraphWriter
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph,
-                                 std::ostream& os) {
-    GraphWriter<Graph> tmp(graph, os);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphWriter class
-  ///
-  /// This function just returns a \ref GraphWriter class.
-  /// \relates GraphWriter
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph, const std::string& fn) {
-    GraphWriter<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref GraphWriter class
-  ///
-  /// This function just returns a \ref GraphWriter class.
-  /// \relates GraphWriter
-  template <typename Graph>
-  GraphWriter<Graph> graphWriter(const Graph& graph, const char* fn) {
-    GraphWriter<Graph> tmp(graph, fn);
-    return tmp;
-  }
-
-  class SectionWriter;
-
-  SectionWriter sectionWriter(std::istream& is);
-  SectionWriter sectionWriter(const std::string& fn);
-  SectionWriter sectionWriter(const char* fn);
-
-  /// \ingroup lemon_io
-  ///
-  /// \brief Section writer class
-  ///
-  /// In the \ref lgf-format "LGF" file extra sections can be placed,
-  /// which contain any data in arbitrary format. Such sections can be
-  /// written with this class. A writing rule can be added to the
-  /// class with two different functions. With the \c sectionLines()
-  /// function a generator can write the section line-by-line, while
-  /// with the \c sectionStream() member the section can be written to
-  /// an output stream.
-  class SectionWriter {
-  private:
-
-    std::ostream* _os;
-    bool local_os;
-
-    typedef std::vector<std::pair<std::string, _writer_bits::Section*> >
-    Sections;
-
-    Sections _sections;
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Construct a section writer, which writes to the given output
-    /// stream.
-    SectionWriter(std::ostream& os)
-      : _os(&os), local_os(false) {}
-
-    /// \brief Constructor
-    ///
-    /// Construct a section writer, which writes into the given file.
-    SectionWriter(const std::string& fn)
-      : _os(new std::ofstream(fn.c_str())), local_os(true) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Constructor
-    ///
-    /// Construct a section writer, which writes into the given file.
-    SectionWriter(const char* fn)
-      : _os(new std::ofstream(fn)), local_os(true) {
-      if (!(*_os)) {
-        delete _os;
-        throw IoError("Cannot write file", fn);
-      }
-    }
-
-    /// \brief Destructor
-    ~SectionWriter() {
-      for (Sections::iterator it = _sections.begin();
-           it != _sections.end(); ++it) {
-        delete it->second;
-      }
-
-      if (local_os) {
-        delete _os;
-      }
-
-    }
-
-  private:
-
-    friend SectionWriter sectionWriter(std::ostream& os);
-    friend SectionWriter sectionWriter(const std::string& fn);
-    friend SectionWriter sectionWriter(const char* fn);
-
-    SectionWriter(SectionWriter& other)
-      : _os(other._os), local_os(other.local_os) {
-
-      other._os = 0;
-      other.local_os = false;
-
-      _sections.swap(other._sections);
-    }
-
-    SectionWriter& operator=(const SectionWriter&);
-
-  public:
-
-    /// \name Section writers
-    /// @{
-
-    /// \brief Add a section writer with line oriented writing
-    ///
-    /// The first parameter is the type descriptor of the section, the
-    /// second is a generator with std::string values. At the writing
-    /// process, the returned \c std::string will be written into the
-    /// output file until it is an empty string.
-    ///
-    /// For example, an integer vector is written into a section.
-    ///\code
-    ///  @numbers
-    ///  12 45 23 78
-    ///  4 28 38 28
-    ///  23 6 16
-    ///\endcode
-    ///
-    /// The generator is implemented as a struct.
-    ///\code
-    ///  struct NumberSection {
-    ///    std::vector<int>::const_iterator _it, _end;
-    ///    NumberSection(const std::vector<int>& data)
-    ///      : _it(data.begin()), _end(data.end()) {}
-    ///    std::string operator()() {
-    ///      int rem_in_line = 4;
-    ///      std::ostringstream ls;
-    ///      while (rem_in_line > 0 && _it != _end) {
-    ///        ls << *(_it++) << ' ';
-    ///        --rem_in_line;
-    ///      }
-    ///      return ls.str();
-    ///    }
-    ///  };
-    ///
-    ///  // ...
-    ///
-    ///  writer.sectionLines("numbers", NumberSection(vec));
-    ///\endcode
-    template <typename Functor>
-    SectionWriter& sectionLines(const std::string& type, Functor functor) {
-      LEMON_ASSERT(!type.empty(), "Type is empty.");
-      _sections.push_back(std::make_pair(type,
-        new _writer_bits::LineSection<Functor>(functor)));
-      return *this;
-    }
-
-
-    /// \brief Add a section writer with stream oriented writing
-    ///
-    /// The first parameter is the type of the section, the second is
-    /// a functor, which takes a \c std::ostream& parameter. The
-    /// functor writes the section to the output stream.
-    /// \warning The last line must be closed with end-line character.
-    template <typename Functor>
-    SectionWriter& sectionStream(const std::string& type, Functor functor) {
-      LEMON_ASSERT(!type.empty(), "Type is empty.");
-      _sections.push_back(std::make_pair(type,
-         new _writer_bits::StreamSection<Functor>(functor)));
-      return *this;
-    }
-
-    /// @}
-
-  public:
-
-
-    /// \name Execution of the writer
-    /// @{
-
-    /// \brief Start the batch processing
-    ///
-    /// This function starts the batch processing.
-    void run() {
-
-      LEMON_ASSERT(_os != 0, "This writer is assigned to an other writer");
-
-      for (Sections::iterator it = _sections.begin();
-           it != _sections.end(); ++it) {
-        (*_os) << '@' << it->first << std::endl;
-        it->second->process(*_os);
-      }
-    }
-
-    /// \brief Give back the stream of the writer
-    ///
-    /// Returns the stream of the writer
-    std::ostream& ostream() {
-      return *_os;
-    }
-
-    /// @}
-
-  };
-
-  /// \brief Return a \ref SectionWriter class
-  ///
-  /// This function just returns a \ref SectionWriter class.
-  /// \relates SectionWriter
-  inline SectionWriter sectionWriter(std::ostream& os) {
-    SectionWriter tmp(os);
-    return tmp;
-  }
-
-  /// \brief Return a \ref SectionWriter class
-  ///
-  /// This function just returns a \ref SectionWriter class.
-  /// \relates SectionWriter
-  inline SectionWriter sectionWriter(const std::string& fn) {
-    SectionWriter tmp(fn);
-    return tmp;
-  }
-
-  /// \brief Return a \ref SectionWriter class
-  ///
-  /// This function just returns a \ref SectionWriter class.
-  /// \relates SectionWriter
-  inline SectionWriter sectionWriter(const char* fn) {
-    SectionWriter tmp(fn);
-    return tmp;
-  }
-}
-
-#endif
Index: mon/list_graph.h
===================================================================
--- lemon/list_graph.h	(revision 427)
+++ 	(revision )
@@ -1,1556 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_LIST_GRAPH_H
-#define LEMON_LIST_GRAPH_H
-
-///\ingroup graphs
-///\file
-///\brief ListDigraph, ListGraph classes.
-
-#include <lemon/core.h>
-#include <lemon/error.h>
-#include <lemon/bits/graph_extender.h>
-
-#include <vector>
-#include <list>
-
-namespace lemon {
-
-  class ListDigraphBase {
-
-  protected:
-    struct NodeT {
-      int first_in, first_out;
-      int prev, next;
-    };
-
-    struct ArcT {
-      int target, source;
-      int prev_in, prev_out;
-      int next_in, next_out;
-    };
-
-    std::vector<NodeT> nodes;
-
-    int first_node;
-
-    int first_free_node;
-
-    std::vector<ArcT> arcs;
-
-    int first_free_arc;
-
-  public:
-
-    typedef ListDigraphBase Digraph;
-
-    class Node {
-      friend class ListDigraphBase;
-    protected:
-
-      int id;
-      explicit Node(int pid) { id = pid;}
-
-    public:
-      Node() {}
-      Node (Invalid) { id = -1; }
-      bool operator==(const Node& node) const {return id == node.id;}
-      bool operator!=(const Node& node) const {return id != node.id;}
-      bool operator<(const Node& node) const {return id < node.id;}
-    };
-
-    class Arc {
-      friend class ListDigraphBase;
-    protected:
-
-      int id;
-      explicit Arc(int pid) { id = pid;}
-
-    public:
-      Arc() {}
-      Arc (Invalid) { id = -1; }
-      bool operator==(const Arc& arc) const {return id == arc.id;}
-      bool operator!=(const Arc& arc) const {return id != arc.id;}
-      bool operator<(const Arc& arc) const {return id < arc.id;}
-    };
-
-
-
-    ListDigraphBase()
-      : nodes(), first_node(-1),
-        first_free_node(-1), arcs(), first_free_arc(-1) {}
-
-
-    int maxNodeId() const { return nodes.size()-1; }
-    int maxArcId() const { return arcs.size()-1; }
-
-    Node source(Arc e) const { return Node(arcs[e.id].source); }
-    Node target(Arc e) const { return Node(arcs[e.id].target); }
-
-
-    void first(Node& node) const {
-      node.id = first_node;
-    }
-
-    void next(Node& node) const {
-      node.id = nodes[node.id].next;
-    }
-
-
-    void first(Arc& arc) const {
-      int n;
-      for(n = first_node;
-          n!=-1 && nodes[n].first_in == -1;
-          n = nodes[n].next) {}
-      arc.id = (n == -1) ? -1 : nodes[n].first_in;
-    }
-
-    void next(Arc& arc) const {
-      if (arcs[arc.id].next_in != -1) {
-        arc.id = arcs[arc.id].next_in;
-      } else {
-        int n;
-        for(n = nodes[arcs[arc.id].target].next;
-            n!=-1 && nodes[n].first_in == -1;
-            n = nodes[n].next) {}
-        arc.id = (n == -1) ? -1 : nodes[n].first_in;
-      }
-    }
-
-    void firstOut(Arc &e, const Node& v) const {
-      e.id = nodes[v.id].first_out;
-    }
-    void nextOut(Arc &e) const {
-      e.id=arcs[e.id].next_out;
-    }
-
-    void firstIn(Arc &e, const Node& v) const {
-      e.id = nodes[v.id].first_in;
-    }
-    void nextIn(Arc &e) const {
-      e.id=arcs[e.id].next_in;
-    }
-
-
-    static int id(Node v) { return v.id; }
-    static int id(Arc e) { return e.id; }
-
-    static Node nodeFromId(int id) { return Node(id);}
-    static Arc arcFromId(int id) { return Arc(id);}
-
-    bool valid(Node n) const {
-      return n.id >= 0 && n.id < static_cast<int>(nodes.size()) &&
-        nodes[n.id].prev != -2;
-    }
-
-    bool valid(Arc a) const {
-      return a.id >= 0 && a.id < static_cast<int>(arcs.size()) &&
-        arcs[a.id].prev_in != -2;
-    }
-
-    Node addNode() {
-      int n;
-
-      if(first_free_node==-1) {
-        n = nodes.size();
-        nodes.push_back(NodeT());
-      } else {
-        n = first_free_node;
-        first_free_node = nodes[n].next;
-      }
-
-      nodes[n].next = first_node;
-      if(first_node != -1) nodes[first_node].prev = n;
-      first_node = n;
-      nodes[n].prev = -1;
-
-      nodes[n].first_in = nodes[n].first_out = -1;
-
-      return Node(n);
-    }
-
-    Arc addArc(Node u, Node v) {
-      int n;
-
-      if (first_free_arc == -1) {
-        n = arcs.size();
-        arcs.push_back(ArcT());
-      } else {
-        n = first_free_arc;
-        first_free_arc = arcs[n].next_in;
-      }
-
-      arcs[n].source = u.id;
-      arcs[n].target = v.id;
-
-      arcs[n].next_out = nodes[u.id].first_out;
-      if(nodes[u.id].first_out != -1) {
-        arcs[nodes[u.id].first_out].prev_out = n;
-      }
-
-      arcs[n].next_in = nodes[v.id].first_in;
-      if(nodes[v.id].first_in != -1) {
-        arcs[nodes[v.id].first_in].prev_in = n;
-      }
-
-      arcs[n].prev_in = arcs[n].prev_out = -1;
-
-      nodes[u.id].first_out = nodes[v.id].first_in = n;
-
-      return Arc(n);
-    }
-
-    void erase(const Node& node) {
-      int n = node.id;
-
-      if(nodes[n].next != -1) {
-        nodes[nodes[n].next].prev = nodes[n].prev;
-      }
-
-      if(nodes[n].prev != -1) {
-        nodes[nodes[n].prev].next = nodes[n].next;
-      } else {
-        first_node = nodes[n].next;
-      }
-
-      nodes[n].next = first_free_node;
-      first_free_node = n;
-      nodes[n].prev = -2;
-
-    }
-
-    void erase(const Arc& arc) {
-      int n = arc.id;
-
-      if(arcs[n].next_in!=-1) {
-        arcs[arcs[n].next_in].prev_in = arcs[n].prev_in;
-      }
-
-      if(arcs[n].prev_in!=-1) {
-        arcs[arcs[n].prev_in].next_in = arcs[n].next_in;
-      } else {
-        nodes[arcs[n].target].first_in = arcs[n].next_in;
-      }
-
-
-      if(arcs[n].next_out!=-1) {
-        arcs[arcs[n].next_out].prev_out = arcs[n].prev_out;
-      }
-
-      if(arcs[n].prev_out!=-1) {
-        arcs[arcs[n].prev_out].next_out = arcs[n].next_out;
-      } else {
-        nodes[arcs[n].source].first_out = arcs[n].next_out;
-      }
-
-      arcs[n].next_in = first_free_arc;
-      first_free_arc = n;
-      arcs[n].prev_in = -2;
-    }
-
-    void clear() {
-      arcs.clear();
-      nodes.clear();
-      first_node = first_free_node = first_free_arc = -1;
-    }
-
-  protected:
-    void changeTarget(Arc e, Node n)
-    {
-      if(arcs[e.id].next_in != -1)
-        arcs[arcs[e.id].next_in].prev_in = arcs[e.id].prev_in;
-      if(arcs[e.id].prev_in != -1)
-        arcs[arcs[e.id].prev_in].next_in = arcs[e.id].next_in;
-      else nodes[arcs[e.id].target].first_in = arcs[e.id].next_in;
-      if (nodes[n.id].first_in != -1) {
-        arcs[nodes[n.id].first_in].prev_in = e.id;
-      }
-      arcs[e.id].target = n.id;
-      arcs[e.id].prev_in = -1;
-      arcs[e.id].next_in = nodes[n.id].first_in;
-      nodes[n.id].first_in = e.id;
-    }
-    void changeSource(Arc e, Node n)
-    {
-      if(arcs[e.id].next_out != -1)
-        arcs[arcs[e.id].next_out].prev_out = arcs[e.id].prev_out;
-      if(arcs[e.id].prev_out != -1)
-        arcs[arcs[e.id].prev_out].next_out = arcs[e.id].next_out;
-      else nodes[arcs[e.id].source].first_out = arcs[e.id].next_out;
-      if (nodes[n.id].first_out != -1) {
-        arcs[nodes[n.id].first_out].prev_out = e.id;
-      }
-      arcs[e.id].source = n.id;
-      arcs[e.id].prev_out = -1;
-      arcs[e.id].next_out = nodes[n.id].first_out;
-      nodes[n.id].first_out = e.id;
-    }
-
-  };
-
-  typedef DigraphExtender<ListDigraphBase> ExtendedListDigraphBase;
-
-  /// \addtogroup graphs
-  /// @{
-
-  ///A general directed graph structure.
-
-  ///\ref ListDigraph is a simple and fast <em>directed graph</em>
-  ///implementation based on static linked lists that are stored in
-  ///\c std::vector structures.
-  ///
-  ///It conforms to the \ref concepts::Digraph "Digraph concept" and it
-  ///also provides several useful additional functionalities.
-  ///Most of the member functions and nested classes are documented
-  ///only in the concept class.
-  ///
-  ///An important extra feature of this digraph implementation is that
-  ///its maps are real \ref concepts::ReferenceMap "reference map"s.
-  ///
-  ///\sa concepts::Digraph
-
-  class ListDigraph : public ExtendedListDigraphBase {
-  private:
-    ///ListDigraph is \e not copy constructible. Use copyDigraph() instead.
-
-    ///ListDigraph is \e not copy constructible. Use copyDigraph() instead.
-    ///
-    ListDigraph(const ListDigraph &) :ExtendedListDigraphBase() {};
-    ///\brief Assignment of ListDigraph to another one is \e not allowed.
-    ///Use copyDigraph() instead.
-
-    ///Assignment of ListDigraph to another one is \e not allowed.
-    ///Use copyDigraph() instead.
-    void operator=(const ListDigraph &) {}
-  public:
-
-    typedef ExtendedListDigraphBase Parent;
-
-    /// Constructor
-
-    /// Constructor.
-    ///
-    ListDigraph() {}
-
-    ///Add a new node to the digraph.
-
-    ///Add a new node to the digraph.
-    ///\return the new node.
-    Node addNode() { return Parent::addNode(); }
-
-    ///Add a new arc to the digraph.
-
-    ///Add a new arc to the digraph with source node \c s
-    ///and target node \c t.
-    ///\return the new arc.
-    Arc addArc(const Node& s, const Node& t) {
-      return Parent::addArc(s, t);
-    }
-
-    ///\brief Erase a node from the digraph.
-    ///
-    ///Erase a node from the digraph.
-    ///
-    void erase(const Node& n) { Parent::erase(n); }
-
-    ///\brief Erase an arc from the digraph.
-    ///
-    ///Erase an arc from the digraph.
-    ///
-    void erase(const Arc& a) { Parent::erase(a); }
-
-    /// Node validity check
-
-    /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.
-    ///
-    /// \warning A Node pointing to a removed item
-    /// could become valid again later if new nodes are
-    /// added to the graph.
-    bool valid(Node n) const { return Parent::valid(n); }
-
-    /// Arc validity check
-
-    /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.
-    ///
-    /// \warning An Arc pointing to a removed item
-    /// could become valid again later if new nodes are
-    /// added to the graph.
-    bool valid(Arc a) const { return Parent::valid(a); }
-
-    /// Change the target of \c a to \c n
-
-    /// Change the target of \c a to \c n
-    ///
-    ///\note The <tt>ArcIt</tt>s and <tt>OutArcIt</tt>s referencing
-    ///the changed arc remain valid. However <tt>InArcIt</tt>s are
-    ///invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the Snapshot
-    ///feature.
-    void changeTarget(Arc a, Node n) {
-      Parent::changeTarget(a,n);
-    }
-    /// Change the source of \c a to \c n
-
-    /// Change the source of \c a to \c n
-    ///
-    ///\note The <tt>InArcIt</tt>s referencing the changed arc remain
-    ///valid. However the <tt>ArcIt</tt>s and <tt>OutArcIt</tt>s are
-    ///invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the Snapshot
-    ///feature.
-    void changeSource(Arc a, Node n) {
-      Parent::changeSource(a,n);
-    }
-
-    /// Invert the direction of an arc.
-
-    ///\note The <tt>ArcIt</tt>s referencing the changed arc remain
-    ///valid. However <tt>OutArcIt</tt>s and <tt>InArcIt</tt>s are
-    ///invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the Snapshot
-    ///feature.
-    void reverseArc(Arc e) {
-      Node t=target(e);
-      changeTarget(e,source(e));
-      changeSource(e,t);
-    }
-
-    /// Reserve memory for nodes.
-
-    /// Using this function it is possible to avoid the superfluous memory
-    /// allocation: if you know that the digraph you want to build will
-    /// be very large (e.g. it will contain millions of nodes and/or arcs)
-    /// then it is worth reserving space for this amount before starting
-    /// to build the digraph.
-    /// \sa reserveArc
-    void reserveNode(int n) { nodes.reserve(n); };
-
-    /// Reserve memory for arcs.
-
-    /// Using this function it is possible to avoid the superfluous memory
-    /// allocation: if you know that the digraph you want to build will
-    /// be very large (e.g. it will contain millions of nodes and/or arcs)
-    /// then it is worth reserving space for this amount before starting
-    /// to build the digraph.
-    /// \sa reserveNode
-    void reserveArc(int m) { arcs.reserve(m); };
-
-    ///Contract two nodes.
-
-    ///This function contracts two nodes.
-    ///Node \p b will be removed but instead of deleting
-    ///incident arcs, they will be joined to \p a.
-    ///The last parameter \p r controls whether to remove loops. \c true
-    ///means that loops will be removed.
-    ///
-    ///\note The <tt>ArcIt</tt>s referencing a moved arc remain
-    ///valid. However <tt>InArcIt</tt>s and <tt>OutArcIt</tt>s
-    ///may be invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the Snapshot
-    ///feature.
-    void contract(Node a, Node b, bool r = true)
-    {
-      for(OutArcIt e(*this,b);e!=INVALID;) {
-        OutArcIt f=e;
-        ++f;
-        if(r && target(e)==a) erase(e);
-        else changeSource(e,a);
-        e=f;
-      }
-      for(InArcIt e(*this,b);e!=INVALID;) {
-        InArcIt f=e;
-        ++f;
-        if(r && source(e)==a) erase(e);
-        else changeTarget(e,a);
-        e=f;
-      }
-      erase(b);
-    }
-
-    ///Split a node.
-
-    ///This function splits a node. First a new node is added to the digraph,
-    ///then the source of each outgoing arc of \c n is moved to this new node.
-    ///If \c connect is \c true (this is the default value), then a new arc
-    ///from \c n to the newly created node is also added.
-    ///\return The newly created node.
-    ///
-    ///\note The <tt>ArcIt</tt>s referencing a moved arc remain
-    ///valid. However <tt>InArcIt</tt>s and <tt>OutArcIt</tt>s may
-    ///be invalidated.
-    ///
-    ///\warning This functionality cannot be used in conjunction with the
-    ///Snapshot feature.
-    Node split(Node n, bool connect = true) {
-      Node b = addNode();
-      for(OutArcIt e(*this,n);e!=INVALID;) {
-        OutArcIt f=e;
-        ++f;
-        changeSource(e,b);
-        e=f;
-      }
-      if (connect) addArc(n,b);
-      return b;
-    }
-
-    ///Split an arc.
-
-    ///This function splits an arc. First a new node \c b is added to
-    ///the digraph, then the original arc is re-targeted to \c
-    ///b. Finally an arc from \c b to the original target is added.
-    ///
-    ///\return The newly created node.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    Node split(Arc e) {
-      Node b = addNode();
-      addArc(b,target(e));
-      changeTarget(e,b);
-      return b;
-    }
-
-    /// \brief Class to make a snapshot of the digraph and restore
-    /// it later.
-    ///
-    /// Class to make a snapshot of the digraph and restore it later.
-    ///
-    /// The newly added nodes and arcs can be removed using the
-    /// restore() function.
-    ///
-    /// \warning Arc and node deletions and other modifications (e.g.
-    /// contracting, splitting, reversing arcs or nodes) cannot be
-    /// restored. These events invalidate the snapshot.
-    class Snapshot {
-    protected:
-
-      typedef Parent::NodeNotifier NodeNotifier;
-
-      class NodeObserverProxy : public NodeNotifier::ObserverBase {
-      public:
-
-        NodeObserverProxy(Snapshot& _snapshot)
-          : snapshot(_snapshot) {}
-
-        using NodeNotifier::ObserverBase::attach;
-        using NodeNotifier::ObserverBase::detach;
-        using NodeNotifier::ObserverBase::attached;
-
-      protected:
-
-        virtual void add(const Node& node) {
-          snapshot.addNode(node);
-        }
-        virtual void add(const std::vector<Node>& nodes) {
-          for (int i = nodes.size() - 1; i >= 0; ++i) {
-            snapshot.addNode(nodes[i]);
-          }
-        }
-        virtual void erase(const Node& node) {
-          snapshot.eraseNode(node);
-        }
-        virtual void erase(const std::vector<Node>& nodes) {
-          for (int i = 0; i < int(nodes.size()); ++i) {
-            snapshot.eraseNode(nodes[i]);
-          }
-        }
-        virtual void build() {
-          Node node;
-          std::vector<Node> nodes;
-          for (notifier()->first(node); node != INVALID;
-               notifier()->next(node)) {
-            nodes.push_back(node);
-          }
-          for (int i = nodes.size() - 1; i >= 0; --i) {
-            snapshot.addNode(nodes[i]);
-          }
-        }
-        virtual void clear() {
-          Node node;
-          for (notifier()->first(node); node != INVALID;
-               notifier()->next(node)) {
-            snapshot.eraseNode(node);
-          }
-        }
-
-        Snapshot& snapshot;
-      };
-
-      class ArcObserverProxy : public ArcNotifier::ObserverBase {
-      public:
-
-        ArcObserverProxy(Snapshot& _snapshot)
-          : snapshot(_snapshot) {}
-
-        using ArcNotifier::ObserverBase::attach;
-        using ArcNotifier::ObserverBase::detach;
-        using ArcNotifier::ObserverBase::attached;
-
-      protected:
-
-        virtual void add(const Arc& arc) {
-          snapshot.addArc(arc);
-        }
-        virtual void add(const std::vector<Arc>& arcs) {
-          for (int i = arcs.size() - 1; i >= 0; ++i) {
-            snapshot.addArc(arcs[i]);
-          }
-        }
-        virtual void erase(const Arc& arc) {
-          snapshot.eraseArc(arc);
-        }
-        virtual void erase(const std::vector<Arc>& arcs) {
-          for (int i = 0; i < int(arcs.size()); ++i) {
-            snapshot.eraseArc(arcs[i]);
-          }
-        }
-        virtual void build() {
-          Arc arc;
-          std::vector<Arc> arcs;
-          for (notifier()->first(arc); arc != INVALID;
-               notifier()->next(arc)) {
-            arcs.push_back(arc);
-          }
-          for (int i = arcs.size() - 1; i >= 0; --i) {
-            snapshot.addArc(arcs[i]);
-          }
-        }
-        virtual void clear() {
-          Arc arc;
-          for (notifier()->first(arc); arc != INVALID;
-               notifier()->next(arc)) {
-            snapshot.eraseArc(arc);
-          }
-        }
-
-        Snapshot& snapshot;
-      };
-
-      ListDigraph *digraph;
-
-      NodeObserverProxy node_observer_proxy;
-      ArcObserverProxy arc_observer_proxy;
-
-      std::list<Node> added_nodes;
-      std::list<Arc> added_arcs;
-
-
-      void addNode(const Node& node) {
-        added_nodes.push_front(node);
-      }
-      void eraseNode(const Node& node) {
-        std::list<Node>::iterator it =
-          std::find(added_nodes.begin(), added_nodes.end(), node);
-        if (it == added_nodes.end()) {
-          clear();
-          arc_observer_proxy.detach();
-          throw NodeNotifier::ImmediateDetach();
-        } else {
-          added_nodes.erase(it);
-        }
-      }
-
-      void addArc(const Arc& arc) {
-        added_arcs.push_front(arc);
-      }
-      void eraseArc(const Arc& arc) {
-        std::list<Arc>::iterator it =
-          std::find(added_arcs.begin(), added_arcs.end(), arc);
-        if (it == added_arcs.end()) {
-          clear();
-          node_observer_proxy.detach();
-          throw ArcNotifier::ImmediateDetach();
-        } else {
-          added_arcs.erase(it);
-        }
-      }
-
-      void attach(ListDigraph &_digraph) {
-        digraph = &_digraph;
-        node_observer_proxy.attach(digraph->notifier(Node()));
-        arc_observer_proxy.attach(digraph->notifier(Arc()));
-      }
-
-      void detach() {
-        node_observer_proxy.detach();
-        arc_observer_proxy.detach();
-      }
-
-      bool attached() const {
-        return node_observer_proxy.attached();
-      }
-
-      void clear() {
-        added_nodes.clear();
-        added_arcs.clear();
-      }
-
-    public:
-
-      /// \brief Default constructor.
-      ///
-      /// Default constructor.
-      /// To actually make a snapshot you must call save().
-      Snapshot()
-        : digraph(0), node_observer_proxy(*this),
-          arc_observer_proxy(*this) {}
-
-      /// \brief Constructor that immediately makes a snapshot.
-      ///
-      /// This constructor immediately makes a snapshot of the digraph.
-      /// \param _digraph The digraph we make a snapshot of.
-      Snapshot(ListDigraph &_digraph)
-        : node_observer_proxy(*this),
-          arc_observer_proxy(*this) {
-        attach(_digraph);
-      }
-
-      /// \brief Make a snapshot.
-      ///
-      /// Make a snapshot of the digraph.
-      ///
-      /// This function can be called more than once. In case of a repeated
-      /// call, the previous snapshot gets lost.
-      /// \param _digraph The digraph we make the snapshot of.
-      void save(ListDigraph &_digraph) {
-        if (attached()) {
-          detach();
-          clear();
-        }
-        attach(_digraph);
-      }
-
-      /// \brief Undo the changes until the last snapshot.
-      //
-      /// Undo the changes until the last snapshot created by save().
-      void restore() {
-        detach();
-        for(std::list<Arc>::iterator it = added_arcs.begin();
-            it != added_arcs.end(); ++it) {
-          digraph->erase(*it);
-        }
-        for(std::list<Node>::iterator it = added_nodes.begin();
-            it != added_nodes.end(); ++it) {
-          digraph->erase(*it);
-        }
-        clear();
-      }
-
-      /// \brief Gives back true when the snapshot is valid.
-      ///
-      /// Gives back true when the snapshot is valid.
-      bool valid() const {
-        return attached();
-      }
-    };
-
-  };
-
-  ///@}
-
-  class ListGraphBase {
-
-  protected:
-
-    struct NodeT {
-      int first_out;
-      int prev, next;
-    };
-
-    struct ArcT {
-      int target;
-      int prev_out, next_out;
-    };
-
-    std::vector<NodeT> nodes;
-
-    int first_node;
-
-    int first_free_node;
-
-    std::vector<ArcT> arcs;
-
-    int first_free_arc;
-
-  public:
-
-    typedef ListGraphBase Digraph;
-
-    class Node;
-    class Arc;
-    class Edge;
-
-    class Node {
-      friend class ListGraphBase;
-    protected:
-
-      int id;
-      explicit Node(int pid) { id = pid;}
-
-    public:
-      Node() {}
-      Node (Invalid) { id = -1; }
-      bool operator==(const Node& node) const {return id == node.id;}
-      bool operator!=(const Node& node) const {return id != node.id;}
-      bool operator<(const Node& node) const {return id < node.id;}
-    };
-
-    class Edge {
-      friend class ListGraphBase;
-    protected:
-
-      int id;
-      explicit Edge(int pid) { id = pid;}
-
-    public:
-      Edge() {}
-      Edge (Invalid) { id = -1; }
-      bool operator==(const Edge& edge) const {return id == edge.id;}
-      bool operator!=(const Edge& edge) const {return id != edge.id;}
-      bool operator<(const Edge& edge) const {return id < edge.id;}
-    };
-
-    class Arc {
-      friend class ListGraphBase;
-    protected:
-
-      int id;
-      explicit Arc(int pid) { id = pid;}
-
-    public:
-      operator Edge() const {
-        return id != -1 ? edgeFromId(id / 2) : INVALID;
-      }
-
-      Arc() {}
-      Arc (Invalid) { id = -1; }
-      bool operator==(const Arc& arc) const {return id == arc.id;}
-      bool operator!=(const Arc& arc) const {return id != arc.id;}
-      bool operator<(const Arc& arc) const {return id < arc.id;}
-    };
-
-
-
-    ListGraphBase()
-      : nodes(), first_node(-1),
-        first_free_node(-1), arcs(), first_free_arc(-1) {}
-
-
-    int maxNodeId() const { return nodes.size()-1; }
-    int maxEdgeId() const { return arcs.size() / 2 - 1; }
-    int maxArcId() const { return arcs.size()-1; }
-
-    Node source(Arc e) const { return Node(arcs[e.id ^ 1].target); }
-    Node target(Arc e) const { return Node(arcs[e.id].target); }
-
-    Node u(Edge e) const { return Node(arcs[2 * e.id].target); }
-    Node v(Edge e) const { return Node(arcs[2 * e.id + 1].target); }
-
-    static bool direction(Arc e) {
-      return (e.id & 1) == 1;
-    }
-
-    static Arc direct(Edge e, bool d) {
-      return Arc(e.id * 2 + (d ? 1 : 0));
-    }
-
-    void first(Node& node) const {
-      node.id = first_node;
-    }
-
-    void next(Node& node) const {
-      node.id = nodes[node.id].next;
-    }
-
-    void first(Arc& e) const {
-      int n = first_node;
-      while (n != -1 && nodes[n].first_out == -1) {
-        n = nodes[n].next;
-      }
-      e.id = (n == -1) ? -1 : nodes[n].first_out;
-    }
-
-    void next(Arc& e) const {
-      if (arcs[e.id].next_out != -1) {
-        e.id = arcs[e.id].next_out;
-      } else {
-        int n = nodes[arcs[e.id ^ 1].target].next;
-        while(n != -1 && nodes[n].first_out == -1) {
-          n = nodes[n].next;
-        }
-        e.id = (n == -1) ? -1 : nodes[n].first_out;
-      }
-    }
-
-    void first(Edge& e) const {
-      int n = first_node;
-      while (n != -1) {
-        e.id = nodes[n].first_out;
-        while ((e.id & 1) != 1) {
-          e.id = arcs[e.id].next_out;
-        }
-        if (e.id != -1) {
-          e.id /= 2;
-          return;
-        }
-        n = nodes[n].next;
-      }
-      e.id = -1;
-    }
-
-    void next(Edge& e) const {
-      int n = arcs[e.id * 2].target;
-      e.id = arcs[(e.id * 2) | 1].next_out;
-      while ((e.id & 1) != 1) {
-        e.id = arcs[e.id].next_out;
-      }
-      if (e.id != -1) {
-        e.id /= 2;
-        return;
-      }
-      n = nodes[n].next;
-      while (n != -1) {
-        e.id = nodes[n].first_out;
-        while ((e.id & 1) != 1) {
-          e.id = arcs[e.id].next_out;
-        }
-        if (e.id != -1) {
-          e.id /= 2;
-          return;
-        }
-        n = nodes[n].next;
-      }
-      e.id = -1;
-    }
-
-    void firstOut(Arc &e, const Node& v) const {
-      e.id = nodes[v.id].first_out;
-    }
-    void nextOut(Arc &e) const {
-      e.id = arcs[e.id].next_out;
-    }
-
-    void firstIn(Arc &e, const Node& v) const {
-      e.id = ((nodes[v.id].first_out) ^ 1);
-      if (e.id == -2) e.id = -1;
-    }
-    void nextIn(Arc &e) const {
-      e.id = ((arcs[e.id ^ 1].next_out) ^ 1);
-      if (e.id == -2) e.id = -1;
-    }
-
-    void firstInc(Edge &e, bool& d, const Node& v) const {
-      int a = nodes[v.id].first_out;
-      if (a != -1 ) {
-        e.id = a / 2;
-        d = ((a & 1) == 1);
-      } else {
-        e.id = -1;
-        d = true;
-      }
-    }
-    void nextInc(Edge &e, bool& d) const {
-      int a = (arcs[(e.id * 2) | (d ? 1 : 0)].next_out);
-      if (a != -1 ) {
-        e.id = a / 2;
-        d = ((a & 1) == 1);
-      } else {
-        e.id = -1;
-        d = true;
-      }
-    }
-
-    static int id(Node v) { return v.id; }
-    static int id(Arc e) { return e.id; }
-    static int id(Edge e) { return e.id; }
-
-    static Node nodeFromId(int id) { return Node(id);}
-    static Arc arcFromId(int id) { return Arc(id);}
-    static Edge edgeFromId(int id) { return Edge(id);}
-
-    bool valid(Node n) const {
-      return n.id >= 0 && n.id < static_cast<int>(nodes.size()) &&
-        nodes[n.id].prev != -2;
-    }
-
-    bool valid(Arc a) const {
-      return a.id >= 0 && a.id < static_cast<int>(arcs.size()) &&
-        arcs[a.id].prev_out != -2;
-    }
-
-    bool valid(Edge e) const {
-      return e.id >= 0 && 2 * e.id < static_cast<int>(arcs.size()) &&
-        arcs[2 * e.id].prev_out != -2;
-    }
-
-    Node addNode() {
-      int n;
-
-      if(first_free_node==-1) {
-        n = nodes.size();
-        nodes.push_back(NodeT());
-      } else {
-        n = first_free_node;
-        first_free_node = nodes[n].next;
-      }
-
-      nodes[n].next = first_node;
-      if (first_node != -1) nodes[first_node].prev = n;
-      first_node = n;
-      nodes[n].prev = -1;
-
-      nodes[n].first_out = -1;
-
-      return Node(n);
-    }
-
-    Edge addEdge(Node u, Node v) {
-      int n;
-
-      if (first_free_arc == -1) {
-        n = arcs.size();
-        arcs.push_back(ArcT());
-        arcs.push_back(ArcT());
-      } else {
-        n = first_free_arc;
-        first_free_arc = arcs[n].next_out;
-      }
-
-      arcs[n].target = u.id;
-      arcs[n | 1].target = v.id;
-
-      arcs[n].next_out = nodes[v.id].first_out;
-      if (nodes[v.id].first_out != -1) {
-        arcs[nodes[v.id].first_out].prev_out = n;
-      }
-      arcs[n].prev_out = -1;
-      nodes[v.id].first_out = n;
-
-      arcs[n | 1].next_out = nodes[u.id].first_out;
-      if (nodes[u.id].first_out != -1) {
-        arcs[nodes[u.id].first_out].prev_out = (n | 1);
-      }
-      arcs[n | 1].prev_out = -1;
-      nodes[u.id].first_out = (n | 1);
-
-      return Edge(n / 2);
-    }
-
-    void erase(const Node& node) {
-      int n = node.id;
-
-      if(nodes[n].next != -1) {
-        nodes[nodes[n].next].prev = nodes[n].prev;
-      }
-
-      if(nodes[n].prev != -1) {
-        nodes[nodes[n].prev].next = nodes[n].next;
-      } else {
-        first_node = nodes[n].next;
-      }
-
-      nodes[n].next = first_free_node;
-      first_free_node = n;
-      nodes[n].prev = -2;
-    }
-
-    void erase(const Edge& edge) {
-      int n = edge.id * 2;
-
-      if (arcs[n].next_out != -1) {
-        arcs[arcs[n].next_out].prev_out = arcs[n].prev_out;
-      }
-
-      if (arcs[n].prev_out != -1) {
-        arcs[arcs[n].prev_out].next_out = arcs[n].next_out;
-      } else {
-        nodes[arcs[n | 1].target].first_out = arcs[n].next_out;
-      }
-
-      if (arcs[n | 1].next_out != -1) {
-        arcs[arcs[n | 1].next_out].prev_out = arcs[n | 1].prev_out;
-      }
-
-      if (arcs[n | 1].prev_out != -1) {
-        arcs[arcs[n | 1].prev_out].next_out = arcs[n | 1].next_out;
-      } else {
-        nodes[arcs[n].target].first_out = arcs[n | 1].next_out;
-      }
-
-      arcs[n].next_out = first_free_arc;
-      first_free_arc = n;
-      arcs[n].prev_out = -2;
-      arcs[n | 1].prev_out = -2;
-
-    }
-
-    void clear() {
-      arcs.clear();
-      nodes.clear();
-      first_node = first_free_node = first_free_arc = -1;
-    }
-
-  protected:
-
-    void changeV(Edge e, Node n) {
-      if(arcs[2 * e.id].next_out != -1) {
-        arcs[arcs[2 * e.id].next_out].prev_out = arcs[2 * e.id].prev_out;
-      }
-      if(arcs[2 * e.id].prev_out != -1) {
-        arcs[arcs[2 * e.id].prev_out].next_out =
-          arcs[2 * e.id].next_out;
-      } else {
-        nodes[arcs[(2 * e.id) | 1].target].first_out =
-          arcs[2 * e.id].next_out;
-      }
-
-      if (nodes[n.id].first_out != -1) {
-        arcs[nodes[n.id].first_out].prev_out = 2 * e.id;
-      }
-      arcs[(2 * e.id) | 1].target = n.id;
-      arcs[2 * e.id].prev_out = -1;
-      arcs[2 * e.id].next_out = nodes[n.id].first_out;
-      nodes[n.id].first_out = 2 * e.id;
-    }
-
-    void changeU(Edge e, Node n) {
-      if(arcs[(2 * e.id) | 1].next_out != -1) {
-        arcs[arcs[(2 * e.id) | 1].next_out].prev_out =
-          arcs[(2 * e.id) | 1].prev_out;
-      }
-      if(arcs[(2 * e.id) | 1].prev_out != -1) {
-        arcs[arcs[(2 * e.id) | 1].prev_out].next_out =
-          arcs[(2 * e.id) | 1].next_out;
-      } else {
-        nodes[arcs[2 * e.id].target].first_out =
-          arcs[(2 * e.id) | 1].next_out;
-      }
-
-      if (nodes[n.id].first_out != -1) {
-        arcs[nodes[n.id].first_out].prev_out = ((2 * e.id) | 1);
-      }
-      arcs[2 * e.id].target = n.id;
-      arcs[(2 * e.id) | 1].prev_out = -1;
-      arcs[(2 * e.id) | 1].next_out = nodes[n.id].first_out;
-      nodes[n.id].first_out = ((2 * e.id) | 1);
-    }
-
-  };
-
-  typedef GraphExtender<ListGraphBase> ExtendedListGraphBase;
-
-
-  /// \addtogroup graphs
-  /// @{
-
-  ///A general undirected graph structure.
-
-  ///\ref ListGraph is a simple and fast <em>undirected graph</em>
-  ///implementation based on static linked lists that are stored in
-  ///\c std::vector structures.
-  ///
-  ///It conforms to the \ref concepts::Graph "Graph concept" and it
-  ///also provides several useful additional functionalities.
-  ///Most of the member functions and nested classes are documented
-  ///only in the concept class.
-  ///
-  ///An important extra feature of this graph implementation is that
-  ///its maps are real \ref concepts::ReferenceMap "reference map"s.
-  ///
-  ///\sa concepts::Graph
-
-  class ListGraph : public ExtendedListGraphBase {
-  private:
-    ///ListGraph is \e not copy constructible. Use copyGraph() instead.
-
-    ///ListGraph is \e not copy constructible. Use copyGraph() instead.
-    ///
-    ListGraph(const ListGraph &) :ExtendedListGraphBase()  {};
-    ///\brief Assignment of ListGraph to another one is \e not allowed.
-    ///Use copyGraph() instead.
-
-    ///Assignment of ListGraph to another one is \e not allowed.
-    ///Use copyGraph() instead.
-    void operator=(const ListGraph &) {}
-  public:
-    /// Constructor
-
-    /// Constructor.
-    ///
-    ListGraph() {}
-
-    typedef ExtendedListGraphBase Parent;
-
-    typedef Parent::OutArcIt IncEdgeIt;
-
-    /// \brief Add a new node to the graph.
-    ///
-    /// Add a new node to the graph.
-    /// \return the new node.
-    Node addNode() { return Parent::addNode(); }
-
-    /// \brief Add a new edge to the graph.
-    ///
-    /// Add a new edge to the graph with source node \c s
-    /// and target node \c t.
-    /// \return the new edge.
-    Edge addEdge(const Node& s, const Node& t) {
-      return Parent::addEdge(s, t);
-    }
-
-    /// \brief Erase a node from the graph.
-    ///
-    /// Erase a node from the graph.
-    ///
-    void erase(const Node& n) { Parent::erase(n); }
-
-    /// \brief Erase an edge from the graph.
-    ///
-    /// Erase an edge from the graph.
-    ///
-    void erase(const Edge& e) { Parent::erase(e); }
-    /// Node validity check
-
-    /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.
-    ///
-    /// \warning A Node pointing to a removed item
-    /// could become valid again later if new nodes are
-    /// added to the graph.
-    bool valid(Node n) const { return Parent::valid(n); }
-    /// Arc validity check
-
-    /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.
-    ///
-    /// \warning An Arc pointing to a removed item
-    /// could become valid again later if new edges are
-    /// added to the graph.
-    bool valid(Arc a) const { return Parent::valid(a); }
-    /// Edge validity check
-
-    /// This function gives back true if the given edge is valid,
-    /// ie. it is a real arc of the graph.
-    ///
-    /// \warning A Edge pointing to a removed item
-    /// could become valid again later if new edges are
-    /// added to the graph.
-    bool valid(Edge e) const { return Parent::valid(e); }
-    /// \brief Change the end \c u of \c e to \c n
-    ///
-    /// This function changes the end \c u of \c e to node \c n.
-    ///
-    ///\note The <tt>EdgeIt</tt>s and <tt>ArcIt</tt>s referencing the
-    ///changed edge are invalidated and if the changed node is the
-    ///base node of an iterator then this iterator is also
-    ///invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    void changeU(Edge e, Node n) {
-      Parent::changeU(e,n);
-    }
-    /// \brief Change the end \c v of \c e to \c n
-    ///
-    /// This function changes the end \c v of \c e to \c n.
-    ///
-    ///\note The <tt>EdgeIt</tt>s referencing the changed edge remain
-    ///valid, however <tt>ArcIt</tt>s and if the changed node is the
-    ///base node of an iterator then this iterator is invalidated.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    void changeV(Edge e, Node n) {
-      Parent::changeV(e,n);
-    }
-    /// \brief Contract two nodes.
-    ///
-    /// This function contracts two nodes.
-    /// Node \p b will be removed but instead of deleting
-    /// its neighboring arcs, they will be joined to \p a.
-    /// The last parameter \p r controls whether to remove loops. \c true
-    /// means that loops will be removed.
-    ///
-    /// \note The <tt>ArcIt</tt>s referencing a moved arc remain
-    /// valid.
-    ///
-    ///\warning This functionality cannot be used together with the
-    ///Snapshot feature.
-    void contract(Node a, Node b, bool r = true) {
-      for(IncEdgeIt e(*this, b); e!=INVALID;) {
-        IncEdgeIt f = e; ++f;
-        if (r && runningNode(e) == a) {
-          erase(e);
-        } else if (u(e) == b) {
-          changeU(e, a);
-        } else {
-          changeV(e, a);
-        }
-        e = f;
-      }
-      erase(b);
-    }
-
-
-    /// \brief Class to make a snapshot of the graph and restore
-    /// it later.
-    ///
-    /// Class to make a snapshot of the graph and restore it later.
-    ///
-    /// The newly added nodes and edges can be removed
-    /// using the restore() function.
-    ///
-    /// \warning Edge and node deletions and other modifications
-    /// (e.g. changing nodes of edges, contracting nodes) cannot be
-    /// restored. These events invalidate the snapshot.
-    class Snapshot {
-    protected:
-
-      typedef Parent::NodeNotifier NodeNotifier;
-
-      class NodeObserverProxy : public NodeNotifier::ObserverBase {
-      public:
-
-        NodeObserverProxy(Snapshot& _snapshot)
-          : snapshot(_snapshot) {}
-
-        using NodeNotifier::ObserverBase::attach;
-        using NodeNotifier::ObserverBase::detach;
-        using NodeNotifier::ObserverBase::attached;
-
-      protected:
-
-        virtual void add(const Node& node) {
-          snapshot.addNode(node);
-        }
-        virtual void add(const std::vector<Node>& nodes) {
-          for (int i = nodes.size() - 1; i >= 0; ++i) {
-            snapshot.addNode(nodes[i]);
-          }
-        }
-        virtual void erase(const Node& node) {
-          snapshot.eraseNode(node);
-        }
-        virtual void erase(const std::vector<Node>& nodes) {
-          for (int i = 0; i < int(nodes.size()); ++i) {
-            snapshot.eraseNode(nodes[i]);
-          }
-        }
-        virtual void build() {
-          Node node;
-          std::vector<Node> nodes;
-          for (notifier()->first(node); node != INVALID;
-               notifier()->next(node)) {
-            nodes.push_back(node);
-          }
-          for (int i = nodes.size() - 1; i >= 0; --i) {
-            snapshot.addNode(nodes[i]);
-          }
-        }
-        virtual void clear() {
-          Node node;
-          for (notifier()->first(node); node != INVALID;
-               notifier()->next(node)) {
-            snapshot.eraseNode(node);
-          }
-        }
-
-        Snapshot& snapshot;
-      };
-
-      class EdgeObserverProxy : public EdgeNotifier::ObserverBase {
-      public:
-
-        EdgeObserverProxy(Snapshot& _snapshot)
-          : snapshot(_snapshot) {}
-
-        using EdgeNotifier::ObserverBase::attach;
-        using EdgeNotifier::ObserverBase::detach;
-        using EdgeNotifier::ObserverBase::attached;
-
-      protected:
-
-        virtual void add(const Edge& edge) {
-          snapshot.addEdge(edge);
-        }
-        virtual void add(const std::vector<Edge>& edges) {
-          for (int i = edges.size() - 1; i >= 0; ++i) {
-            snapshot.addEdge(edges[i]);
-          }
-        }
-        virtual void erase(const Edge& edge) {
-          snapshot.eraseEdge(edge);
-        }
-        virtual void erase(const std::vector<Edge>& edges) {
-          for (int i = 0; i < int(edges.size()); ++i) {
-            snapshot.eraseEdge(edges[i]);
-          }
-        }
-        virtual void build() {
-          Edge edge;
-          std::vector<Edge> edges;
-          for (notifier()->first(edge); edge != INVALID;
-               notifier()->next(edge)) {
-            edges.push_back(edge);
-          }
-          for (int i = edges.size() - 1; i >= 0; --i) {
-            snapshot.addEdge(edges[i]);
-          }
-        }
-        virtual void clear() {
-          Edge edge;
-          for (notifier()->first(edge); edge != INVALID;
-               notifier()->next(edge)) {
-            snapshot.eraseEdge(edge);
-          }
-        }
-
-        Snapshot& snapshot;
-      };
-
-      ListGraph *graph;
-
-      NodeObserverProxy node_observer_proxy;
-      EdgeObserverProxy edge_observer_proxy;
-
-      std::list<Node> added_nodes;
-      std::list<Edge> added_edges;
-
-
-      void addNode(const Node& node) {
-        added_nodes.push_front(node);
-      }
-      void eraseNode(const Node& node) {
-        std::list<Node>::iterator it =
-          std::find(added_nodes.begin(), added_nodes.end(), node);
-        if (it == added_nodes.end()) {
-          clear();
-          edge_observer_proxy.detach();
-          throw NodeNotifier::ImmediateDetach();
-        } else {
-          added_nodes.erase(it);
-        }
-      }
-
-      void addEdge(const Edge& edge) {
-        added_edges.push_front(edge);
-      }
-      void eraseEdge(const Edge& edge) {
-        std::list<Edge>::iterator it =
-          std::find(added_edges.begin(), added_edges.end(), edge);
-        if (it == added_edges.end()) {
-          clear();
-          node_observer_proxy.detach();
-          throw EdgeNotifier::ImmediateDetach();
-        } else {
-          added_edges.erase(it);
-        }
-      }
-
-      void attach(ListGraph &_graph) {
-        graph = &_graph;
-        node_observer_proxy.attach(graph->notifier(Node()));
-        edge_observer_proxy.attach(graph->notifier(Edge()));
-      }
-
-      void detach() {
-        node_observer_proxy.detach();
-        edge_observer_proxy.detach();
-      }
-
-      bool attached() const {
-        return node_observer_proxy.attached();
-      }
-
-      void clear() {
-        added_nodes.clear();
-        added_edges.clear();
-      }
-
-    public:
-
-      /// \brief Default constructor.
-      ///
-      /// Default constructor.
-      /// To actually make a snapshot you must call save().
-      Snapshot()
-        : graph(0), node_observer_proxy(*this),
-          edge_observer_proxy(*this) {}
-
-      /// \brief Constructor that immediately makes a snapshot.
-      ///
-      /// This constructor immediately makes a snapshot of the graph.
-      /// \param _graph The graph we make a snapshot of.
-      Snapshot(ListGraph &_graph)
-        : node_observer_proxy(*this),
-          edge_observer_proxy(*this) {
-        attach(_graph);
-      }
-
-      /// \brief Make a snapshot.
-      ///
-      /// Make a snapshot of the graph.
-      ///
-      /// This function can be called more than once. In case of a repeated
-      /// call, the previous snapshot gets lost.
-      /// \param _graph The graph we make the snapshot of.
-      void save(ListGraph &_graph) {
-        if (attached()) {
-          detach();
-          clear();
-        }
-        attach(_graph);
-      }
-
-      /// \brief Undo the changes until the last snapshot.
-      //
-      /// Undo the changes until the last snapshot created by save().
-      void restore() {
-        detach();
-        for(std::list<Edge>::iterator it = added_edges.begin();
-            it != added_edges.end(); ++it) {
-          graph->erase(*it);
-        }
-        for(std::list<Node>::iterator it = added_nodes.begin();
-            it != added_nodes.end(); ++it) {
-          graph->erase(*it);
-        }
-        clear();
-      }
-
-      /// \brief Gives back true when the snapshot is valid.
-      ///
-      /// Gives back true when the snapshot is valid.
-      bool valid() const {
-        return attached();
-      }
-    };
-  };
-
-  /// @}
-} //namespace lemon
-
-
-#endif
Index: mon/maps.h
===================================================================
--- lemon/maps.h	(revision 320)
+++ 	(revision )
@@ -1,2306 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_MAPS_H
-#define LEMON_MAPS_H
-
-#include <iterator>
-#include <functional>
-#include <vector>
-
-#include <lemon/core.h>
-
-///\file
-///\ingroup maps
-///\brief Miscellaneous property maps
-
-#include <map>
-
-namespace lemon {
-
-  /// \addtogroup maps
-  /// @{
-
-  /// Base class of maps.
-
-  /// Base class of maps. It provides the necessary type definitions
-  /// required by the map %concepts.
-  template<typename K, typename V>
-  class MapBase {
-  public:
-    /// \brief The key type of the map.
-    typedef K Key;
-    /// \brief The value type of the map.
-    /// (The type of objects associated with the keys).
-    typedef V Value;
-  };
-
-
-  /// Null map. (a.k.a. DoNothingMap)
-
-  /// This map can be used if you have to provide a map only for
-  /// its type definitions, or if you have to provide a writable map,
-  /// but data written to it is not required (i.e. it will be sent to
-  /// <tt>/dev/null</tt>).
-  /// It conforms the \ref concepts::ReadWriteMap "ReadWriteMap" concept.
-  ///
-  /// \sa ConstMap
-  template<typename K, typename V>
-  class NullMap : public MapBase<K, V> {
-  public:
-    typedef MapBase<K, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Gives back a default constructed element.
-    Value operator[](const Key&) const { return Value(); }
-    /// Absorbs the value.
-    void set(const Key&, const Value&) {}
-  };
-
-  /// Returns a \c NullMap class
-
-  /// This function just returns a \c NullMap class.
-  /// \relates NullMap
-  template <typename K, typename V>
-  NullMap<K, V> nullMap() {
-    return NullMap<K, V>();
-  }
-
-
-  /// Constant map.
-
-  /// This \ref concepts::ReadMap "readable map" assigns a specified
-  /// value to each key.
-  ///
-  /// In other aspects it is equivalent to \c NullMap.
-  /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap"
-  /// concept, but it absorbs the data written to it.
-  ///
-  /// The simplest way of using this map is through the constMap()
-  /// function.
-  ///
-  /// \sa NullMap
-  /// \sa IdentityMap
-  template<typename K, typename V>
-  class ConstMap : public MapBase<K, V> {
-  private:
-    V _value;
-  public:
-    typedef MapBase<K, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Default constructor
-
-    /// Default constructor.
-    /// The value of the map will be default constructed.
-    ConstMap() {}
-
-    /// Constructor with specified initial value
-
-    /// Constructor with specified initial value.
-    /// \param v The initial value of the map.
-    ConstMap(const Value &v) : _value(v) {}
-
-    /// Gives back the specified value.
-    Value operator[](const Key&) const { return _value; }
-
-    /// Absorbs the value.
-    void set(const Key&, const Value&) {}
-
-    /// Sets the value that is assigned to each key.
-    void setAll(const Value &v) {
-      _value = v;
-    }
-
-    template<typename V1>
-    ConstMap(const ConstMap<K, V1> &, const Value &v) : _value(v) {}
-  };
-
-  /// Returns a \c ConstMap class
-
-  /// This function just returns a \c ConstMap class.
-  /// \relates ConstMap
-  template<typename K, typename V>
-  inline ConstMap<K, V> constMap(const V &v) {
-    return ConstMap<K, V>(v);
-  }
-
-  template<typename K, typename V>
-  inline ConstMap<K, V> constMap() {
-    return ConstMap<K, V>();
-  }
-
-
-  template<typename T, T v>
-  struct Const {};
-
-  /// Constant map with inlined constant value.
-
-  /// This \ref concepts::ReadMap "readable map" assigns a specified
-  /// value to each key.
-  ///
-  /// In other aspects it is equivalent to \c NullMap.
-  /// So it conforms the \ref concepts::ReadWriteMap "ReadWriteMap"
-  /// concept, but it absorbs the data written to it.
-  ///
-  /// The simplest way of using this map is through the constMap()
-  /// function.
-  ///
-  /// \sa NullMap
-  /// \sa IdentityMap
-  template<typename K, typename V, V v>
-  class ConstMap<K, Const<V, v> > : public MapBase<K, V> {
-  public:
-    typedef MapBase<K, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor.
-    ConstMap() {}
-
-    /// Gives back the specified value.
-    Value operator[](const Key&) const { return v; }
-
-    /// Absorbs the value.
-    void set(const Key&, const Value&) {}
-  };
-
-  /// Returns a \c ConstMap class with inlined constant value
-
-  /// This function just returns a \c ConstMap class with inlined
-  /// constant value.
-  /// \relates ConstMap
-  template<typename K, typename V, V v>
-  inline ConstMap<K, Const<V, v> > constMap() {
-    return ConstMap<K, Const<V, v> >();
-  }
-
-
-  /// Identity map.
-
-  /// This \ref concepts::ReadMap "read-only map" gives back the given
-  /// key as value without any modification.
-  ///
-  /// \sa ConstMap
-  template <typename T>
-  class IdentityMap : public MapBase<T, T> {
-  public:
-    typedef MapBase<T, T> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Gives back the given value without any modification.
-    Value operator[](const Key &k) const {
-      return k;
-    }
-  };
-
-  /// Returns an \c IdentityMap class
-
-  /// This function just returns an \c IdentityMap class.
-  /// \relates IdentityMap
-  template<typename T>
-  inline IdentityMap<T> identityMap() {
-    return IdentityMap<T>();
-  }
-
-
-  /// \brief Map for storing values for integer keys from the range
-  /// <tt>[0..size-1]</tt>.
-  ///
-  /// This map is essentially a wrapper for \c std::vector. It assigns
-  /// values to integer keys from the range <tt>[0..size-1]</tt>.
-  /// It can be used with some data structures, for example
-  /// \c UnionFind, \c BinHeap, when the used items are small
-  /// integers. This map conforms the \ref concepts::ReferenceMap
-  /// "ReferenceMap" concept.
-  ///
-  /// The simplest way of using this map is through the rangeMap()
-  /// function.
-  template <typename V>
-  class RangeMap : public MapBase<int, V> {
-    template <typename V1>
-    friend class RangeMap;
-  private:
-
-    typedef std::vector<V> Vector;
-    Vector _vector;
-
-  public:
-
-    typedef MapBase<int, V> Parent;
-    /// Key type
-    typedef typename Parent::Key Key;
-    /// Value type
-    typedef typename Parent::Value Value;
-    /// Reference type
-    typedef typename Vector::reference Reference;
-    /// Const reference type
-    typedef typename Vector::const_reference ConstReference;
-
-    typedef True ReferenceMapTag;
-
-  public:
-
-    /// Constructor with specified default value.
-    RangeMap(int size = 0, const Value &value = Value())
-      : _vector(size, value) {}
-
-    /// Constructs the map from an appropriate \c std::vector.
-    template <typename V1>
-    RangeMap(const std::vector<V1>& vector)
-      : _vector(vector.begin(), vector.end()) {}
-
-    /// Constructs the map from another \c RangeMap.
-    template <typename V1>
-    RangeMap(const RangeMap<V1> &c)
-      : _vector(c._vector.begin(), c._vector.end()) {}
-
-    /// Returns the size of the map.
-    int size() {
-      return _vector.size();
-    }
-
-    /// Resizes the map.
-
-    /// Resizes the underlying \c std::vector container, so changes the
-    /// keyset of the map.
-    /// \param size The new size of the map. The new keyset will be the
-    /// range <tt>[0..size-1]</tt>.
-    /// \param value The default value to assign to the new keys.
-    void resize(int size, const Value &value = Value()) {
-      _vector.resize(size, value);
-    }
-
-  private:
-
-    RangeMap& operator=(const RangeMap&);
-
-  public:
-
-    ///\e
-    Reference operator[](const Key &k) {
-      return _vector[k];
-    }
-
-    ///\e
-    ConstReference operator[](const Key &k) const {
-      return _vector[k];
-    }
-
-    ///\e
-    void set(const Key &k, const Value &v) {
-      _vector[k] = v;
-    }
-  };
-
-  /// Returns a \c RangeMap class
-
-  /// This function just returns a \c RangeMap class.
-  /// \relates RangeMap
-  template<typename V>
-  inline RangeMap<V> rangeMap(int size = 0, const V &value = V()) {
-    return RangeMap<V>(size, value);
-  }
-
-  /// \brief Returns a \c RangeMap class created from an appropriate
-  /// \c std::vector
-
-  /// This function just returns a \c RangeMap class created from an
-  /// appropriate \c std::vector.
-  /// \relates RangeMap
-  template<typename V>
-  inline RangeMap<V> rangeMap(const std::vector<V> &vector) {
-    return RangeMap<V>(vector);
-  }
-
-
-  /// Map type based on \c std::map
-
-  /// This map is essentially a wrapper for \c std::map with addition
-  /// that you can specify a default value for the keys that are not
-  /// stored actually. This value can be different from the default
-  /// contructed value (i.e. \c %Value()).
-  /// This type conforms the \ref concepts::ReferenceMap "ReferenceMap"
-  /// concept.
-  ///
-  /// This map is useful if a default value should be assigned to most of
-  /// the keys and different values should be assigned only to a few
-  /// keys (i.e. the map is "sparse").
-  /// The name of this type also refers to this important usage.
-  ///
-  /// Apart form that this map can be used in many other cases since it
-  /// is based on \c std::map, which is a general associative container.
-  /// However keep in mind that it is usually not as efficient as other
-  /// maps.
-  ///
-  /// The simplest way of using this map is through the sparseMap()
-  /// function.
-  template <typename K, typename V, typename Compare = std::less<K> >
-  class SparseMap : public MapBase<K, V> {
-    template <typename K1, typename V1, typename C1>
-    friend class SparseMap;
-  public:
-
-    typedef MapBase<K, V> Parent;
-    /// Key type
-    typedef typename Parent::Key Key;
-    /// Value type
-    typedef typename Parent::Value Value;
-    /// Reference type
-    typedef Value& Reference;
-    /// Const reference type
-    typedef const Value& ConstReference;
-
-    typedef True ReferenceMapTag;
-
-  private:
-
-    typedef std::map<K, V, Compare> Map;
-    Map _map;
-    Value _value;
-
-  public:
-
-    /// \brief Constructor with specified default value.
-    SparseMap(const Value &value = Value()) : _value(value) {}
-    /// \brief Constructs the map from an appropriate \c std::map, and
-    /// explicitly specifies a default value.
-    template <typename V1, typename Comp1>
-    SparseMap(const std::map<Key, V1, Comp1> &map,
-              const Value &value = Value())
-      : _map(map.begin(), map.end()), _value(value) {}
-
-    /// \brief Constructs the map from another \c SparseMap.
-    template<typename V1, typename Comp1>
-    SparseMap(const SparseMap<Key, V1, Comp1> &c)
-      : _map(c._map.begin(), c._map.end()), _value(c._value) {}
-
-  private:
-
-    SparseMap& operator=(const SparseMap&);
-
-  public:
-
-    ///\e
-    Reference operator[](const Key &k) {
-      typename Map::iterator it = _map.lower_bound(k);
-      if (it != _map.end() && !_map.key_comp()(k, it->first))
-        return it->second;
-      else
-        return _map.insert(it, std::make_pair(k, _value))->second;
-    }
-
-    ///\e
-    ConstReference operator[](const Key &k) const {
-      typename Map::const_iterator it = _map.find(k);
-      if (it != _map.end())
-        return it->second;
-      else
-        return _value;
-    }
-
-    ///\e
-    void set(const Key &k, const Value &v) {
-      typename Map::iterator it = _map.lower_bound(k);
-      if (it != _map.end() && !_map.key_comp()(k, it->first))
-        it->second = v;
-      else
-        _map.insert(it, std::make_pair(k, v));
-    }
-
-    ///\e
-    void setAll(const Value &v) {
-      _value = v;
-      _map.clear();
-    }
-  };
-
-  /// Returns a \c SparseMap class
-
-  /// This function just returns a \c SparseMap class with specified
-  /// default value.
-  /// \relates SparseMap
-  template<typename K, typename V, typename Compare>
-  inline SparseMap<K, V, Compare> sparseMap(const V& value = V()) {
-    return SparseMap<K, V, Compare>(value);
-  }
-
-  template<typename K, typename V>
-  inline SparseMap<K, V, std::less<K> > sparseMap(const V& value = V()) {
-    return SparseMap<K, V, std::less<K> >(value);
-  }
-
-  /// \brief Returns a \c SparseMap class created from an appropriate
-  /// \c std::map
-
-  /// This function just returns a \c SparseMap class created from an
-  /// appropriate \c std::map.
-  /// \relates SparseMap
-  template<typename K, typename V, typename Compare>
-  inline SparseMap<K, V, Compare>
-    sparseMap(const std::map<K, V, Compare> &map, const V& value = V())
-  {
-    return SparseMap<K, V, Compare>(map, value);
-  }
-
-  /// @}
-
-  /// \addtogroup map_adaptors
-  /// @{
-
-  /// Composition of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the
-  /// composition of two given maps. That is to say, if \c m1 is of
-  /// type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   ComposeMap<M1, M2> cm(m1,m2);
-  /// \endcode
-  /// <tt>cm[x]</tt> will be equal to <tt>m1[m2[x]]</tt>.
-  ///
-  /// The \c Key type of the map is inherited from \c M2 and the
-  /// \c Value type is from \c M1.
-  /// \c M2::Value must be convertible to \c M1::Key.
-  ///
-  /// The simplest way of using this map is through the composeMap()
-  /// function.
-  ///
-  /// \sa CombineMap
-  template <typename M1, typename M2>
-  class ComposeMap : public MapBase<typename M2::Key, typename M1::Value> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M2::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    ComposeMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-
-    /// \e
-    typename MapTraits<M1>::ConstReturnValue
-    operator[](const Key &k) const { return _m1[_m2[k]]; }
-  };
-
-  /// Returns a \c ComposeMap class
-
-  /// This function just returns a \c ComposeMap class.
-  ///
-  /// If \c m1 and \c m2 are maps and the \c Value type of \c m2 is
-  /// convertible to the \c Key of \c m1, then <tt>composeMap(m1,m2)[x]</tt>
-  /// will be equal to <tt>m1[m2[x]]</tt>.
-  ///
-  /// \relates ComposeMap
-  template <typename M1, typename M2>
-  inline ComposeMap<M1, M2> composeMap(const M1 &m1, const M2 &m2) {
-    return ComposeMap<M1, M2>(m1, m2);
-  }
-
-
-  /// Combination of two maps using an STL (binary) functor.
-
-  /// This \ref concepts::ReadMap "read-only map" takes two maps and a
-  /// binary functor and returns the combination of the two given maps
-  /// using the functor.
-  /// That is to say, if \c m1 is of type \c M1 and \c m2 is of \c M2
-  /// and \c f is of \c F, then for
-  /// \code
-  ///   CombineMap<M1,M2,F,V> cm(m1,m2,f);
-  /// \endcode
-  /// <tt>cm[x]</tt> will be equal to <tt>f(m1[x],m2[x])</tt>.
-  ///
-  /// The \c Key type of the map is inherited from \c M1 (\c M1::Key
-  /// must be convertible to \c M2::Key) and the \c Value type is \c V.
-  /// \c M2::Value and \c M1::Value must be convertible to the
-  /// corresponding input parameter of \c F and the return type of \c F
-  /// must be convertible to \c V.
-  ///
-  /// The simplest way of using this map is through the combineMap()
-  /// function.
-  ///
-  /// \sa ComposeMap
-  template<typename M1, typename M2, typename F,
-           typename V = typename F::result_type>
-  class CombineMap : public MapBase<typename M1::Key, V> {
-    const M1 &_m1;
-    const M2 &_m2;
-    F _f;
-  public:
-    typedef MapBase<typename M1::Key, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    CombineMap(const M1 &m1, const M2 &m2, const F &f = F())
-      : _m1(m1), _m2(m2), _f(f) {}
-    /// \e
-    Value operator[](const Key &k) const { return _f(_m1[k],_m2[k]); }
-  };
-
-  /// Returns a \c CombineMap class
-
-  /// This function just returns a \c CombineMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c double
-  /// values, then
-  /// \code
-  ///   combineMap(m1,m2,std::plus<double>())
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   addMap(m1,m2)
-  /// \endcode
-  ///
-  /// This function is specialized for adaptable binary function
-  /// classes and C++ functions.
-  ///
-  /// \relates CombineMap
-  template<typename M1, typename M2, typename F, typename V>
-  inline CombineMap<M1, M2, F, V>
-  combineMap(const M1 &m1, const M2 &m2, const F &f) {
-    return CombineMap<M1, M2, F, V>(m1,m2,f);
-  }
-
-  template<typename M1, typename M2, typename F>
-  inline CombineMap<M1, M2, F, typename F::result_type>
-  combineMap(const M1 &m1, const M2 &m2, const F &f) {
-    return combineMap<M1, M2, F, typename F::result_type>(m1,m2,f);
-  }
-
-  template<typename M1, typename M2, typename K1, typename K2, typename V>
-  inline CombineMap<M1, M2, V (*)(K1, K2), V>
-  combineMap(const M1 &m1, const M2 &m2, V (*f)(K1, K2)) {
-    return combineMap<M1, M2, V (*)(K1, K2), V>(m1,m2,f);
-  }
-
-
-  /// Converts an STL style (unary) functor to a map
-
-  /// This \ref concepts::ReadMap "read-only map" returns the value
-  /// of a given functor. Actually, it just wraps the functor and
-  /// provides the \c Key and \c Value typedefs.
-  ///
-  /// Template parameters \c K and \c V will become its \c Key and
-  /// \c Value. In most cases they have to be given explicitly because
-  /// a functor typically does not provide \c argument_type and
-  /// \c result_type typedefs.
-  /// Parameter \c F is the type of the used functor.
-  ///
-  /// The simplest way of using this map is through the functorToMap()
-  /// function.
-  ///
-  /// \sa MapToFunctor
-  template<typename F,
-           typename K = typename F::argument_type,
-           typename V = typename F::result_type>
-  class FunctorToMap : public MapBase<K, V> {
-    F _f;
-  public:
-    typedef MapBase<K, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    FunctorToMap(const F &f = F()) : _f(f) {}
-    /// \e
-    Value operator[](const Key &k) const { return _f(k); }
-  };
-
-  /// Returns a \c FunctorToMap class
-
-  /// This function just returns a \c FunctorToMap class.
-  ///
-  /// This function is specialized for adaptable binary function
-  /// classes and C++ functions.
-  ///
-  /// \relates FunctorToMap
-  template<typename K, typename V, typename F>
-  inline FunctorToMap<F, K, V> functorToMap(const F &f) {
-    return FunctorToMap<F, K, V>(f);
-  }
-
-  template <typename F>
-  inline FunctorToMap<F, typename F::argument_type, typename F::result_type>
-    functorToMap(const F &f)
-  {
-    return FunctorToMap<F, typename F::argument_type,
-      typename F::result_type>(f);
-  }
-
-  template <typename K, typename V>
-  inline FunctorToMap<V (*)(K), K, V> functorToMap(V (*f)(K)) {
-    return FunctorToMap<V (*)(K), K, V>(f);
-  }
-
-
-  /// Converts a map to an STL style (unary) functor
-
-  /// This class converts a map to an STL style (unary) functor.
-  /// That is it provides an <tt>operator()</tt> to read its values.
-  ///
-  /// For the sake of convenience it also works as a usual
-  /// \ref concepts::ReadMap "readable map", i.e. <tt>operator[]</tt>
-  /// and the \c Key and \c Value typedefs also exist.
-  ///
-  /// The simplest way of using this map is through the mapToFunctor()
-  /// function.
-  ///
-  ///\sa FunctorToMap
-  template <typename M>
-  class MapToFunctor : public MapBase<typename M::Key, typename M::Value> {
-    const M &_m;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    typedef typename Parent::Key argument_type;
-    typedef typename Parent::Value result_type;
-
-    /// Constructor
-    MapToFunctor(const M &m) : _m(m) {}
-    /// \e
-    Value operator()(const Key &k) const { return _m[k]; }
-    /// \e
-    Value operator[](const Key &k) const { return _m[k]; }
-  };
-
-  /// Returns a \c MapToFunctor class
-
-  /// This function just returns a \c MapToFunctor class.
-  /// \relates MapToFunctor
-  template<typename M>
-  inline MapToFunctor<M> mapToFunctor(const M &m) {
-    return MapToFunctor<M>(m);
-  }
-
-
-  /// \brief Map adaptor to convert the \c Value type of a map to
-  /// another type using the default conversion.
-
-  /// Map adaptor to convert the \c Value type of a \ref concepts::ReadMap
-  /// "readable map" to another type using the default conversion.
-  /// The \c Key type of it is inherited from \c M and the \c Value
-  /// type is \c V.
-  /// This type conforms the \ref concepts::ReadMap "ReadMap" concept.
-  ///
-  /// The simplest way of using this map is through the convertMap()
-  /// function.
-  template <typename M, typename V>
-  class ConvertMap : public MapBase<typename M::Key, V> {
-    const M &_m;
-  public:
-    typedef MapBase<typename M::Key, V> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-
-    /// Constructor.
-    /// \param m The underlying map.
-    ConvertMap(const M &m) : _m(m) {}
-
-    /// \e
-    Value operator[](const Key &k) const { return _m[k]; }
-  };
-
-  /// Returns a \c ConvertMap class
-
-  /// This function just returns a \c ConvertMap class.
-  /// \relates ConvertMap
-  template<typename V, typename M>
-  inline ConvertMap<M, V> convertMap(const M &map) {
-    return ConvertMap<M, V>(map);
-  }
-
-
-  /// Applies all map setting operations to two maps
-
-  /// This map has two \ref concepts::WriteMap "writable map" parameters
-  /// and each write request will be passed to both of them.
-  /// If \c M1 is also \ref concepts::ReadMap "readable", then the read
-  /// operations will return the corresponding values of \c M1.
-  ///
-  /// The \c Key and \c Value types are inherited from \c M1.
-  /// The \c Key and \c Value of \c M2 must be convertible from those
-  /// of \c M1.
-  ///
-  /// The simplest way of using this map is through the forkMap()
-  /// function.
-  template<typename  M1, typename M2>
-  class ForkMap : public MapBase<typename M1::Key, typename M1::Value> {
-    M1 &_m1;
-    M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    ForkMap(M1 &m1, M2 &m2) : _m1(m1), _m2(m2) {}
-    /// Returns the value associated with the given key in the first map.
-    Value operator[](const Key &k) const { return _m1[k]; }
-    /// Sets the value associated with the given key in both maps.
-    void set(const Key &k, const Value &v) { _m1.set(k,v); _m2.set(k,v); }
-  };
-
-  /// Returns a \c ForkMap class
-
-  /// This function just returns a \c ForkMap class.
-  /// \relates ForkMap
-  template <typename M1, typename M2>
-  inline ForkMap<M1,M2> forkMap(M1 &m1, M2 &m2) {
-    return ForkMap<M1,M2>(m1,m2);
-  }
-
-
-  /// Sum of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the sum
-  /// of the values of the two given maps.
-  /// Its \c Key and \c Value types are inherited from \c M1.
-  /// The \c Key and \c Value of \c M2 must be convertible to those of
-  /// \c M1.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   AddMap<M1,M2> am(m1,m2);
-  /// \endcode
-  /// <tt>am[x]</tt> will be equal to <tt>m1[x]+m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the addMap()
-  /// function.
-  ///
-  /// \sa SubMap, MulMap, DivMap
-  /// \sa ShiftMap, ShiftWriteMap
-  template<typename M1, typename M2>
-  class AddMap : public MapBase<typename M1::Key, typename M1::Value> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    AddMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]+_m2[k]; }
-  };
-
-  /// Returns an \c AddMap class
-
-  /// This function just returns an \c AddMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c double
-  /// values, then <tt>addMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]+m2[x]</tt>.
-  ///
-  /// \relates AddMap
-  template<typename M1, typename M2>
-  inline AddMap<M1, M2> addMap(const M1 &m1, const M2 &m2) {
-    return AddMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Difference of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the difference
-  /// of the values of the two given maps.
-  /// Its \c Key and \c Value types are inherited from \c M1.
-  /// The \c Key and \c Value of \c M2 must be convertible to those of
-  /// \c M1.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   SubMap<M1,M2> sm(m1,m2);
-  /// \endcode
-  /// <tt>sm[x]</tt> will be equal to <tt>m1[x]-m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the subMap()
-  /// function.
-  ///
-  /// \sa AddMap, MulMap, DivMap
-  template<typename M1, typename M2>
-  class SubMap : public MapBase<typename M1::Key, typename M1::Value> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    SubMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]-_m2[k]; }
-  };
-
-  /// Returns a \c SubMap class
-
-  /// This function just returns a \c SubMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c double
-  /// values, then <tt>subMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]-m2[x]</tt>.
-  ///
-  /// \relates SubMap
-  template<typename M1, typename M2>
-  inline SubMap<M1, M2> subMap(const M1 &m1, const M2 &m2) {
-    return SubMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Product of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the product
-  /// of the values of the two given maps.
-  /// Its \c Key and \c Value types are inherited from \c M1.
-  /// The \c Key and \c Value of \c M2 must be convertible to those of
-  /// \c M1.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   MulMap<M1,M2> mm(m1,m2);
-  /// \endcode
-  /// <tt>mm[x]</tt> will be equal to <tt>m1[x]*m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the mulMap()
-  /// function.
-  ///
-  /// \sa AddMap, SubMap, DivMap
-  /// \sa ScaleMap, ScaleWriteMap
-  template<typename M1, typename M2>
-  class MulMap : public MapBase<typename M1::Key, typename M1::Value> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    MulMap(const M1 &m1,const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]*_m2[k]; }
-  };
-
-  /// Returns a \c MulMap class
-
-  /// This function just returns a \c MulMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c double
-  /// values, then <tt>mulMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]*m2[x]</tt>.
-  ///
-  /// \relates MulMap
-  template<typename M1, typename M2>
-  inline MulMap<M1, M2> mulMap(const M1 &m1,const M2 &m2) {
-    return MulMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Quotient of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the quotient
-  /// of the values of the two given maps.
-  /// Its \c Key and \c Value types are inherited from \c M1.
-  /// The \c Key and \c Value of \c M2 must be convertible to those of
-  /// \c M1.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   DivMap<M1,M2> dm(m1,m2);
-  /// \endcode
-  /// <tt>dm[x]</tt> will be equal to <tt>m1[x]/m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the divMap()
-  /// function.
-  ///
-  /// \sa AddMap, SubMap, MulMap
-  template<typename M1, typename M2>
-  class DivMap : public MapBase<typename M1::Key, typename M1::Value> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    DivMap(const M1 &m1,const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]/_m2[k]; }
-  };
-
-  /// Returns a \c DivMap class
-
-  /// This function just returns a \c DivMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c double
-  /// values, then <tt>divMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]/m2[x]</tt>.
-  ///
-  /// \relates DivMap
-  template<typename M1, typename M2>
-  inline DivMap<M1, M2> divMap(const M1 &m1,const M2 &m2) {
-    return DivMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Shifts a map with a constant.
-
-  /// This \ref concepts::ReadMap "read-only map" returns the sum of
-  /// the given map and a constant value (i.e. it shifts the map with
-  /// the constant). Its \c Key and \c Value are inherited from \c M.
-  ///
-  /// Actually,
-  /// \code
-  ///   ShiftMap<M> sh(m,v);
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ConstMap<M::Key, M::Value> cm(v);
-  ///   AddMap<M, ConstMap<M::Key, M::Value> > sh(m,cm);
-  /// \endcode
-  ///
-  /// The simplest way of using this map is through the shiftMap()
-  /// function.
-  ///
-  /// \sa ShiftWriteMap
-  template<typename M, typename C = typename M::Value>
-  class ShiftMap : public MapBase<typename M::Key, typename M::Value> {
-    const M &_m;
-    C _v;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-
-    /// Constructor.
-    /// \param m The undelying map.
-    /// \param v The constant value.
-    ShiftMap(const M &m, const C &v) : _m(m), _v(v) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m[k]+_v; }
-  };
-
-  /// Shifts a map with a constant (read-write version).
-
-  /// This \ref concepts::ReadWriteMap "read-write map" returns the sum
-  /// of the given map and a constant value (i.e. it shifts the map with
-  /// the constant). Its \c Key and \c Value are inherited from \c M.
-  /// It makes also possible to write the map.
-  ///
-  /// The simplest way of using this map is through the shiftWriteMap()
-  /// function.
-  ///
-  /// \sa ShiftMap
-  template<typename M, typename C = typename M::Value>
-  class ShiftWriteMap : public MapBase<typename M::Key, typename M::Value> {
-    M &_m;
-    C _v;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-
-    /// Constructor.
-    /// \param m The undelying map.
-    /// \param v The constant value.
-    ShiftWriteMap(M &m, const C &v) : _m(m), _v(v) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m[k]+_v; }
-    /// \e
-    void set(const Key &k, const Value &v) { _m.set(k, v-_v); }
-  };
-
-  /// Returns a \c ShiftMap class
-
-  /// This function just returns a \c ShiftMap class.
-  ///
-  /// For example, if \c m is a map with \c double values and \c v is
-  /// \c double, then <tt>shiftMap(m,v)[x]</tt> will be equal to
-  /// <tt>m[x]+v</tt>.
-  ///
-  /// \relates ShiftMap
-  template<typename M, typename C>
-  inline ShiftMap<M, C> shiftMap(const M &m, const C &v) {
-    return ShiftMap<M, C>(m,v);
-  }
-
-  /// Returns a \c ShiftWriteMap class
-
-  /// This function just returns a \c ShiftWriteMap class.
-  ///
-  /// For example, if \c m is a map with \c double values and \c v is
-  /// \c double, then <tt>shiftWriteMap(m,v)[x]</tt> will be equal to
-  /// <tt>m[x]+v</tt>.
-  /// Moreover it makes also possible to write the map.
-  ///
-  /// \relates ShiftWriteMap
-  template<typename M, typename C>
-  inline ShiftWriteMap<M, C> shiftWriteMap(M &m, const C &v) {
-    return ShiftWriteMap<M, C>(m,v);
-  }
-
-
-  /// Scales a map with a constant.
-
-  /// This \ref concepts::ReadMap "read-only map" returns the value of
-  /// the given map multiplied from the left side with a constant value.
-  /// Its \c Key and \c Value are inherited from \c M.
-  ///
-  /// Actually,
-  /// \code
-  ///   ScaleMap<M> sc(m,v);
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ConstMap<M::Key, M::Value> cm(v);
-  ///   MulMap<ConstMap<M::Key, M::Value>, M> sc(cm,m);
-  /// \endcode
-  ///
-  /// The simplest way of using this map is through the scaleMap()
-  /// function.
-  ///
-  /// \sa ScaleWriteMap
-  template<typename M, typename C = typename M::Value>
-  class ScaleMap : public MapBase<typename M::Key, typename M::Value> {
-    const M &_m;
-    C _v;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-
-    /// Constructor.
-    /// \param m The undelying map.
-    /// \param v The constant value.
-    ScaleMap(const M &m, const C &v) : _m(m), _v(v) {}
-    /// \e
-    Value operator[](const Key &k) const { return _v*_m[k]; }
-  };
-
-  /// Scales a map with a constant (read-write version).
-
-  /// This \ref concepts::ReadWriteMap "read-write map" returns the value of
-  /// the given map multiplied from the left side with a constant value.
-  /// Its \c Key and \c Value are inherited from \c M.
-  /// It can also be used as write map if the \c / operator is defined
-  /// between \c Value and \c C and the given multiplier is not zero.
-  ///
-  /// The simplest way of using this map is through the scaleWriteMap()
-  /// function.
-  ///
-  /// \sa ScaleMap
-  template<typename M, typename C = typename M::Value>
-  class ScaleWriteMap : public MapBase<typename M::Key, typename M::Value> {
-    M &_m;
-    C _v;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-
-    /// Constructor.
-    /// \param m The undelying map.
-    /// \param v The constant value.
-    ScaleWriteMap(M &m, const C &v) : _m(m), _v(v) {}
-    /// \e
-    Value operator[](const Key &k) const { return _v*_m[k]; }
-    /// \e
-    void set(const Key &k, const Value &v) { _m.set(k, v/_v); }
-  };
-
-  /// Returns a \c ScaleMap class
-
-  /// This function just returns a \c ScaleMap class.
-  ///
-  /// For example, if \c m is a map with \c double values and \c v is
-  /// \c double, then <tt>scaleMap(m,v)[x]</tt> will be equal to
-  /// <tt>v*m[x]</tt>.
-  ///
-  /// \relates ScaleMap
-  template<typename M, typename C>
-  inline ScaleMap<M, C> scaleMap(const M &m, const C &v) {
-    return ScaleMap<M, C>(m,v);
-  }
-
-  /// Returns a \c ScaleWriteMap class
-
-  /// This function just returns a \c ScaleWriteMap class.
-  ///
-  /// For example, if \c m is a map with \c double values and \c v is
-  /// \c double, then <tt>scaleWriteMap(m,v)[x]</tt> will be equal to
-  /// <tt>v*m[x]</tt>.
-  /// Moreover it makes also possible to write the map.
-  ///
-  /// \relates ScaleWriteMap
-  template<typename M, typename C>
-  inline ScaleWriteMap<M, C> scaleWriteMap(M &m, const C &v) {
-    return ScaleWriteMap<M, C>(m,v);
-  }
-
-
-  /// Negative of a map
-
-  /// This \ref concepts::ReadMap "read-only map" returns the negative
-  /// of the values of the given map (using the unary \c - operator).
-  /// Its \c Key and \c Value are inherited from \c M.
-  ///
-  /// If M::Value is \c int, \c double etc., then
-  /// \code
-  ///   NegMap<M> neg(m);
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ScaleMap<M> neg(m,-1);
-  /// \endcode
-  ///
-  /// The simplest way of using this map is through the negMap()
-  /// function.
-  ///
-  /// \sa NegWriteMap
-  template<typename M>
-  class NegMap : public MapBase<typename M::Key, typename M::Value> {
-    const M& _m;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    NegMap(const M &m) : _m(m) {}
-    /// \e
-    Value operator[](const Key &k) const { return -_m[k]; }
-  };
-
-  /// Negative of a map (read-write version)
-
-  /// This \ref concepts::ReadWriteMap "read-write map" returns the
-  /// negative of the values of the given map (using the unary \c -
-  /// operator).
-  /// Its \c Key and \c Value are inherited from \c M.
-  /// It makes also possible to write the map.
-  ///
-  /// If M::Value is \c int, \c double etc., then
-  /// \code
-  ///   NegWriteMap<M> neg(m);
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ScaleWriteMap<M> neg(m,-1);
-  /// \endcode
-  ///
-  /// The simplest way of using this map is through the negWriteMap()
-  /// function.
-  ///
-  /// \sa NegMap
-  template<typename M>
-  class NegWriteMap : public MapBase<typename M::Key, typename M::Value> {
-    M &_m;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    NegWriteMap(M &m) : _m(m) {}
-    /// \e
-    Value operator[](const Key &k) const { return -_m[k]; }
-    /// \e
-    void set(const Key &k, const Value &v) { _m.set(k, -v); }
-  };
-
-  /// Returns a \c NegMap class
-
-  /// This function just returns a \c NegMap class.
-  ///
-  /// For example, if \c m is a map with \c double values, then
-  /// <tt>negMap(m)[x]</tt> will be equal to <tt>-m[x]</tt>.
-  ///
-  /// \relates NegMap
-  template <typename M>
-  inline NegMap<M> negMap(const M &m) {
-    return NegMap<M>(m);
-  }
-
-  /// Returns a \c NegWriteMap class
-
-  /// This function just returns a \c NegWriteMap class.
-  ///
-  /// For example, if \c m is a map with \c double values, then
-  /// <tt>negWriteMap(m)[x]</tt> will be equal to <tt>-m[x]</tt>.
-  /// Moreover it makes also possible to write the map.
-  ///
-  /// \relates NegWriteMap
-  template <typename M>
-  inline NegWriteMap<M> negWriteMap(M &m) {
-    return NegWriteMap<M>(m);
-  }
-
-
-  /// Absolute value of a map
-
-  /// This \ref concepts::ReadMap "read-only map" returns the absolute
-  /// value of the values of the given map.
-  /// Its \c Key and \c Value are inherited from \c M.
-  /// \c Value must be comparable to \c 0 and the unary \c -
-  /// operator must be defined for it, of course.
-  ///
-  /// The simplest way of using this map is through the absMap()
-  /// function.
-  template<typename M>
-  class AbsMap : public MapBase<typename M::Key, typename M::Value> {
-    const M &_m;
-  public:
-    typedef MapBase<typename M::Key, typename M::Value> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    AbsMap(const M &m) : _m(m) {}
-    /// \e
-    Value operator[](const Key &k) const {
-      Value tmp = _m[k];
-      return tmp >= 0 ? tmp : -tmp;
-    }
-
-  };
-
-  /// Returns an \c AbsMap class
-
-  /// This function just returns an \c AbsMap class.
-  ///
-  /// For example, if \c m is a map with \c double values, then
-  /// <tt>absMap(m)[x]</tt> will be equal to <tt>m[x]</tt> if
-  /// it is positive or zero and <tt>-m[x]</tt> if <tt>m[x]</tt> is
-  /// negative.
-  ///
-  /// \relates AbsMap
-  template<typename M>
-  inline AbsMap<M> absMap(const M &m) {
-    return AbsMap<M>(m);
-  }
-
-  /// @}
-
-  // Logical maps and map adaptors:
-
-  /// \addtogroup maps
-  /// @{
-
-  /// Constant \c true map.
-
-  /// This \ref concepts::ReadMap "read-only map" assigns \c true to
-  /// each key.
-  ///
-  /// Note that
-  /// \code
-  ///   TrueMap<K> tm;
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ConstMap<K,bool> tm(true);
-  /// \endcode
-  ///
-  /// \sa FalseMap
-  /// \sa ConstMap
-  template <typename K>
-  class TrueMap : public MapBase<K, bool> {
-  public:
-    typedef MapBase<K, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Gives back \c true.
-    Value operator[](const Key&) const { return true; }
-  };
-
-  /// Returns a \c TrueMap class
-
-  /// This function just returns a \c TrueMap class.
-  /// \relates TrueMap
-  template<typename K>
-  inline TrueMap<K> trueMap() {
-    return TrueMap<K>();
-  }
-
-
-  /// Constant \c false map.
-
-  /// This \ref concepts::ReadMap "read-only map" assigns \c false to
-  /// each key.
-  ///
-  /// Note that
-  /// \code
-  ///   FalseMap<K> fm;
-  /// \endcode
-  /// is equivalent to
-  /// \code
-  ///   ConstMap<K,bool> fm(false);
-  /// \endcode
-  ///
-  /// \sa TrueMap
-  /// \sa ConstMap
-  template <typename K>
-  class FalseMap : public MapBase<K, bool> {
-  public:
-    typedef MapBase<K, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Gives back \c false.
-    Value operator[](const Key&) const { return false; }
-  };
-
-  /// Returns a \c FalseMap class
-
-  /// This function just returns a \c FalseMap class.
-  /// \relates FalseMap
-  template<typename K>
-  inline FalseMap<K> falseMap() {
-    return FalseMap<K>();
-  }
-
-  /// @}
-
-  /// \addtogroup map_adaptors
-  /// @{
-
-  /// Logical 'and' of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the logical
-  /// 'and' of the values of the two given maps.
-  /// Its \c Key type is inherited from \c M1 and its \c Value type is
-  /// \c bool. \c M2::Key must be convertible to \c M1::Key.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   AndMap<M1,M2> am(m1,m2);
-  /// \endcode
-  /// <tt>am[x]</tt> will be equal to <tt>m1[x]&&m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the andMap()
-  /// function.
-  ///
-  /// \sa OrMap
-  /// \sa NotMap, NotWriteMap
-  template<typename M1, typename M2>
-  class AndMap : public MapBase<typename M1::Key, bool> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    AndMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]&&_m2[k]; }
-  };
-
-  /// Returns an \c AndMap class
-
-  /// This function just returns an \c AndMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c bool values,
-  /// then <tt>andMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]&&m2[x]</tt>.
-  ///
-  /// \relates AndMap
-  template<typename M1, typename M2>
-  inline AndMap<M1, M2> andMap(const M1 &m1, const M2 &m2) {
-    return AndMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Logical 'or' of two maps
-
-  /// This \ref concepts::ReadMap "read-only map" returns the logical
-  /// 'or' of the values of the two given maps.
-  /// Its \c Key type is inherited from \c M1 and its \c Value type is
-  /// \c bool. \c M2::Key must be convertible to \c M1::Key.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   OrMap<M1,M2> om(m1,m2);
-  /// \endcode
-  /// <tt>om[x]</tt> will be equal to <tt>m1[x]||m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the orMap()
-  /// function.
-  ///
-  /// \sa AndMap
-  /// \sa NotMap, NotWriteMap
-  template<typename M1, typename M2>
-  class OrMap : public MapBase<typename M1::Key, bool> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    OrMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]||_m2[k]; }
-  };
-
-  /// Returns an \c OrMap class
-
-  /// This function just returns an \c OrMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are both maps with \c bool values,
-  /// then <tt>orMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]||m2[x]</tt>.
-  ///
-  /// \relates OrMap
-  template<typename M1, typename M2>
-  inline OrMap<M1, M2> orMap(const M1 &m1, const M2 &m2) {
-    return OrMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Logical 'not' of a map
-
-  /// This \ref concepts::ReadMap "read-only map" returns the logical
-  /// negation of the values of the given map.
-  /// Its \c Key is inherited from \c M and its \c Value is \c bool.
-  ///
-  /// The simplest way of using this map is through the notMap()
-  /// function.
-  ///
-  /// \sa NotWriteMap
-  template <typename M>
-  class NotMap : public MapBase<typename M::Key, bool> {
-    const M &_m;
-  public:
-    typedef MapBase<typename M::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    NotMap(const M &m) : _m(m) {}
-    /// \e
-    Value operator[](const Key &k) const { return !_m[k]; }
-  };
-
-  /// Logical 'not' of a map (read-write version)
-
-  /// This \ref concepts::ReadWriteMap "read-write map" returns the
-  /// logical negation of the values of the given map.
-  /// Its \c Key is inherited from \c M and its \c Value is \c bool.
-  /// It makes also possible to write the map. When a value is set,
-  /// the opposite value is set to the original map.
-  ///
-  /// The simplest way of using this map is through the notWriteMap()
-  /// function.
-  ///
-  /// \sa NotMap
-  template <typename M>
-  class NotWriteMap : public MapBase<typename M::Key, bool> {
-    M &_m;
-  public:
-    typedef MapBase<typename M::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    NotWriteMap(M &m) : _m(m) {}
-    /// \e
-    Value operator[](const Key &k) const { return !_m[k]; }
-    /// \e
-    void set(const Key &k, bool v) { _m.set(k, !v); }
-  };
-
-  /// Returns a \c NotMap class
-
-  /// This function just returns a \c NotMap class.
-  ///
-  /// For example, if \c m is a map with \c bool values, then
-  /// <tt>notMap(m)[x]</tt> will be equal to <tt>!m[x]</tt>.
-  ///
-  /// \relates NotMap
-  template <typename M>
-  inline NotMap<M> notMap(const M &m) {
-    return NotMap<M>(m);
-  }
-
-  /// Returns a \c NotWriteMap class
-
-  /// This function just returns a \c NotWriteMap class.
-  ///
-  /// For example, if \c m is a map with \c bool values, then
-  /// <tt>notWriteMap(m)[x]</tt> will be equal to <tt>!m[x]</tt>.
-  /// Moreover it makes also possible to write the map.
-  ///
-  /// \relates NotWriteMap
-  template <typename M>
-  inline NotWriteMap<M> notWriteMap(M &m) {
-    return NotWriteMap<M>(m);
-  }
-
-
-  /// Combination of two maps using the \c == operator
-
-  /// This \ref concepts::ReadMap "read-only map" assigns \c true to
-  /// the keys for which the corresponding values of the two maps are
-  /// equal.
-  /// Its \c Key type is inherited from \c M1 and its \c Value type is
-  /// \c bool. \c M2::Key must be convertible to \c M1::Key.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   EqualMap<M1,M2> em(m1,m2);
-  /// \endcode
-  /// <tt>em[x]</tt> will be equal to <tt>m1[x]==m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the equalMap()
-  /// function.
-  ///
-  /// \sa LessMap
-  template<typename M1, typename M2>
-  class EqualMap : public MapBase<typename M1::Key, bool> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    EqualMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]==_m2[k]; }
-  };
-
-  /// Returns an \c EqualMap class
-
-  /// This function just returns an \c EqualMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are maps with keys and values of
-  /// the same type, then <tt>equalMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]==m2[x]</tt>.
-  ///
-  /// \relates EqualMap
-  template<typename M1, typename M2>
-  inline EqualMap<M1, M2> equalMap(const M1 &m1, const M2 &m2) {
-    return EqualMap<M1, M2>(m1,m2);
-  }
-
-
-  /// Combination of two maps using the \c < operator
-
-  /// This \ref concepts::ReadMap "read-only map" assigns \c true to
-  /// the keys for which the corresponding value of the first map is
-  /// less then the value of the second map.
-  /// Its \c Key type is inherited from \c M1 and its \c Value type is
-  /// \c bool. \c M2::Key must be convertible to \c M1::Key.
-  ///
-  /// If \c m1 is of type \c M1 and \c m2 is of \c M2, then for
-  /// \code
-  ///   LessMap<M1,M2> lm(m1,m2);
-  /// \endcode
-  /// <tt>lm[x]</tt> will be equal to <tt>m1[x]<m2[x]</tt>.
-  ///
-  /// The simplest way of using this map is through the lessMap()
-  /// function.
-  ///
-  /// \sa EqualMap
-  template<typename M1, typename M2>
-  class LessMap : public MapBase<typename M1::Key, bool> {
-    const M1 &_m1;
-    const M2 &_m2;
-  public:
-    typedef MapBase<typename M1::Key, bool> Parent;
-    typedef typename Parent::Key Key;
-    typedef typename Parent::Value Value;
-
-    /// Constructor
-    LessMap(const M1 &m1, const M2 &m2) : _m1(m1), _m2(m2) {}
-    /// \e
-    Value operator[](const Key &k) const { return _m1[k]<_m2[k]; }
-  };
-
-  /// Returns an \c LessMap class
-
-  /// This function just returns an \c LessMap class.
-  ///
-  /// For example, if \c m1 and \c m2 are maps with keys and values of
-  /// the same type, then <tt>lessMap(m1,m2)[x]</tt> will be equal to
-  /// <tt>m1[x]<m2[x]</tt>.
-  ///
-  /// \relates LessMap
-  template<typename M1, typename M2>
-  inline LessMap<M1, M2> lessMap(const M1 &m1, const M2 &m2) {
-    return LessMap<M1, M2>(m1,m2);
-  }
-
-  namespace _maps_bits {
-
-    template <typename _Iterator, typename Enable = void>
-    struct IteratorTraits {
-      typedef typename std::iterator_traits<_Iterator>::value_type Value;
-    };
-
-    template <typename _Iterator>
-    struct IteratorTraits<_Iterator,
-      typename exists<typename _Iterator::container_type>::type>
-    {
-      typedef typename _Iterator::container_type::value_type Value;
-    };
-
-  }
-
-  /// @}
-
-  /// \addtogroup maps
-  /// @{
-
-  /// \brief Writable bool map for logging each \c true assigned element
-  ///
-  /// A \ref concepts::WriteMap "writable" bool map for logging
-  /// each \c true assigned element, i.e it copies subsequently each
-  /// keys set to \c true to the given iterator.
-  /// The most important usage of it is storing certain nodes or arcs
-  /// that were marked \c true by an algorithm.
-  ///
-  /// There are several algorithms that provide solutions through bool
-  /// maps and most of them assign \c true at most once for each key.
-  /// In these cases it is a natural request to store each \c true
-  /// assigned elements (in order of the assignment), which can be
-  /// easily done with LoggerBoolMap.
-  ///
-  /// The simplest way of using this map is through the loggerBoolMap()
-  /// function.
-  ///
-  /// \tparam It The type of the iterator.
-  /// \tparam Ke The key type of the map. The default value set
-  /// according to the iterator type should work in most cases.
-  ///
-  /// \note The container of the iterator must contain enough space
-  /// for the elements or the iterator should be an inserter iterator.
-#ifdef DOXYGEN
-  template <typename It, typename Ke>
-#else
-  template <typename It,
-            typename Ke=typename _maps_bits::IteratorTraits<It>::Value>
-#endif
-  class LoggerBoolMap {
-  public:
-    typedef It Iterator;
-
-    typedef Ke Key;
-    typedef bool Value;
-
-    /// Constructor
-    LoggerBoolMap(Iterator it)
-      : _begin(it), _end(it) {}
-
-    /// Gives back the given iterator set for the first key
-    Iterator begin() const {
-      return _begin;
-    }
-
-    /// Gives back the the 'after the last' iterator
-    Iterator end() const {
-      return _end;
-    }
-
-    /// The set function of the map
-    void set(const Key& key, Value value) {
-      if (value) {
-        *_end++ = key;
-      }
-    }
-
-  private:
-    Iterator _begin;
-    Iterator _end;
-  };
-
-  /// Returns a \c LoggerBoolMap class
-
-  /// This function just returns a \c LoggerBoolMap class.
-  ///
-  /// The most important usage of it is storing certain nodes or arcs
-  /// that were marked \c true by an algorithm.
-  /// For example it makes easier to store the nodes in the processing
-  /// order of Dfs algorithm, as the following examples show.
-  /// \code
-  ///   std::vector<Node> v;
-  ///   dfs(g,s).processedMap(loggerBoolMap(std::back_inserter(v))).run();
-  /// \endcode
-  /// \code
-  ///   std::vector<Node> v(countNodes(g));
-  ///   dfs(g,s).processedMap(loggerBoolMap(v.begin())).run();
-  /// \endcode
-  ///
-  /// \note The container of the iterator must contain enough space
-  /// for the elements or the iterator should be an inserter iterator.
-  ///
-  /// \note LoggerBoolMap is just \ref concepts::WriteMap "writable", so
-  /// it cannot be used when a readable map is needed, for example as
-  /// \c ReachedMap for \c Bfs, \c Dfs and \c Dijkstra algorithms.
-  ///
-  /// \relates LoggerBoolMap
-  template<typename Iterator>
-  inline LoggerBoolMap<Iterator> loggerBoolMap(Iterator it) {
-    return LoggerBoolMap<Iterator>(it);
-  }
-
-  /// @}
-
-  /// \addtogroup graph_maps
-  /// @{
-
-  /// Provides an immutable and unique id for each item in the graph.
-
-  /// The IdMap class provides a unique and immutable id for each item of the
-  /// same type (e.g. node) in the graph. This id is <ul><li>\b unique:
-  /// different items (nodes) get different ids <li>\b immutable: the id of an
-  /// item (node) does not change (even if you delete other nodes).  </ul>
-  /// Through this map you get access (i.e. can read) the inner id values of
-  /// the items stored in the graph. This map can be inverted with its member
-  /// class \c InverseMap or with the \c operator() member.
-  ///
-  template <typename _Graph, typename _Item>
-  class IdMap {
-  public:
-    typedef _Graph Graph;
-    typedef int Value;
-    typedef _Item Item;
-    typedef _Item Key;
-
-    /// \brief Constructor.
-    ///
-    /// Constructor of the map.
-    explicit IdMap(const Graph& graph) : _graph(&graph) {}
-
-    /// \brief Gives back the \e id of the item.
-    ///
-    /// Gives back the immutable and unique \e id of the item.
-    int operator[](const Item& item) const { return _graph->id(item);}
-
-    /// \brief Gives back the item by its id.
-    ///
-    /// Gives back the item by its id.
-    Item operator()(int id) { return _graph->fromId(id, Item()); }
-
-  private:
-    const Graph* _graph;
-
-  public:
-
-    /// \brief The class represents the inverse of its owner (IdMap).
-    ///
-    /// The class represents the inverse of its owner (IdMap).
-    /// \see inverse()
-    class InverseMap {
-    public:
-
-      /// \brief Constructor.
-      ///
-      /// Constructor for creating an id-to-item map.
-      explicit InverseMap(const Graph& graph) : _graph(&graph) {}
-
-      /// \brief Constructor.
-      ///
-      /// Constructor for creating an id-to-item map.
-      explicit InverseMap(const IdMap& map) : _graph(map._graph) {}
-
-      /// \brief Gives back the given item from its id.
-      ///
-      /// Gives back the given item from its id.
-      ///
-      Item operator[](int id) const { return _graph->fromId(id, Item());}
-
-    private:
-      const Graph* _graph;
-    };
-
-    /// \brief Gives back the inverse of the map.
-    ///
-    /// Gives back the inverse of the IdMap.
-    InverseMap inverse() const { return InverseMap(*_graph);}
-
-  };
-
-  /// \brief Returns the source of the given arc.
-  ///
-  /// The SourceMap gives back the source Node of the given arc.
-  /// \see TargetMap
-  template <typename Digraph>
-  class SourceMap {
-  public:
-
-    typedef typename Digraph::Node Value;
-    typedef typename Digraph::Arc Key;
-
-    /// \brief Constructor
-    ///
-    /// Constructor
-    /// \param digraph The digraph that the map belongs to.
-    explicit SourceMap(const Digraph& digraph) : _digraph(digraph) {}
-
-    /// \brief The subscript operator.
-    ///
-    /// The subscript operator.
-    /// \param arc The arc
-    /// \return The source of the arc
-    Value operator[](const Key& arc) const {
-      return _digraph.source(arc);
-    }
-
-  private:
-    const Digraph& _digraph;
-  };
-
-  /// \brief Returns a \c SourceMap class.
-  ///
-  /// This function just returns an \c SourceMap class.
-  /// \relates SourceMap
-  template <typename Digraph>
-  inline SourceMap<Digraph> sourceMap(const Digraph& digraph) {
-    return SourceMap<Digraph>(digraph);
-  }
-
-  /// \brief Returns the target of the given arc.
-  ///
-  /// The TargetMap gives back the target Node of the given arc.
-  /// \see SourceMap
-  template <typename Digraph>
-  class TargetMap {
-  public:
-
-    typedef typename Digraph::Node Value;
-    typedef typename Digraph::Arc Key;
-
-    /// \brief Constructor
-    ///
-    /// Constructor
-    /// \param digraph The digraph that the map belongs to.
-    explicit TargetMap(const Digraph& digraph) : _digraph(digraph) {}
-
-    /// \brief The subscript operator.
-    ///
-    /// The subscript operator.
-    /// \param e The arc
-    /// \return The target of the arc
-    Value operator[](const Key& e) const {
-      return _digraph.target(e);
-    }
-
-  private:
-    const Digraph& _digraph;
-  };
-
-  /// \brief Returns a \c TargetMap class.
-  ///
-  /// This function just returns a \c TargetMap class.
-  /// \relates TargetMap
-  template <typename Digraph>
-  inline TargetMap<Digraph> targetMap(const Digraph& digraph) {
-    return TargetMap<Digraph>(digraph);
-  }
-
-  /// \brief Returns the "forward" directed arc view of an edge.
-  ///
-  /// Returns the "forward" directed arc view of an edge.
-  /// \see BackwardMap
-  template <typename Graph>
-  class ForwardMap {
-  public:
-
-    typedef typename Graph::Arc Value;
-    typedef typename Graph::Edge Key;
-
-    /// \brief Constructor
-    ///
-    /// Constructor
-    /// \param graph The graph that the map belongs to.
-    explicit ForwardMap(const Graph& graph) : _graph(graph) {}
-
-    /// \brief The subscript operator.
-    ///
-    /// The subscript operator.
-    /// \param key An edge
-    /// \return The "forward" directed arc view of edge
-    Value operator[](const Key& key) const {
-      return _graph.direct(key, true);
-    }
-
-  private:
-    const Graph& _graph;
-  };
-
-  /// \brief Returns a \c ForwardMap class.
-  ///
-  /// This function just returns an \c ForwardMap class.
-  /// \relates ForwardMap
-  template <typename Graph>
-  inline ForwardMap<Graph> forwardMap(const Graph& graph) {
-    return ForwardMap<Graph>(graph);
-  }
-
-  /// \brief Returns the "backward" directed arc view of an edge.
-  ///
-  /// Returns the "backward" directed arc view of an edge.
-  /// \see ForwardMap
-  template <typename Graph>
-  class BackwardMap {
-  public:
-
-    typedef typename Graph::Arc Value;
-    typedef typename Graph::Edge Key;
-
-    /// \brief Constructor
-    ///
-    /// Constructor
-    /// \param graph The graph that the map belongs to.
-    explicit BackwardMap(const Graph& graph) : _graph(graph) {}
-
-    /// \brief The subscript operator.
-    ///
-    /// The subscript operator.
-    /// \param key An edge
-    /// \return The "backward" directed arc view of edge
-    Value operator[](const Key& key) const {
-      return _graph.direct(key, false);
-    }
-
-  private:
-    const Graph& _graph;
-  };
-
-  /// \brief Returns a \c BackwardMap class
-
-  /// This function just returns a \c BackwardMap class.
-  /// \relates BackwardMap
-  template <typename Graph>
-  inline BackwardMap<Graph> backwardMap(const Graph& graph) {
-    return BackwardMap<Graph>(graph);
-  }
-
-  /// \brief Potential difference map
-  ///
-  /// If there is an potential map on the nodes then we
-  /// can get an arc map as we get the substraction of the
-  /// values of the target and source.
-  template <typename Digraph, typename NodeMap>
-  class PotentialDifferenceMap {
-  public:
-    typedef typename Digraph::Arc Key;
-    typedef typename NodeMap::Value Value;
-
-    /// \brief Constructor
-    ///
-    /// Contructor of the map
-    explicit PotentialDifferenceMap(const Digraph& digraph,
-                                    const NodeMap& potential)
-      : _digraph(digraph), _potential(potential) {}
-
-    /// \brief Const subscription operator
-    ///
-    /// Const subscription operator
-    Value operator[](const Key& arc) const {
-      return _potential[_digraph.target(arc)] -
-        _potential[_digraph.source(arc)];
-    }
-
-  private:
-    const Digraph& _digraph;
-    const NodeMap& _potential;
-  };
-
-  /// \brief Returns a PotentialDifferenceMap.
-  ///
-  /// This function just returns a PotentialDifferenceMap.
-  /// \relates PotentialDifferenceMap
-  template <typename Digraph, typename NodeMap>
-  PotentialDifferenceMap<Digraph, NodeMap>
-  potentialDifferenceMap(const Digraph& digraph, const NodeMap& potential) {
-    return PotentialDifferenceMap<Digraph, NodeMap>(digraph, potential);
-  }
-
-  /// \brief Map of the node in-degrees.
-  ///
-  /// This map returns the in-degree of a node. Once it is constructed,
-  /// the degrees are stored in a standard NodeMap, so each query is done
-  /// in constant time. On the other hand, the values are updated automatically
-  /// whenever the digraph changes.
-  ///
-  /// \warning Besides addNode() and addArc(), a digraph structure may provide
-  /// alternative ways to modify the digraph. The correct behavior of InDegMap
-  /// is not guarantied if these additional features are used. For example
-  /// the functions \ref ListDigraph::changeSource() "changeSource()",
-  /// \ref ListDigraph::changeTarget() "changeTarget()" and
-  /// \ref ListDigraph::reverseArc() "reverseArc()"
-  /// of \ref ListDigraph will \e not update the degree values correctly.
-  ///
-  /// \sa OutDegMap
-
-  template <typename _Digraph>
-  class InDegMap
-    : protected ItemSetTraits<_Digraph, typename _Digraph::Arc>
-      ::ItemNotifier::ObserverBase {
-
-  public:
-
-    typedef _Digraph Digraph;
-    typedef int Value;
-    typedef typename Digraph::Node Key;
-
-    typedef typename ItemSetTraits<Digraph, typename Digraph::Arc>
-    ::ItemNotifier::ObserverBase Parent;
-
-  private:
-
-    class AutoNodeMap
-      : public ItemSetTraits<Digraph, Key>::template Map<int>::Type {
-    public:
-
-      typedef typename ItemSetTraits<Digraph, Key>::
-      template Map<int>::Type Parent;
-
-      AutoNodeMap(const Digraph& digraph) : Parent(digraph, 0) {}
-
-      virtual void add(const Key& key) {
-        Parent::add(key);
-        Parent::set(key, 0);
-      }
-
-      virtual void add(const std::vector<Key>& keys) {
-        Parent::add(keys);
-        for (int i = 0; i < int(keys.size()); ++i) {
-          Parent::set(keys[i], 0);
-        }
-      }
-
-      virtual void build() {
-        Parent::build();
-        Key it;
-        typename Parent::Notifier* nf = Parent::notifier();
-        for (nf->first(it); it != INVALID; nf->next(it)) {
-          Parent::set(it, 0);
-        }
-      }
-    };
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// Constructor for creating in-degree map.
-    explicit InDegMap(const Digraph& digraph)
-      : _digraph(digraph), _deg(digraph) {
-      Parent::attach(_digraph.notifier(typename Digraph::Arc()));
-
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = countInArcs(_digraph, it);
-      }
-    }
-
-    /// Gives back the in-degree of a Node.
-    int operator[](const Key& key) const {
-      return _deg[key];
-    }
-
-  protected:
-
-    typedef typename Digraph::Arc Arc;
-
-    virtual void add(const Arc& arc) {
-      ++_deg[_digraph.target(arc)];
-    }
-
-    virtual void add(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        ++_deg[_digraph.target(arcs[i])];
-      }
-    }
-
-    virtual void erase(const Arc& arc) {
-      --_deg[_digraph.target(arc)];
-    }
-
-    virtual void erase(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        --_deg[_digraph.target(arcs[i])];
-      }
-    }
-
-    virtual void build() {
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = countInArcs(_digraph, it);
-      }
-    }
-
-    virtual void clear() {
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = 0;
-      }
-    }
-  private:
-
-    const Digraph& _digraph;
-    AutoNodeMap _deg;
-  };
-
-  /// \brief Map of the node out-degrees.
-  ///
-  /// This map returns the out-degree of a node. Once it is constructed,
-  /// the degrees are stored in a standard NodeMap, so each query is done
-  /// in constant time. On the other hand, the values are updated automatically
-  /// whenever the digraph changes.
-  ///
-  /// \warning Besides addNode() and addArc(), a digraph structure may provide
-  /// alternative ways to modify the digraph. The correct behavior of OutDegMap
-  /// is not guarantied if these additional features are used. For example
-  /// the functions \ref ListDigraph::changeSource() "changeSource()",
-  /// \ref ListDigraph::changeTarget() "changeTarget()" and
-  /// \ref ListDigraph::reverseArc() "reverseArc()"
-  /// of \ref ListDigraph will \e not update the degree values correctly.
-  ///
-  /// \sa InDegMap
-
-  template <typename _Digraph>
-  class OutDegMap
-    : protected ItemSetTraits<_Digraph, typename _Digraph::Arc>
-      ::ItemNotifier::ObserverBase {
-
-  public:
-
-    typedef _Digraph Digraph;
-    typedef int Value;
-    typedef typename Digraph::Node Key;
-
-    typedef typename ItemSetTraits<Digraph, typename Digraph::Arc>
-    ::ItemNotifier::ObserverBase Parent;
-
-  private:
-
-    class AutoNodeMap
-      : public ItemSetTraits<Digraph, Key>::template Map<int>::Type {
-    public:
-
-      typedef typename ItemSetTraits<Digraph, Key>::
-      template Map<int>::Type Parent;
-
-      AutoNodeMap(const Digraph& digraph) : Parent(digraph, 0) {}
-
-      virtual void add(const Key& key) {
-        Parent::add(key);
-        Parent::set(key, 0);
-      }
-      virtual void add(const std::vector<Key>& keys) {
-        Parent::add(keys);
-        for (int i = 0; i < int(keys.size()); ++i) {
-          Parent::set(keys[i], 0);
-        }
-      }
-      virtual void build() {
-        Parent::build();
-        Key it;
-        typename Parent::Notifier* nf = Parent::notifier();
-        for (nf->first(it); it != INVALID; nf->next(it)) {
-          Parent::set(it, 0);
-        }
-      }
-    };
-
-  public:
-
-    /// \brief Constructor.
-    ///
-    /// Constructor for creating out-degree map.
-    explicit OutDegMap(const Digraph& digraph)
-      : _digraph(digraph), _deg(digraph) {
-      Parent::attach(_digraph.notifier(typename Digraph::Arc()));
-
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = countOutArcs(_digraph, it);
-      }
-    }
-
-    /// Gives back the out-degree of a Node.
-    int operator[](const Key& key) const {
-      return _deg[key];
-    }
-
-  protected:
-
-    typedef typename Digraph::Arc Arc;
-
-    virtual void add(const Arc& arc) {
-      ++_deg[_digraph.source(arc)];
-    }
-
-    virtual void add(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        ++_deg[_digraph.source(arcs[i])];
-      }
-    }
-
-    virtual void erase(const Arc& arc) {
-      --_deg[_digraph.source(arc)];
-    }
-
-    virtual void erase(const std::vector<Arc>& arcs) {
-      for (int i = 0; i < int(arcs.size()); ++i) {
-        --_deg[_digraph.source(arcs[i])];
-      }
-    }
-
-    virtual void build() {
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = countOutArcs(_digraph, it);
-      }
-    }
-
-    virtual void clear() {
-      for(typename Digraph::NodeIt it(_digraph); it != INVALID; ++it) {
-        _deg[it] = 0;
-      }
-    }
-  private:
-
-    const Digraph& _digraph;
-    AutoNodeMap _deg;
-  };
-
-  /// @}
-}
-
-#endif // LEMON_MAPS_H
Index: mon/math.h
===================================================================
--- lemon/math.h	(revision 209)
+++ 	(revision )
@@ -1,63 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_MATH_H
-#define LEMON_MATH_H
-
-///\ingroup misc
-///\file
-///\brief Some extensions to the standard \c cmath library.
-///
-///Some extensions to the standard \c cmath library.
-///
-///This file includes the standard math library (cmath).
-
-#include<cmath>
-
-namespace lemon {
-
-  /// \addtogroup misc
-  /// @{
-
-  /// The Euler constant
-  const long double E       = 2.7182818284590452353602874713526625L;
-  /// log_2(e)
-  const long double LOG2E   = 1.4426950408889634073599246810018921L;
-  /// log_10(e)
-  const long double LOG10E  = 0.4342944819032518276511289189166051L;
-  /// ln(2)
-  const long double LN2     = 0.6931471805599453094172321214581766L;
-  /// ln(10)
-  const long double LN10    = 2.3025850929940456840179914546843642L;
-  /// pi
-  const long double PI      = 3.1415926535897932384626433832795029L;
-  /// pi/2
-  const long double PI_2    = 1.5707963267948966192313216916397514L;
-  /// pi/4
-  const long double PI_4    = 0.7853981633974483096156608458198757L;
-  /// sqrt(2)
-  const long double SQRT2   = 1.4142135623730950488016887242096981L;
-  /// 1/sqrt(2)
-  const long double SQRT1_2 = 0.7071067811865475244008443621048490L;
-
-
-  /// @}
-
-} //namespace lemon
-
-#endif //LEMON_TOLERANCE_H
Index: mon/path.h
===================================================================
--- lemon/path.h	(revision 427)
+++ 	(revision )
@@ -1,1112 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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 paths
-///\file
-///\brief Classes for representing paths in digraphs.
-///
-
-#ifndef LEMON_PATH_H
-#define LEMON_PATH_H
-
-#include <vector>
-#include <algorithm>
-
-#include <lemon/error.h>
-#include <lemon/core.h>
-#include <lemon/concepts/path.h>
-
-namespace lemon {
-
-  /// \addtogroup paths
-  /// @{
-
-
-  /// \brief A structure for representing directed paths in a digraph.
-  ///
-  /// A structure for representing directed path in a digraph.
-  /// \tparam _Digraph The digraph type in which the path is.
-  ///
-  /// In a sense, the path can be treated as a list of arcs. The
-  /// lemon path type stores just this list. As a consequence, it
-  /// cannot enumerate the nodes of the path and the source node of
-  /// a zero length path is undefined.
-  ///
-  /// This implementation is a back and front insertable and erasable
-  /// path type. It can be indexed in O(1) time. The front and back
-  /// insertion and erase is done in O(1) (amortized) time. The
-  /// implementation uses two vectors for storing the front and back
-  /// insertions.
-  template <typename _Digraph>
-  class Path {
-  public:
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-
-    /// \brief Default constructor
-    ///
-    /// Default constructor
-    Path() {}
-
-    /// \brief Template copy constructor
-    ///
-    /// This constuctor initializes the path from any other path type.
-    /// It simply makes a copy of the given path.
-    template <typename CPath>
-    Path(const CPath& cpath) {
-      pathCopy(cpath, *this);
-    }
-
-    /// \brief Template copy assignment
-    ///
-    /// This operator makes a copy of a path of any other type.
-    template <typename CPath>
-    Path& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
-      return *this;
-    }
-
-    /// \brief LEMON style iterator for path arcs
-    ///
-    /// This class is used to iterate on the arcs of the paths.
-    class ArcIt {
-      friend class Path;
-    public:
-      /// \brief Default constructor
-      ArcIt() {}
-      /// \brief Invalid constructor
-      ArcIt(Invalid) : path(0), idx(-1) {}
-      /// \brief Initializate the iterator to the first arc of path
-      ArcIt(const Path &_path)
-        : path(&_path), idx(_path.empty() ? -1 : 0) {}
-
-    private:
-
-      ArcIt(const Path &_path, int _idx)
-        : path(&_path), idx(_idx) {}
-
-    public:
-
-      /// \brief Conversion to Arc
-      operator const Arc&() const {
-        return path->nth(idx);
-      }
-
-      /// \brief Next arc
-      ArcIt& operator++() {
-        ++idx;
-        if (idx >= path->length()) idx = -1;
-        return *this;
-      }
-
-      /// \brief Comparison operator
-      bool operator==(const ArcIt& e) const { return idx==e.idx; }
-      /// \brief Comparison operator
-      bool operator!=(const ArcIt& e) const { return idx!=e.idx; }
-      /// \brief Comparison operator
-      bool operator<(const ArcIt& e) const { return idx<e.idx; }
-
-    private:
-      const Path *path;
-      int idx;
-    };
-
-    /// \brief Length of the path.
-    int length() const { return head.size() + tail.size(); }
-    /// \brief Return whether the path is empty.
-    bool empty() const { return head.empty() && tail.empty(); }
-
-    /// \brief Reset the path to an empty one.
-    void clear() { head.clear(); tail.clear(); }
-
-    /// \brief The nth arc.
-    ///
-    /// \pre n is in the [0..length() - 1] range
-    const Arc& nth(int n) const {
-      return n < int(head.size()) ? *(head.rbegin() + n) :
-        *(tail.begin() + (n - head.size()));
-    }
-
-    /// \brief Initialize arc iterator to point to the nth arc
-    ///
-    /// \pre n is in the [0..length() - 1] range
-    ArcIt nthIt(int n) const {
-      return ArcIt(*this, n);
-    }
-
-    /// \brief The first arc of the path
-    const Arc& front() const {
-      return head.empty() ? tail.front() : head.back();
-    }
-
-    /// \brief Add a new arc before the current path
-    void addFront(const Arc& arc) {
-      head.push_back(arc);
-    }
-
-    /// \brief Erase the first arc of the path
-    void eraseFront() {
-      if (!head.empty()) {
-        head.pop_back();
-      } else {
-        head.clear();
-        int halfsize = tail.size() / 2;
-        head.resize(halfsize);
-        std::copy(tail.begin() + 1, tail.begin() + halfsize + 1,
-                  head.rbegin());
-        std::copy(tail.begin() + halfsize + 1, tail.end(), tail.begin());
-        tail.resize(tail.size() - halfsize - 1);
-      }
-    }
-
-    /// \brief The last arc of the path
-    const Arc& back() const {
-      return tail.empty() ? head.front() : tail.back();
-    }
-
-    /// \brief Add a new arc behind the current path
-    void addBack(const Arc& arc) {
-      tail.push_back(arc);
-    }
-
-    /// \brief Erase the last arc of the path
-    void eraseBack() {
-      if (!tail.empty()) {
-        tail.pop_back();
-      } else {
-        int halfsize = head.size() / 2;
-        tail.resize(halfsize);
-        std::copy(head.begin() + 1, head.begin() + halfsize + 1,
-                  tail.rbegin());
-        std::copy(head.begin() + halfsize + 1, head.end(), head.begin());
-        head.resize(head.size() - halfsize - 1);
-      }
-    }
-
-    typedef True BuildTag;
-
-    template <typename CPath>
-    void build(const CPath& path) {
-      int len = path.length();
-      tail.reserve(len);
-      for (typename CPath::ArcIt it(path); it != INVALID; ++it) {
-        tail.push_back(it);
-      }
-    }
-
-    template <typename CPath>
-    void buildRev(const CPath& path) {
-      int len = path.length();
-      head.reserve(len);
-      for (typename CPath::RevArcIt it(path); it != INVALID; ++it) {
-        head.push_back(it);
-      }
-    }
-
-  protected:
-    typedef std::vector<Arc> Container;
-    Container head, tail;
-
-  };
-
-  /// \brief A structure for representing directed paths in a digraph.
-  ///
-  /// A structure for representing directed path in a digraph.
-  /// \tparam _Digraph The digraph type in which the path is.
-  ///
-  /// In a sense, the path can be treated as a list of arcs. The
-  /// lemon path type stores just this list. As a consequence it
-  /// cannot enumerate the nodes in the path and the zero length paths
-  /// cannot store the source.
-  ///
-  /// This implementation is a just back insertable and erasable path
-  /// type. It can be indexed in O(1) time. The back insertion and
-  /// erasure is amortized O(1) time. This implementation is faster
-  /// then the \c Path type because it use just one vector for the
-  /// arcs.
-  template <typename _Digraph>
-  class SimplePath {
-  public:
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-
-    /// \brief Default constructor
-    ///
-    /// Default constructor
-    SimplePath() {}
-
-    /// \brief Template copy constructor
-    ///
-    /// This path can be initialized with any other path type. It just
-    /// makes a copy of the given path.
-    template <typename CPath>
-    SimplePath(const CPath& cpath) {
-      pathCopy(cpath, *this);
-    }
-
-    /// \brief Template copy assignment
-    ///
-    /// This path can be initialized with any other path type. It just
-    /// makes a copy of the given path.
-    template <typename CPath>
-    SimplePath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
-      return *this;
-    }
-
-    /// \brief Iterator class to iterate on the arcs of the paths
-    ///
-    /// This class is used to iterate on the arcs of the paths
-    ///
-    /// Of course it converts to Digraph::Arc
-    class ArcIt {
-      friend class SimplePath;
-    public:
-      /// Default constructor
-      ArcIt() {}
-      /// Invalid constructor
-      ArcIt(Invalid) : path(0), idx(-1) {}
-      /// \brief Initializate the constructor to the first arc of path
-      ArcIt(const SimplePath &_path)
-        : path(&_path), idx(_path.empty() ? -1 : 0) {}
-
-    private:
-
-      /// Constructor with starting point
-      ArcIt(const SimplePath &_path, int _idx)
-        : idx(_idx), path(&_path) {}
-
-    public:
-
-      ///Conversion to Digraph::Arc
-      operator const Arc&() const {
-        return path->nth(idx);
-      }
-
-      /// Next arc
-      ArcIt& operator++() {
-        ++idx;
-        if (idx >= path->length()) idx = -1;
-        return *this;
-      }
-
-      /// Comparison operator
-      bool operator==(const ArcIt& e) const { return idx==e.idx; }
-      /// Comparison operator
-      bool operator!=(const ArcIt& e) const { return idx!=e.idx; }
-      /// Comparison operator
-      bool operator<(const ArcIt& e) const { return idx<e.idx; }
-
-    private:
-      const SimplePath *path;
-      int idx;
-    };
-
-    /// \brief Length of the path.
-    int length() const { return data.size(); }
-    /// \brief Return true if the path is empty.
-    bool empty() const { return data.empty(); }
-
-    /// \brief Reset the path to an empty one.
-    void clear() { data.clear(); }
-
-    /// \brief The nth arc.
-    ///
-    /// \pre n is in the [0..length() - 1] range
-    const Arc& nth(int n) const {
-      return data[n];
-    }
-
-    /// \brief  Initializes arc iterator to point to the nth arc.
-    ArcIt nthIt(int n) const {
-      return ArcIt(*this, n);
-    }
-
-    /// \brief The first arc of the path.
-    const Arc& front() const {
-      return data.front();
-    }
-
-    /// \brief The last arc of the path.
-    const Arc& back() const {
-      return data.back();
-    }
-
-    /// \brief Add a new arc behind the current path.
-    void addBack(const Arc& arc) {
-      data.push_back(arc);
-    }
-
-    /// \brief Erase the last arc of the path
-    void eraseBack() {
-      data.pop_back();
-    }
-
-    typedef True BuildTag;
-
-    template <typename CPath>
-    void build(const CPath& path) {
-      int len = path.length();
-      data.resize(len);
-      int index = 0;
-      for (typename CPath::ArcIt it(path); it != INVALID; ++it) {
-        data[index] = it;;
-        ++index;
-      }
-    }
-
-    template <typename CPath>
-    void buildRev(const CPath& path) {
-      int len = path.length();
-      data.resize(len);
-      int index = len;
-      for (typename CPath::RevArcIt it(path); it != INVALID; ++it) {
-        --index;
-        data[index] = it;;
-      }
-    }
-
-  protected:
-    typedef std::vector<Arc> Container;
-    Container data;
-
-  };
-
-  /// \brief A structure for representing directed paths in a digraph.
-  ///
-  /// A structure for representing directed path in a digraph.
-  /// \tparam _Digraph The digraph type in which the path is.
-  ///
-  /// In a sense, the path can be treated as a list of arcs. The
-  /// lemon path type stores just this list. As a consequence it
-  /// cannot enumerate the nodes in the path and the zero length paths
-  /// cannot store the source.
-  ///
-  /// This implementation is a back and front insertable and erasable
-  /// path type. It can be indexed in O(k) time, where k is the rank
-  /// of the arc in the path. The length can be computed in O(n)
-  /// time. The front and back insertion and erasure is O(1) time
-  /// and it can be splited and spliced in O(1) time.
-  template <typename _Digraph>
-  class ListPath {
-  public:
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-
-  protected:
-
-    // the std::list<> is incompatible
-    // hard to create invalid iterator
-    struct Node {
-      Arc arc;
-      Node *next, *prev;
-    };
-
-    Node *first, *last;
-
-    std::allocator<Node> alloc;
-
-  public:
-
-    /// \brief Default constructor
-    ///
-    /// Default constructor
-    ListPath() : first(0), last(0) {}
-
-    /// \brief Template copy constructor
-    ///
-    /// This path can be initialized with any other path type. It just
-    /// makes a copy of the given path.
-    template <typename CPath>
-    ListPath(const CPath& cpath) : first(0), last(0) {
-      pathCopy(cpath, *this);
-    }
-
-    /// \brief Destructor of the path
-    ///
-    /// Destructor of the path
-    ~ListPath() {
-      clear();
-    }
-
-    /// \brief Template copy assignment
-    ///
-    /// This path can be initialized with any other path type. It just
-    /// makes a copy of the given path.
-    template <typename CPath>
-    ListPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
-      return *this;
-    }
-
-    /// \brief Iterator class to iterate on the arcs of the paths
-    ///
-    /// This class is used to iterate on the arcs of the paths
-    ///
-    /// Of course it converts to Digraph::Arc
-    class ArcIt {
-      friend class ListPath;
-    public:
-      /// Default constructor
-      ArcIt() {}
-      /// Invalid constructor
-      ArcIt(Invalid) : path(0), node(0) {}
-      /// \brief Initializate the constructor to the first arc of path
-      ArcIt(const ListPath &_path)
-        : path(&_path), node(_path.first) {}
-
-    protected:
-
-      ArcIt(const ListPath &_path, Node *_node)
-        : path(&_path), node(_node) {}
-
-
-    public:
-
-      ///Conversion to Digraph::Arc
-      operator const Arc&() const {
-        return node->arc;
-      }
-
-      /// Next arc
-      ArcIt& operator++() {
-        node = node->next;
-        return *this;
-      }
-
-      /// Comparison operator
-      bool operator==(const ArcIt& e) const { return node==e.node; }
-      /// Comparison operator
-      bool operator!=(const ArcIt& e) const { return node!=e.node; }
-      /// Comparison operator
-      bool operator<(const ArcIt& e) const { return node<e.node; }
-
-    private:
-      const ListPath *path;
-      Node *node;
-    };
-
-    /// \brief The nth arc.
-    ///
-    /// This function looks for the nth arc in O(n) time.
-    /// \pre n is in the [0..length() - 1] range
-    const Arc& nth(int n) const {
-      Node *node = first;
-      for (int i = 0; i < n; ++i) {
-        node = node->next;
-      }
-      return node->arc;
-    }
-
-    /// \brief Initializes arc iterator to point to the nth arc.
-    ArcIt nthIt(int n) const {
-      Node *node = first;
-      for (int i = 0; i < n; ++i) {
-        node = node->next;
-      }
-      return ArcIt(*this, node);
-    }
-
-    /// \brief Length of the path.
-    int length() const {
-      int len = 0;
-      Node *node = first;
-      while (node != 0) {
-        node = node->next;
-        ++len;
-      }
-      return len;
-    }
-
-    /// \brief Return true if the path is empty.
-    bool empty() const { return first == 0; }
-
-    /// \brief Reset the path to an empty one.
-    void clear() {
-      while (first != 0) {
-        last = first->next;
-        alloc.destroy(first);
-        alloc.deallocate(first, 1);
-        first = last;
-      }
-    }
-
-    /// \brief The first arc of the path
-    const Arc& front() const {
-      return first->arc;
-    }
-
-    /// \brief Add a new arc before the current path
-    void addFront(const Arc& arc) {
-      Node *node = alloc.allocate(1);
-      alloc.construct(node, Node());
-      node->prev = 0;
-      node->next = first;
-      node->arc = arc;
-      if (first) {
-        first->prev = node;
-        first = node;
-      } else {
-        first = last = node;
-      }
-    }
-
-    /// \brief Erase the first arc of the path
-    void eraseFront() {
-      Node *node = first;
-      first = first->next;
-      if (first) {
-        first->prev = 0;
-      } else {
-        last = 0;
-      }
-      alloc.destroy(node);
-      alloc.deallocate(node, 1);
-    }
-
-    /// \brief The last arc of the path.
-    const Arc& back() const {
-      return last->arc;
-    }
-
-    /// \brief Add a new arc behind the current path.
-    void addBack(const Arc& arc) {
-      Node *node = alloc.allocate(1);
-      alloc.construct(node, Node());
-      node->next = 0;
-      node->prev = last;
-      node->arc = arc;
-      if (last) {
-        last->next = node;
-        last = node;
-      } else {
-        last = first = node;
-      }
-    }
-
-    /// \brief Erase the last arc of the path
-    void eraseBack() {
-      Node *node = last;
-      last = last->prev;
-      if (last) {
-        last->next = 0;
-      } else {
-        first = 0;
-      }
-      alloc.destroy(node);
-      alloc.deallocate(node, 1);
-    }
-
-    /// \brief Splice a path to the back of the current path.
-    ///
-    /// It splices \c tpath to the back of the current path and \c
-    /// tpath becomes empty. The time complexity of this function is
-    /// O(1).
-    void spliceBack(ListPath& tpath) {
-      if (first) {
-        if (tpath.first) {
-          last->next = tpath.first;
-          tpath.first->prev = last;
-          last = tpath.last;
-        }
-      } else {
-        first = tpath.first;
-        last = tpath.last;
-      }
-      tpath.first = tpath.last = 0;
-    }
-
-    /// \brief Splice a path to the front of the current path.
-    ///
-    /// It splices \c tpath before the current path and \c tpath
-    /// becomes empty. The time complexity of this function
-    /// is O(1).
-    void spliceFront(ListPath& tpath) {
-      if (first) {
-        if (tpath.first) {
-          first->prev = tpath.last;
-          tpath.last->next = first;
-          first = tpath.first;
-        }
-      } else {
-        first = tpath.first;
-        last = tpath.last;
-      }
-      tpath.first = tpath.last = 0;
-    }
-
-    /// \brief Splice a path into the current path.
-    ///
-    /// It splices the \c tpath into the current path before the
-    /// position of \c it iterator and \c tpath becomes empty. The
-    /// time complexity of this function is O(1). If the \c it is
-    /// \c INVALID then it will splice behind the current path.
-    void splice(ArcIt it, ListPath& tpath) {
-      if (it.node) {
-        if (tpath.first) {
-          tpath.first->prev = it.node->prev;
-          if (it.node->prev) {
-            it.node->prev->next = tpath.first;
-          } else {
-            first = tpath.first;
-          }
-          it.node->prev = tpath.last;
-          tpath.last->next = it.node;
-        }
-      } else {
-        if (first) {
-          if (tpath.first) {
-            last->next = tpath.first;
-            tpath.first->prev = last;
-            last = tpath.last;
-          }
-        } else {
-          first = tpath.first;
-          last = tpath.last;
-        }
-      }
-      tpath.first = tpath.last = 0;
-    }
-
-    /// \brief Split the current path.
-    ///
-    /// It splits the current path into two parts. The part before
-    /// the iterator \c it will remain in the current path and the part
-    /// starting with
-    /// \c it will put into \c tpath. If \c tpath have arcs
-    /// before the operation they are removed first.  The time
-    /// complexity of this function is O(1) plus the the time of emtying
-    /// \c tpath. If \c it is \c INVALID then it just clears \c tpath
-    void split(ArcIt it, ListPath& tpath) {
-      tpath.clear();
-      if (it.node) {
-        tpath.first = it.node;
-        tpath.last = last;
-        if (it.node->prev) {
-          last = it.node->prev;
-          last->next = 0;
-        } else {
-          first = last = 0;
-        }
-        it.node->prev = 0;
-      }
-    }
-
-
-    typedef True BuildTag;
-
-    template <typename CPath>
-    void build(const CPath& path) {
-      for (typename CPath::ArcIt it(path); it != INVALID; ++it) {
-        addBack(it);
-      }
-    }
-
-    template <typename CPath>
-    void buildRev(const CPath& path) {
-      for (typename CPath::RevArcIt it(path); it != INVALID; ++it) {
-        addFront(it);
-      }
-    }
-
-  };
-
-  /// \brief A structure for representing directed paths in a digraph.
-  ///
-  /// A structure for representing directed path in a digraph.
-  /// \tparam _Digraph The digraph type in which the path is.
-  ///
-  /// In a sense, the path can be treated as a list of arcs. The
-  /// lemon path type stores just this list. As a consequence it
-  /// cannot enumerate the nodes in the path and the source node of
-  /// a zero length path is undefined.
-  ///
-  /// This implementation is completly static, i.e. it can be copy constucted
-  /// or copy assigned from another path, but otherwise it cannot be
-  /// modified.
-  ///
-  /// Being the the most memory efficient path type in LEMON,
-  /// it is intented to be
-  /// used when you want to store a large number of paths.
-  template <typename _Digraph>
-  class StaticPath {
-  public:
-
-    typedef _Digraph Digraph;
-    typedef typename Digraph::Arc Arc;
-
-    /// \brief Default constructor
-    ///
-    /// Default constructor
-    StaticPath() : len(0), arcs(0) {}
-
-    /// \brief Template copy constructor
-    ///
-    /// This path can be initialized from any other path type.
-    template <typename CPath>
-    StaticPath(const CPath& cpath) : arcs(0) {
-      pathCopy(cpath, *this);
-    }
-
-    /// \brief Destructor of the path
-    ///
-    /// Destructor of the path
-    ~StaticPath() {
-      if (arcs) delete[] arcs;
-    }
-
-    /// \brief Template copy assignment
-    ///
-    /// This path can be made equal to any other path type. It simply
-    /// makes a copy of the given path.
-    template <typename CPath>
-    StaticPath& operator=(const CPath& cpath) {
-      pathCopy(cpath, *this);
-      return *this;
-    }
-
-    /// \brief Iterator class to iterate on the arcs of the paths
-    ///
-    /// This class is used to iterate on the arcs of the paths
-    ///
-    /// Of course it converts to Digraph::Arc
-    class ArcIt {
-      friend class StaticPath;
-    public:
-      /// Default constructor
-      ArcIt() {}
-      /// Invalid constructor
-      ArcIt(Invalid) : path(0), idx(-1) {}
-      /// Initializate the constructor to the first arc of path
-      ArcIt(const StaticPath &_path)
-        : path(&_path), idx(_path.empty() ? -1 : 0) {}
-
-    private:
-
-      /// Constructor with starting point
-      ArcIt(const StaticPath &_path, int _idx)
-        : idx(_idx), path(&_path) {}
-
-    public:
-
-      ///Conversion to Digraph::Arc
-      operator const Arc&() const {
-        return path->nth(idx);
-      }
-
-      /// Next arc
-      ArcIt& operator++() {
-        ++idx;
-        if (idx >= path->length()) idx = -1;
-        return *this;
-      }
-
-      /// Comparison operator
-      bool operator==(const ArcIt& e) const { return idx==e.idx; }
-      /// Comparison operator
-      bool operator!=(const ArcIt& e) const { return idx!=e.idx; }
-      /// Comparison operator
-      bool operator<(const ArcIt& e) const { return idx<e.idx; }
-
-    private:
-      const StaticPath *path;
-      int idx;
-    };
-
-    /// \brief The nth arc.
-    ///
-    /// \pre n is in the [0..length() - 1] range
-    const Arc& nth(int n) const {
-      return arcs[n];
-    }
-
-    /// \brief The arc iterator pointing to the nth arc.
-    ArcIt nthIt(int n) const {
-      return ArcIt(*this, n);
-    }
-
-    /// \brief The length of the path.
-    int length() const { return len; }
-
-    /// \brief Return true when the path is empty.
-    int empty() const { return len == 0; }
-
-    /// \brief Erase all arcs in the digraph.
-    void clear() {
-      len = 0;
-      if (arcs) delete[] arcs;
-      arcs = 0;
-    }
-
-    /// \brief The first arc of the path.
-    const Arc& front() const {
-      return arcs[0];
-    }
-
-    /// \brief The last arc of the path.
-    const Arc& back() const {
-      return arcs[len - 1];
-    }
-
-
-    typedef True BuildTag;
-
-    template <typename CPath>
-    void build(const CPath& path) {
-      len = path.length();
-      arcs = new Arc[len];
-      int index = 0;
-      for (typename CPath::ArcIt it(path); it != INVALID; ++it) {
-        arcs[index] = it;
-        ++index;
-      }
-    }
-
-    template <typename CPath>
-    void buildRev(const CPath& path) {
-      len = path.length();
-      arcs = new Arc[len];
-      int index = len;
-      for (typename CPath::RevArcIt it(path); it != INVALID; ++it) {
-        --index;
-        arcs[index] = it;
-      }
-    }
-
-  private:
-    int len;
-    Arc* arcs;
-  };
-
-  ///////////////////////////////////////////////////////////////////////
-  // Additional utilities
-  ///////////////////////////////////////////////////////////////////////
-
-  namespace _path_bits {
-
-    template <typename Path, typename Enable = void>
-    struct RevPathTagIndicator {
-      static const bool value = false;
-    };
-
-    template <typename Path>
-    struct RevPathTagIndicator<
-      Path,
-      typename enable_if<typename Path::RevPathTag, void>::type
-      > {
-      static const bool value = true;
-    };
-
-    template <typename Path, typename Enable = void>
-    struct BuildTagIndicator {
-      static const bool value = false;
-    };
-
-    template <typename Path>
-    struct BuildTagIndicator<
-      Path,
-      typename enable_if<typename Path::BuildTag, void>::type
-    > {
-      static const bool value = true;
-    };
-
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
-    struct PathCopySelectorForward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::ArcIt it(from); it != INVALID; ++it) {
-          to.addBack(it);
-        }
-      }
-    };
-
-    template <typename From, typename To>
-    struct PathCopySelectorForward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.build(from);
-      }
-    };
-
-    template <typename From, typename To,
-              bool buildEnable = BuildTagIndicator<To>::value>
-    struct PathCopySelectorBackward {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        for (typename From::RevArcIt it(from); it != INVALID; ++it) {
-          to.addFront(it);
-        }
-      }
-    };
-
-    template <typename From, typename To>
-    struct PathCopySelectorBackward<From, To, true> {
-      static void copy(const From& from, To& to) {
-        to.clear();
-        to.buildRev(from);
-      }
-    };
-
-
-    template <typename From, typename To,
-              bool revEnable = RevPathTagIndicator<From>::value>
-    struct PathCopySelector {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorForward<From, To>::copy(from, to);
-      }
-    };
-
-    template <typename From, typename To>
-    struct PathCopySelector<From, To, true> {
-      static void copy(const From& from, To& to) {
-        PathCopySelectorBackward<From, To>::copy(from, to);
-      }
-    };
-
-  }
-
-
-  /// \brief Make a copy of a path.
-  ///
-  /// This function makes a copy of a path.
-  template <typename From, typename To>
-  void pathCopy(const From& from, To& to) {
-    checkConcept<concepts::PathDumper<typename From::Digraph>, From>();
-    _path_bits::PathCopySelector<From, To>::copy(from, to);
-  }
-
-  /// \brief Deprecated version of \ref pathCopy().
-  ///
-  /// Deprecated version of \ref pathCopy() (only for reverse compatibility).
-  template <typename To, typename From>
-  void copyPath(To& to, const From& from) {
-    pathCopy(from, to);
-  }
-
-  /// \brief Check the consistency of a path.
-  ///
-  /// This function checks that the target of each arc is the same
-  /// as the source of the next one.
-  ///
-  template <typename Digraph, typename Path>
-  bool checkPath(const Digraph& digraph, const Path& path) {
-    typename Path::ArcIt it(path);
-    if (it == INVALID) return true;
-    typename Digraph::Node node = digraph.target(it);
-    ++it;
-    while (it != INVALID) {
-      if (digraph.source(it) != node) return false;
-      node = digraph.target(it);
-      ++it;
-    }
-    return true;
-  }
-
-  /// \brief The source of a path
-  ///
-  /// This function returns the source node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
-  template <typename Digraph, typename Path>
-  typename Digraph::Node pathSource(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.source(path.front());
-  }
-
-  /// \brief The target of a path
-  ///
-  /// This function returns the target node of the given path.
-  /// If the path is empty, then it returns \c INVALID.
-  template <typename Digraph, typename Path>
-  typename Digraph::Node pathTarget(const Digraph& digraph, const Path& path) {
-    return path.empty() ? INVALID : digraph.target(path.back());
-  }
-
-  /// \brief Class which helps to iterate through the nodes of a path
-  ///
-  /// In a sense, the path can be treated as a list of arcs. The
-  /// lemon path type stores only this list. As a consequence, it
-  /// cannot enumerate the nodes in the path and the zero length paths
-  /// cannot have a source node.
-  ///
-  /// This class implements the node iterator of a path structure. To
-  /// provide this feature, the underlying digraph should be passed to
-  /// the constructor of the iterator.
-  template <typename Path>
-  class PathNodeIt {
-  private:
-    const typename Path::Digraph *_digraph;
-    typename Path::ArcIt _it;
-    typename Path::Digraph::Node _nd;
-
-  public:
-
-    typedef typename Path::Digraph Digraph;
-    typedef typename Digraph::Node Node;
-
-    /// Default constructor
-    PathNodeIt() {}
-    /// Invalid constructor
-    PathNodeIt(Invalid)
-      : _digraph(0), _it(INVALID), _nd(INVALID) {}
-    /// Constructor
-    PathNodeIt(const Digraph& digraph, const Path& path)
-      : _digraph(&digraph), _it(path) {
-      _nd = (_it != INVALID ? _digraph->source(_it) : INVALID);
-    }
-    /// Constructor
-    PathNodeIt(const Digraph& digraph, const Path& path, const Node& src)
-      : _digraph(&digraph), _it(path), _nd(src) {}
-
-    ///Conversion to Digraph::Node
-    operator Node() const {
-      return _nd;
-    }
-
-    /// Next node
-    PathNodeIt& operator++() {
-      if (_it == INVALID) _nd = INVALID;
-      else {
-        _nd = _digraph->target(_it);
-        ++_it;
-      }
-      return *this;
-    }
-
-    /// Comparison operator
-    bool operator==(const PathNodeIt& n) const {
-      return _it == n._it && _nd == n._nd;
-    }
-    /// Comparison operator
-    bool operator!=(const PathNodeIt& n) const {
-      return _it != n._it || _nd != n._nd;
-    }
-    /// Comparison operator
-    bool operator<(const PathNodeIt& n) const {
-      return (_it < n._it && _nd != INVALID);
-    }
-
-  };
-
-  ///@}
-
-} // namespace lemon
-
-#endif // LEMON_PATH_H
Index: mon/random.cc
===================================================================
--- lemon/random.cc	(revision 209)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-///\file
-///\brief Instantiation of the Random class.
-
-#include <lemon/random.h>
-
-namespace lemon {
-  /// \brief Global random number generator instance
-  ///
-  /// A global Mersenne Twister random number generator instance.
-  Random rnd;
-}
Index: mon/random.h
===================================================================
--- lemon/random.h	(revision 427)
+++ 	(revision )
@@ -1,979 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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 the reimplemented version of the Mersenne Twister
- * Generator of Matsumoto and Nishimura.
- *
- * See the appropriate copyright notice below.
- *
- * Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * 3. The names of its contributors may not be used to endorse or promote
- *    products derived from this software without specific prior written
- *    permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Any feedback is very welcome.
- * http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
- * email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
- */
-
-#ifndef LEMON_RANDOM_H
-#define LEMON_RANDOM_H
-
-#include <algorithm>
-#include <iterator>
-#include <vector>
-#include <limits>
-#include <fstream>
-
-#include <lemon/math.h>
-#include <lemon/dim2.h>
-
-#ifndef WIN32
-#include <sys/time.h>
-#include <ctime>
-#include <sys/types.h>
-#include <unistd.h>
-#else
-#include <lemon/bits/windows.h>
-#endif
-
-///\ingroup misc
-///\file
-///\brief Mersenne Twister random number generator
-
-namespace lemon {
-
-  namespace _random_bits {
-
-    template <typename _Word, int _bits = std::numeric_limits<_Word>::digits>
-    struct RandomTraits {};
-
-    template <typename _Word>
-    struct RandomTraits<_Word, 32> {
-
-      typedef _Word Word;
-      static const int bits = 32;
-
-      static const int length = 624;
-      static const int shift = 397;
-
-      static const Word mul = 0x6c078965u;
-      static const Word arrayInit = 0x012BD6AAu;
-      static const Word arrayMul1 = 0x0019660Du;
-      static const Word arrayMul2 = 0x5D588B65u;
-
-      static const Word mask = 0x9908B0DFu;
-      static const Word loMask = (1u << 31) - 1;
-      static const Word hiMask = ~loMask;
-
-
-      static Word tempering(Word rnd) {
-        rnd ^= (rnd >> 11);
-        rnd ^= (rnd << 7) & 0x9D2C5680u;
-        rnd ^= (rnd << 15) & 0xEFC60000u;
-        rnd ^= (rnd >> 18);
-        return rnd;
-      }
-
-    };
-
-    template <typename _Word>
-    struct RandomTraits<_Word, 64> {
-
-      typedef _Word Word;
-      static const int bits = 64;
-
-      static const int length = 312;
-      static const int shift = 156;
-
-      static const Word mul = Word(0x5851F42Du) << 32 | Word(0x4C957F2Du);
-      static const Word arrayInit = Word(0x00000000u) << 32 |Word(0x012BD6AAu);
-      static const Word arrayMul1 = Word(0x369DEA0Fu) << 32 |Word(0x31A53F85u);
-      static const Word arrayMul2 = Word(0x27BB2EE6u) << 32 |Word(0x87B0B0FDu);
-
-      static const Word mask = Word(0xB5026F5Au) << 32 | Word(0xA96619E9u);
-      static const Word loMask = (Word(1u) << 31) - 1;
-      static const Word hiMask = ~loMask;
-
-      static Word tempering(Word rnd) {
-        rnd ^= (rnd >> 29) & (Word(0x55555555u) << 32 | Word(0x55555555u));
-        rnd ^= (rnd << 17) & (Word(0x71D67FFFu) << 32 | Word(0xEDA60000u));
-        rnd ^= (rnd << 37) & (Word(0xFFF7EEE0u) << 32 | Word(0x00000000u));
-        rnd ^= (rnd >> 43);
-        return rnd;
-      }
-
-    };
-
-    template <typename _Word>
-    class RandomCore {
-    public:
-
-      typedef _Word Word;
-
-    private:
-
-      static const int bits = RandomTraits<Word>::bits;
-
-      static const int length = RandomTraits<Word>::length;
-      static const int shift = RandomTraits<Word>::shift;
-
-    public:
-
-      void initState() {
-        static const Word seedArray[4] = {
-          0x12345u, 0x23456u, 0x34567u, 0x45678u
-        };
-
-        initState(seedArray, seedArray + 4);
-      }
-
-      void initState(Word seed) {
-
-        static const Word mul = RandomTraits<Word>::mul;
-
-        current = state;
-
-        Word *curr = state + length - 1;
-        curr[0] = seed; --curr;
-        for (int i = 1; i < length; ++i) {
-          curr[0] = (mul * ( curr[1] ^ (curr[1] >> (bits - 2)) ) + i);
-          --curr;
-        }
-      }
-
-      template <typename Iterator>
-      void initState(Iterator begin, Iterator end) {
-
-        static const Word init = RandomTraits<Word>::arrayInit;
-        static const Word mul1 = RandomTraits<Word>::arrayMul1;
-        static const Word mul2 = RandomTraits<Word>::arrayMul2;
-
-
-        Word *curr = state + length - 1; --curr;
-        Iterator it = begin; int cnt = 0;
-        int num;
-
-        initState(init);
-
-        num = length > end - begin ? length : end - begin;
-        while (num--) {
-          curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul1))
-            + *it + cnt;
-          ++it; ++cnt;
-          if (it == end) {
-            it = begin; cnt = 0;
-          }
-          if (curr == state) {
-            curr = state + length - 1; curr[0] = state[0];
-          }
-          --curr;
-        }
-
-        num = length - 1; cnt = length - (curr - state) - 1;
-        while (num--) {
-          curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul2))
-            - cnt;
-          --curr; ++cnt;
-          if (curr == state) {
-            curr = state + length - 1; curr[0] = state[0]; --curr;
-            cnt = 1;
-          }
-        }
-
-        state[length - 1] = Word(1) << (bits - 1);
-      }
-
-      void copyState(const RandomCore& other) {
-        std::copy(other.state, other.state + length, state);
-        current = state + (other.current - other.state);
-      }
-
-      Word operator()() {
-        if (current == state) fillState();
-        --current;
-        Word rnd = *current;
-        return RandomTraits<Word>::tempering(rnd);
-      }
-
-    private:
-
-
-      void fillState() {
-        static const Word mask[2] = { 0x0ul, RandomTraits<Word>::mask };
-        static const Word loMask = RandomTraits<Word>::loMask;
-        static const Word hiMask = RandomTraits<Word>::hiMask;
-
-        current = state + length;
-
-        register Word *curr = state + length - 1;
-        register long num;
-
-        num = length - shift;
-        while (num--) {
-          curr[0] = (((curr[0] & hiMask) | (curr[-1] & loMask)) >> 1) ^
-            curr[- shift] ^ mask[curr[-1] & 1ul];
-          --curr;
-        }
-        num = shift - 1;
-        while (num--) {
-          curr[0] = (((curr[0] & hiMask) | (curr[-1] & loMask)) >> 1) ^
-            curr[length - shift] ^ mask[curr[-1] & 1ul];
-          --curr;
-        }
-        state[0] = (((state[0] & hiMask) | (curr[length - 1] & loMask)) >> 1) ^
-          curr[length - shift] ^ mask[curr[length - 1] & 1ul];
-
-      }
-
-
-      Word *current;
-      Word state[length];
-
-    };
-
-
-    template <typename Result,
-              int shift = (std::numeric_limits<Result>::digits + 1) / 2>
-    struct Masker {
-      static Result mask(const Result& result) {
-        return Masker<Result, (shift + 1) / 2>::
-          mask(static_cast<Result>(result | (result >> shift)));
-      }
-    };
-
-    template <typename Result>
-    struct Masker<Result, 1> {
-      static Result mask(const Result& result) {
-        return static_cast<Result>(result | (result >> 1));
-      }
-    };
-
-    template <typename Result, typename Word,
-              int rest = std::numeric_limits<Result>::digits, int shift = 0,
-              bool last = rest <= std::numeric_limits<Word>::digits>
-    struct IntConversion {
-      static const int bits = std::numeric_limits<Word>::digits;
-
-      static Result convert(RandomCore<Word>& rnd) {
-        return static_cast<Result>(rnd() >> (bits - rest)) << shift;
-      }
-
-    };
-
-    template <typename Result, typename Word, int rest, int shift>
-    struct IntConversion<Result, Word, rest, shift, false> {
-      static const int bits = std::numeric_limits<Word>::digits;
-
-      static Result convert(RandomCore<Word>& rnd) {
-        return (static_cast<Result>(rnd()) << shift) |
-          IntConversion<Result, Word, rest - bits, shift + bits>::convert(rnd);
-      }
-    };
-
-
-    template <typename Result, typename Word,
-              bool one_word = (std::numeric_limits<Word>::digits <
-                               std::numeric_limits<Result>::digits) >
-    struct Mapping {
-      static Result map(RandomCore<Word>& rnd, const Result& bound) {
-        Word max = Word(bound - 1);
-        Result mask = Masker<Result>::mask(bound - 1);
-        Result num;
-        do {
-          num = IntConversion<Result, Word>::convert(rnd) & mask;
-        } while (num > max);
-        return num;
-      }
-    };
-
-    template <typename Result, typename Word>
-    struct Mapping<Result, Word, false> {
-      static Result map(RandomCore<Word>& rnd, const Result& bound) {
-        Word max = Word(bound - 1);
-        Word mask = Masker<Word, (std::numeric_limits<Result>::digits + 1) / 2>
-          ::mask(max);
-        Word num;
-        do {
-          num = rnd() & mask;
-        } while (num > max);
-        return num;
-      }
-    };
-
-    template <typename Result, int exp>
-    struct ShiftMultiplier {
-      static const Result multiplier() {
-        Result res = ShiftMultiplier<Result, exp / 2>::multiplier();
-        res *= res;
-        if ((exp & 1) == 1) res *= static_cast<Result>(0.5);
-        return res;
-      }
-    };
-
-    template <typename Result>
-    struct ShiftMultiplier<Result, 0> {
-      static const Result multiplier() {
-        return static_cast<Result>(1.0);
-      }
-    };
-
-    template <typename Result>
-    struct ShiftMultiplier<Result, 20> {
-      static const Result multiplier() {
-        return static_cast<Result>(1.0/1048576.0);
-      }
-    };
-
-    template <typename Result>
-    struct ShiftMultiplier<Result, 32> {
-      static const Result multiplier() {
-        return static_cast<Result>(1.0/4294967296.0);
-      }
-    };
-
-    template <typename Result>
-    struct ShiftMultiplier<Result, 53> {
-      static const Result multiplier() {
-        return static_cast<Result>(1.0/9007199254740992.0);
-      }
-    };
-
-    template <typename Result>
-    struct ShiftMultiplier<Result, 64> {
-      static const Result multiplier() {
-        return static_cast<Result>(1.0/18446744073709551616.0);
-      }
-    };
-
-    template <typename Result, int exp>
-    struct Shifting {
-      static Result shift(const Result& result) {
-        return result * ShiftMultiplier<Result, exp>::multiplier();
-      }
-    };
-
-    template <typename Result, typename Word,
-              int rest = std::numeric_limits<Result>::digits, int shift = 0,
-              bool last = rest <= std::numeric_limits<Word>::digits>
-    struct RealConversion{
-      static const int bits = std::numeric_limits<Word>::digits;
-
-      static Result convert(RandomCore<Word>& rnd) {
-        return Shifting<Result, shift + rest>::
-          shift(static_cast<Result>(rnd() >> (bits - rest)));
-      }
-    };
-
-    template <typename Result, typename Word, int rest, int shift>
-    struct RealConversion<Result, Word, rest, shift, false> {
-      static const int bits = std::numeric_limits<Word>::digits;
-
-      static Result convert(RandomCore<Word>& rnd) {
-        return Shifting<Result, shift + bits>::
-          shift(static_cast<Result>(rnd())) +
-          RealConversion<Result, Word, rest-bits, shift + bits>::
-          convert(rnd);
-      }
-    };
-
-    template <typename Result, typename Word>
-    struct Initializer {
-
-      template <typename Iterator>
-      static void init(RandomCore<Word>& rnd, Iterator begin, Iterator end) {
-        std::vector<Word> ws;
-        for (Iterator it = begin; it != end; ++it) {
-          ws.push_back(Word(*it));
-        }
-        rnd.initState(ws.begin(), ws.end());
-      }
-
-      static void init(RandomCore<Word>& rnd, Result seed) {
-        rnd.initState(seed);
-      }
-    };
-
-    template <typename Word>
-    struct BoolConversion {
-      static bool convert(RandomCore<Word>& rnd) {
-        return (rnd() & 1) == 1;
-      }
-    };
-
-    template <typename Word>
-    struct BoolProducer {
-      Word buffer;
-      int num;
-
-      BoolProducer() : num(0) {}
-
-      bool convert(RandomCore<Word>& rnd) {
-        if (num == 0) {
-          buffer = rnd();
-          num = RandomTraits<Word>::bits;
-        }
-        bool r = (buffer & 1);
-        buffer >>= 1;
-        --num;
-        return r;
-      }
-    };
-
-  }
-
-  /// \ingroup misc
-  ///
-  /// \brief Mersenne Twister random number generator
-  ///
-  /// The Mersenne Twister is a twisted generalized feedback
-  /// shift-register generator of Matsumoto and Nishimura. The period
-  /// of this generator is \f$ 2^{19937} - 1 \f$ and it is
-  /// equi-distributed in 623 dimensions for 32-bit numbers. The time
-  /// performance of this generator is comparable to the commonly used
-  /// generators.
-  ///
-  /// This implementation is specialized for both 32-bit and 64-bit
-  /// architectures. The generators differ sligthly in the
-  /// initialization and generation phase so they produce two
-  /// completly different sequences.
-  ///
-  /// The generator gives back random numbers of serveral types. To
-  /// get a random number from a range of a floating point type you
-  /// can use one form of the \c operator() or the \c real() member
-  /// function. If you want to get random number from the {0, 1, ...,
-  /// n-1} integer range use the \c operator[] or the \c integer()
-  /// method. And to get random number from the whole range of an
-  /// integer type you can use the argumentless \c integer() or \c
-  /// uinteger() functions. After all you can get random bool with
-  /// equal chance of true and false or given probability of true
-  /// result with the \c boolean() member functions.
-  ///
-  ///\code
-  /// // The commented code is identical to the other
-  /// double a = rnd();                     // [0.0, 1.0)
-  /// // double a = rnd.real();             // [0.0, 1.0)
-  /// double b = rnd(100.0);                // [0.0, 100.0)
-  /// // double b = rnd.real(100.0);        // [0.0, 100.0)
-  /// double c = rnd(1.0, 2.0);             // [1.0, 2.0)
-  /// // double c = rnd.real(1.0, 2.0);     // [1.0, 2.0)
-  /// int d = rnd[100000];                  // 0..99999
-  /// // int d = rnd.integer(100000);       // 0..99999
-  /// int e = rnd[6] + 1;                   // 1..6
-  /// // int e = rnd.integer(1, 1 + 6);     // 1..6
-  /// int b = rnd.uinteger<int>();          // 0 .. 2^31 - 1
-  /// int c = rnd.integer<int>();           // - 2^31 .. 2^31 - 1
-  /// bool g = rnd.boolean();               // P(g = true) = 0.5
-  /// bool h = rnd.boolean(0.8);            // P(h = true) = 0.8
-  ///\endcode
-  ///
-  /// LEMON provides a global instance of the random number
-  /// generator which name is \ref lemon::rnd "rnd". Usually it is a
-  /// good programming convenience to use this global generator to get
-  /// random numbers.
-  class Random {
-  private:
-
-    // Architecture word
-    typedef unsigned long Word;
-
-    _random_bits::RandomCore<Word> core;
-    _random_bits::BoolProducer<Word> bool_producer;
-
-
-  public:
-
-    ///\name Initialization
-    ///
-    /// @{
-
-    ///\name Initialization
-    ///
-    /// @{
-
-    /// \brief Default constructor
-    ///
-    /// Constructor with constant seeding.
-    Random() { core.initState(); }
-
-    /// \brief Constructor with seed
-    ///
-    /// Constructor with seed. The current number type will be converted
-    /// to the architecture word type.
-    template <typename Number>
-    Random(Number seed) {
-      _random_bits::Initializer<Number, Word>::init(core, seed);
-    }
-
-    /// \brief Constructor with array seeding
-    ///
-    /// Constructor with array seeding. The given range should contain
-    /// any number type and the numbers will be converted to the
-    /// architecture word type.
-    template <typename Iterator>
-    Random(Iterator begin, Iterator end) {
-      typedef typename std::iterator_traits<Iterator>::value_type Number;
-      _random_bits::Initializer<Number, Word>::init(core, begin, end);
-    }
-
-    /// \brief Copy constructor
-    ///
-    /// Copy constructor. The generated sequence will be identical to
-    /// the other sequence. It can be used to save the current state
-    /// of the generator and later use it to generate the same
-    /// sequence.
-    Random(const Random& other) {
-      core.copyState(other.core);
-    }
-
-    /// \brief Assign operator
-    ///
-    /// Assign operator. The generated sequence will be identical to
-    /// the other sequence. It can be used to save the current state
-    /// of the generator and later use it to generate the same
-    /// sequence.
-    Random& operator=(const Random& other) {
-      if (&other != this) {
-        core.copyState(other.core);
-      }
-      return *this;
-    }
-
-    /// \brief Seeding random sequence
-    ///
-    /// Seeding the random sequence. The current number type will be
-    /// converted to the architecture word type.
-    template <typename Number>
-    void seed(Number seed) {
-      _random_bits::Initializer<Number, Word>::init(core, seed);
-    }
-
-    /// \brief Seeding random sequence
-    ///
-    /// Seeding the random sequence. The given range should contain
-    /// any number type and the numbers will be converted to the
-    /// architecture word type.
-    template <typename Iterator>
-    void seed(Iterator begin, Iterator end) {
-      typedef typename std::iterator_traits<Iterator>::value_type Number;
-      _random_bits::Initializer<Number, Word>::init(core, begin, end);
-    }
-
-    /// \brief Seeding from file or from process id and time
-    ///
-    /// By default, this function calls the \c seedFromFile() member
-    /// function with the <tt>/dev/urandom</tt> file. If it does not success,
-    /// it uses the \c seedFromTime().
-    /// \return Currently always true.
-    bool seed() {
-#ifndef WIN32
-      if (seedFromFile("/dev/urandom", 0)) return true;
-#endif
-      if (seedFromTime()) return true;
-      return false;
-    }
-
-    /// \brief Seeding from file
-    ///
-    /// Seeding the random sequence from file. The linux kernel has two
-    /// devices, <tt>/dev/random</tt> and <tt>/dev/urandom</tt> which
-    /// could give good seed values for pseudo random generators (The
-    /// difference between two devices is that the <tt>random</tt> may
-    /// block the reading operation while the kernel can give good
-    /// source of randomness, while the <tt>urandom</tt> does not
-    /// block the input, but it could give back bytes with worse
-    /// entropy).
-    /// \param file The source file
-    /// \param offset The offset, from the file read.
-    /// \return True when the seeding successes.
-#ifndef WIN32
-    bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0)
-#else
-    bool seedFromFile(const std::string& file = "", int offset = 0)
-#endif
-    {
-      std::ifstream rs(file.c_str());
-      const int size = 4;
-      Word buf[size];
-      if (offset != 0 && !rs.seekg(offset)) return false;
-      if (!rs.read(reinterpret_cast<char*>(buf), sizeof(buf))) return false;
-      seed(buf, buf + size);
-      return true;
-    }
-
-    /// \brief Seding from process id and time
-    ///
-    /// Seding from process id and time. This function uses the
-    /// current process id and the current time for initialize the
-    /// random sequence.
-    /// \return Currently always true.
-    bool seedFromTime() {
-#ifndef WIN32
-      timeval tv;
-      gettimeofday(&tv, 0);
-      seed(getpid() + tv.tv_sec + tv.tv_usec);
-#else
-      seed(bits::getWinRndSeed());
-#endif
-      return true;
-    }
-
-    /// @}
-
-    ///\name Uniform distributions
-    ///
-    /// @{
-
-    /// \brief Returns a random real number from the range [0, 1)
-    ///
-    /// It returns a random real number from the range [0, 1). The
-    /// default Number type is \c double.
-    template <typename Number>
-    Number real() {
-      return _random_bits::RealConversion<Number, Word>::convert(core);
-    }
-
-    double real() {
-      return real<double>();
-    }
-
-    /// @}
-
-    ///\name Uniform distributions
-    ///
-    /// @{
-
-    /// \brief Returns a random real number from the range [0, 1)
-    ///
-    /// It returns a random double from the range [0, 1).
-    double operator()() {
-      return real<double>();
-    }
-
-    /// \brief Returns a random real number from the range [0, b)
-    ///
-    /// It returns a random real number from the range [0, b).
-    double operator()(double b) {
-      return real<double>() * b;
-    }
-
-    /// \brief Returns a random real number from the range [a, b)
-    ///
-    /// It returns a random real number from the range [a, b).
-    double operator()(double a, double b) {
-      return real<double>() * (b - a) + a;
-    }
-
-    /// \brief Returns a random integer from a range
-    ///
-    /// It returns a random integer from the range {0, 1, ..., b - 1}.
-    template <typename Number>
-    Number integer(Number b) {
-      return _random_bits::Mapping<Number, Word>::map(core, b);
-    }
-
-    /// \brief Returns a random integer from a range
-    ///
-    /// It returns a random integer from the range {a, a + 1, ..., b - 1}.
-    template <typename Number>
-    Number integer(Number a, Number b) {
-      return _random_bits::Mapping<Number, Word>::map(core, b - a) + a;
-    }
-
-    /// \brief Returns a random integer from a range
-    ///
-    /// It returns a random integer from the range {0, 1, ..., b - 1}.
-    template <typename Number>
-    Number operator[](Number b) {
-      return _random_bits::Mapping<Number, Word>::map(core, b);
-    }
-
-    /// \brief Returns a random non-negative integer
-    ///
-    /// It returns a random non-negative integer uniformly from the
-    /// whole range of the current \c Number type. The default result
-    /// type of this function is <tt>unsigned int</tt>.
-    template <typename Number>
-    Number uinteger() {
-      return _random_bits::IntConversion<Number, Word>::convert(core);
-    }
-
-    /// @}
-
-    unsigned int uinteger() {
-      return uinteger<unsigned int>();
-    }
-
-    /// \brief Returns a random integer
-    ///
-    /// It returns a random integer uniformly from the whole range of
-    /// the current \c Number type. The default result type of this
-    /// function is \c int.
-    template <typename Number>
-    Number integer() {
-      static const int nb = std::numeric_limits<Number>::digits +
-        (std::numeric_limits<Number>::is_signed ? 1 : 0);
-      return _random_bits::IntConversion<Number, Word, nb>::convert(core);
-    }
-
-    int integer() {
-      return integer<int>();
-    }
-
-    /// \brief Returns a random bool
-    ///
-    /// It returns a random bool. The generator holds a buffer for
-    /// random bits. Every time when it become empty the generator makes
-    /// a new random word and fill the buffer up.
-    bool boolean() {
-      return bool_producer.convert(core);
-    }
-
-    /// @}
-
-    ///\name Non-uniform distributions
-    ///
-
-    ///@{
-
-    /// \brief Returns a random bool
-    ///
-    /// It returns a random bool with given probability of true result.
-    bool boolean(double p) {
-      return operator()() < p;
-    }
-
-    /// Standard Gauss distribution
-
-    /// Standard Gauss distribution.
-    /// \note The Cartesian form of the Box-Muller
-    /// transformation is used to generate a random normal distribution.
-    double gauss()
-    {
-      double V1,V2,S;
-      do {
-        V1=2*real<double>()-1;
-        V2=2*real<double>()-1;
-        S=V1*V1+V2*V2;
-      } while(S>=1);
-      return std::sqrt(-2*std::log(S)/S)*V1;
-    }
-    /// Gauss distribution with given mean and standard deviation
-
-    /// Gauss distribution with given mean and standard deviation.
-    /// \sa gauss()
-    double gauss(double mean,double std_dev)
-    {
-      return gauss()*std_dev+mean;
-    }
-
-    /// Exponential distribution with given mean
-
-    /// This function generates an exponential distribution random number
-    /// with mean <tt>1/lambda</tt>.
-    ///
-    double exponential(double lambda=1.0)
-    {
-      return -std::log(1.0-real<double>())/lambda;
-    }
-
-    /// Gamma distribution with given integer shape
-
-    /// This function generates a gamma distribution random number.
-    ///
-    ///\param k shape parameter (<tt>k>0</tt> integer)
-    double gamma(int k)
-    {
-      double s = 0;
-      for(int i=0;i<k;i++) s-=std::log(1.0-real<double>());
-      return s;
-    }
-
-    /// Gamma distribution with given shape and scale parameter
-
-    /// This function generates a gamma distribution random number.
-    ///
-    ///\param k shape parameter (<tt>k>0</tt>)
-    ///\param theta scale parameter
-    ///
-    double gamma(double k,double theta=1.0)
-    {
-      double xi,nu;
-      const double delta = k-std::floor(k);
-      const double v0=E/(E-delta);
-      do {
-        double V0=1.0-real<double>();
-        double V1=1.0-real<double>();
-        double V2=1.0-real<double>();
-        if(V2<=v0)
-          {
-            xi=std::pow(V1,1.0/delta);
-            nu=V0*std::pow(xi,delta-1.0);
-          }
-        else
-          {
-            xi=1.0-std::log(V1);
-            nu=V0*std::exp(-xi);
-          }
-      } while(nu>std::pow(xi,delta-1.0)*std::exp(-xi));
-      return theta*(xi+gamma(int(std::floor(k))));
-    }
-
-    /// Weibull distribution
-
-    /// This function generates a Weibull distribution random number.
-    ///
-    ///\param k shape parameter (<tt>k>0</tt>)
-    ///\param lambda scale parameter (<tt>lambda>0</tt>)
-    ///
-    double weibull(double k,double lambda)
-    {
-      return lambda*pow(-std::log(1.0-real<double>()),1.0/k);
-    }
-
-    /// Pareto distribution
-
-    /// This function generates a Pareto distribution random number.
-    ///
-    ///\param k shape parameter (<tt>k>0</tt>)
-    ///\param x_min location parameter (<tt>x_min>0</tt>)
-    ///
-    double pareto(double k,double x_min)
-    {
-      return exponential(gamma(k,1.0/x_min))+x_min;
-    }
-
-    /// Poisson distribution
-
-    /// This function generates a Poisson distribution random number with
-    /// parameter \c lambda.
-    ///
-    /// The probability mass function of this distribusion is
-    /// \f[ \frac{e^{-\lambda}\lambda^k}{k!} \f]
-    /// \note The algorithm is taken from the book of Donald E. Knuth titled
-    /// ''Seminumerical Algorithms'' (1969). Its running time is linear in the
-    /// return value.
-
-    int poisson(double lambda)
-    {
-      const double l = std::exp(-lambda);
-      int k=0;
-      double p = 1.0;
-      do {
-        k++;
-        p*=real<double>();
-      } while (p>=l);
-      return k-1;
-    }
-
-    ///@}
-
-    ///\name Two dimensional distributions
-    ///
-
-    ///@{
-
-    /// Uniform distribution on the full unit circle
-
-    /// Uniform distribution on the full unit circle.
-    ///
-    dim2::Point<double> disc()
-    {
-      double V1,V2;
-      do {
-        V1=2*real<double>()-1;
-        V2=2*real<double>()-1;
-
-      } while(V1*V1+V2*V2>=1);
-      return dim2::Point<double>(V1,V2);
-    }
-    /// A kind of two dimensional Gauss distribution
-
-    /// This function provides a turning symmetric two-dimensional distribution.
-    /// Both coordinates are of standard normal distribution, but they are not
-    /// independent.
-    ///
-    /// \note The coordinates are the two random variables provided by
-    /// the Box-Muller method.
-    dim2::Point<double> gauss2()
-    {
-      double V1,V2,S;
-      do {
-        V1=2*real<double>()-1;
-        V2=2*real<double>()-1;
-        S=V1*V1+V2*V2;
-      } while(S>=1);
-      double W=std::sqrt(-2*std::log(S)/S);
-      return dim2::Point<double>(W*V1,W*V2);
-    }
-    /// A kind of two dimensional exponential distribution
-
-    /// This function provides a turning symmetric two-dimensional distribution.
-    /// The x-coordinate is of conditionally exponential distribution
-    /// with the condition that x is positive and y=0. If x is negative and
-    /// y=0 then, -x is of exponential distribution. The same is true for the
-    /// y-coordinate.
-    dim2::Point<double> exponential2()
-    {
-      double V1,V2,S;
-      do {
-        V1=2*real<double>()-1;
-        V2=2*real<double>()-1;
-        S=V1*V1+V2*V2;
-      } while(S>=1);
-      double W=-std::log(S)/S;
-      return dim2::Point<double>(W*V1,W*V2);
-    }
-
-    ///@}
-  };
-
-
-  extern Random rnd;
-
-}
-
-#endif
Index: mon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 427)
+++ 	(revision )
@@ -1,814 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_SMART_GRAPH_H
-#define LEMON_SMART_GRAPH_H
-
-///\ingroup graphs
-///\file
-///\brief SmartDigraph and SmartGraph classes.
-
-#include <vector>
-
-#include <lemon/core.h>
-#include <lemon/error.h>
-#include <lemon/bits/graph_extender.h>
-
-namespace lemon {
-
-  class SmartDigraph;
-  ///Base of SmartDigraph
-
-  ///Base of SmartDigraph
-  ///
-  class SmartDigraphBase {
-  protected:
-
-    struct NodeT
-    {
-      int first_in, first_out;
-      NodeT() {}
-    };
-    struct ArcT
-    {
-      int target, source, next_in, next_out;
-      ArcT() {}
-    };
-
-    std::vector<NodeT> nodes;
-    std::vector<ArcT> arcs;
-
-  public:
-
-    typedef SmartDigraphBase Graph;
-
-    class Node;
-    class Arc;
-
-  public:
-
-    SmartDigraphBase() : nodes(), arcs() { }
-    SmartDigraphBase(const SmartDigraphBase &_g)
-      : nodes(_g.nodes), arcs(_g.arcs) { }
-
-    typedef True NodeNumTag;
-    typedef True EdgeNumTag;
-
-    int nodeNum() const { return nodes.size(); }
-    int arcNum() const { return arcs.size(); }
-
-    int maxNodeId() const { return nodes.size()-1; }
-    int maxArcId() const { return arcs.size()-1; }
-
-    Node addNode() {
-      int n = nodes.size();
-      nodes.push_back(NodeT());
-      nodes[n].first_in = -1;
-      nodes[n].first_out = -1;
-      return Node(n);
-    }
-
-    Arc addArc(Node u, Node v) {
-      int n = arcs.size();
-      arcs.push_back(ArcT());
-      arcs[n].source = u._id;
-      arcs[n].target = v._id;
-      arcs[n].next_out = nodes[u._id].first_out;
-      arcs[n].next_in = nodes[v._id].first_in;
-      nodes[u._id].first_out = nodes[v._id].first_in = n;
-
-      return Arc(n);
-    }
-
-    void clear() {
-      arcs.clear();
-      nodes.clear();
-    }
-
-    Node source(Arc a) const { return Node(arcs[a._id].source); }
-    Node target(Arc a) const { return Node(arcs[a._id].target); }
-
-    static int id(Node v) { return v._id; }
-    static int id(Arc a) { return a._id; }
-
-    static Node nodeFromId(int id) { return Node(id);}
-    static Arc arcFromId(int id) { return Arc(id);}
-
-    bool valid(Node n) const {
-      return n._id >= 0 && n._id < static_cast<int>(nodes.size());
-    }
-    bool valid(Arc a) const {
-      return a._id >= 0 && a._id < static_cast<int>(arcs.size());
-    }
-
-    class Node {
-      friend class SmartDigraphBase;
-      friend class SmartDigraph;
-
-    protected:
-      int _id;
-      explicit Node(int id) : _id(id) {}
-    public:
-      Node() {}
-      Node (Invalid) : _id(-1) {}
-      bool operator==(const Node i) const {return _id == i._id;}
-      bool operator!=(const Node i) const {return _id != i._id;}
-      bool operator<(const Node i) const {return _id < i._id;}
-    };
-
-
-    class Arc {
-      friend class SmartDigraphBase;
-      friend class SmartDigraph;
-
-    protected:
-      int _id;
-      explicit Arc(int id) : _id(id) {}
-    public:
-      Arc() { }
-      Arc (Invalid) : _id(-1) {}
-      bool operator==(const Arc i) const {return _id == i._id;}
-      bool operator!=(const Arc i) const {return _id != i._id;}
-      bool operator<(const Arc i) const {return _id < i._id;}
-    };
-
-    void first(Node& node) const {
-      node._id = nodes.size() - 1;
-    }
-
-    static void next(Node& node) {
-      --node._id;
-    }
-
-    void first(Arc& arc) const {
-      arc._id = arcs.size() - 1;
-    }
-
-    static void next(Arc& arc) {
-      --arc._id;
-    }
-
-    void firstOut(Arc& arc, const Node& node) const {
-      arc._id = nodes[node._id].first_out;
-    }
-
-    void nextOut(Arc& arc) const {
-      arc._id = arcs[arc._id].next_out;
-    }
-
-    void firstIn(Arc& arc, const Node& node) const {
-      arc._id = nodes[node._id].first_in;
-    }
-
-    void nextIn(Arc& arc) const {
-      arc._id = arcs[arc._id].next_in;
-    }
-
-  };
-
-  typedef DigraphExtender<SmartDigraphBase> ExtendedSmartDigraphBase;
-
-  ///\ingroup graphs
-  ///
-  ///\brief A smart directed graph class.
-  ///
-  ///This is a simple and fast digraph implementation.
-  ///It is also quite memory efficient, but at the price
-  ///that <b> it does support only limited (only stack-like)
-  ///node and arc deletions</b>.
-  ///It conforms to the \ref concepts::Digraph "Digraph concept" with
-  ///an important extra feature that its maps are real \ref
-  ///concepts::ReferenceMap "reference map"s.
-  ///
-  ///\sa concepts::Digraph.
-  class SmartDigraph : public ExtendedSmartDigraphBase {
-  public:
-
-    typedef ExtendedSmartDigraphBase Parent;
-
-  private:
-
-    ///SmartDigraph is \e not copy constructible. Use DigraphCopy() instead.
-
-    ///SmartDigraph is \e not copy constructible. Use DigraphCopy() instead.
-    ///
-    SmartDigraph(const SmartDigraph &) : ExtendedSmartDigraphBase() {};
-    ///\brief Assignment of SmartDigraph to another one is \e not allowed.
-    ///Use DigraphCopy() instead.
-
-    ///Assignment of SmartDigraph to another one is \e not allowed.
-    ///Use DigraphCopy() instead.
-    void operator=(const SmartDigraph &) {}
-
-  public:
-
-    /// Constructor
-
-    /// Constructor.
-    ///
-    SmartDigraph() {};
-
-    ///Add a new node to the digraph.
-
-    /// \return the new node.
-    ///
-    Node addNode() { return Parent::addNode(); }
-
-    ///Add a new arc to the digraph.
-
-    ///Add a new arc to the digraph with source node \c s
-    ///and target node \c t.
-    ///\return the new arc.
-    Arc addArc(const Node& s, const Node& t) {
-      return Parent::addArc(s, t);
-    }
-
-    /// \brief Using this it is possible to avoid the superfluous memory
-    /// allocation.
-
-    /// Using this it is possible to avoid the superfluous memory
-    /// allocation: if you know that the digraph you want to build will
-    /// be very large (e.g. it will contain millions of nodes and/or arcs)
-    /// then it is worth reserving space for this amount before starting
-    /// to build the digraph.
-    /// \sa reserveArc
-    void reserveNode(int n) { nodes.reserve(n); };
-
-    /// \brief Using this it is possible to avoid the superfluous memory
-    /// allocation.
-
-    /// Using this it is possible to avoid the superfluous memory
-    /// allocation: if you know that the digraph you want to build will
-    /// be very large (e.g. it will contain millions of nodes and/or arcs)
-    /// then it is worth reserving space for this amount before starting
-    /// to build the digraph.
-    /// \sa reserveNode
-    void reserveArc(int m) { arcs.reserve(m); };
-
-    /// \brief Node validity check
-    ///
-    /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.
-    ///
-    /// \warning A removed node (using Snapshot) could become valid again
-    /// when new nodes are added to the graph.
-    bool valid(Node n) const { return Parent::valid(n); }
-
-    /// \brief Arc validity check
-    ///
-    /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.
-    ///
-    /// \warning A removed arc (using Snapshot) could become valid again
-    /// when new arcs are added to the graph.
-    bool valid(Arc a) const { return Parent::valid(a); }
-
-    ///Clear the digraph.
-
-    ///Erase all the nodes and arcs from the digraph.
-    ///
-    void clear() {
-      Parent::clear();
-    }
-
-    ///Split a node.
-
-    ///This function splits a node. First a new node is added to the digraph,
-    ///then the source of each outgoing arc of \c n is moved to this new node.
-    ///If \c connect is \c true (this is the default value), then a new arc
-    ///from \c n to the newly created node is also added.
-    ///\return The newly created node.
-    ///
-    ///\note The <tt>Arc</tt>s
-    ///referencing a moved arc remain
-    ///valid. However <tt>InArc</tt>'s and <tt>OutArc</tt>'s
-    ///may be invalidated.
-    ///\warning This functionality cannot be used together with the Snapshot
-    ///feature.
-    Node split(Node n, bool connect = true)
-    {
-      Node b = addNode();
-      nodes[b._id].first_out=nodes[n._id].first_out;
-      nodes[n._id].first_out=-1;
-      for(int i=nodes[b._id].first_out; i!=-1; i=arcs[i].next_out) {
-        arcs[i].source=b._id;
-      }
-      if(connect) addArc(n,b);
-      return b;
-    }
-
-  public:
-
-    class Snapshot;
-
-  protected:
-
-    void restoreSnapshot(const Snapshot &s)
-    {
-      while(s.arc_num<arcs.size()) {
-        Arc arc = arcFromId(arcs.size()-1);
-        Parent::notifier(Arc()).erase(arc);
-        nodes[arcs.back().source].first_out=arcs.back().next_out;
-        nodes[arcs.back().target].first_in=arcs.back().next_in;
-        arcs.pop_back();
-      }
-      while(s.node_num<nodes.size()) {
-        Node node = nodeFromId(nodes.size()-1);
-        Parent::notifier(Node()).erase(node);
-        nodes.pop_back();
-      }
-    }
-
-  public:
-
-    ///Class to make a snapshot of the digraph and to restrore to it later.
-
-    ///Class to make a snapshot of the digraph and to restrore to it later.
-    ///
-    ///The newly added nodes and arcs can be removed using the
-    ///restore() function.
-    ///\note After you restore a state, you cannot restore
-    ///a later state, in other word you cannot add again the arcs deleted
-    ///by restore() using another one Snapshot instance.
-    ///
-    ///\warning If you do not use correctly the snapshot that can cause
-    ///either broken program, invalid state of the digraph, valid but
-    ///not the restored digraph or no change. Because the runtime performance
-    ///the validity of the snapshot is not stored.
-    class Snapshot
-    {
-      SmartDigraph *_graph;
-    protected:
-      friend class SmartDigraph;
-      unsigned int node_num;
-      unsigned int arc_num;
-    public:
-      ///Default constructor.
-
-      ///Default constructor.
-      ///To actually make a snapshot you must call save().
-      ///
-      Snapshot() : _graph(0) {}
-      ///Constructor that immediately makes a snapshot
-
-      ///This constructor immediately makes a snapshot of the digraph.
-      ///\param graph The digraph we make a snapshot of.
-      Snapshot(SmartDigraph &graph) : _graph(&graph) {
-        node_num=_graph->nodes.size();
-        arc_num=_graph->arcs.size();
-      }
-
-      ///Make a snapshot.
-
-      ///Make a snapshot of the digraph.
-      ///
-      ///This function can be called more than once. In case of a repeated
-      ///call, the previous snapshot gets lost.
-      ///\param graph The digraph we make the snapshot of.
-      void save(SmartDigraph &graph)
-      {
-        _graph=&graph;
-        node_num=_graph->nodes.size();
-        arc_num=_graph->arcs.size();
-      }
-
-      ///Undo the changes until a snapshot.
-
-      ///Undo the changes until a snapshot created by save().
-      ///
-      ///\note After you restored a state, you cannot restore
-      ///a later state, in other word you cannot add again the arcs deleted
-      ///by restore().
-      void restore()
-      {
-        _graph->restoreSnapshot(*this);
-      }
-    };
-  };
-
-
-  class SmartGraphBase {
-
-  protected:
-
-    struct NodeT {
-      int first_out;
-    };
-
-    struct ArcT {
-      int target;
-      int next_out;
-    };
-
-    std::vector<NodeT> nodes;
-    std::vector<ArcT> arcs;
-
-    int first_free_arc;
-
-  public:
-
-    typedef SmartGraphBase Digraph;
-
-    class Node;
-    class Arc;
-    class Edge;
-
-    class Node {
-      friend class SmartGraphBase;
-    protected:
-
-      int _id;
-      explicit Node(int id) { _id = id;}
-
-    public:
-      Node() {}
-      Node (Invalid) { _id = -1; }
-      bool operator==(const Node& node) const {return _id == node._id;}
-      bool operator!=(const Node& node) const {return _id != node._id;}
-      bool operator<(const Node& node) const {return _id < node._id;}
-    };
-
-    class Edge {
-      friend class SmartGraphBase;
-    protected:
-
-      int _id;
-      explicit Edge(int id) { _id = id;}
-
-    public:
-      Edge() {}
-      Edge (Invalid) { _id = -1; }
-      bool operator==(const Edge& arc) const {return _id == arc._id;}
-      bool operator!=(const Edge& arc) const {return _id != arc._id;}
-      bool operator<(const Edge& arc) const {return _id < arc._id;}
-    };
-
-    class Arc {
-      friend class SmartGraphBase;
-    protected:
-
-      int _id;
-      explicit Arc(int id) { _id = id;}
-
-    public:
-      operator Edge() const {
-        return _id != -1 ? edgeFromId(_id / 2) : INVALID;
-      }
-
-      Arc() {}
-      Arc (Invalid) { _id = -1; }
-      bool operator==(const Arc& arc) const {return _id == arc._id;}
-      bool operator!=(const Arc& arc) const {return _id != arc._id;}
-      bool operator<(const Arc& arc) const {return _id < arc._id;}
-    };
-
-
-
-    SmartGraphBase()
-      : nodes(), arcs() {}
-
-
-    int maxNodeId() const { return nodes.size()-1; }
-    int maxEdgeId() const { return arcs.size() / 2 - 1; }
-    int maxArcId() const { return arcs.size()-1; }
-
-    Node source(Arc e) const { return Node(arcs[e._id ^ 1].target); }
-    Node target(Arc e) const { return Node(arcs[e._id].target); }
-
-    Node u(Edge e) const { return Node(arcs[2 * e._id].target); }
-    Node v(Edge e) const { return Node(arcs[2 * e._id + 1].target); }
-
-    static bool direction(Arc e) {
-      return (e._id & 1) == 1;
-    }
-
-    static Arc direct(Edge e, bool d) {
-      return Arc(e._id * 2 + (d ? 1 : 0));
-    }
-
-    void first(Node& node) const {
-      node._id = nodes.size() - 1;
-    }
-
-    void next(Node& node) const {
-      --node._id;
-    }
-
-    void first(Arc& arc) const {
-      arc._id = arcs.size() - 1;
-    }
-
-    void next(Arc& arc) const {
-      --arc._id;
-    }
-
-    void first(Edge& arc) const {
-      arc._id = arcs.size() / 2 - 1;
-    }
-
-    void next(Edge& arc) const {
-      --arc._id;
-    }
-
-    void firstOut(Arc &arc, const Node& v) const {
-      arc._id = nodes[v._id].first_out;
-    }
-    void nextOut(Arc &arc) const {
-      arc._id = arcs[arc._id].next_out;
-    }
-
-    void firstIn(Arc &arc, const Node& v) const {
-      arc._id = ((nodes[v._id].first_out) ^ 1);
-      if (arc._id == -2) arc._id = -1;
-    }
-    void nextIn(Arc &arc) const {
-      arc._id = ((arcs[arc._id ^ 1].next_out) ^ 1);
-      if (arc._id == -2) arc._id = -1;
-    }
-
-    void firstInc(Edge &arc, bool& d, const Node& v) const {
-      int de = nodes[v._id].first_out;
-      if (de != -1) {
-        arc._id = de / 2;
-        d = ((de & 1) == 1);
-      } else {
-        arc._id = -1;
-        d = true;
-      }
-    }
-    void nextInc(Edge &arc, bool& d) const {
-      int de = (arcs[(arc._id * 2) | (d ? 1 : 0)].next_out);
-      if (de != -1) {
-        arc._id = de / 2;
-        d = ((de & 1) == 1);
-      } else {
-        arc._id = -1;
-        d = true;
-      }
-    }
-
-    static int id(Node v) { return v._id; }
-    static int id(Arc e) { return e._id; }
-    static int id(Edge e) { return e._id; }
-
-    static Node nodeFromId(int id) { return Node(id);}
-    static Arc arcFromId(int id) { return Arc(id);}
-    static Edge edgeFromId(int id) { return Edge(id);}
-
-    bool valid(Node n) const {
-      return n._id >= 0 && n._id < static_cast<int>(nodes.size());
-    }
-    bool valid(Arc a) const {
-      return a._id >= 0 && a._id < static_cast<int>(arcs.size());
-    }
-    bool valid(Edge e) const {
-      return e._id >= 0 && 2 * e._id < static_cast<int>(arcs.size());
-    }
-
-    Node addNode() {
-      int n = nodes.size();
-      nodes.push_back(NodeT());
-      nodes[n].first_out = -1;
-
-      return Node(n);
-    }
-
-    Edge addEdge(Node u, Node v) {
-      int n = arcs.size();
-      arcs.push_back(ArcT());
-      arcs.push_back(ArcT());
-
-      arcs[n].target = u._id;
-      arcs[n | 1].target = v._id;
-
-      arcs[n].next_out = nodes[v._id].first_out;
-      nodes[v._id].first_out = n;
-
-      arcs[n | 1].next_out = nodes[u._id].first_out;
-      nodes[u._id].first_out = (n | 1);
-
-      return Edge(n / 2);
-    }
-
-    void clear() {
-      arcs.clear();
-      nodes.clear();
-    }
-
-  };
-
-  typedef GraphExtender<SmartGraphBase> ExtendedSmartGraphBase;
-
-  /// \ingroup graphs
-  ///
-  /// \brief A smart undirected graph class.
-  ///
-  /// This is a simple and fast graph implementation.
-  /// It is also quite memory efficient, but at the price
-  /// that <b> it does support only limited (only stack-like)
-  /// node and arc deletions</b>.
-  /// Except from this it conforms to
-  /// the \ref concepts::Graph "Graph concept".
-  ///
-  /// It also has an
-  /// important extra feature that
-  /// its maps are real \ref concepts::ReferenceMap "reference map"s.
-  ///
-  /// \sa concepts::Graph.
-  ///
-  class SmartGraph : public ExtendedSmartGraphBase {
-  private:
-
-    ///SmartGraph is \e not copy constructible. Use GraphCopy() instead.
-
-    ///SmartGraph is \e not copy constructible. Use GraphCopy() instead.
-    ///
-    SmartGraph(const SmartGraph &) : ExtendedSmartGraphBase() {};
-
-    ///\brief Assignment of SmartGraph to another one is \e not allowed.
-    ///Use GraphCopy() instead.
-
-    ///Assignment of SmartGraph to another one is \e not allowed.
-    ///Use GraphCopy() instead.
-    void operator=(const SmartGraph &) {}
-
-  public:
-
-    typedef ExtendedSmartGraphBase Parent;
-
-    /// Constructor
-
-    /// Constructor.
-    ///
-    SmartGraph() {}
-
-    ///Add a new node to the graph.
-
-    /// \return the new node.
-    ///
-    Node addNode() { return Parent::addNode(); }
-
-    ///Add a new edge to the graph.
-
-    ///Add a new edge to the graph with node \c s
-    ///and \c t.
-    ///\return the new edge.
-    Edge addEdge(const Node& s, const Node& t) {
-      return Parent::addEdge(s, t);
-    }
-
-    /// \brief Node validity check
-    ///
-    /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.
-    ///
-    /// \warning A removed node (using Snapshot) could become valid again
-    /// when new nodes are added to the graph.
-    bool valid(Node n) const { return Parent::valid(n); }
-
-    /// \brief Arc validity check
-    ///
-    /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.
-    ///
-    /// \warning A removed arc (using Snapshot) could become valid again
-    /// when new edges are added to the graph.
-    bool valid(Arc a) const { return Parent::valid(a); }
-
-    /// \brief Edge validity check
-    ///
-    /// This function gives back true if the given edge is valid,
-    /// ie. it is a real edge of the graph.
-    ///
-    /// \warning A removed edge (using Snapshot) could become valid again
-    /// when new edges are added to the graph.
-    bool valid(Edge e) const { return Parent::valid(e); }
-
-    ///Clear the graph.
-
-    ///Erase all the nodes and edges from the graph.
-    ///
-    void clear() {
-      Parent::clear();
-    }
-
-  public:
-
-    class Snapshot;
-
-  protected:
-
-    void saveSnapshot(Snapshot &s)
-    {
-      s._graph = this;
-      s.node_num = nodes.size();
-      s.arc_num = arcs.size();
-    }
-
-    void restoreSnapshot(const Snapshot &s)
-    {
-      while(s.arc_num<arcs.size()) {
-        int n=arcs.size()-1;
-        Edge arc=edgeFromId(n/2);
-        Parent::notifier(Edge()).erase(arc);
-        std::vector<Arc> dir;
-        dir.push_back(arcFromId(n));
-        dir.push_back(arcFromId(n-1));
-        Parent::notifier(Arc()).erase(dir);
-        nodes[arcs[n-1].target].first_out=arcs[n].next_out;
-        nodes[arcs[n].target].first_out=arcs[n-1].next_out;
-        arcs.pop_back();
-        arcs.pop_back();
-      }
-      while(s.node_num<nodes.size()) {
-        int n=nodes.size()-1;
-        Node node = nodeFromId(n);
-        Parent::notifier(Node()).erase(node);
-        nodes.pop_back();
-      }
-    }
-
-  public:
-
-    ///Class to make a snapshot of the digraph and to restrore to it later.
-
-    ///Class to make a snapshot of the digraph and to restrore to it later.
-    ///
-    ///The newly added nodes and arcs can be removed using the
-    ///restore() function.
-    ///
-    ///\note After you restore a state, you cannot restore
-    ///a later state, in other word you cannot add again the arcs deleted
-    ///by restore() using another one Snapshot instance.
-    ///
-    ///\warning If you do not use correctly the snapshot that can cause
-    ///either broken program, invalid state of the digraph, valid but
-    ///not the restored digraph or no change. Because the runtime performance
-    ///the validity of the snapshot is not stored.
-    class Snapshot
-    {
-      SmartGraph *_graph;
-    protected:
-      friend class SmartGraph;
-      unsigned int node_num;
-      unsigned int arc_num;
-    public:
-      ///Default constructor.
-
-      ///Default constructor.
-      ///To actually make a snapshot you must call save().
-      ///
-      Snapshot() : _graph(0) {}
-      ///Constructor that immediately makes a snapshot
-
-      ///This constructor immediately makes a snapshot of the digraph.
-      ///\param graph The digraph we make a snapshot of.
-      Snapshot(SmartGraph &graph) {
-        graph.saveSnapshot(*this);
-      }
-
-      ///Make a snapshot.
-
-      ///Make a snapshot of the graph.
-      ///
-      ///This function can be called more than once. In case of a repeated
-      ///call, the previous snapshot gets lost.
-      ///\param graph The digraph we make the snapshot of.
-      void save(SmartGraph &graph)
-      {
-        graph.saveSnapshot(*this);
-      }
-
-      ///Undo the changes until a snapshot.
-
-      ///Undo the changes until a snapshot created by save().
-      ///
-      ///\note After you restored a state, you cannot restore
-      ///a later state, in other word you cannot add again the arcs deleted
-      ///by restore().
-      void restore()
-      {
-        _graph->restoreSnapshot(*this);
-      }
-    };
-  };
-
-} //namespace lemon
-
-
-#endif //LEMON_SMART_GRAPH_H
Index: mon/time_measure.h
===================================================================
--- lemon/time_measure.h	(revision 427)
+++ 	(revision )
@@ -1,552 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_TIME_MEASURE_H
-#define LEMON_TIME_MEASURE_H
-
-///\ingroup timecount
-///\file
-///\brief Tools for measuring cpu usage
-
-#ifdef WIN32
-#include <lemon/bits/windows.h>
-#else
-#include <unistd.h>
-#include <sys/times.h>
-#include <sys/time.h>
-#endif
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-namespace lemon {
-
-  /// \addtogroup timecount
-  /// @{
-
-  /// A class to store (cpu)time instances.
-
-  /// This class stores five time values.
-  /// - a real time
-  /// - a user cpu time
-  /// - a system cpu time
-  /// - a user cpu time of children
-  /// - a system cpu time of children
-  ///
-  /// TimeStamp's can be added to or substracted from each other and
-  /// they can be pushed to a stream.
-  ///
-  /// In most cases, perhaps the \ref Timer or the \ref TimeReport
-  /// class is what you want to use instead.
-
-  class TimeStamp
-  {
-    double utime;
-    double stime;
-    double cutime;
-    double cstime;
-    double rtime;
-
-    void _reset() {
-      utime = stime = cutime = cstime = rtime = 0;
-    }
-
-  public:
-
-    ///Read the current time values of the process
-    void stamp()
-    {
-#ifndef WIN32
-      timeval tv;
-      gettimeofday(&tv, 0);
-      rtime=tv.tv_sec+double(tv.tv_usec)/1e6;
-
-      tms ts;
-      double tck=sysconf(_SC_CLK_TCK);
-      times(&ts);
-      utime=ts.tms_utime/tck;
-      stime=ts.tms_stime/tck;
-      cutime=ts.tms_cutime/tck;
-      cstime=ts.tms_cstime/tck;
-#else
-      bits::getWinProcTimes(rtime, utime, stime, cutime, cstime);
-#endif
-    }
-
-    /// Constructor initializing with zero
-    TimeStamp()
-    { _reset(); }
-    ///Constructor initializing with the current time values of the process
-    TimeStamp(void *) { stamp();}
-
-    ///Set every time value to zero
-    TimeStamp &reset() {_reset();return *this;}
-
-    ///\e
-    TimeStamp &operator+=(const TimeStamp &b)
-    {
-      utime+=b.utime;
-      stime+=b.stime;
-      cutime+=b.cutime;
-      cstime+=b.cstime;
-      rtime+=b.rtime;
-      return *this;
-    }
-    ///\e
-    TimeStamp operator+(const TimeStamp &b) const
-    {
-      TimeStamp t(*this);
-      return t+=b;
-    }
-    ///\e
-    TimeStamp &operator-=(const TimeStamp &b)
-    {
-      utime-=b.utime;
-      stime-=b.stime;
-      cutime-=b.cutime;
-      cstime-=b.cstime;
-      rtime-=b.rtime;
-      return *this;
-    }
-    ///\e
-    TimeStamp operator-(const TimeStamp &b) const
-    {
-      TimeStamp t(*this);
-      return t-=b;
-    }
-    ///\e
-    TimeStamp &operator*=(double b)
-    {
-      utime*=b;
-      stime*=b;
-      cutime*=b;
-      cstime*=b;
-      rtime*=b;
-      return *this;
-    }
-    ///\e
-    TimeStamp operator*(double b) const
-    {
-      TimeStamp t(*this);
-      return t*=b;
-    }
-    friend TimeStamp operator*(double b,const TimeStamp &t);
-    ///\e
-    TimeStamp &operator/=(double b)
-    {
-      utime/=b;
-      stime/=b;
-      cutime/=b;
-      cstime/=b;
-      rtime/=b;
-      return *this;
-    }
-    ///\e
-    TimeStamp operator/(double b) const
-    {
-      TimeStamp t(*this);
-      return t/=b;
-    }
-    ///The time ellapsed since the last call of stamp()
-    TimeStamp ellapsed() const
-    {
-      TimeStamp t(NULL);
-      return t-*this;
-    }
-
-    friend std::ostream& operator<<(std::ostream& os,const TimeStamp &t);
-
-    ///Gives back the user time of the process
-    double userTime() const
-    {
-      return utime;
-    }
-    ///Gives back the system time of the process
-    double systemTime() const
-    {
-      return stime;
-    }
-    ///Gives back the user time of the process' children
-
-    ///\note On <tt>WIN32</tt> platform this value is not calculated.
-    ///
-    double cUserTime() const
-    {
-      return cutime;
-    }
-    ///Gives back the user time of the process' children
-
-    ///\note On <tt>WIN32</tt> platform this value is not calculated.
-    ///
-    double cSystemTime() const
-    {
-      return cstime;
-    }
-    ///Gives back the real time
-    double realTime() const {return rtime;}
-  };
-
-  inline TimeStamp operator*(double b,const TimeStamp &t)
-  {
-    return t*b;
-  }
-
-  ///Prints the time counters
-
-  ///Prints the time counters in the following form:
-  ///
-  /// <tt>u: XX.XXs s: XX.XXs cu: XX.XXs cs: XX.XXs real: XX.XXs</tt>
-  ///
-  /// where the values are the
-  /// \li \c u: user cpu time,
-  /// \li \c s: system cpu time,
-  /// \li \c cu: user cpu time of children,
-  /// \li \c cs: system cpu time of children,
-  /// \li \c real: real time.
-  /// \relates TimeStamp
-  /// \note On <tt>WIN32</tt> platform the cummulative values are not
-  /// calculated.
-  inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t)
-  {
-    os << "u: " << t.userTime() <<
-      "s, s: " << t.systemTime() <<
-      "s, cu: " << t.cUserTime() <<
-      "s, cs: " << t.cSystemTime() <<
-      "s, real: " << t.realTime() << "s";
-    return os;
-  }
-
-  ///Class for measuring the cpu time and real time usage of the process
-
-  ///Class for measuring the cpu time and real time usage of the process.
-  ///It is quite easy-to-use, here is a short example.
-  ///\code
-  /// #include<lemon/time_measure.h>
-  /// #include<iostream>
-  ///
-  /// int main()
-  /// {
-  ///
-  ///   ...
-  ///
-  ///   Timer t;
-  ///   doSomething();
-  ///   std::cout << t << '\n';
-  ///   t.restart();
-  ///   doSomethingElse();
-  ///   std::cout << t << '\n';
-  ///
-  ///   ...
-  ///
-  /// }
-  ///\endcode
-  ///
-  ///The \ref Timer can also be \ref stop() "stopped" and
-  ///\ref start() "started" again, so it is possible to compute collected
-  ///running times.
-  ///
-  ///\warning Depending on the operation system and its actual configuration
-  ///the time counters have a certain (10ms on a typical Linux system)
-  ///granularity.
-  ///Therefore this tool is not appropriate to measure very short times.
-  ///Also, if you start and stop the timer very frequently, it could lead to
-  ///distorted results.
-  ///
-  ///\note If you want to measure the running time of the execution of a certain
-  ///function, consider the usage of \ref TimeReport instead.
-  ///
-  ///\sa TimeReport
-  class Timer
-  {
-    int _running; //Timer is running iff _running>0; (_running>=0 always holds)
-    TimeStamp start_time; //This is the relativ start-time if the timer
-                          //is _running, the collected _running time otherwise.
-
-    void _reset() {if(_running) start_time.stamp(); else start_time.reset();}
-
-  public:
-    ///Constructor.
-
-    ///\param run indicates whether or not the timer starts immediately.
-    ///
-    Timer(bool run=true) :_running(run) {_reset();}
-
-    ///\name Control the state of the timer
-    ///Basically a Timer can be either running or stopped,
-    ///but it provides a bit finer control on the execution.
-    ///The \ref lemon::Timer "Timer" also counts the number of
-    ///\ref lemon::Timer::start() "start()" executions, and it stops
-    ///only after the same amount (or more) \ref lemon::Timer::stop()
-    ///"stop()"s. This can be useful e.g. to compute the running time
-    ///of recursive functions.
-
-    ///@{
-
-    ///Reset and stop the time counters
-
-    ///This function resets and stops the time counters
-    ///\sa restart()
-    void reset()
-    {
-      _running=0;
-      _reset();
-    }
-
-    ///Start the time counters
-
-    ///This function starts the time counters.
-    ///
-    ///If the timer is started more than ones, it will remain running
-    ///until the same amount of \ref stop() is called.
-    ///\sa stop()
-    void start()
-    {
-      if(_running) _running++;
-      else {
-        _running=1;
-        TimeStamp t;
-        t.stamp();
-        start_time=t-start_time;
-      }
-    }
-
-
-    ///Stop the time counters
-
-    ///This function stops the time counters. If start() was executed more than
-    ///once, then the same number of stop() execution is necessary the really
-    ///stop the timer.
-    ///
-    ///\sa halt()
-    ///\sa start()
-    ///\sa restart()
-    ///\sa reset()
-
-    void stop()
-    {
-      if(_running && !--_running) {
-        TimeStamp t;
-        t.stamp();
-        start_time=t-start_time;
-      }
-    }
-
-    ///Halt (i.e stop immediately) the time counters
-
-    ///This function stops immediately the time counters, i.e. <tt>t.halt()</tt>
-    ///is a faster
-    ///equivalent of the following.
-    ///\code
-    ///  while(t.running()) t.stop()
-    ///\endcode
-    ///
-    ///
-    ///\sa stop()
-    ///\sa restart()
-    ///\sa reset()
-
-    void halt()
-    {
-      if(_running) {
-        _running=0;
-        TimeStamp t;
-        t.stamp();
-        start_time=t-start_time;
-      }
-    }
-
-    ///Returns the running state of the timer
-
-    ///This function returns the number of stop() exections that is
-    ///necessary to really stop the timer.
-    ///For example the timer
-    ///is running if and only if the return value is \c true
-    ///(i.e. greater than
-    ///zero).
-    int running()  { return _running; }
-
-
-    ///Restart the time counters
-
-    ///This function is a shorthand for
-    ///a reset() and a start() calls.
-    ///
-    void restart()
-    {
-      reset();
-      start();
-    }
-
-    ///@}
-
-    ///\name Query Functions for the ellapsed time
-
-    ///@{
-
-    ///Gives back the ellapsed user time of the process
-    double userTime() const
-    {
-      return operator TimeStamp().userTime();
-    }
-    ///Gives back the ellapsed system time of the process
-    double systemTime() const
-    {
-      return operator TimeStamp().systemTime();
-    }
-    ///Gives back the ellapsed user time of the process' children
-
-    ///\note On <tt>WIN32</tt> platform this value is not calculated.
-    ///
-    double cUserTime() const
-    {
-      return operator TimeStamp().cUserTime();
-    }
-    ///Gives back the ellapsed user time of the process' children
-
-    ///\note On <tt>WIN32</tt> platform this value is not calculated.
-    ///
-    double cSystemTime() const
-    {
-      return operator TimeStamp().cSystemTime();
-    }
-    ///Gives back the ellapsed real time
-    double realTime() const
-    {
-      return operator TimeStamp().realTime();
-    }
-    ///Computes the ellapsed time
-
-    ///This conversion computes the ellapsed time, therefore you can print
-    ///the ellapsed time like this.
-    ///\code
-    ///  Timer t;
-    ///  doSomething();
-    ///  std::cout << t << '\n';
-    ///\endcode
-    operator TimeStamp () const
-    {
-      TimeStamp t;
-      t.stamp();
-      return _running?t-start_time:start_time;
-    }
-
-
-    ///@}
-  };
-
-  ///Same as Timer but prints a report on destruction.
-
-  ///Same as \ref Timer but prints a report on destruction.
-  ///This example shows its usage.
-  ///\code
-  ///  void myAlg(ListGraph &g,int n)
-  ///  {
-  ///    TimeReport tr("Running time of myAlg: ");
-  ///    ... //Here comes the algorithm
-  ///  }
-  ///\endcode
-  ///
-  ///\sa Timer
-  ///\sa NoTimeReport
-  class TimeReport : public Timer
-  {
-    std::string _title;
-    std::ostream &_os;
-  public:
-    ///Constructor
-
-    ///Constructor.
-    ///\param title This text will be printed before the ellapsed time.
-    ///\param os The stream to print the report to.
-    ///\param run Sets whether the timer should start immediately.
-    TimeReport(std::string title,std::ostream &os=std::cerr,bool run=true)
-      : Timer(run), _title(title), _os(os){}
-    ///Destructor that prints the ellapsed time
-    ~TimeReport()
-    {
-      _os << _title << *this << std::endl;
-    }
-  };
-
-  ///'Do nothing' version of TimeReport
-
-  ///\sa TimeReport
-  ///
-  class NoTimeReport
-  {
-  public:
-    ///\e
-    NoTimeReport(std::string,std::ostream &,bool) {}
-    ///\e
-    NoTimeReport(std::string,std::ostream &) {}
-    ///\e
-    NoTimeReport(std::string) {}
-    ///\e Do nothing.
-    ~NoTimeReport() {}
-
-    operator TimeStamp () const { return TimeStamp(); }
-    void reset() {}
-    void start() {}
-    void stop() {}
-    void halt() {}
-    int running() { return 0; }
-    void restart() {}
-    double userTime() const { return 0; }
-    double systemTime() const { return 0; }
-    double cUserTime() const { return 0; }
-    double cSystemTime() const { return 0; }
-    double realTime() const { return 0; }
-  };
-
-  ///Tool to measure the running time more exactly.
-
-  ///This function calls \c f several times and returns the average
-  ///running time. The number of the executions will be choosen in such a way
-  ///that the full real running time will be roughly between \c min_time
-  ///and <tt>2*min_time</tt>.
-  ///\param f the function object to be measured.
-  ///\param min_time the minimum total running time.
-  ///\retval num if it is not \c NULL, then the actual
-  ///        number of execution of \c f will be written into <tt>*num</tt>.
-  ///\retval full_time if it is not \c NULL, then the actual
-  ///        total running time will be written into <tt>*full_time</tt>.
-  ///\return The average running time of \c f.
-
-  template<class F>
-  TimeStamp runningTimeTest(F f,double min_time=10,unsigned int *num = NULL,
-                            TimeStamp *full_time=NULL)
-  {
-    TimeStamp full;
-    unsigned int total=0;
-    Timer t;
-    for(unsigned int tn=1;tn <= 1U<<31 && full.realTime()<=min_time; tn*=2) {
-      for(;total<tn;total++) f();
-      full=t;
-    }
-    if(num) *num=total;
-    if(full_time) *full_time=full;
-    return full/total;
-  }
-
-  /// @}
-
-
-} //namespace lemon
-
-#endif //LEMON_TIME_MEASURE_H
Index: mon/tolerance.h
===================================================================
--- lemon/tolerance.h	(revision 427)
+++ 	(revision )
@@ -1,242 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_TOLERANCE_H
-#define LEMON_TOLERANCE_H
-
-///\ingroup misc
-///\file
-///\brief A basic tool to handle the anomalies of calculation with
-///floating point numbers.
-///
-
-namespace lemon {
-
-  /// \addtogroup misc
-  /// @{
-
-  ///\brief A class to provide a basic way to
-  ///handle the comparison of numbers that are obtained
-  ///as a result of a probably inexact computation.
-  ///
-  ///\ref Tolerance is a class to provide a basic way to
-  ///handle the comparison of numbers that are obtained
-  ///as a result of a probably inexact computation.
-  ///
-  ///The general implementation is suitable only if the data type is exact,
-  ///like the integer types, otherwise a specialized version must be
-  ///implemented. These specialized classes like
-  ///Tolerance<double> may offer additional tuning parameters.
-  ///
-  ///\sa Tolerance<float>
-  ///\sa Tolerance<double>
-  ///\sa Tolerance<long double>
-
-  template<class T>
-  class Tolerance
-  {
-  public:
-    typedef T Value;
-
-    ///\name Comparisons
-    ///The concept is that these bool functions return \c true only if
-    ///the related comparisons hold even if some numerical error appeared
-    ///during the computations.
-
-    ///@{
-
-    ///Returns \c true if \c a is \e surely strictly less than \c b
-    static bool less(Value a,Value b) {return a<b;}
-    ///Returns \c true if \c a is \e surely different from \c b
-    static bool different(Value a,Value b) {return a!=b;}
-    ///Returns \c true if \c a is \e surely positive
-    static bool positive(Value a) {return static_cast<Value>(0) < a;}
-    ///Returns \c true if \c a is \e surely negative
-    static bool negative(Value a) {return a < static_cast<Value>(0);}
-    ///Returns \c true if \c a is \e surely non-zero
-    static bool nonZero(Value a) {return a != static_cast<Value>(0);}
-
-    ///@}
-
-    ///Returns the zero value.
-    static Value zero() {return static_cast<Value>(0);}
-
-    //   static bool finite(Value a) {}
-    //   static Value big() {}
-    //   static Value negativeBig() {}
-  };
-
-
-  ///Float specialization of Tolerance.
-
-  ///Float specialization of Tolerance.
-  ///\sa Tolerance
-  ///\relates Tolerance
-  template<>
-  class Tolerance<float>
-  {
-    static float def_epsilon;
-    float _epsilon;
-  public:
-    ///\e
-    typedef float Value;
-
-    ///Constructor setting the epsilon tolerance to the default value.
-    Tolerance() : _epsilon(def_epsilon) {}
-    ///Constructor setting the epsilon tolerance to the given value.
-    Tolerance(float e) : _epsilon(e) {}
-
-    ///Returns the epsilon value.
-    Value epsilon() const {return _epsilon;}
-    ///Sets the epsilon value.
-    void epsilon(Value e) {_epsilon=e;}
-
-    ///Returns the default epsilon value.
-    static Value defaultEpsilon() {return def_epsilon;}
-    ///Sets the default epsilon value.
-    static void defaultEpsilon(Value e) {def_epsilon=e;}
-
-    ///\name Comparisons
-    ///See \ref lemon::Tolerance "Tolerance" for more details.
-
-    ///@{
-
-    ///Returns \c true if \c a is \e surely strictly less than \c b
-    bool less(Value a,Value b) const {return a+_epsilon<b;}
-    ///Returns \c true if \c a is \e surely different from \c b
-    bool different(Value a,Value b) const { return less(a,b)||less(b,a); }
-    ///Returns \c true if \c a is \e surely positive
-    bool positive(Value a) const { return _epsilon<a; }
-    ///Returns \c true if \c a is \e surely negative
-    bool negative(Value a) const { return -_epsilon>a; }
-    ///Returns \c true if \c a is \e surely non-zero
-    bool nonZero(Value a) const { return positive(a)||negative(a); }
-
-    ///@}
-
-    ///Returns zero
-    static Value zero() {return 0;}
-  };
-
-  ///Double specialization of Tolerance.
-
-  ///Double specialization of Tolerance.
-  ///\sa Tolerance
-  ///\relates Tolerance
-  template<>
-  class Tolerance<double>
-  {
-    static double def_epsilon;
-    double _epsilon;
-  public:
-    ///\e
-    typedef double Value;
-
-    ///Constructor setting the epsilon tolerance to the default value.
-    Tolerance() : _epsilon(def_epsilon) {}
-    ///Constructor setting the epsilon tolerance to the given value.
-    Tolerance(double e) : _epsilon(e) {}
-
-    ///Returns the epsilon value.
-    Value epsilon() const {return _epsilon;}
-    ///Sets the epsilon value.
-    void epsilon(Value e) {_epsilon=e;}
-
-    ///Returns the default epsilon value.
-    static Value defaultEpsilon() {return def_epsilon;}
-    ///Sets the default epsilon value.
-    static void defaultEpsilon(Value e) {def_epsilon=e;}
-
-    ///\name Comparisons
-    ///See \ref lemon::Tolerance "Tolerance" for more details.
-
-    ///@{
-
-    ///Returns \c true if \c a is \e surely strictly less than \c b
-    bool less(Value a,Value b) const {return a+_epsilon<b;}
-    ///Returns \c true if \c a is \e surely different from \c b
-    bool different(Value a,Value b) const { return less(a,b)||less(b,a); }
-    ///Returns \c true if \c a is \e surely positive
-    bool positive(Value a) const { return _epsilon<a; }
-    ///Returns \c true if \c a is \e surely negative
-    bool negative(Value a) const { return -_epsilon>a; }
-    ///Returns \c true if \c a is \e surely non-zero
-    bool nonZero(Value a) const { return positive(a)||negative(a); }
-
-    ///@}
-
-    ///Returns zero
-    static Value zero() {return 0;}
-  };
-
-  ///Long double specialization of Tolerance.
-
-  ///Long double specialization of Tolerance.
-  ///\sa Tolerance
-  ///\relates Tolerance
-  template<>
-  class Tolerance<long double>
-  {
-    static long double def_epsilon;
-    long double _epsilon;
-  public:
-    ///\e
-    typedef long double Value;
-
-    ///Constructor setting the epsilon tolerance to the default value.
-    Tolerance() : _epsilon(def_epsilon) {}
-    ///Constructor setting the epsilon tolerance to the given value.
-    Tolerance(long double e) : _epsilon(e) {}
-
-    ///Returns the epsilon value.
-    Value epsilon() const {return _epsilon;}
-    ///Sets the epsilon value.
-    void epsilon(Value e) {_epsilon=e;}
-
-    ///Returns the default epsilon value.
-    static Value defaultEpsilon() {return def_epsilon;}
-    ///Sets the default epsilon value.
-    static void defaultEpsilon(Value e) {def_epsilon=e;}
-
-    ///\name Comparisons
-    ///See \ref lemon::Tolerance "Tolerance" for more details.
-
-    ///@{
-
-    ///Returns \c true if \c a is \e surely strictly less than \c b
-    bool less(Value a,Value b) const {return a+_epsilon<b;}
-    ///Returns \c true if \c a is \e surely different from \c b
-    bool different(Value a,Value b) const { return less(a,b)||less(b,a); }
-    ///Returns \c true if \c a is \e surely positive
-    bool positive(Value a) const { return _epsilon<a; }
-    ///Returns \c true if \c a is \e surely negative
-    bool negative(Value a) const { return -_epsilon>a; }
-    ///Returns \c true if \c a is \e surely non-zero
-    bool nonZero(Value a) const { return positive(a)||negative(a); }
-
-    ///@}
-
-    ///Returns zero
-    static Value zero() {return 0;}
-  };
-
-  /// @}
-
-} //namespace lemon
-
-#endif //LEMON_TOLERANCE_H
Index: mon/unionfind.h
===================================================================
--- lemon/unionfind.h	(revision 427)
+++ 	(revision )
@@ -1,1809 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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_UNION_FIND_H
-#define LEMON_UNION_FIND_H
-
-//!\ingroup auxdat
-//!\file
-//!\brief Union-Find data structures.
-//!
-
-#include <vector>
-#include <list>
-#include <utility>
-#include <algorithm>
-#include <functional>
-
-#include <lemon/core.h>
-
-namespace lemon {
-
-  /// \ingroup auxdat
-  ///
-  /// \brief A \e Union-Find data structure implementation
-  ///
-  /// The class implements the \e Union-Find data structure.
-  /// The union operation uses rank heuristic, while
-  /// the find operation uses path compression.
-  /// This is a very simple but efficient implementation, providing
-  /// only four methods: join (union), find, insert and size.
-  /// For more features see the \ref UnionFindEnum class.
-  ///
-  /// It is primarily used in Kruskal algorithm for finding minimal
-  /// cost spanning tree in a graph.
-  /// \sa kruskal()
-  ///
-  /// \pre You need to add all the elements by the \ref insert()
-  /// method.
-  template <typename _ItemIntMap>
-  class UnionFind {
-  public:
-
-    typedef _ItemIntMap ItemIntMap;
-    typedef typename ItemIntMap::Key Item;
-
-  private:
-    // If the items vector stores negative value for an item then
-    // that item is root item and it has -items[it] component size.
-    // Else the items[it] contains the index of the parent.
-    std::vector<int> items;
-    ItemIntMap& index;
-
-    bool rep(int idx) const {
-      return items[idx] < 0;
-    }
-
-    int repIndex(int idx) const {
-      int k = idx;
-      while (!rep(k)) {
-        k = items[k] ;
-      }
-      while (idx != k) {
-        int next = items[idx];
-        const_cast<int&>(items[idx]) = k;
-        idx = next;
-      }
-      return k;
-    }
-
-  public:
-
-    /// \brief Constructor
-    ///
-    /// Constructor of the UnionFind class. You should give an item to
-    /// integer map which will be used from the data structure. If you
-    /// modify directly this map that may cause segmentation fault,
-    /// invalid data structure, or infinite loop when you use again
-    /// the union-find.
-    UnionFind(ItemIntMap& m) : index(m) {}
-
-    /// \brief Returns the index of the element's component.
-    ///
-    /// The method returns the index of the element's component.
-    /// This is an integer between zero and the number of inserted elements.
-    ///
-    int find(const Item& a) {
-      return repIndex(index[a]);
-    }
-
-    /// \brief Clears the union-find data structure
-    ///
-    /// Erase each item from the data structure.
-    void clear() {
-      items.clear();
-    }
-
-    /// \brief Inserts a new element into the structure.
-    ///
-    /// This method inserts a new element into the data structure.
-    ///
-    /// The method returns the index of the new component.
-    int insert(const Item& a) {
-      int n = items.size();
-      items.push_back(-1);
-      index.set(a,n);
-      return n;
-    }
-
-    /// \brief Joining the components of element \e a and element \e b.
-    ///
-    /// This is the \e union operation of the Union-Find structure.
-    /// Joins the component of element \e a and component of
-    /// element \e b. If \e a and \e b are in the same component then
-    /// it returns false otherwise it returns true.
-    bool join(const Item& a, const Item& b) {
-      int ka = repIndex(index[a]);
-      int kb = repIndex(index[b]);
-
-      if ( ka == kb )
-        return false;
-
-      if (items[ka] < items[kb]) {
-        items[ka] += items[kb];
-        items[kb] = ka;
-      } else {
-        items[kb] += items[ka];
-        items[ka] = kb;
-      }
-      return true;
-    }
-
-    /// \brief Returns the size of the component of element \e a.
-    ///
-    /// Returns the size of the component of element \e a.
-    int size(const Item& a) {
-      int k = repIndex(index[a]);
-      return - items[k];
-    }
-
-  };
-
-  /// \ingroup auxdat
-  ///
-  /// \brief A \e Union-Find data structure implementation which
-  /// is able to enumerate the components.
-  ///
-  /// The class implements a \e Union-Find data structure
-  /// which is able to enumerate the components and the items in
-  /// a component. If you don't need this feature then perhaps it's
-  /// better to use the \ref UnionFind class which is more efficient.
-  ///
-  /// The union operation uses rank heuristic, while
-  /// the find operation uses path compression.
-  ///
-  /// \pre You need to add all the elements by the \ref insert()
-  /// method.
-  ///
-  template <typename _ItemIntMap>
-  class UnionFindEnum {
-  public:
-
-    typedef _ItemIntMap ItemIntMap;
-    typedef typename ItemIntMap::Key Item;
-
-  private:
-
-    ItemIntMap& index;
-
-    // If the parent stores negative value for an item then that item
-    // is root item and it has ~(items[it].parent) component id.  Else
-    // the items[it].parent contains the index of the parent.
-    //
-    // The \c next and \c prev provides the double-linked
-    // cyclic list of one component's items.
-    struct ItemT {
-      int parent;
-      Item item;
-
-      int next, prev;
-    };
-
-    std::vector<ItemT> items;
-    int firstFreeItem;
-
-    struct ClassT {
-      int size;
-      int firstItem;
-      int next, prev;
-    };
-
-    std::vector<ClassT> classes;
-    int firstClass, firstFreeClass;
-
-    int newClass() {
-      if (firstFreeClass == -1) {
-        int cdx = classes.size();
-        classes.push_back(ClassT());
-        return cdx;
-      } else {
-        int cdx = firstFreeClass;
-        firstFreeClass = classes[firstFreeClass].next;
-        return cdx;
-      }
-    }
-
-    int newItem() {
-      if (firstFreeItem == -1) {
-        int idx = items.size();
-        items.push_back(ItemT());
-        return idx;
-      } else {
-        int idx = firstFreeItem;
-        firstFreeItem = items[firstFreeItem].next;
-        return idx;
-      }
-    }
-
-
-    bool rep(int idx) const {
-      return items[idx].parent < 0;
-    }
-
-    int repIndex(int idx) const {
-      int k = idx;
-      while (!rep(k)) {
-        k = items[k].parent;
-      }
-      while (idx != k) {
-        int next = items[idx].parent;
-        const_cast<int&>(items[idx].parent) = k;
-        idx = next;
-      }
-      return k;
-    }
-
-    int classIndex(int idx) const {
-      return ~(items[repIndex(idx)].parent);
-    }
-
-    void singletonItem(int idx) {
-      items[idx].next = idx;
-      items[idx].prev = idx;
-    }
-
-    void laceItem(int idx, int rdx) {
-      items[idx].prev = rdx;
-      items[idx].next = items[rdx].next;
-      items[items[rdx].next].prev = idx;
-      items[rdx].next = idx;
-    }
-
-    void unlaceItem(int idx) {
-      items[items[idx].prev].next = items[idx].next;
-      items[items[idx].next].prev = items[idx].prev;
-
-      items[idx].next = firstFreeItem;
-      firstFreeItem = idx;
-    }
-
-    void spliceItems(int ak, int bk) {
-      items[items[ak].prev].next = bk;
-      items[items[bk].prev].next = ak;
-      int tmp = items[ak].prev;
-      items[ak].prev = items[bk].prev;
-      items[bk].prev = tmp;
-
-    }
-
-    void laceClass(int cls) {
-      if (firstClass != -1) {
-        classes[firstClass].prev = cls;
-      }
-      classes[cls].next = firstClass;
-      classes[cls].prev = -1;
-      firstClass = cls;
-    }
-
-    void unlaceClass(int cls) {
-      if (classes[cls].prev != -1) {
-        classes[classes[cls].prev].next = classes[cls].next;
-      } else {
-        firstClass = classes[cls].next;
-      }
-      if (classes[cls].next != -1) {
-        classes[classes[cls].next].prev = classes[cls].prev;
-      }
-
-      classes[cls].next = firstFreeClass;
-      firstFreeClass = cls;
-    }
-
-  public:
-
-    UnionFindEnum(ItemIntMap& _index)
-      : index(_index), items(), firstFreeItem(-1),
-        firstClass(-1), firstFreeClass(-1) {}
-
-    /// \brief Inserts the given element into a new component.
-    ///
-    /// This method creates a new component consisting only of the
-    /// given element.
-    ///
-    int insert(const Item& item) {
-      int idx = newItem();
-
-      index.set(item, idx);
-
-      singletonItem(idx);
-      items[idx].item = item;
-
-      int cdx = newClass();
-
-      items[idx].parent = ~cdx;
-
-      laceClass(cdx);
-      classes[cdx].size = 1;
-      classes[cdx].firstItem = idx;
-
-      firstClass = cdx;
-
-      return cdx;
-    }
-
-    /// \brief Inserts the given element into the component of the others.
-    ///
-    /// This methods inserts the element \e a into the component of the
-    /// element \e comp.
-    void insert(const Item& item, int cls) {
-      int rdx = classes[cls].firstItem;
-      int idx = newItem();
-
-      index.set(item, idx);
-
-      laceItem(idx, rdx);
-
-      items[idx].item = item;
-      items[idx].parent = rdx;
-
-      ++classes[~(items[rdx].parent)].size;
-    }
-
-    /// \brief Clears the union-find data structure
-    ///
-    /// Erase each item from the data structure.
-    void clear() {
-      items.clear();
-      firstClass = -1;
-      firstFreeItem = -1;
-    }
-
-    /// \brief Finds the component of the given element.
-    ///
-    /// The method returns the component id of the given element.
-    int find(const Item &item) const {
-      return ~(items[repIndex(index[item])].parent);
-    }
-
-    /// \brief Joining the component of element \e a and element \e b.
-    ///
-    /// This is the \e union operation of the Union-Find structure.
-    /// Joins the component of element \e a and component of
-    /// element \e b. If \e a and \e b are in the same component then
-    /// returns -1 else returns the remaining class.
-    int join(const Item& a, const Item& b) {
-
-      int ak = repIndex(index[a]);
-      int bk = repIndex(index[b]);
-
-      if (ak == bk) {
-        return -1;
-      }
-
-      int acx = ~(items[ak].parent);
-      int bcx = ~(items[bk].parent);
-
-      int rcx;
-
-      if (classes[acx].size > classes[bcx].size) {
-        classes[acx].size += classes[bcx].size;
-        items[bk].parent = ak;
-        unlaceClass(bcx);
-        rcx = acx;
-      } else {
-        classes[bcx].size += classes[acx].size;
-        items[ak].parent = bk;
-        unlaceClass(acx);
-        rcx = bcx;
-      }
-      spliceItems(ak, bk);
-
-      return rcx;
-    }
-
-    /// \brief Returns the size of the class.
-    ///
-    /// Returns the size of the class.
-    int size(int cls) const {
-      return classes[cls].size;
-    }
-
-    /// \brief Splits up the component.
-    ///
-    /// Splitting the component into singleton components (component
-    /// of size one).
-    void split(int cls) {
-      int fdx = classes[cls].firstItem;
-      int idx = items[fdx].next;
-      while (idx != fdx) {
-        int next = items[idx].next;
-
-        singletonItem(idx);
-
-        int cdx = newClass();
-        items[idx].parent = ~cdx;
-
-        laceClass(cdx);
-        classes[cdx].size = 1;
-        classes[cdx].firstItem = idx;
-
-        idx = next;
-      }
-
-      items[idx].prev = idx;
-      items[idx].next = idx;
-
-      classes[~(items[idx].parent)].size = 1;
-
-    }
-
-    /// \brief Removes the given element from the structure.
-    ///
-    /// Removes the element from its component and if the component becomes
-    /// empty then removes that component from the component list.
-    ///
-    /// \warning It is an error to remove an element which is not in
-    /// the structure.
-    /// \warning This running time of this operation is proportional to the
-    /// number of the items in this class.
-    void erase(const Item& item) {
-      int idx = index[item];
-      int fdx = items[idx].next;
-
-      int cdx = classIndex(idx);
-      if (idx == fdx) {
-        unlaceClass(cdx);
-        items[idx].next = firstFreeItem;
-        firstFreeItem = idx;
-        return;
-      } else {
-        classes[cdx].firstItem = fdx;
-        --classes[cdx].size;
-        items[fdx].parent = ~cdx;
-
-        unlaceItem(idx);
-        idx = items[fdx].next;
-        while (idx != fdx) {
-          items[idx].parent = fdx;
-          idx = items[idx].next;
-        }
-
-      }
-
-    }
-
-    /// \brief Gives back a representant item of the component.
-    ///
-    /// Gives back a representant item of the component.
-    Item item(int cls) const {
-      return items[classes[cls].firstItem].item;
-    }
-
-    /// \brief Removes the component of the given element from the structure.
-    ///
-    /// Removes the component of the given element from the structure.
-    ///
-    /// \warning It is an error to give an element which is not in the
-    /// structure.
-    void eraseClass(int cls) {
-      int fdx = classes[cls].firstItem;
-      unlaceClass(cls);
-      items[items[fdx].prev].next = firstFreeItem;
-      firstFreeItem = fdx;
-    }
-
-    /// \brief LEMON style iterator for the representant items.
-    ///
-    /// ClassIt is a lemon style iterator for the components. It iterates
-    /// on the ids of the classes.
-    class ClassIt {
-    public:
-      /// \brief Constructor of the iterator
-      ///
-      /// Constructor of the iterator
-      ClassIt(const UnionFindEnum& ufe) : unionFind(&ufe) {
-        cdx = unionFind->firstClass;
-      }
-
-      /// \brief Constructor to get invalid iterator
-      ///
-      /// Constructor to get invalid iterator
-      ClassIt(Invalid) : unionFind(0), cdx(-1) {}
-
-      /// \brief Increment operator
-      ///
-      /// It steps to the next representant item.
-      ClassIt& operator++() {
-        cdx = unionFind->classes[cdx].next;
-        return *this;
-      }
-
-      /// \brief Conversion operator
-      ///
-      /// It converts the iterator to the current representant item.
-      operator int() const {
-        return cdx;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ClassIt& i) {
-        return i.cdx == cdx;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ClassIt& i) {
-        return i.cdx != cdx;
-      }
-
-    private:
-      const UnionFindEnum* unionFind;
-      int cdx;
-    };
-
-    /// \brief LEMON style iterator for the items of a component.
-    ///
-    /// ClassIt is a lemon style iterator for the components. It iterates
-    /// on the items of a class. By example if you want to iterate on
-    /// each items of each classes then you may write the next code.
-    ///\code
-    /// for (ClassIt cit(ufe); cit != INVALID; ++cit) {
-    ///   std::cout << "Class: ";
-    ///   for (ItemIt iit(ufe, cit); iit != INVALID; ++iit) {
-    ///     std::cout << toString(iit) << ' ' << std::endl;
-    ///   }
-    ///   std::cout << std::endl;
-    /// }
-    ///\endcode
-    class ItemIt {
-    public:
-      /// \brief Constructor of the iterator
-      ///
-      /// Constructor of the iterator. The iterator iterates
-      /// on the class of the \c item.
-      ItemIt(const UnionFindEnum& ufe, int cls) : unionFind(&ufe) {
-        fdx = idx = unionFind->classes[cls].firstItem;
-      }
-
-      /// \brief Constructor to get invalid iterator
-      ///
-      /// Constructor to get invalid iterator
-      ItemIt(Invalid) : unionFind(0), idx(-1) {}
-
-      /// \brief Increment operator
-      ///
-      /// It steps to the next item in the class.
-      ItemIt& operator++() {
-        idx = unionFind->items[idx].next;
-        if (idx == fdx) idx = -1;
-        return *this;
-      }
-
-      /// \brief Conversion operator
-      ///
-      /// It converts the iterator to the current item.
-      operator const Item&() const {
-        return unionFind->items[idx].item;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ItemIt& i) {
-        return i.idx == idx;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ItemIt& i) {
-        return i.idx != idx;
-      }
-
-    private:
-      const UnionFindEnum* unionFind;
-      int idx, fdx;
-    };
-
-  };
-
-  /// \ingroup auxdat
-  ///
-  /// \brief A \e Extend-Find data structure implementation which
-  /// is able to enumerate the components.
-  ///
-  /// The class implements an \e Extend-Find data structure which is
-  /// able to enumerate the components and the items in a
-  /// component. The data structure is a simplification of the
-  /// Union-Find structure, and it does not allow to merge two components.
-  ///
-  /// \pre You need to add all the elements by the \ref insert()
-  /// method.
-  template <typename _ItemIntMap>
-  class ExtendFindEnum {
-  public:
-
-    typedef _ItemIntMap ItemIntMap;
-    typedef typename ItemIntMap::Key Item;
-
-  private:
-
-    ItemIntMap& index;
-
-    struct ItemT {
-      int cls;
-      Item item;
-      int next, prev;
-    };
-
-    std::vector<ItemT> items;
-    int firstFreeItem;
-
-    struct ClassT {
-      int firstItem;
-      int next, prev;
-    };
-
-    std::vector<ClassT> classes;
-
-    int firstClass, firstFreeClass;
-
-    int newClass() {
-      if (firstFreeClass != -1) {
-        int cdx = firstFreeClass;
-        firstFreeClass = classes[cdx].next;
-        return cdx;
-      } else {
-        classes.push_back(ClassT());
-        return classes.size() - 1;
-      }
-    }
-
-    int newItem() {
-      if (firstFreeItem != -1) {
-        int idx = firstFreeItem;
-        firstFreeItem = items[idx].next;
-        return idx;
-      } else {
-        items.push_back(ItemT());
-        return items.size() - 1;
-      }
-    }
-
-  public:
-
-    /// \brief Constructor
-    ExtendFindEnum(ItemIntMap& _index)
-      : index(_index), items(), firstFreeItem(-1),
-        classes(), firstClass(-1), firstFreeClass(-1) {}
-
-    /// \brief Inserts the given element into a new component.
-    ///
-    /// This method creates a new component consisting only of the
-    /// given element.
-    int insert(const Item& item) {
-      int cdx = newClass();
-      classes[cdx].prev = -1;
-      classes[cdx].next = firstClass;
-      if (firstClass != -1) {
-        classes[firstClass].prev = cdx;
-      }
-      firstClass = cdx;
-
-      int idx = newItem();
-      items[idx].item = item;
-      items[idx].cls = cdx;
-      items[idx].prev = idx;
-      items[idx].next = idx;
-
-      classes[cdx].firstItem = idx;
-
-      index.set(item, idx);
-
-      return cdx;
-    }
-
-    /// \brief Inserts the given element into the given component.
-    ///
-    /// This methods inserts the element \e item a into the \e cls class.
-    void insert(const Item& item, int cls) {
-      int idx = newItem();
-      int rdx = classes[cls].firstItem;
-      items[idx].item = item;
-      items[idx].cls = cls;
-
-      items[idx].prev = rdx;
-      items[idx].next = items[rdx].next;
-      items[items[rdx].next].prev = idx;
-      items[rdx].next = idx;
-
-      index.set(item, idx);
-    }
-
-    /// \brief Clears the union-find data structure
-    ///
-    /// Erase each item from the data structure.
-    void clear() {
-      items.clear();
-      classes.clear();
-      firstClass = firstFreeClass = firstFreeItem = -1;
-    }
-
-    /// \brief Gives back the class of the \e item.
-    ///
-    /// Gives back the class of the \e item.
-    int find(const Item &item) const {
-      return items[index[item]].cls;
-    }
-
-    /// \brief Gives back a representant item of the component.
-    ///
-    /// Gives back a representant item of the component.
-    Item item(int cls) const {
-      return items[classes[cls].firstItem].item;
-    }
-
-    /// \brief Removes the given element from the structure.
-    ///
-    /// Removes the element from its component and if the component becomes
-    /// empty then removes that component from the component list.
-    ///
-    /// \warning It is an error to remove an element which is not in
-    /// the structure.
-    void erase(const Item &item) {
-      int idx = index[item];
-      int cdx = items[idx].cls;
-
-      if (idx == items[idx].next) {
-        if (classes[cdx].prev != -1) {
-          classes[classes[cdx].prev].next = classes[cdx].next;
-        } else {
-          firstClass = classes[cdx].next;
-        }
-        if (classes[cdx].next != -1) {
-          classes[classes[cdx].next].prev = classes[cdx].prev;
-        }
-        classes[cdx].next = firstFreeClass;
-        firstFreeClass = cdx;
-      } else {
-        classes[cdx].firstItem = items[idx].next;
-        items[items[idx].next].prev = items[idx].prev;
-        items[items[idx].prev].next = items[idx].next;
-      }
-      items[idx].next = firstFreeItem;
-      firstFreeItem = idx;
-
-    }
-
-
-    /// \brief Removes the component of the given element from the structure.
-    ///
-    /// Removes the component of the given element from the structure.
-    ///
-    /// \warning It is an error to give an element which is not in the
-    /// structure.
-    void eraseClass(int cdx) {
-      int idx = classes[cdx].firstItem;
-      items[items[idx].prev].next = firstFreeItem;
-      firstFreeItem = idx;
-
-      if (classes[cdx].prev != -1) {
-        classes[classes[cdx].prev].next = classes[cdx].next;
-      } else {
-        firstClass = classes[cdx].next;
-      }
-      if (classes[cdx].next != -1) {
-        classes[classes[cdx].next].prev = classes[cdx].prev;
-      }
-      classes[cdx].next = firstFreeClass;
-      firstFreeClass = cdx;
-    }
-
-    /// \brief LEMON style iterator for the classes.
-    ///
-    /// ClassIt is a lemon style iterator for the components. It iterates
-    /// on the ids of classes.
-    class ClassIt {
-    public:
-      /// \brief Constructor of the iterator
-      ///
-      /// Constructor of the iterator
-      ClassIt(const ExtendFindEnum& ufe) : extendFind(&ufe) {
-        cdx = extendFind->firstClass;
-      }
-
-      /// \brief Constructor to get invalid iterator
-      ///
-      /// Constructor to get invalid iterator
-      ClassIt(Invalid) : extendFind(0), cdx(-1) {}
-
-      /// \brief Increment operator
-      ///
-      /// It steps to the next representant item.
-      ClassIt& operator++() {
-        cdx = extendFind->classes[cdx].next;
-        return *this;
-      }
-
-      /// \brief Conversion operator
-      ///
-      /// It converts the iterator to the current class id.
-      operator int() const {
-        return cdx;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ClassIt& i) {
-        return i.cdx == cdx;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ClassIt& i) {
-        return i.cdx != cdx;
-      }
-
-    private:
-      const ExtendFindEnum* extendFind;
-      int cdx;
-    };
-
-    /// \brief LEMON style iterator for the items of a component.
-    ///
-    /// ClassIt is a lemon style iterator for the components. It iterates
-    /// on the items of a class. By example if you want to iterate on
-    /// each items of each classes then you may write the next code.
-    ///\code
-    /// for (ClassIt cit(ufe); cit != INVALID; ++cit) {
-    ///   std::cout << "Class: ";
-    ///   for (ItemIt iit(ufe, cit); iit != INVALID; ++iit) {
-    ///     std::cout << toString(iit) << ' ' << std::endl;
-    ///   }
-    ///   std::cout << std::endl;
-    /// }
-    ///\endcode
-    class ItemIt {
-    public:
-      /// \brief Constructor of the iterator
-      ///
-      /// Constructor of the iterator. The iterator iterates
-      /// on the class of the \c item.
-      ItemIt(const ExtendFindEnum& ufe, int cls) : extendFind(&ufe) {
-        fdx = idx = extendFind->classes[cls].firstItem;
-      }
-
-      /// \brief Constructor to get invalid iterator
-      ///
-      /// Constructor to get invalid iterator
-      ItemIt(Invalid) : extendFind(0), idx(-1) {}
-
-      /// \brief Increment operator
-      ///
-      /// It steps to the next item in the class.
-      ItemIt& operator++() {
-        idx = extendFind->items[idx].next;
-        if (fdx == idx) idx = -1;
-        return *this;
-      }
-
-      /// \brief Conversion operator
-      ///
-      /// It converts the iterator to the current item.
-      operator const Item&() const {
-        return extendFind->items[idx].item;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ItemIt& i) {
-        return i.idx == idx;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ItemIt& i) {
-        return i.idx != idx;
-      }
-
-    private:
-      const ExtendFindEnum* extendFind;
-      int idx, fdx;
-    };
-
-  };
-
-  /// \ingroup auxdat
-  ///
-  /// \brief A \e Union-Find data structure implementation which
-  /// is able to store a priority for each item and retrieve the minimum of
-  /// each class.
-  ///
-  /// A \e Union-Find data structure implementation which is able to
-  /// store a priority for each item and retrieve the minimum of each
-  /// class. In addition, it supports the joining and splitting the
-  /// components. If you don't need this feature then you makes
-  /// better to use the \ref UnionFind class which is more efficient.
-  ///
-  /// The union-find data strcuture based on a (2, 16)-tree with a
-  /// tournament minimum selection on the internal nodes. The insert
-  /// operation takes O(1), the find, set, decrease and increase takes
-  /// O(log(n)), where n is the number of nodes in the current
-  /// component.  The complexity of join and split is O(log(n)*k),
-  /// where n is the sum of the number of the nodes and k is the
-  /// number of joined components or the number of the components
-  /// after the split.
-  ///
-  /// \pre You need to add all the elements by the \ref insert()
-  /// method.
-  ///
-  template <typename _Value, typename _ItemIntMap,
-            typename _Comp = std::less<_Value> >
-  class HeapUnionFind {
-  public:
-
-    typedef _Value Value;
-    typedef typename _ItemIntMap::Key Item;
-
-    typedef _ItemIntMap ItemIntMap;
-
-    typedef _Comp Comp;
-
-  private:
-
-    static const int cmax = 16;
-
-    ItemIntMap& index;
-
-    struct ClassNode {
-      int parent;
-      int depth;
-
-      int left, right;
-      int next, prev;
-    };
-
-    int first_class;
-    int first_free_class;
-    std::vector<ClassNode> classes;
-
-    int newClass() {
-      if (first_free_class < 0) {
-        int id = classes.size();
-        classes.push_back(ClassNode());
-        return id;
-      } else {
-        int id = first_free_class;
-        first_free_class = classes[id].next;
-        return id;
-      }
-    }
-
-    void deleteClass(int id) {
-      classes[id].next = first_free_class;
-      first_free_class = id;
-    }
-
-    struct ItemNode {
-      int parent;
-      Item item;
-      Value prio;
-      int next, prev;
-      int left, right;
-      int size;
-    };
-
-    int first_free_node;
-    std::vector<ItemNode> nodes;
-
-    int newNode() {
-      if (first_free_node < 0) {
-        int id = nodes.size();
-        nodes.push_back(ItemNode());
-        return id;
-      } else {
-        int id = first_free_node;
-        first_free_node = nodes[id].next;
-        return id;
-      }
-    }
-
-    void deleteNode(int id) {
-      nodes[id].next = first_free_node;
-      first_free_node = id;
-    }
-
-    Comp comp;
-
-    int findClass(int id) const {
-      int kd = id;
-      while (kd >= 0) {
-        kd = nodes[kd].parent;
-      }
-      return ~kd;
-    }
-
-    int leftNode(int id) const {
-      int kd = ~(classes[id].parent);
-      for (int i = 0; i < classes[id].depth; ++i) {
-        kd = nodes[kd].left;
-      }
-      return kd;
-    }
-
-    int nextNode(int id) const {
-      int depth = 0;
-      while (id >= 0 && nodes[id].next == -1) {
-        id = nodes[id].parent;
-        ++depth;
-      }
-      if (id < 0) {
-        return -1;
-      }
-      id = nodes[id].next;
-      while (depth--) {
-        id = nodes[id].left;
-      }
-      return id;
-    }
-
-
-    void setPrio(int id) {
-      int jd = nodes[id].left;
-      nodes[id].prio = nodes[jd].prio;
-      nodes[id].item = nodes[jd].item;
-      jd = nodes[jd].next;
-      while (jd != -1) {
-        if (comp(nodes[jd].prio, nodes[id].prio)) {
-          nodes[id].prio = nodes[jd].prio;
-          nodes[id].item = nodes[jd].item;
-        }
-        jd = nodes[jd].next;
-      }
-    }
-
-    void push(int id, int jd) {
-      nodes[id].size = 1;
-      nodes[id].left = nodes[id].right = jd;
-      nodes[jd].next = nodes[jd].prev = -1;
-      nodes[jd].parent = id;
-    }
-
-    void pushAfter(int id, int jd) {
-      int kd = nodes[id].parent;
-      if (nodes[id].next != -1) {
-        nodes[nodes[id].next].prev = jd;
-        if (kd >= 0) {
-          nodes[kd].size += 1;
-        }
-      } else {
-        if (kd >= 0) {
-          nodes[kd].right = jd;
-          nodes[kd].size += 1;
-        }
-      }
-      nodes[jd].next = nodes[id].next;
-      nodes[jd].prev = id;
-      nodes[id].next = jd;
-      nodes[jd].parent = kd;
-    }
-
-    void pushRight(int id, int jd) {
-      nodes[id].size += 1;
-      nodes[jd].prev = nodes[id].right;
-      nodes[jd].next = -1;
-      nodes[nodes[id].right].next = jd;
-      nodes[id].right = jd;
-      nodes[jd].parent = id;
-    }
-
-    void popRight(int id) {
-      nodes[id].size -= 1;
-      int jd = nodes[id].right;
-      nodes[nodes[jd].prev].next = -1;
-      nodes[id].right = nodes[jd].prev;
-    }
-
-    void splice(int id, int jd) {
-      nodes[id].size += nodes[jd].size;
-      nodes[nodes[id].right].next = nodes[jd].left;
-      nodes[nodes[jd].left].prev = nodes[id].right;
-      int kd = nodes[jd].left;
-      while (kd != -1) {
-        nodes[kd].parent = id;
-        kd = nodes[kd].next;
-      }
-      nodes[id].right = nodes[jd].right;
-    }
-
-    void split(int id, int jd) {
-      int kd = nodes[id].parent;
-      nodes[kd].right = nodes[id].prev;
-      nodes[nodes[id].prev].next = -1;
-
-      nodes[jd].left = id;
-      nodes[id].prev = -1;
-      int num = 0;
-      while (id != -1) {
-        nodes[id].parent = jd;
-        nodes[jd].right = id;
-        id = nodes[id].next;
-        ++num;
-      }
-      nodes[kd].size -= num;
-      nodes[jd].size = num;
-    }
-
-    void pushLeft(int id, int jd) {
-      nodes[id].size += 1;
-      nodes[jd].next = nodes[id].left;
-      nodes[jd].prev = -1;
-      nodes[nodes[id].left].prev = jd;
-      nodes[id].left = jd;
-      nodes[jd].parent = id;
-    }
-
-    void popLeft(int id) {
-      nodes[id].size -= 1;
-      int jd = nodes[id].left;
-      nodes[nodes[jd].next].prev = -1;
-      nodes[id].left = nodes[jd].next;
-    }
-
-    void repairLeft(int id) {
-      int jd = ~(classes[id].parent);
-      while (nodes[jd].left != -1) {
-        int kd = nodes[jd].left;
-        if (nodes[jd].size == 1) {
-          if (nodes[jd].parent < 0) {
-            classes[id].parent = ~kd;
-            classes[id].depth -= 1;
-            nodes[kd].parent = ~id;
-            deleteNode(jd);
-            jd = kd;
-          } else {
-            int pd = nodes[jd].parent;
-            if (nodes[nodes[jd].next].size < cmax) {
-              pushLeft(nodes[jd].next, nodes[jd].left);
-              if (less(jd, nodes[jd].next) ||
-                  nodes[jd].item == nodes[pd].item) {
-                nodes[nodes[jd].next].prio = nodes[jd].prio;
-                nodes[nodes[jd].next].item = nodes[jd].item;
-              }
-              popLeft(pd);
-              deleteNode(jd);
-              jd = pd;
-            } else {
-              int ld = nodes[nodes[jd].next].left;
-              popLeft(nodes[jd].next);
-              pushRight(jd, ld);
-              if (less(ld, nodes[jd].left) ||
-                  nodes[ld].item == nodes[pd].item) {
-                nodes[jd].item = nodes[ld].item;
-                nodes[jd].prio = nodes[ld].prio;
-              }
-              if (nodes[nodes[jd].next].item == nodes[ld].item) {
-                setPrio(nodes[jd].next);
-              }
-              jd = nodes[jd].left;
-            }
-          }
-        } else {
-          jd = nodes[jd].left;
-        }
-      }
-    }
-
-    void repairRight(int id) {
-      int jd = ~(classes[id].parent);
-      while (nodes[jd].right != -1) {
-        int kd = nodes[jd].right;
-        if (nodes[jd].size == 1) {
-          if (nodes[jd].parent < 0) {
-            classes[id].parent = ~kd;
-            classes[id].depth -= 1;
-            nodes[kd].parent = ~id;
-            deleteNode(jd);
-            jd = kd;
-          } else {
-            int pd = nodes[jd].parent;
-            if (nodes[nodes[jd].prev].size < cmax) {
-              pushRight(nodes[jd].prev, nodes[jd].right);
-              if (less(jd, nodes[jd].prev) ||
-                  nodes[jd].item == nodes[pd].item) {
-                nodes[nodes[jd].prev].prio = nodes[jd].prio;
-                nodes[nodes[jd].prev].item = nodes[jd].item;
-              }
-              popRight(pd);
-              deleteNode(jd);
-              jd = pd;
-            } else {
-              int ld = nodes[nodes[jd].prev].right;
-              popRight(nodes[jd].prev);
-              pushLeft(jd, ld);
-              if (less(ld, nodes[jd].right) ||
-                  nodes[ld].item == nodes[pd].item) {
-                nodes[jd].item = nodes[ld].item;
-                nodes[jd].prio = nodes[ld].prio;
-              }
-              if (nodes[nodes[jd].prev].item == nodes[ld].item) {
-                setPrio(nodes[jd].prev);
-              }
-              jd = nodes[jd].right;
-            }
-          }
-        } else {
-          jd = nodes[jd].right;
-        }
-      }
-    }
-
-
-    bool less(int id, int jd) const {
-      return comp(nodes[id].prio, nodes[jd].prio);
-    }
-
-  public:
-
-    /// \brief Returns true when the given class is alive.
-    ///
-    /// Returns true when the given class is alive, ie. the class is
-    /// not nested into other class.
-    bool alive(int cls) const {
-      return classes[cls].parent < 0;
-    }
-
-    /// \brief Returns true when the given class is trivial.
-    ///
-    /// Returns true when the given class is trivial, ie. the class
-    /// contains just one item directly.
-    bool trivial(int cls) const {
-      return classes[cls].left == -1;
-    }
-
-    /// \brief Constructs the union-find.
-    ///
-    /// Constructs the union-find.
-    /// \brief _index The index map of the union-find. The data
-    /// structure uses internally for store references.
-    HeapUnionFind(ItemIntMap& _index)
-      : index(_index), first_class(-1),
-        first_free_class(-1), first_free_node(-1) {}
-
-    /// \brief Insert a new node into a new component.
-    ///
-    /// Insert a new node into a new component.
-    /// \param item The item of the new node.
-    /// \param prio The priority of the new node.
-    /// \return The class id of the one-item-heap.
-    int insert(const Item& item, const Value& prio) {
-      int id = newNode();
-      nodes[id].item = item;
-      nodes[id].prio = prio;
-      nodes[id].size = 0;
-
-      nodes[id].prev = -1;
-      nodes[id].next = -1;
-
-      nodes[id].left = -1;
-      nodes[id].right = -1;
-
-      nodes[id].item = item;
-      index[item] = id;
-
-      int class_id = newClass();
-      classes[class_id].parent = ~id;
-      classes[class_id].depth = 0;
-
-      classes[class_id].left = -1;
-      classes[class_id].right = -1;
-
-      if (first_class != -1) {
-        classes[first_class].prev = class_id;
-      }
-      classes[class_id].next = first_class;
-      classes[class_id].prev = -1;
-      first_class = class_id;
-
-      nodes[id].parent = ~class_id;
-
-      return class_id;
-    }
-
-    /// \brief The class of the item.
-    ///
-    /// \return The alive class id of the item, which is not nested into
-    /// other classes.
-    ///
-    /// The time complexity is O(log(n)).
-    int find(const Item& item) const {
-      return findClass(index[item]);
-    }
-
-    /// \brief Joins the classes.
-    ///
-    /// The current function joins the given classes. The parameter is
-    /// an STL range which should be contains valid class ids. The
-    /// time complexity is O(log(n)*k) where n is the overall number
-    /// of the joined nodes and k is the number of classes.
-    /// \return The class of the joined classes.
-    /// \pre The range should contain at least two class ids.
-    template <typename Iterator>
-    int join(Iterator begin, Iterator end) {
-      std::vector<int> cs;
-      for (Iterator it = begin; it != end; ++it) {
-        cs.push_back(*it);
-      }
-
-      int class_id = newClass();
-      { // creation union-find
-
-        if (first_class != -1) {
-          classes[first_class].prev = class_id;
-        }
-        classes[class_id].next = first_class;
-        classes[class_id].prev = -1;
-        first_class = class_id;
-
-        classes[class_id].depth = classes[cs[0]].depth;
-        classes[class_id].parent = classes[cs[0]].parent;
-        nodes[~(classes[class_id].parent)].parent = ~class_id;
-
-        int l = cs[0];
-
-        classes[class_id].left = l;
-        classes[class_id].right = l;
-
-        if (classes[l].next != -1) {
-          classes[classes[l].next].prev = classes[l].prev;
-        }
-        classes[classes[l].prev].next = classes[l].next;
-
-        classes[l].prev = -1;
-        classes[l].next = -1;
-
-        classes[l].depth = leftNode(l);
-        classes[l].parent = class_id;
-
-      }
-
-      { // merging of heap
-        int l = class_id;
-        for (int ci = 1; ci < int(cs.size()); ++ci) {
-          int r = cs[ci];
-          int rln = leftNode(r);
-          if (classes[l].depth > classes[r].depth) {
-            int id = ~(classes[l].parent);
-            for (int i = classes[r].depth + 1; i < classes[l].depth; ++i) {
-              id = nodes[id].right;
-            }
-            while (id >= 0 && nodes[id].size == cmax) {
-              int new_id = newNode();
-              int right_id = nodes[id].right;
-
-              popRight(id);
-              if (nodes[id].item == nodes[right_id].item) {
-                setPrio(id);
-              }
-              push(new_id, right_id);
-              pushRight(new_id, ~(classes[r].parent));
-
-              if (less(~classes[r].parent, right_id)) {
-                nodes[new_id].item = nodes[~classes[r].parent].item;
-                nodes[new_id].prio = nodes[~classes[r].parent].prio;
-              } else {
-                nodes[new_id].item = nodes[right_id].item;
-                nodes[new_id].prio = nodes[right_id].prio;
-              }
-
-              id = nodes[id].parent;
-              classes[r].parent = ~new_id;
-            }
-            if (id < 0) {
-              int new_parent = newNode();
-              nodes[new_parent].next = -1;
-              nodes[new_parent].prev = -1;
-              nodes[new_parent].parent = ~l;
-
-              push(new_parent, ~(classes[l].parent));
-              pushRight(new_parent, ~(classes[r].parent));
-              setPrio(new_parent);
-
-              classes[l].parent = ~new_parent;
-              classes[l].depth += 1;
-            } else {
-              pushRight(id, ~(classes[r].parent));
-              while (id >= 0 && less(~(classes[r].parent), id)) {
-                nodes[id].prio = nodes[~(classes[r].parent)].prio;
-                nodes[id].item = nodes[~(classes[r].parent)].item;
-                id = nodes[id].parent;
-              }
-            }
-          } else if (classes[r].depth > classes[l].depth) {
-            int id = ~(classes[r].parent);
-            for (int i = classes[l].depth + 1; i < classes[r].depth; ++i) {
-              id = nodes[id].left;
-            }
-            while (id >= 0 && nodes[id].size == cmax) {
-              int new_id = newNode();
-              int left_id = nodes[id].left;
-
-              popLeft(id);
-              if (nodes[id].prio == nodes[left_id].prio) {
-                setPrio(id);
-              }
-              push(new_id, left_id);
-              pushLeft(new_id, ~(classes[l].parent));
-
-              if (less(~classes[l].parent, left_id)) {
-                nodes[new_id].item = nodes[~classes[l].parent].item;
-                nodes[new_id].prio = nodes[~classes[l].parent].prio;
-              } else {
-                nodes[new_id].item = nodes[left_id].item;
-                nodes[new_id].prio = nodes[left_id].prio;
-              }
-
-              id = nodes[id].parent;
-              classes[l].parent = ~new_id;
-
-            }
-            if (id < 0) {
-              int new_parent = newNode();
-              nodes[new_parent].next = -1;
-              nodes[new_parent].prev = -1;
-              nodes[new_parent].parent = ~l;
-
-              push(new_parent, ~(classes[r].parent));
-              pushLeft(new_parent, ~(classes[l].parent));
-              setPrio(new_parent);
-
-              classes[r].parent = ~new_parent;
-              classes[r].depth += 1;
-            } else {
-              pushLeft(id, ~(classes[l].parent));
-              while (id >= 0 && less(~(classes[l].parent), id)) {
-                nodes[id].prio = nodes[~(classes[l].parent)].prio;
-                nodes[id].item = nodes[~(classes[l].parent)].item;
-                id = nodes[id].parent;
-              }
-            }
-            nodes[~(classes[r].parent)].parent = ~l;
-            classes[l].parent = classes[r].parent;
-            classes[l].depth = classes[r].depth;
-          } else {
-            if (classes[l].depth != 0 &&
-                nodes[~(classes[l].parent)].size +
-                nodes[~(classes[r].parent)].size <= cmax) {
-              splice(~(classes[l].parent), ~(classes[r].parent));
-              deleteNode(~(classes[r].parent));
-              if (less(~(classes[r].parent), ~(classes[l].parent))) {
-                nodes[~(classes[l].parent)].prio =
-                  nodes[~(classes[r].parent)].prio;
-                nodes[~(classes[l].parent)].item =
-                  nodes[~(classes[r].parent)].item;
-              }
-            } else {
-              int new_parent = newNode();
-              nodes[new_parent].next = nodes[new_parent].prev = -1;
-              push(new_parent, ~(classes[l].parent));
-              pushRight(new_parent, ~(classes[r].parent));
-              setPrio(new_parent);
-
-              classes[l].parent = ~new_parent;
-              classes[l].depth += 1;
-              nodes[new_parent].parent = ~l;
-            }
-          }
-          if (classes[r].next != -1) {
-            classes[classes[r].next].prev = classes[r].prev;
-          }
-          classes[classes[r].prev].next = classes[r].next;
-
-          classes[r].prev = classes[l].right;
-          classes[classes[l].right].next = r;
-          classes[l].right = r;
-          classes[r].parent = l;
-
-          classes[r].next = -1;
-          classes[r].depth = rln;
-        }
-      }
-      return class_id;
-    }
-
-    /// \brief Split the class to subclasses.
-    ///
-    /// The current function splits the given class. The join, which
-    /// made the current class, stored a reference to the
-    /// subclasses. The \c splitClass() member restores the classes
-    /// and creates the heaps. The parameter is an STL output iterator
-    /// which will be filled with the subclass ids. The time
-    /// complexity is O(log(n)*k) where n is the overall number of
-    /// nodes in the splitted classes and k is the number of the
-    /// classes.
-    template <typename Iterator>
-    void split(int cls, Iterator out) {
-      std::vector<int> cs;
-      { // splitting union-find
-        int id = cls;
-        int l = classes[id].left;
-
-        classes[l].parent = classes[id].parent;
-        classes[l].depth = classes[id].depth;
-
-        nodes[~(classes[l].parent)].parent = ~l;
-
-        *out++ = l;
-
-        while (l != -1) {
-          cs.push_back(l);
-          l = classes[l].next;
-        }
-
-        classes[classes[id].right].next = first_class;
-        classes[first_class].prev = classes[id].right;
-        first_class = classes[id].left;
-
-        if (classes[id].next != -1) {
-          classes[classes[id].next].prev = classes[id].prev;
-        }
-        classes[classes[id].prev].next = classes[id].next;
-
-        deleteClass(id);
-      }
-
-      {
-        for (int i = 1; i < int(cs.size()); ++i) {
-          int l = classes[cs[i]].depth;
-          while (nodes[nodes[l].parent].left == l) {
-            l = nodes[l].parent;
-          }
-          int r = l;
-          while (nodes[l].parent >= 0) {
-            l = nodes[l].parent;
-            int new_node = newNode();
-
-            nodes[new_node].prev = -1;
-            nodes[new_node].next = -1;
-
-            split(r, new_node);
-            pushAfter(l, new_node);
-            setPrio(l);
-            setPrio(new_node);
-            r = new_node;
-          }
-          classes[cs[i]].parent = ~r;
-          classes[cs[i]].depth = classes[~(nodes[l].parent)].depth;
-          nodes[r].parent = ~cs[i];
-
-          nodes[l].next = -1;
-          nodes[r].prev = -1;
-
-          repairRight(~(nodes[l].parent));
-          repairLeft(cs[i]);
-
-          *out++ = cs[i];
-        }
-      }
-    }
-
-    /// \brief Gives back the priority of the current item.
-    ///
-    /// \return Gives back the priority of the current item.
-    const Value& operator[](const Item& item) const {
-      return nodes[index[item]].prio;
-    }
-
-    /// \brief Sets the priority of the current item.
-    ///
-    /// Sets the priority of the current item.
-    void set(const Item& item, const Value& prio) {
-      if (comp(prio, nodes[index[item]].prio)) {
-        decrease(item, prio);
-      } else if (!comp(prio, nodes[index[item]].prio)) {
-        increase(item, prio);
-      }
-    }
-
-    /// \brief Increase the priority of the current item.
-    ///
-    /// Increase the priority of the current item.
-    void increase(const Item& item, const Value& prio) {
-      int id = index[item];
-      int kd = nodes[id].parent;
-      nodes[id].prio = prio;
-      while (kd >= 0 && nodes[kd].item == item) {
-        setPrio(kd);
-        kd = nodes[kd].parent;
-      }
-    }
-
-    /// \brief Increase the priority of the current item.
-    ///
-    /// Increase the priority of the current item.
-    void decrease(const Item& item, const Value& prio) {
-      int id = index[item];
-      int kd = nodes[id].parent;
-      nodes[id].prio = prio;
-      while (kd >= 0 && less(id, kd)) {
-        nodes[kd].prio = prio;
-        nodes[kd].item = item;
-        kd = nodes[kd].parent;
-      }
-    }
-
-    /// \brief Gives back the minimum priority of the class.
-    ///
-    /// \return Gives back the minimum priority of the class.
-    const Value& classPrio(int cls) const {
-      return nodes[~(classes[cls].parent)].prio;
-    }
-
-    /// \brief Gives back the minimum priority item of the class.
-    ///
-    /// \return Gives back the minimum priority item of the class.
-    const Item& classTop(int cls) const {
-      return nodes[~(classes[cls].parent)].item;
-    }
-
-    /// \brief Gives back a representant item of the class.
-    ///
-    /// The representant is indpendent from the priorities of the
-    /// items.
-    /// \return Gives back a representant item of the class.
-    const Item& classRep(int id) const {
-      int parent = classes[id].parent;
-      return nodes[parent >= 0 ? classes[id].depth : leftNode(id)].item;
-    }
-
-    /// \brief LEMON style iterator for the items of a class.
-    ///
-    /// ClassIt is a lemon style iterator for the components. It iterates
-    /// on the items of a class. By example if you want to iterate on
-    /// each items of each classes then you may write the next code.
-    ///\code
-    /// for (ClassIt cit(huf); cit != INVALID; ++cit) {
-    ///   std::cout << "Class: ";
-    ///   for (ItemIt iit(huf, cit); iit != INVALID; ++iit) {
-    ///     std::cout << toString(iit) << ' ' << std::endl;
-    ///   }
-    ///   std::cout << std::endl;
-    /// }
-    ///\endcode
-    class ItemIt {
-    private:
-
-      const HeapUnionFind* _huf;
-      int _id, _lid;
-
-    public:
-
-      /// \brief Default constructor
-      ///
-      /// Default constructor
-      ItemIt() {}
-
-      ItemIt(const HeapUnionFind& huf, int cls) : _huf(&huf) {
-        int id = cls;
-        int parent = _huf->classes[id].parent;
-        if (parent >= 0) {
-          _id = _huf->classes[id].depth;
-          if (_huf->classes[id].next != -1) {
-            _lid = _huf->classes[_huf->classes[id].next].depth;
-          } else {
-            _lid = -1;
-          }
-        } else {
-          _id = _huf->leftNode(id);
-          _lid = -1;
-        }
-      }
-
-      /// \brief Increment operator
-      ///
-      /// It steps to the next item in the class.
-      ItemIt& operator++() {
-        _id = _huf->nextNode(_id);
-        return *this;
-      }
-
-      /// \brief Conversion operator
-      ///
-      /// It converts the iterator to the current item.
-      operator const Item&() const {
-        return _huf->nodes[_id].item;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ItemIt& i) {
-        return i._id == _id;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ItemIt& i) {
-        return i._id != _id;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(Invalid) {
-        return _id == _lid;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(Invalid) {
-        return _id != _lid;
-      }
-
-    };
-
-    /// \brief Class iterator
-    ///
-    /// The iterator stores
-    class ClassIt {
-    private:
-
-      const HeapUnionFind* _huf;
-      int _id;
-
-    public:
-
-      ClassIt(const HeapUnionFind& huf)
-        : _huf(&huf), _id(huf.first_class) {}
-
-      ClassIt(const HeapUnionFind& huf, int cls)
-        : _huf(&huf), _id(huf.classes[cls].left) {}
-
-      ClassIt(Invalid) : _huf(0), _id(-1) {}
-
-      const ClassIt& operator++() {
-        _id = _huf->classes[_id].next;
-        return *this;
-      }
-
-      /// \brief Equality operator
-      ///
-      /// Equality operator
-      bool operator==(const ClassIt& i) {
-        return i._id == _id;
-      }
-
-      /// \brief Inequality operator
-      ///
-      /// Inequality operator
-      bool operator!=(const ClassIt& i) {
-        return i._id != _id;
-      }
-
-      operator int() const {
-        return _id;
-      }
-
-    };
-
-  };
-
-  //! @}
-
-} //namespace lemon
-
-#endif //LEMON_UNION_FIND_H
Index: lx_check_cplex.m4
===================================================================
--- m4/lx_check_cplex.m4	(revision 395)
+++ 	(revision )
@@ -1,77 +1,0 @@
-AC_DEFUN([LX_CHECK_CPLEX],
-[
-  AC_ARG_WITH([cplex],
-AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
-AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
-              [], [with_cplex=yes])
-
-  AC_ARG_WITH([cplex-includedir],
-AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
-              [], [with_cplex_includedir=no])
-
-  AC_ARG_WITH([cplex-libdir],
-AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
-              [], [with_cplex_libdir=no])
-
-  lx_cplex_found=no
-  if test x"$with_cplex" != x"no"; then
-    AC_MSG_CHECKING([for CPLEX])
-
-    if test x"$with_cplex_includedir" != x"no"; then
-      CPLEX_CFLAGS="-I$with_cplex_includedir"
-    elif test x"$with_cplex" != x"yes"; then
-      CPLEX_CFLAGS="-I$with_cplex/include"
-    elif test x"$CPLEX_INCLUDEDIR" != x; then
-      CPLEX_CFLAGS="-I$CPLEX_INCLUDEDIR"
-    fi
-
-    if test x"$with_cplex_libdir" != x"no"; then
-      CPLEX_LDFLAGS="-L$with_cplex_libdir"
-    elif test x"$with_cplex" != x"yes"; then
-      CPLEX_LDFLAGS="-L$with_cplex/lib"
-    elif test x"$CPLEX_LIBDIR" != x; then
-      CPLEX_LDFLAGS="-L$CPLEX_LIBDIR"
-    fi
-    CPLEX_LIBS="-lcplex -lm -lpthread"
-
-    lx_save_cxxflags="$CXXFLAGS"
-    lx_save_ldflags="$LDFLAGS"
-    lx_save_libs="$LIBS"
-    CXXFLAGS="$CPLEX_CFLAGS"
-    LDFLAGS="$CPLEX_LDFLAGS"
-    LIBS="$CPLEX_LIBS"
-
-    lx_cplex_test_prog='
-      extern "C" {
-      #include <ilcplex/cplex.h>
-      }
-
-      int main(int argc, char** argv)
-      {
-        CPXENVptr env = NULL;
-        return 0;
-      }'
-
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
-    AC_LANG_POP(C++)
-
-    CXXFLAGS="$lx_save_cxxflags"
-    LDFLAGS="$lx_save_ldflags"
-    LIBS="$lx_save_libs"
-
-    if test x"$lx_cplex_found" = x"yes"; then
-      AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
-      AC_MSG_RESULT([yes])
-    else
-      CPLEX_CFLAGS=""
-      CPLEX_LDFLAGS=""
-      CPLEX_LIBS=""
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
-  AC_SUBST(CPLEX_CFLAGS)
-  AC_SUBST(CPLEX_LIBS)
-  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
-])
Index: lx_check_glpk.m4
===================================================================
--- m4/lx_check_glpk.m4	(revision 395)
+++ 	(revision )
@@ -1,75 +1,0 @@
-AC_DEFUN([LX_CHECK_GLPK],
-[
-  AC_ARG_WITH([glpk],
-AS_HELP_STRING([--with-glpk@<:@=PREFIX@:>@], [search for GLPK under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
-AS_HELP_STRING([--without-glpk], [disable checking for GLPK]),
-              [], [with_glpk=yes])
-
-  AC_ARG_WITH([glpk-includedir],
-AS_HELP_STRING([--with-glpk-includedir=DIR], [search for GLPK headers in DIR]),
-              [], [with_glpk_includedir=no])
-
-  AC_ARG_WITH([glpk-libdir],
-AS_HELP_STRING([--with-glpk-libdir=DIR], [search for GLPK libraries in DIR]),
-              [], [with_glpk_libdir=no])
-
-  lx_glpk_found=no
-  if test x"$with_glpk" != x"no"; then
-    AC_MSG_CHECKING([for GLPK])
-
-    if test x"$with_glpk_includedir" != x"no"; then
-      GLPK_CFLAGS="-I$with_glpk_includedir"
-    elif test x"$with_glpk" != x"yes"; then
-      GLPK_CFLAGS="-I$with_glpk/include"
-    fi
-
-    if test x"$with_glpk_libdir" != x"no"; then
-      GLPK_LDFLAGS="-L$with_glpk_libdir"
-    elif test x"$with_glpk" != x"yes"; then
-      GLPK_LDFLAGS="-L$with_glpk/lib"
-    fi
-    GLPK_LIBS="-lglpk"
-
-    lx_save_cxxflags="$CXXFLAGS"
-    lx_save_ldflags="$LDFLAGS"
-    lx_save_libs="$LIBS"
-    CXXFLAGS="$GLPK_CFLAGS"
-    LDFLAGS="$GLPK_LDFLAGS"
-    LIBS="$GLPK_LIBS"
-
-    lx_glpk_test_prog='
-      extern "C" {
-      #include <glpk.h>
-      }
-
-      int main(int argc, char** argv)
-      {
-        LPX *lp;
-        lp = lpx_create_prob();
-        lpx_delete_prob(lp);
-        return 0;
-      }'
-
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no])
-    AC_LANG_POP(C++)
-
-    CXXFLAGS="$lx_save_cxxflags"
-    LDFLAGS="$lx_save_ldflags"
-    LIBS="$lx_save_libs"
-
-    if test x"$lx_glpk_found" = x"yes"; then
-      AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
-      AC_MSG_RESULT([yes])
-    else
-      GLPK_CFLAGS=""
-      GLPK_LDFLAGS=""
-      GLPK_LIBS=""
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS"
-  AC_SUBST(GLPK_CFLAGS)
-  AC_SUBST(GLPK_LIBS)
-  AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
-])
Index: lx_check_soplex.m4
===================================================================
--- m4/lx_check_soplex.m4	(revision 395)
+++ 	(revision )
@@ -1,71 +1,0 @@
-AC_DEFUN([LX_CHECK_SOPLEX],
-[
-  AC_ARG_WITH([soplex],
-AS_HELP_STRING([--with-soplex@<:@=PREFIX@:>@], [search for SOPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
-AS_HELP_STRING([--without-soplex], [disable checking for SOPLEX]),
-              [], [with_soplex=yes])
-
-  AC_ARG_WITH([soplex-includedir],
-AS_HELP_STRING([--with-soplex-includedir=DIR], [search for SOPLEX headers in DIR]),
-              [], [with_soplex_includedir=no])
-
-  AC_ARG_WITH([soplex-libdir],
-AS_HELP_STRING([--with-soplex-libdir=DIR], [search for SOPLEX libraries in DIR]),
-              [], [with_soplex_libdir=no])
-
-  lx_soplex_found=no
-  if test x"$with_soplex" != x"no"; then
-    AC_MSG_CHECKING([for SOPLEX])
-
-    if test x"$with_soplex_includedir" != x"no"; then
-      SOPLEX_CXXFLAGS="-I$with_soplex_includedir"
-    elif test x"$with_soplex" != x"yes"; then
-      SOPLEX_CXXFLAGS="-I$with_soplex/include"
-    fi
-
-    if test x"$with_soplex_libdir" != x"no"; then
-      SOPLEX_LDFLAGS="-L$with_soplex_libdir"
-    elif test x"$with_soplex" != x"yes"; then
-      SOPLEX_LDFLAGS="-L$with_soplex/lib"
-    fi
-    SOPLEX_LIBS="-lsoplex -lz"
-
-    lx_save_cxxflags="$CXXFLAGS"
-    lx_save_ldflags="$LDFLAGS"
-    lx_save_libs="$LIBS"
-    CXXFLAGS="$SOPLEX_CXXFLAGS"
-    LDFLAGS="$SOPLEX_LDFLAGS"
-    LIBS="$SOPLEX_LIBS"
-
-    lx_soplex_test_prog='
-      #include <soplex/soplex.h>
-
-      int main(int argc, char** argv)
-      {
-        soplex::SoPlex soplex;
-        return 0;
-      }'
-
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([$lx_soplex_test_prog], [lx_soplex_found=yes], [lx_soplex_found=no])
-    AC_LANG_POP(C++)
-
-    CXXFLAGS="$lx_save_cxxflags"
-    LDFLAGS="$lx_save_ldflags"
-    LIBS="$lx_save_libs"
-
-    if test x"$lx_soplex_found" = x"yes"; then
-      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
-      AC_MSG_RESULT([yes])
-    else
-      SOPLEX_CXXFLAGS=""
-      SOPLEX_LDFLAGS=""
-      SOPLEX_LIBS=""
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  SOPLEX_LIBS="$SOPLEX_LDFLAGS $SOPLEX_LIBS"
-  AC_SUBST(SOPLEX_CXXFLAGS)
-  AC_SUBST(SOPLEX_LIBS)
-  AM_CONDITIONAL([HAVE_SOPLEX], [test x"$lx_soplex_found" = x"yes"])
-])
Index: ripts/chg-len.py
===================================================================
--- scripts/chg-len.py	(revision 284)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#! /usr/bin/env python
-
-import sys
-import os
-
-if len(sys.argv)>1 and sys.argv[1] in ["-h","--help"]:
-    print """
-This utility just prints the length of the longest path
-in the revision graph from revison 0 to the current one.
-"""
-    exit(0)
-plist = os.popen("HGRCPATH='' hg parents --template='{rev}\n'").readlines()
-if len(plist)>1:
-    print "You are in the process of merging"
-    exit(1)
-PAR = int(plist[0])
-
-f = os.popen("HGRCPATH='' hg log -r 0:tip --template='{rev} {parents}\n'").\
-    readlines()
-REV = -1
-lengths=[]
-for l in f:
-    REV+=1
-    s = l.split()
-    rev = int(s[0])
-    if REV != rev:
-        print "Something is seriously wrong"
-        exit(1)
-    if len(s) == 1:
-        par1 = par2 = rev - 1
-    elif len(s) == 2:
-        par1 = par2 = int(s[1].split(":")[0])
-    else:
-        par1 = int(s[1].split(":")[0])
-        par2 = int(s[2].split(":")[0])
-    if rev == 0:
-        lengths.append(0)
-    else:
-        lengths.append(max(lengths[par1],lengths[par2])+1)
-print lengths[PAR]
Index: ripts/mk-release.sh
===================================================================
--- scripts/mk-release.sh	(revision 391)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/bin/bash
-
-set -e
-
-if [ $# = 0 ]; then
-    echo "Usage: $0 release-id"
-    exit 1
-else
-    export LEMON_VERSION=$1
-fi
-
-echo '*****************************************************************'
-echo ' Start making release tarballs for version '${LEMON_VERSION}
-echo '*****************************************************************'
-
-autoreconf -vif
-./configure --enable-demo
-
-make
-make html
-make distcheck
-tar xf lemon-${LEMON_VERSION}.tar.gz
-zip -r lemon-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
-mv lemon-${LEMON_VERSION}/doc/html lemon-doc-${LEMON_VERSION}
-tar czf lemon-doc-${LEMON_VERSION}.tar.gz lemon-doc-${LEMON_VERSION}
-zip -r lemon-doc-${LEMON_VERSION}.zip lemon-doc-${LEMON_VERSION}
-tar czf lemon-nodoc-${LEMON_VERSION}.tar.gz lemon-${LEMON_VERSION}
-zip -r lemon-nodoc-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
-hg tag -m 'LEMON '${LEMON_VERSION}' released ('$(hg par --template="{node|short}")' tagged as r'${LEMON_VERSION}')' r${LEMON_VERSION}
-
-rm -rf lemon-${LEMON_VERSION} lemon-doc-${LEMON_VERSION}
-
-echo '*****************************************************************'
-echo '  Release '${LEMON_VERSION}' has been created' 
-echo '*****************************************************************'
Index: ripts/unify-sources.sh
===================================================================
--- scripts/unify-sources.sh	(revision 393)
+++ 	(revision )
@@ -1,143 +1,0 @@
-#!/bin/bash
-
-YEAR=`date +%Y`
-HGROOT=`hg root`
-
-function hg_year() {
-    if [ -n "$(hg st $1)" ]; then
-        echo $YEAR
-    else
-        hg log -l 1 --template='{date|isodate}\n' $1 |
-        cut -d '-' -f 1
-    fi
-}
-
-function update_header() {
-    TMP_FILE=`mktemp`
-    FILE_NAME=$1
-
-    (echo "/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-"$(hg_year $1)"
- * 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.
- *
- */
-"
-	awk 'BEGIN { pm=0; }
-     pm==3 { print }
-     /\/\* / && pm==0 { pm=1;}
-     /[^:blank:]/ && (pm==0 || pm==2) { pm=3; print;}
-     /\*\// && pm==1 { pm=2;}
-    ' $1
-	) >$TMP_FILE
-
-    HEADER_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function update_tabs() {
-    TMP_FILE=`mktemp`
-    FILE_NAME=$1
-
-    cat $1 |
-    sed -e 's/\t/        /g' >$TMP_FILE
-
-    TABS_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function remove_trailing_space() {
-    TMP_FILE=`mktemp`
-    FILE_NAME=$1
-
-    cat $1 |
-    sed -e 's/ \+$//g' >$TMP_FILE
-
-    SPACES_CH=`diff -q $TMP_FILE $FILE_NAME >/dev/null&&echo NO||echo YES`
-
-    rm $FILE_NAME
-    mv $TMP_FILE $FILE_NAME
-}
-
-function long_line_test() {
-    cat $1 |grep -q -E '.{81,}'
-}
-
-function update_file() {
-    echo -n '    update' $i ...
-
-    update_header $1
-    update_tabs $1
-    remove_trailing_space $1
-
-    CHANGED=NO;
-    if [[ $HEADER_CH = YES ]];
-    then
-	echo -n '  [header updated]'
-	CHANGED=YES;
-    fi
-    if [[ $TABS_CH = YES ]];
-    then
-	echo -n ' [tabs removed]'
-	CHANGED=YES;
-    fi
-    if [[ $SPACES_CH = YES ]];
-    then
-	echo -n ' [trailing spaces removed]'
-	CHANGED=YES;
-    fi
-    if long_line_test $1 ;
-    then
-	echo -n ' [LONG LINES]'
-	((LONG_LINE_FILES++))
-    fi
-    echo
-    if [[ $CHANGED = YES ]];
-    then
-	((CHANGED_FILES++))
-    fi
-}
-
-CHANGED_FILES=0
-TOTAL_FILES=0
-LONG_LINE_FILES=0
-if [ $# == 0 ]; then
-    echo Update all source files...
-    for i in `hg manifest|grep -E  '\.(cc|h|dox)$'`
-    do
-	update_file $HGROOT/$i
-	((TOTAL_FILES++))
-    done
-    echo '  done.'
-else
-    for i in $*
-    do
-	update_file $i
-	((TOTAL_FILES++))
-    done
-fi
-echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
-if [[ $LONG_LINE_FILES -gt 1 ]]; then
-    echo
-    echo WARNING: $LONG_LINE_FILES files contains long lines!    
-    echo
-elif [[ $LONG_LINE_FILES -gt 0 ]]; then
-    echo
-    echo WARNING: a file contains long lines!
-    echo
-fi
Index: st/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 422)
+++ 	(revision )
@@ -1,32 +1,0 @@
-INCLUDE_DIRECTORIES(
-  ${CMAKE_SOURCE_DIR}
-  ${PROJECT_BINARY_DIR}
-)
-
-LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
-
-SET(TESTS
-  bfs_test
-  counter_test
-  dfs_test
-  digraph_test
-  dijkstra_test
-  dim_test
-  error_test
-  graph_copy_test
-  graph_test
-  graph_utils_test
-  heap_test
-  kruskal_test
-  lgf_test
-  maps_test
-  random_test
-  path_test
-  time_measure_test
-  unionfind_test)
-
-FOREACH(TEST_NAME ${TESTS})
-  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
-  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
-  ADD_TEST(${TEST_NAME} ${TEST_NAME})
-ENDFOREACH(TEST_NAME)
Index: st/Makefile.am
===================================================================
--- test/Makefile.am	(revision 422)
+++ 	(revision )
@@ -1,52 +1,0 @@
-EXTRA_DIST += \
-	test/CMakeLists.txt
-
-noinst_HEADERS += \
-	test/graph_test.h \
-        test/test_tools.h
-
-check_PROGRAMS += \
-	test/bfs_test \
-        test/counter_test \
-	test/dfs_test \
-	test/digraph_test \
-	test/dijkstra_test \
-        test/dim_test \
-	test/error_test \
-	test/graph_copy_test \
-	test/graph_test \
-	test/graph_utils_test \
-	test/heap_test \
-	test/kruskal_test \
-	test/lgf_test \
-        test/maps_test \
-        test/random_test \
-        test/path_test \
-        test/test_tools_fail \
-        test/test_tools_pass \
-        test/time_measure_test \
-	test/unionfind_test
-
-TESTS += $(check_PROGRAMS)
-XFAIL_TESTS += test/test_tools_fail$(EXEEXT)
-
-test_bfs_test_SOURCES = test/bfs_test.cc
-test_counter_test_SOURCES = test/counter_test.cc
-test_dfs_test_SOURCES = test/dfs_test.cc
-test_digraph_test_SOURCES = test/digraph_test.cc
-test_dijkstra_test_SOURCES = test/dijkstra_test.cc
-test_dim_test_SOURCES = test/dim_test.cc
-test_error_test_SOURCES = test/error_test.cc
-test_graph_copy_test_SOURCES = test/graph_copy_test.cc
-test_graph_test_SOURCES = test/graph_test.cc
-test_graph_utils_test_SOURCES = test/graph_utils_test.cc
-test_heap_test_SOURCES = test/heap_test.cc
-test_kruskal_test_SOURCES = test/kruskal_test.cc
-test_lgf_test_SOURCES = test/lgf_test.cc
-test_maps_test_SOURCES = test/maps_test.cc
-test_path_test_SOURCES = test/path_test.cc
-test_random_test_SOURCES = test/random_test.cc
-test_test_tools_fail_SOURCES = test/test_tools_fail.cc
-test_test_tools_pass_SOURCES = test/test_tools_pass.cc
-test_time_measure_test_SOURCES = test/time_measure_test.cc
-test_unionfind_test_SOURCES = test/unionfind_test.cc
Index: st/bfs_test.cc
===================================================================
--- test/bfs_test.cc	(revision 293)
+++ 	(revision )
@@ -1,197 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/concepts/digraph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/bfs.h>
-#include <lemon/path.h>
-
-#include "graph_test.h"
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "2\n"
-  "3\n"
-  "4\n"
-  "5\n"
-  "@arcs\n"
-  "     label\n"
-  "0 1  0\n"
-  "1 2  1\n"
-  "2 3  2\n"
-  "3 4  3\n"
-  "0 3  4\n"
-  "0 3  5\n"
-  "5 2  6\n"
-  "@attributes\n"
-  "source 0\n"
-  "target 4\n";
-
-void checkBfsCompile()
-{
-  typedef concepts::Digraph Digraph;
-  typedef Bfs<Digraph> BType;
-  typedef Digraph::Node Node;
-  typedef Digraph::Arc Arc;
-
-  Digraph G;
-  Node s, t;
-  Arc e;
-  int l;
-  bool b;
-  BType::DistMap d(G);
-  BType::PredMap p(G);
-  Path<Digraph> pp;
-
-  {
-    BType bfs_test(G);
-
-    bfs_test.run(s);
-    bfs_test.run(s,t);
-    bfs_test.run();
-
-    l  = bfs_test.dist(t);
-    e  = bfs_test.predArc(t);
-    s  = bfs_test.predNode(t);
-    b  = bfs_test.reached(t);
-    d  = bfs_test.distMap();
-    p  = bfs_test.predMap();
-    pp = bfs_test.path(t);
-  }
-  {
-    BType
-      ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
-      ::SetDistMap<concepts::ReadWriteMap<Node,int> >
-      ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
-      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
-      ::SetStandardProcessedMap
-      ::Create bfs_test(G);
-
-    bfs_test.run(s);
-    bfs_test.run(s,t);
-    bfs_test.run();
-
-    l  = bfs_test.dist(t);
-    e  = bfs_test.predArc(t);
-    s  = bfs_test.predNode(t);
-    b  = bfs_test.reached(t);
-    pp = bfs_test.path(t);
-  }
-}
-
-void checkBfsFunctionCompile()
-{
-  typedef int VType;
-  typedef concepts::Digraph Digraph;
-  typedef Digraph::Arc Arc;
-  typedef Digraph::Node Node;
-
-  Digraph g;
-  bool b;
-  bfs(g).run(Node());
-  b=bfs(g).run(Node(),Node());
-  bfs(g).run();
-  bfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .run(Node());
-  b=bfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .path(concepts::Path<Digraph>())
-    .dist(VType())
-    .run(Node(),Node());
-  bfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .run();
-}
-
-template <class Digraph>
-void checkBfs() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node s, t;
-
-  std::istringstream input(test_lgf);
-  digraphReader(G, input).
-    node("source", s).
-    node("target", t).
-    run();
-
-  Bfs<Digraph> bfs_test(G);
-  bfs_test.run(s);
-
-  check(bfs_test.dist(t)==2,"Bfs found a wrong path.");
-
-  Path<Digraph> p = bfs_test.path(t);
-  check(p.length()==2,"path() found a wrong path.");
-  check(checkPath(G, p),"path() found a wrong path.");
-  check(pathSource(G, p) == s,"path() found a wrong path.");
-  check(pathTarget(G, p) == t,"path() found a wrong path.");
-
-
-  for(ArcIt a(G); a!=INVALID; ++a) {
-    Node u=G.source(a);
-    Node v=G.target(a);
-    check( !bfs_test.reached(u) ||
-           (bfs_test.dist(v) <= bfs_test.dist(u)+1),
-           "Wrong output. " << G.id(u) << "->" << G.id(v));
-  }
-
-  for(NodeIt v(G); v!=INVALID; ++v) {
-    if (bfs_test.reached(v)) {
-      check(v==s || bfs_test.predArc(v)!=INVALID, "Wrong tree.");
-      if (bfs_test.predArc(v)!=INVALID ) {
-        Arc a=bfs_test.predArc(v);
-        Node u=G.source(a);
-        check(u==bfs_test.predNode(v),"Wrong tree.");
-        check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
-              "Wrong distance. Difference: "
-              << std::abs(bfs_test.dist(v) - bfs_test.dist(u) - 1));
-      }
-    }
-  }
-
-  {
-    NullMap<Node,Arc> myPredMap;
-    bfs(G).predMap(myPredMap).run(s);
-  }
-}
-
-int main()
-{
-  checkBfs<ListDigraph>();
-  checkBfs<SmartDigraph>();
-  return 0;
-}
Index: st/counter_test.cc
===================================================================
--- test/counter_test.cc	(revision 209)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/counter.h>
-#include <vector>
-
-using namespace lemon;
-
-template <typename T>
-void bubbleSort(std::vector<T>& v) {
-  Counter op("Bubble Sort - Operations: ");
-  Counter::NoSubCounter as(op, "Assignments: ");
-  Counter::NoSubCounter co(op, "Comparisons: ");
-  for (int i = v.size()-1; i > 0; --i) {
-    for (int j = 0; j < i; ++j) {
-      if (v[j] > v[j+1]) {
-        T tmp = v[j];
-        v[j] = v[j+1];
-        v[j+1] = tmp;
-        as += 3;
-      }
-      ++co;
-    }
-  }
-}
-
-template <typename T>
-void insertionSort(std::vector<T>& v) {
-  Counter op("Insertion Sort - Operations: ");
-  Counter::NoSubCounter as(op, "Assignments: ");
-  Counter::NoSubCounter co(op, "Comparisons: ");
-  for (int i = 1; i < int(v.size()); ++i) {
-    T value = v[i];
-    ++as;
-    int j = i;
-    while (j > 0 && v[j-1] > value) {
-      v[j] = v[j-1];
-      --j;
-      ++co; ++as;
-    }
-    v[j] = value;
-    ++as;
-  }
-}
-
-template <typename MyCounter>
-void counterTest() {
-  MyCounter c("Main Counter: ");
-  c++;
-  typename MyCounter::SubCounter d(c, "SubCounter: ");
-  d++;
-  typename MyCounter::SubCounter::NoSubCounter e(d, "SubSubCounter: ");
-  e++;
-  d+=3;
-  c-=4;
-  e-=2;
-  c.reset(2);
-  c.reset();
-}
-
-void init(std::vector<int>& v) {
-  v[0] = 10; v[1] = 60; v[2] = 20; v[3] = 90; v[4] = 100;
-  v[5] = 80; v[6] = 40; v[7] = 30; v[8] = 50; v[9] = 70;
-}
-
-int main()
-{
-  counterTest<Counter>();
-  counterTest<NoCounter>();
-
-  std::vector<int> x(10);
-  init(x); bubbleSort(x);
-  init(x); insertionSort(x);
-
-  return 0;
-}
Index: st/dfs_test.cc
===================================================================
--- test/dfs_test.cc	(revision 427)
+++ 	(revision )
@@ -1,199 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-#include <lemon/concepts/digraph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/dfs.h>
-#include <lemon/path.h>
-
-#include "graph_test.h"
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "2\n"
-  "3\n"
-  "4\n"
-  "5\n"
-  "6\n"
-  "@arcs\n"
-  "     label\n"
-  "0 1  0\n"
-  "1 2  1\n"
-  "2 3  2\n"
-  "1 4  3\n"
-  "4 2  4\n"
-  "4 5  5\n"
-  "5 0  6\n"
-  "6 3  7\n"
-  "@attributes\n"
-  "source 0\n"
-  "target 5\n"
-  "source1 6\n"
-  "target1 3\n";
-
-
-void checkDfsCompile()
-{
-  typedef concepts::Digraph Digraph;
-  typedef Dfs<Digraph> DType;
-  typedef Digraph::Node Node;
-  typedef Digraph::Arc Arc;
-
-  Digraph G;
-  Node s, t;
-  Arc e;
-  int l;
-  bool b;
-  DType::DistMap d(G);
-  DType::PredMap p(G);
-  Path<Digraph> pp;
-
-  {
-    DType dfs_test(G);
-
-    dfs_test.run(s);
-    dfs_test.run(s,t);
-    dfs_test.run();
-
-    l  = dfs_test.dist(t);
-    e  = dfs_test.predArc(t);
-    s  = dfs_test.predNode(t);
-    b  = dfs_test.reached(t);
-    d  = dfs_test.distMap();
-    p  = dfs_test.predMap();
-    pp = dfs_test.path(t);
-  }
-  {
-    DType
-      ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
-      ::SetDistMap<concepts::ReadWriteMap<Node,int> >
-      ::SetReachedMap<concepts::ReadWriteMap<Node,bool> >
-      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
-      ::SetStandardProcessedMap
-      ::Create dfs_test(G);
-
-    dfs_test.run(s);
-    dfs_test.run(s,t);
-    dfs_test.run();
-
-    l  = dfs_test.dist(t);
-    e  = dfs_test.predArc(t);
-    s  = dfs_test.predNode(t);
-    b  = dfs_test.reached(t);
-    pp = dfs_test.path(t);
-  }
-}
-
-void checkDfsFunctionCompile()
-{
-  typedef int VType;
-  typedef concepts::Digraph Digraph;
-  typedef Digraph::Arc Arc;
-  typedef Digraph::Node Node;
-
-  Digraph g;
-  bool b;
-  dfs(g).run(Node());
-  b=dfs(g).run(Node(),Node());
-  dfs(g).run();
-  dfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .run(Node());
-  b=dfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .path(concepts::Path<Digraph>())
-    .dist(VType())
-    .run(Node(),Node());
-  dfs(g)
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .reachedMap(concepts::ReadWriteMap<Node,bool>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .run();
-}
-
-template <class Digraph>
-void checkDfs() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node s, t;
-  Node s1, t1;
-
-  std::istringstream input(test_lgf);
-  digraphReader(G, input).
-    node("source", s).
-    node("target", t).
-    node("source1", s1).
-    node("target1", t1).
-    run();
-
-  Dfs<Digraph> dfs_test(G);
-  dfs_test.run(s);
-
-  Path<Digraph> p = dfs_test.path(t);
-  check(p.length() == dfs_test.dist(t),"path() found a wrong path.");
-  check(checkPath(G, p),"path() found a wrong path.");
-  check(pathSource(G, p) == s,"path() found a wrong path.");
-  check(pathTarget(G, p) == t,"path() found a wrong path.");
-
-  for(NodeIt v(G); v!=INVALID; ++v) {
-    if (dfs_test.reached(v)) {
-      check(v==s || dfs_test.predArc(v)!=INVALID, "Wrong tree.");
-      if (dfs_test.predArc(v)!=INVALID ) {
-        Arc e=dfs_test.predArc(v);
-        Node u=G.source(e);
-        check(u==dfs_test.predNode(v),"Wrong tree.");
-        check(dfs_test.dist(v) - dfs_test.dist(u) == 1,
-              "Wrong distance. (" << dfs_test.dist(u) << "->"
-              << dfs_test.dist(v) << ")");
-      }
-    }
-  }
-
-  {
-  Dfs<Digraph> dfs(G);
-  check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
-  }
-
-  {
-    NullMap<Node,Arc> myPredMap;
-    dfs(G).predMap(myPredMap).run(s);
-  }
-}
-
-int main()
-{
-  checkDfs<ListDigraph>();
-  checkDfs<SmartDigraph>();
-  return 0;
-}
Index: st/digraph_test.cc
===================================================================
--- test/digraph_test.cc	(revision 338)
+++ 	(revision )
@@ -1,400 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/concepts/digraph.h>
-#include <lemon/list_graph.h>
-#include <lemon/smart_graph.h>
-//#include <lemon/full_graph.h>
-//#include <lemon/hypercube_graph.h>
-
-#include "test_tools.h"
-#include "graph_test.h"
-
-using namespace lemon;
-using namespace lemon::concepts;
-
-template <class Digraph>
-void checkDigraphBuild() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-  Digraph G;
-
-  checkGraphNodeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  Node
-    n1 = G.addNode(),
-    n2 = G.addNode(),
-    n3 = G.addNode();
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 0);
-
-  Arc a1 = G.addArc(n1, n2);
-  check(G.source(a1) == n1 && G.target(a1) == n2, "Wrong arc");
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 1);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 0);
-  checkGraphOutArcList(G, n3, 0);
-
-  checkGraphInArcList(G, n1, 0);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 0);
-
-  checkGraphConArcList(G, 1);
-
-  Arc a2 = G.addArc(n2, n1),
-      a3 = G.addArc(n2, n3),
-      a4 = G.addArc(n2, n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 4);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 3);
-  checkGraphOutArcList(G, n3, 0);
-
-  checkGraphInArcList(G, n1, 1);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 2);
-
-  checkGraphConArcList(G, 4);
-
-  checkNodeIds(G);
-  checkArcIds(G);
-  checkGraphNodeMap(G);
-  checkGraphArcMap(G);
-}
-
-template <class Digraph>
-void checkDigraphSplit() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
-  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
-      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
-
-  Node n4 = G.split(n2);
-
-  check(G.target(OutArcIt(G, n2)) == n4 &&
-        G.source(InArcIt(G, n4)) == n2,
-        "Wrong split.");
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 5);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 1);
-  checkGraphOutArcList(G, n3, 0);
-  checkGraphOutArcList(G, n4, 3);
-
-  checkGraphInArcList(G, n1, 1);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 2);
-  checkGraphInArcList(G, n4, 1);
-
-  checkGraphConArcList(G, 5);
-}
-
-template <class Digraph>
-void checkDigraphAlter() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node n1 = G.addNode(), n2 = G.addNode(),
-       n3 = G.addNode(), n4 = G.addNode();
-  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n4, n1),
-      a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3),
-      a5 = G.addArc(n2, n4);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 5);
-
-  // Check changeSource() and changeTarget()
-  G.changeTarget(a4, n1);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 5);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 1);
-  checkGraphOutArcList(G, n3, 0);
-  checkGraphOutArcList(G, n4, 3);
-
-  checkGraphInArcList(G, n1, 2);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 1);
-  checkGraphInArcList(G, n4, 1);
-
-  checkGraphConArcList(G, 5);
-
-  G.changeSource(a4, n3);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 5);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 1);
-  checkGraphOutArcList(G, n3, 1);
-  checkGraphOutArcList(G, n4, 2);
-
-  checkGraphInArcList(G, n1, 2);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 1);
-  checkGraphInArcList(G, n4, 1);
-
-  checkGraphConArcList(G, 5);
-
-  // Check contract()
-  G.contract(n2, n4, false);
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 5);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 3);
-  checkGraphOutArcList(G, n3, 1);
-
-  checkGraphInArcList(G, n1, 2);
-  checkGraphInArcList(G, n2, 2);
-  checkGraphInArcList(G, n3, 1);
-
-  checkGraphConArcList(G, 5);
-
-  G.contract(n2, n1);
-
-  checkGraphNodeList(G, 2);
-  checkGraphArcList(G, 3);
-
-  checkGraphOutArcList(G, n2, 2);
-  checkGraphOutArcList(G, n3, 1);
-
-  checkGraphInArcList(G, n2, 2);
-  checkGraphInArcList(G, n3, 1);
-
-  checkGraphConArcList(G, 3);
-}
-
-template <class Digraph>
-void checkDigraphErase() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node n1 = G.addNode(), n2 = G.addNode(),
-       n3 = G.addNode(), n4 = G.addNode();
-  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n4, n1),
-      a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1),
-      a5 = G.addArc(n2, n4);
-
-  // Check arc deletion
-  G.erase(a1);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 4);
-
-  checkGraphOutArcList(G, n1, 0);
-  checkGraphOutArcList(G, n2, 1);
-  checkGraphOutArcList(G, n3, 1);
-  checkGraphOutArcList(G, n4, 2);
-
-  checkGraphInArcList(G, n1, 2);
-  checkGraphInArcList(G, n2, 0);
-  checkGraphInArcList(G, n3, 1);
-  checkGraphInArcList(G, n4, 1);
-
-  checkGraphConArcList(G, 4);
-
-  // Check node deletion
-  G.erase(n4);
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 1);
-
-  checkGraphOutArcList(G, n1, 0);
-  checkGraphOutArcList(G, n2, 0);
-  checkGraphOutArcList(G, n3, 1);
-  checkGraphOutArcList(G, n4, 0);
-
-  checkGraphInArcList(G, n1, 1);
-  checkGraphInArcList(G, n2, 0);
-  checkGraphInArcList(G, n3, 0);
-  checkGraphInArcList(G, n4, 0);
-
-  checkGraphConArcList(G, 1);
-}
-
-
-template <class Digraph>
-void checkDigraphSnapshot() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph G;
-  Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
-  Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1),
-      a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3);
-
-  typename Digraph::Snapshot snapshot(G);
-
-  Node n = G.addNode();
-  G.addArc(n3, n);
-  G.addArc(n, n3);
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 6);
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 3);
-  checkGraphArcList(G, 4);
-
-  checkGraphOutArcList(G, n1, 1);
-  checkGraphOutArcList(G, n2, 3);
-  checkGraphOutArcList(G, n3, 0);
-
-  checkGraphInArcList(G, n1, 1);
-  checkGraphInArcList(G, n2, 1);
-  checkGraphInArcList(G, n3, 2);
-
-  checkGraphConArcList(G, 4);
-
-  checkNodeIds(G);
-  checkArcIds(G);
-  checkGraphNodeMap(G);
-  checkGraphArcMap(G);
-
-  G.addNode();
-  snapshot.save(G);
-
-  G.addArc(G.addNode(), G.addNode());
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 4);
-  checkGraphArcList(G, 4);
-}
-
-void checkConcepts() {
-  { // Checking digraph components
-    checkConcept<BaseDigraphComponent, BaseDigraphComponent >();
-
-    checkConcept<IDableDigraphComponent<>,
-      IDableDigraphComponent<> >();
-
-    checkConcept<IterableDigraphComponent<>,
-      IterableDigraphComponent<> >();
-
-    checkConcept<MappableDigraphComponent<>,
-      MappableDigraphComponent<> >();
-  }
-  { // Checking skeleton digraph
-    checkConcept<Digraph, Digraph>();
-  }
-  { // Checking ListDigraph
-    checkConcept<Digraph, ListDigraph>();
-    checkConcept<AlterableDigraphComponent<>, ListDigraph>();
-    checkConcept<ExtendableDigraphComponent<>, ListDigraph>();
-    checkConcept<ClearableDigraphComponent<>, ListDigraph>();
-    checkConcept<ErasableDigraphComponent<>, ListDigraph>();
-  }
-  { // Checking SmartDigraph
-    checkConcept<Digraph, SmartDigraph>();
-    checkConcept<AlterableDigraphComponent<>, SmartDigraph>();
-    checkConcept<ExtendableDigraphComponent<>, SmartDigraph>();
-    checkConcept<ClearableDigraphComponent<>, SmartDigraph>();
-  }
-//  { // Checking FullDigraph
-//    checkConcept<Digraph, FullDigraph>();
-//  }
-//  { // Checking HyperCubeDigraph
-//    checkConcept<Digraph, HyperCubeDigraph>();
-//  }
-}
-
-template <typename Digraph>
-void checkDigraphValidity() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-  Digraph g;
-
-  Node
-    n1 = g.addNode(),
-    n2 = g.addNode(),
-    n3 = g.addNode();
-
-  Arc
-    e1 = g.addArc(n1, n2),
-    e2 = g.addArc(n2, n3);
-
-  check(g.valid(n1), "Wrong validity check");
-  check(g.valid(e1), "Wrong validity check");
-
-  check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-template <typename Digraph>
-void checkDigraphValidityErase() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-  Digraph g;
-
-  Node
-    n1 = g.addNode(),
-    n2 = g.addNode(),
-    n3 = g.addNode();
-
-  Arc
-    e1 = g.addArc(n1, n2),
-    e2 = g.addArc(n2, n3);
-
-  check(g.valid(n1), "Wrong validity check");
-  check(g.valid(e1), "Wrong validity check");
-
-  g.erase(n1);
-
-  check(!g.valid(n1), "Wrong validity check");
-  check(g.valid(n2), "Wrong validity check");
-  check(g.valid(n3), "Wrong validity check");
-  check(!g.valid(e1), "Wrong validity check");
-  check(g.valid(e2), "Wrong validity check");
-
-  check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-void checkDigraphs() {
-  { // Checking ListDigraph
-    checkDigraphBuild<ListDigraph>();
-    checkDigraphSplit<ListDigraph>();
-    checkDigraphAlter<ListDigraph>();
-    checkDigraphErase<ListDigraph>();
-    checkDigraphSnapshot<ListDigraph>();
-    checkDigraphValidityErase<ListDigraph>();
-  }
-  { // Checking SmartDigraph
-    checkDigraphBuild<SmartDigraph>();
-    checkDigraphSplit<SmartDigraph>();
-    checkDigraphSnapshot<SmartDigraph>();
-    checkDigraphValidity<SmartDigraph>();
-  }
-}
-
-int main() {
-  checkDigraphs();
-  checkConcepts();
-  return 0;
-}
Index: st/dijkstra_test.cc
===================================================================
--- test/dijkstra_test.cc	(revision 342)
+++ 	(revision )
@@ -1,196 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/concepts/digraph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/dijkstra.h>
-#include <lemon/path.h>
-#include <lemon/bin_heap.h>
-
-#include "graph_test.h"
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "2\n"
-  "3\n"
-  "4\n"
-  "@arcs\n"
-  "     label length\n"
-  "0 1  0     1\n"
-  "1 2  1     1\n"
-  "2 3  2     1\n"
-  "0 3  4     5\n"
-  "0 3  5     10\n"
-  "0 3  6     7\n"
-  "4 2  7     1\n"
-  "@attributes\n"
-  "source 0\n"
-  "target 3\n";
-
-void checkDijkstraCompile()
-{
-  typedef int VType;
-  typedef concepts::Digraph Digraph;
-  typedef concepts::ReadMap<Digraph::Arc,VType> LengthMap;
-  typedef Dijkstra<Digraph, LengthMap> DType;
-  typedef Digraph::Node Node;
-  typedef Digraph::Arc Arc;
-
-  Digraph G;
-  Node s, t;
-  Arc e;
-  VType l;
-  bool b;
-  DType::DistMap d(G);
-  DType::PredMap p(G);
-  LengthMap length;
-  Path<Digraph> pp;
-
-  {
-    DType dijkstra_test(G,length);
-
-    dijkstra_test.run(s);
-    dijkstra_test.run(s,t);
-
-    l  = dijkstra_test.dist(t);
-    e  = dijkstra_test.predArc(t);
-    s  = dijkstra_test.predNode(t);
-    b  = dijkstra_test.reached(t);
-    d  = dijkstra_test.distMap();
-    p  = dijkstra_test.predMap();
-    pp = dijkstra_test.path(t);
-  }
-  {
-    DType
-      ::SetPredMap<concepts::ReadWriteMap<Node,Arc> >
-      ::SetDistMap<concepts::ReadWriteMap<Node,VType> >
-      ::SetProcessedMap<concepts::WriteMap<Node,bool> >
-      ::SetStandardProcessedMap
-      ::SetOperationTraits<DijkstraDefaultOperationTraits<VType> >
-      ::SetHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
-      ::SetStandardHeap<BinHeap<VType, concepts::ReadWriteMap<Node,int> > >
-      ::Create dijkstra_test(G,length);
-
-    dijkstra_test.run(s);
-    dijkstra_test.run(s,t);
-
-    l  = dijkstra_test.dist(t);
-    e  = dijkstra_test.predArc(t);
-    s  = dijkstra_test.predNode(t);
-    b  = dijkstra_test.reached(t);
-    pp = dijkstra_test.path(t);
-  }
-
-}
-
-void checkDijkstraFunctionCompile()
-{
-  typedef int VType;
-  typedef concepts::Digraph Digraph;
-  typedef Digraph::Arc Arc;
-  typedef Digraph::Node Node;
-  typedef concepts::ReadMap<Digraph::Arc,VType> LengthMap;
-
-  Digraph g;
-  bool b;
-  dijkstra(g,LengthMap()).run(Node());
-  b=dijkstra(g,LengthMap()).run(Node(),Node());
-  dijkstra(g,LengthMap())
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .run(Node());
-  b=dijkstra(g,LengthMap())
-    .predMap(concepts::ReadWriteMap<Node,Arc>())
-    .distMap(concepts::ReadWriteMap<Node,VType>())
-    .processedMap(concepts::WriteMap<Node,bool>())
-    .path(concepts::Path<Digraph>())
-    .dist(VType())
-    .run(Node(),Node());
-}
-
-template <class Digraph>
-void checkDijkstra() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-  typedef typename Digraph::template ArcMap<int> LengthMap;
-
-  Digraph G;
-  Node s, t;
-  LengthMap length(G);
-
-  std::istringstream input(test_lgf);
-  digraphReader(G, input).
-    arcMap("length", length).
-    node("source", s).
-    node("target", t).
-    run();
-
-  Dijkstra<Digraph, LengthMap>
-        dijkstra_test(G, length);
-  dijkstra_test.run(s);
-
-  check(dijkstra_test.dist(t)==3,"Dijkstra found a wrong path.");
-
-  Path<Digraph> p = dijkstra_test.path(t);
-  check(p.length()==3,"path() found a wrong path.");
-  check(checkPath(G, p),"path() found a wrong path.");
-  check(pathSource(G, p) == s,"path() found a wrong path.");
-  check(pathTarget(G, p) == t,"path() found a wrong path.");
-
-  for(ArcIt e(G); e!=INVALID; ++e) {
-    Node u=G.source(e);
-    Node v=G.target(e);
-    check( !dijkstra_test.reached(u) ||
-           (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]),
-           "Wrong output. dist(target)-dist(source)-arc_length=" <<
-           dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]);
-  }
-
-  for(NodeIt v(G); v!=INVALID; ++v) {
-    if (dijkstra_test.reached(v)) {
-      check(v==s || dijkstra_test.predArc(v)!=INVALID, "Wrong tree.");
-      if (dijkstra_test.predArc(v)!=INVALID ) {
-        Arc e=dijkstra_test.predArc(v);
-        Node u=G.source(e);
-        check(u==dijkstra_test.predNode(v),"Wrong tree.");
-        check(dijkstra_test.dist(v) - dijkstra_test.dist(u) == length[e],
-              "Wrong distance! Difference: " <<
-              std::abs(dijkstra_test.dist(v)-dijkstra_test.dist(u)-length[e]));
-      }
-    }
-  }
-
-  {
-    NullMap<Node,Arc> myPredMap;
-    dijkstra(G,length).predMap(myPredMap).run(s);
-  }
-}
-
-int main() {
-  checkDijkstra<ListDigraph>();
-  checkDijkstra<SmartDigraph>();
-  return 0;
-}
Index: st/dim_test.cc
===================================================================
--- test/dim_test.cc	(revision 253)
+++ 	(revision )
@@ -1,87 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/dim2.h>
-#include <iostream>
-#include "test_tools.h"
-
-using namespace std;
-using namespace lemon;
-
-int main()
-{
-  typedef dim2::Point<int> Point;
-
-  Point p;
-  check(p.size()==2, "Wrong dim2::Point initialization.");
-
-  Point a(1,2);
-  Point b(3,4);
-  check(a[0]==1 && a[1]==2, "Wrong dim2::Point initialization.");
-
-  p = a+b;
-  check(p.x==4 && p.y==6, "Wrong dim2::Point addition.");
-
-  p = a-b;
-  check(p.x==-2 && p.y==-2, "Wrong dim2::Point subtraction.");
-
-  check(a.normSquare()==5,"Wrong dim2::Point norm calculation.");
-  check(a*b==11, "Wrong dim2::Point scalar product.");
-
-  int l=2;
-  p = a*l;
-  check(p.x==2 && p.y==4, "Wrong dim2::Point multiplication by a scalar.");
-
-  p = b/l;
-  check(p.x==1 && p.y==2, "Wrong dim2::Point division by a scalar.");
-
-  typedef dim2::Box<int> Box;
-  Box box1;
-  check(box1.empty(), "Wrong empty() in dim2::Box.");
-
-  box1.add(a);
-  check(!box1.empty(), "Wrong empty() in dim2::Box.");
-  box1.add(b);
-
-  check(box1.left()==1 && box1.bottom()==2 &&
-        box1.right()==3 && box1.top()==4,
-        "Wrong addition of points to dim2::Box.");
-
-  check(box1.inside(Point(2,3)), "Wrong inside() in dim2::Box.");
-  check(box1.inside(Point(1,3)), "Wrong inside() in dim2::Box.");
-  check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::Box.");
-
-  Box box2(Point(2,2));
-  check(!box2.empty(), "Wrong empty() in dim2::Box.");
-
-  box2.bottomLeft(Point(2,0));
-  box2.topRight(Point(5,3));
-  Box box3 = box1 & box2;
-  check(!box3.empty() &&
-        box3.left()==2 && box3.bottom()==2 &&
-        box3.right()==3 && box3.top()==3,
-        "Wrong intersection of two dim2::Box objects.");
-
-  box1.add(box2);
-  check(!box1.empty() &&
-        box1.left()==1 && box1.bottom()==0 &&
-        box1.right()==5 && box1.top()==4,
-        "Wrong addition of two dim2::Box objects.");
-
-  return 0;
-}
Index: st/error_test.cc
===================================================================
--- test/error_test.cc	(revision 277)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <iostream>
-
-#include <lemon/error.h>
-#include "test_tools.h"
-
-using namespace lemon;
-
-#ifdef LEMON_ENABLE_ASSERTS
-#undef LEMON_ENABLE_ASSERTS
-#endif
-
-#ifdef LEMON_DISABLE_ASSERTS
-#undef LEMON_DISABLE_ASSERTS
-#endif
-
-#ifdef NDEBUG
-#undef NDEBUG
-#endif
-
-//checking disabled asserts
-#define LEMON_DISABLE_ASSERTS
-#include <lemon/assert.h>
-
-void no_assertion_text_disable() {
-  LEMON_ASSERT(true, "This is a fault message");
-}
-
-void assertion_text_disable() {
-  LEMON_ASSERT(false, "This is a fault message");
-}
-
-void check_assertion_disable() {
-  no_assertion_text_disable();
-  assertion_text_disable();
-}
-#undef LEMON_DISABLE_ASSERTS
-
-//checking custom assert handler
-#define LEMON_ASSERT_CUSTOM
-
-static int cnt = 0;
-void my_assert_handler(const char*, int, const char*,
-                       const char*, const char*) {
-  ++cnt;
-}
-
-#define LEMON_CUSTOM_ASSERT_HANDLER my_assert_handler
-#include <lemon/assert.h>
-
-void no_assertion_text_custom() {
-  LEMON_ASSERT(true, "This is a fault message");
-}
-
-void assertion_text_custom() {
-  LEMON_ASSERT(false, "This is a fault message");
-}
-
-void check_assertion_custom() {
-  no_assertion_text_custom();
-  assertion_text_custom();
-  check(cnt == 1, "The custom assert handler does not work");
-}
-
-#undef LEMON_ASSERT_CUSTOM
-
-
-int main() {
-  check_assertion_disable();
-  check_assertion_custom();
-
-  return 0;
-}
Index: st/graph_copy_test.cc
===================================================================
--- test/graph_copy_test.cc	(revision 427)
+++ 	(revision )
@@ -1,215 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-#include <lemon/smart_graph.h>
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include <lemon/error.h>
-
-#include "test_tools.h"
-
-using namespace std;
-using namespace lemon;
-
-void digraph_copy_test() {
-  const int nn = 10;
-
-  // Build a digraph
-  SmartDigraph from;
-  SmartDigraph::NodeMap<int> fnm(from);
-  SmartDigraph::ArcMap<int> fam(from);
-  SmartDigraph::Node fn = INVALID;
-  SmartDigraph::Arc fa = INVALID;
-
-  std::vector<SmartDigraph::Node> fnv;
-  for (int i = 0; i < nn; ++i) {
-    SmartDigraph::Node node = from.addNode();
-    fnv.push_back(node);
-    fnm[node] = i * i;
-    if (i == 0) fn = node;
-  }
-
-  for (int i = 0; i < nn; ++i) {
-    for (int j = 0; j < nn; ++j) {
-      SmartDigraph::Arc arc = from.addArc(fnv[i], fnv[j]);
-      fam[arc] = i + j * j;
-      if (i == 0 && j == 0) fa = arc;
-    }
-  }
-
-  // Test digraph copy
-  ListDigraph to;
-  ListDigraph::NodeMap<int> tnm(to);
-  ListDigraph::ArcMap<int> tam(to);
-  ListDigraph::Node tn;
-  ListDigraph::Arc ta;
-
-  SmartDigraph::NodeMap<ListDigraph::Node> nr(from);
-  SmartDigraph::ArcMap<ListDigraph::Arc> er(from);
-
-  ListDigraph::NodeMap<SmartDigraph::Node> ncr(to);
-  ListDigraph::ArcMap<SmartDigraph::Arc> ecr(to);
-
-  digraphCopy(from, to).
-    nodeMap(fnm, tnm).arcMap(fam, tam).
-    nodeRef(nr).arcRef(er).
-    nodeCrossRef(ncr).arcCrossRef(ecr).
-    node(fn, tn).arc(fa, ta).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-
-  for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) {
-    check(ncr[nr[it]] == it, "Wrong copy.");
-    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
-  }
-
-  for (SmartDigraph::ArcIt it(from); it != INVALID; ++it) {
-    check(ecr[er[it]] == it, "Wrong copy.");
-    check(fam[it] == tam[er[it]], "Wrong copy.");
-    check(nr[from.source(it)] == to.source(er[it]), "Wrong copy.");
-    check(nr[from.target(it)] == to.target(er[it]), "Wrong copy.");
-  }
-
-  for (ListDigraph::NodeIt it(to); it != INVALID; ++it) {
-    check(nr[ncr[it]] == it, "Wrong copy.");
-  }
-
-  for (ListDigraph::ArcIt it(to); it != INVALID; ++it) {
-    check(er[ecr[it]] == it, "Wrong copy.");
-  }
-  check(tn == nr[fn], "Wrong copy.");
-  check(ta == er[fa], "Wrong copy.");
-
-  // Test repeated copy
-  digraphCopy(from, to).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-}
-
-void graph_copy_test() {
-  const int nn = 10;
-
-  // Build a graph
-  SmartGraph from;
-  SmartGraph::NodeMap<int> fnm(from);
-  SmartGraph::ArcMap<int> fam(from);
-  SmartGraph::EdgeMap<int> fem(from);
-  SmartGraph::Node fn = INVALID;
-  SmartGraph::Arc fa = INVALID;
-  SmartGraph::Edge fe = INVALID;
-
-  std::vector<SmartGraph::Node> fnv;
-  for (int i = 0; i < nn; ++i) {
-    SmartGraph::Node node = from.addNode();
-    fnv.push_back(node);
-    fnm[node] = i * i;
-    if (i == 0) fn = node;
-  }
-
-  for (int i = 0; i < nn; ++i) {
-    for (int j = 0; j < nn; ++j) {
-      SmartGraph::Edge edge = from.addEdge(fnv[i], fnv[j]);
-      fem[edge] = i * i + j * j;
-      fam[from.direct(edge, true)] = i + j * j;
-      fam[from.direct(edge, false)] = i * i + j;
-      if (i == 0 && j == 0) fa = from.direct(edge, true);
-      if (i == 0 && j == 0) fe = edge;
-    }
-  }
-
-  // Test graph copy
-  ListGraph to;
-  ListGraph::NodeMap<int> tnm(to);
-  ListGraph::ArcMap<int> tam(to);
-  ListGraph::EdgeMap<int> tem(to);
-  ListGraph::Node tn;
-  ListGraph::Arc ta;
-  ListGraph::Edge te;
-
-  SmartGraph::NodeMap<ListGraph::Node> nr(from);
-  SmartGraph::ArcMap<ListGraph::Arc> ar(from);
-  SmartGraph::EdgeMap<ListGraph::Edge> er(from);
-
-  ListGraph::NodeMap<SmartGraph::Node> ncr(to);
-  ListGraph::ArcMap<SmartGraph::Arc> acr(to);
-  ListGraph::EdgeMap<SmartGraph::Edge> ecr(to);
-
-  graphCopy(from, to).
-    nodeMap(fnm, tnm).arcMap(fam, tam).edgeMap(fem, tem).
-    nodeRef(nr).arcRef(ar).edgeRef(er).
-    nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr).
-    node(fn, tn).arc(fa, ta).edge(fe, te).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-
-  for (SmartGraph::NodeIt it(from); it != INVALID; ++it) {
-    check(ncr[nr[it]] == it, "Wrong copy.");
-    check(fnm[it] == tnm[nr[it]], "Wrong copy.");
-  }
-
-  for (SmartGraph::ArcIt it(from); it != INVALID; ++it) {
-    check(acr[ar[it]] == it, "Wrong copy.");
-    check(fam[it] == tam[ar[it]], "Wrong copy.");
-    check(nr[from.source(it)] == to.source(ar[it]), "Wrong copy.");
-    check(nr[from.target(it)] == to.target(ar[it]), "Wrong copy.");
-  }
-
-  for (SmartGraph::EdgeIt it(from); it != INVALID; ++it) {
-    check(ecr[er[it]] == it, "Wrong copy.");
-    check(fem[it] == tem[er[it]], "Wrong copy.");
-    check(nr[from.u(it)] == to.u(er[it]) || nr[from.u(it)] == to.v(er[it]),
-          "Wrong copy.");
-    check(nr[from.v(it)] == to.u(er[it]) || nr[from.v(it)] == to.v(er[it]),
-          "Wrong copy.");
-    check((from.u(it) != from.v(it)) == (to.u(er[it]) != to.v(er[it])),
-          "Wrong copy.");
-  }
-
-  for (ListGraph::NodeIt it(to); it != INVALID; ++it) {
-    check(nr[ncr[it]] == it, "Wrong copy.");
-  }
-
-  for (ListGraph::ArcIt it(to); it != INVALID; ++it) {
-    check(ar[acr[it]] == it, "Wrong copy.");
-  }
-  for (ListGraph::EdgeIt it(to); it != INVALID; ++it) {
-    check(er[ecr[it]] == it, "Wrong copy.");
-  }
-  check(tn == nr[fn], "Wrong copy.");
-  check(ta == ar[fa], "Wrong copy.");
-  check(te == er[fe], "Wrong copy.");
-
-  // Test repeated copy
-  graphCopy(from, to).run();
-
-  check(countNodes(from) == countNodes(to), "Wrong copy.");
-  check(countEdges(from) == countEdges(to), "Wrong copy.");
-  check(countArcs(from) == countArcs(to), "Wrong copy.");
-}
-
-
-int main() {
-  digraph_copy_test();
-  graph_copy_test();
-
-  return 0;
-}
Index: st/graph_test.cc
===================================================================
--- test/graph_test.cc	(revision 338)
+++ 	(revision )
@@ -1,431 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/concepts/graph.h>
-#include <lemon/list_graph.h>
-#include <lemon/smart_graph.h>
-// #include <lemon/full_graph.h>
-// #include <lemon/grid_graph.h>
-
-#include "test_tools.h"
-#include "graph_test.h"
-
-using namespace lemon;
-using namespace lemon::concepts;
-
-template <class Graph>
-void checkGraphBuild() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  Graph G;
-  checkGraphNodeList(G, 0);
-  checkGraphEdgeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  Node
-    n1 = G.addNode(),
-    n2 = G.addNode(),
-    n3 = G.addNode();
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 0);
-  checkGraphArcList(G, 0);
-
-  Edge e1 = G.addEdge(n1, n2);
-  check((G.u(e1) == n1 && G.v(e1) == n2) || (G.u(e1) == n2 && G.v(e1) == n1),
-        "Wrong edge");
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 1);
-  checkGraphArcList(G, 2);
-
-  checkGraphIncEdgeArcLists(G, n1, 1);
-  checkGraphIncEdgeArcLists(G, n2, 1);
-  checkGraphIncEdgeArcLists(G, n3, 0);
-
-  checkGraphConEdgeList(G, 1);
-  checkGraphConArcList(G, 2);
-
-  Edge e2 = G.addEdge(n2, n1),
-       e3 = G.addEdge(n2, n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 3);
-  checkGraphIncEdgeArcLists(G, n3, 1);
-
-  checkGraphConEdgeList(G, 3);
-  checkGraphConArcList(G, 6);
-
-  checkArcDirections(G);
-
-  checkNodeIds(G);
-  checkArcIds(G);
-  checkEdgeIds(G);
-  checkGraphNodeMap(G);
-  checkGraphArcMap(G);
-  checkGraphEdgeMap(G);
-}
-
-template <class Graph>
-void checkGraphAlter() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  Graph G;
-  Node n1 = G.addNode(), n2 = G.addNode(),
-       n3 = G.addNode(), n4 = G.addNode();
-  Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
-       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
-       e5 = G.addEdge(n4, n3);
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 5);
-  checkGraphArcList(G, 10);
-
-  // Check changeU() and changeV()
-  if (G.u(e2) == n2) {
-    G.changeU(e2, n3);
-  } else {
-    G.changeV(e2, n3);
-  }
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 5);
-  checkGraphArcList(G, 10);
-
-  checkGraphIncEdgeArcLists(G, n1, 3);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-  checkGraphIncEdgeArcLists(G, n3, 3);
-  checkGraphIncEdgeArcLists(G, n4, 2);
-
-  checkGraphConEdgeList(G, 5);
-  checkGraphConArcList(G, 10);
-
-  if (G.u(e2) == n1) {
-    G.changeU(e2, n2);
-  } else {
-    G.changeV(e2, n2);
-  }
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 5);
-  checkGraphArcList(G, 10);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 3);
-  checkGraphIncEdgeArcLists(G, n3, 3);
-  checkGraphIncEdgeArcLists(G, n4, 2);
-
-  checkGraphConEdgeList(G, 5);
-  checkGraphConArcList(G, 10);
-
-  // Check contract()
-  G.contract(n1, n4, false);
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 5);
-  checkGraphArcList(G, 10);
-
-  checkGraphIncEdgeArcLists(G, n1, 4);
-  checkGraphIncEdgeArcLists(G, n2, 3);
-  checkGraphIncEdgeArcLists(G, n3, 3);
-
-  checkGraphConEdgeList(G, 5);
-  checkGraphConArcList(G, 10);
-
-  G.contract(n2, n3);
-
-  checkGraphNodeList(G, 2);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  checkGraphIncEdgeArcLists(G, n1, 4);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-
-  checkGraphConEdgeList(G, 3);
-  checkGraphConArcList(G, 6);
-}
-
-template <class Graph>
-void checkGraphErase() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  Graph G;
-  Node n1 = G.addNode(), n2 = G.addNode(),
-       n3 = G.addNode(), n4 = G.addNode();
-  Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
-       e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4),
-       e5 = G.addEdge(n4, n3);
-
-  // Check edge deletion
-  G.erase(e2);
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 4);
-  checkGraphArcList(G, 8);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 2);
-  checkGraphIncEdgeArcLists(G, n3, 2);
-  checkGraphIncEdgeArcLists(G, n4, 2);
-
-  checkGraphConEdgeList(G, 4);
-  checkGraphConArcList(G, 8);
-
-  // Check node deletion
-  G.erase(n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 2);
-  checkGraphArcList(G, 4);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 1);
-  checkGraphIncEdgeArcLists(G, n4, 1);
-
-  checkGraphConEdgeList(G, 2);
-  checkGraphConArcList(G, 4);
-}
-
-
-template <class Graph>
-void checkGraphSnapshot() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-
-  Graph G;
-  Node n1 = G.addNode(), n2 = G.addNode(), n3 = G.addNode();
-  Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1),
-       e3 = G.addEdge(n2, n3);
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  typename Graph::Snapshot snapshot(G);
-
-  Node n = G.addNode();
-  G.addEdge(n3, n);
-  G.addEdge(n, n3);
-  G.addEdge(n3, n2);
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 6);
-  checkGraphArcList(G, 12);
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 3);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-
-  checkGraphIncEdgeArcLists(G, n1, 2);
-  checkGraphIncEdgeArcLists(G, n2, 3);
-  checkGraphIncEdgeArcLists(G, n3, 1);
-
-  checkGraphConEdgeList(G, 3);
-  checkGraphConArcList(G, 6);
-
-  checkNodeIds(G);
-  checkEdgeIds(G);
-  checkArcIds(G);
-  checkGraphNodeMap(G);
-  checkGraphEdgeMap(G);
-  checkGraphArcMap(G);
-
-  G.addNode();
-  snapshot.save(G);
-
-  G.addEdge(G.addNode(), G.addNode());
-
-  snapshot.restore();
-
-  checkGraphNodeList(G, 4);
-  checkGraphEdgeList(G, 3);
-  checkGraphArcList(G, 6);
-}
-
-void checkConcepts() {
-  { // Checking graph components
-    checkConcept<BaseGraphComponent, BaseGraphComponent >();
-
-    checkConcept<IDableGraphComponent<>,
-      IDableGraphComponent<> >();
-
-    checkConcept<IterableGraphComponent<>,
-      IterableGraphComponent<> >();
-
-    checkConcept<MappableGraphComponent<>,
-      MappableGraphComponent<> >();
-  }
-  { // Checking skeleton graph
-    checkConcept<Graph, Graph>();
-  }
-  { // Checking ListGraph
-    checkConcept<Graph, ListGraph>();
-    checkConcept<AlterableGraphComponent<>, ListGraph>();
-    checkConcept<ExtendableGraphComponent<>, ListGraph>();
-    checkConcept<ClearableGraphComponent<>, ListGraph>();
-    checkConcept<ErasableGraphComponent<>, ListGraph>();
-  }
-  { // Checking SmartGraph
-    checkConcept<Graph, SmartGraph>();
-    checkConcept<AlterableGraphComponent<>, SmartGraph>();
-    checkConcept<ExtendableGraphComponent<>, SmartGraph>();
-    checkConcept<ClearableGraphComponent<>, SmartGraph>();
-  }
-//  { // Checking FullGraph
-//    checkConcept<Graph, FullGraph>();
-//    checkGraphIterators<FullGraph>();
-//  }
-//  { // Checking GridGraph
-//    checkConcept<Graph, GridGraph>();
-//    checkGraphIterators<GridGraph>();
-//  }
-}
-
-template <typename Graph>
-void checkGraphValidity() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-  Graph g;
-
-  Node
-    n1 = g.addNode(),
-    n2 = g.addNode(),
-    n3 = g.addNode();
-
-  Edge
-    e1 = g.addEdge(n1, n2),
-    e2 = g.addEdge(n2, n3);
-
-  check(g.valid(n1), "Wrong validity check");
-  check(g.valid(e1), "Wrong validity check");
-  check(g.valid(g.direct(e1, true)), "Wrong validity check");
-
-  check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.edgeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-template <typename Graph>
-void checkGraphValidityErase() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-  Graph g;
-
-  Node
-    n1 = g.addNode(),
-    n2 = g.addNode(),
-    n3 = g.addNode();
-
-  Edge
-    e1 = g.addEdge(n1, n2),
-    e2 = g.addEdge(n2, n3);
-
-  check(g.valid(n1), "Wrong validity check");
-  check(g.valid(e1), "Wrong validity check");
-  check(g.valid(g.direct(e1, true)), "Wrong validity check");
-
-  g.erase(n1);
-
-  check(!g.valid(n1), "Wrong validity check");
-  check(g.valid(n2), "Wrong validity check");
-  check(g.valid(n3), "Wrong validity check");
-  check(!g.valid(e1), "Wrong validity check");
-  check(g.valid(e2), "Wrong validity check");
-
-  check(!g.valid(g.nodeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.edgeFromId(-1)), "Wrong validity check");
-  check(!g.valid(g.arcFromId(-1)), "Wrong validity check");
-}
-
-// void checkGridGraph(const GridGraph& g, int w, int h) {
-//   check(g.width() == w, "Wrong width");
-//   check(g.height() == h, "Wrong height");
-
-//   for (int i = 0; i < w; ++i) {
-//     for (int j = 0; j < h; ++j) {
-//       check(g.col(g(i, j)) == i, "Wrong col");
-//       check(g.row(g(i, j)) == j, "Wrong row");
-//     }
-//   }
-
-//   for (int i = 0; i < w; ++i) {
-//     for (int j = 0; j < h - 1; ++j) {
-//       check(g.source(g.down(g(i, j))) == g(i, j), "Wrong down");
-//       check(g.target(g.down(g(i, j))) == g(i, j + 1), "Wrong down");
-//     }
-//     check(g.down(g(i, h - 1)) == INVALID, "Wrong down");
-//   }
-
-//   for (int i = 0; i < w; ++i) {
-//     for (int j = 1; j < h; ++j) {
-//       check(g.source(g.up(g(i, j))) == g(i, j), "Wrong up");
-//       check(g.target(g.up(g(i, j))) == g(i, j - 1), "Wrong up");
-//     }
-//     check(g.up(g(i, 0)) == INVALID, "Wrong up");
-//   }
-
-//   for (int j = 0; j < h; ++j) {
-//     for (int i = 0; i < w - 1; ++i) {
-//       check(g.source(g.right(g(i, j))) == g(i, j), "Wrong right");
-//       check(g.target(g.right(g(i, j))) == g(i + 1, j), "Wrong right");
-//     }
-//     check(g.right(g(w - 1, j)) == INVALID, "Wrong right");
-//   }
-
-//   for (int j = 0; j < h; ++j) {
-//     for (int i = 1; i < w; ++i) {
-//       check(g.source(g.left(g(i, j))) == g(i, j), "Wrong left");
-//       check(g.target(g.left(g(i, j))) == g(i - 1, j), "Wrong left");
-//     }
-//     check(g.left(g(0, j)) == INVALID, "Wrong left");
-//   }
-// }
-
-void checkGraphs() {
-  { // Checking ListGraph
-    checkGraphBuild<ListGraph>();
-    checkGraphAlter<ListGraph>();
-    checkGraphErase<ListGraph>();
-    checkGraphSnapshot<ListGraph>();
-    checkGraphValidityErase<ListGraph>();
-  }
-  { // Checking SmartGraph
-    checkGraphBuild<SmartGraph>();
-    checkGraphSnapshot<SmartGraph>();
-    checkGraphValidity<SmartGraph>();
-  }
-//   { // Checking FullGraph
-//     FullGraph g(5);
-//     checkGraphNodeList(g, 5);
-//     checkGraphEdgeList(g, 10);
-//   }
-//   { // Checking GridGraph
-//     GridGraph g(5, 6);
-//     checkGraphNodeList(g, 30);
-//     checkGraphEdgeList(g, 49);
-//     checkGridGraph(g, 5, 6);
-//   }
-}
-
-int main() {
-  checkConcepts();
-  checkGraphs();
-  return 0;
-}
Index: st/graph_test.h
===================================================================
--- test/graph_test.h	(revision 338)
+++ 	(revision )
@@ -1,293 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_TEST_GRAPH_TEST_H
-#define LEMON_TEST_GRAPH_TEST_H
-
-#include <set>
-
-#include <lemon/core.h>
-#include <lemon/maps.h>
-
-#include "test_tools.h"
-
-namespace lemon {
-
-  template<class Graph>
-  void checkGraphNodeList(const Graph &G, int cnt)
-  {
-    typename Graph::NodeIt n(G);
-    for(int i=0;i<cnt;i++) {
-      check(n!=INVALID,"Wrong Node list linking.");
-      ++n;
-    }
-    check(n==INVALID,"Wrong Node list linking.");
-    check(countNodes(G)==cnt,"Wrong Node number.");
-  }
-
-  template<class Graph>
-  void checkGraphArcList(const Graph &G, int cnt)
-  {
-    typename Graph::ArcIt e(G);
-    for(int i=0;i<cnt;i++) {
-      check(e!=INVALID,"Wrong Arc list linking.");
-      check(G.oppositeNode(G.source(e), e) == G.target(e),
-            "Wrong opposite node");
-      check(G.oppositeNode(G.target(e), e) == G.source(e),
-            "Wrong opposite node");
-      ++e;
-    }
-    check(e==INVALID,"Wrong Arc list linking.");
-    check(countArcs(G)==cnt,"Wrong Arc number.");
-  }
-
-  template<class Graph>
-  void checkGraphOutArcList(const Graph &G, typename Graph::Node n, int cnt)
-  {
-    typename Graph::OutArcIt e(G,n);
-    for(int i=0;i<cnt;i++) {
-      check(e!=INVALID,"Wrong OutArc list linking.");
-      check(n==G.source(e),"Wrong OutArc list linking.");
-      check(n==G.baseNode(e),"Wrong OutArc list linking.");
-      check(G.target(e)==G.runningNode(e),"Wrong OutArc list linking.");
-      ++e;
-    }
-    check(e==INVALID,"Wrong OutArc list linking.");
-    check(countOutArcs(G,n)==cnt,"Wrong OutArc number.");
-  }
-
-  template<class Graph>
-  void checkGraphInArcList(const Graph &G, typename Graph::Node n, int cnt)
-  {
-    typename Graph::InArcIt e(G,n);
-    for(int i=0;i<cnt;i++) {
-      check(e!=INVALID,"Wrong InArc list linking.");
-      check(n==G.target(e),"Wrong InArc list linking.");
-      check(n==G.baseNode(e),"Wrong OutArc list linking.");
-      check(G.source(e)==G.runningNode(e),"Wrong OutArc list linking.");
-      ++e;
-    }
-    check(e==INVALID,"Wrong InArc list linking.");
-    check(countInArcs(G,n)==cnt,"Wrong InArc number.");
-  }
-
-  template<class Graph>
-  void checkGraphEdgeList(const Graph &G, int cnt)
-  {
-    typename Graph::EdgeIt e(G);
-    for(int i=0;i<cnt;i++) {
-      check(e!=INVALID,"Wrong Edge list linking.");
-      check(G.oppositeNode(G.u(e), e) == G.v(e), "Wrong opposite node");
-      check(G.oppositeNode(G.v(e), e) == G.u(e), "Wrong opposite node");
-      ++e;
-    }
-    check(e==INVALID,"Wrong Edge list linking.");
-    check(countEdges(G)==cnt,"Wrong Edge number.");
-  }
-
-  template<class Graph>
-  void checkGraphIncEdgeList(const Graph &G, typename Graph::Node n, int cnt)
-  {
-    typename Graph::IncEdgeIt e(G,n);
-    for(int i=0;i<cnt;i++) {
-      check(e!=INVALID,"Wrong IncEdge list linking.");
-      check(n==G.u(e) || n==G.v(e),"Wrong IncEdge list linking.");
-      check(n==G.baseNode(e),"Wrong OutArc list linking.");
-      check(G.u(e)==G.runningNode(e) || G.v(e)==G.runningNode(e),
-            "Wrong OutArc list linking.");
-      ++e;
-    }
-    check(e==INVALID,"Wrong IncEdge list linking.");
-    check(countIncEdges(G,n)==cnt,"Wrong IncEdge number.");
-  }
-
-  template <class Graph>
-  void checkGraphIncEdgeArcLists(const Graph &G, typename Graph::Node n,
-                                 int cnt)
-  {
-    checkGraphIncEdgeList(G, n, cnt);
-    checkGraphOutArcList(G, n, cnt);
-    checkGraphInArcList(G, n, cnt);
-  }
-
-  template <class Graph>
-  void checkGraphConArcList(const Graph &G, int cnt) {
-    int i = 0;
-    for (typename Graph::NodeIt u(G); u != INVALID; ++u) {
-      for (typename Graph::NodeIt v(G); v != INVALID; ++v) {
-        for (ConArcIt<Graph> a(G, u, v); a != INVALID; ++a) {
-          check(G.source(a) == u, "Wrong iterator.");
-          check(G.target(a) == v, "Wrong iterator.");
-          ++i;
-        }
-      }
-    }
-    check(cnt == i, "Wrong iterator.");
-  }
-
-  template <class Graph>
-  void checkGraphConEdgeList(const Graph &G, int cnt) {
-    int i = 0;
-    for (typename Graph::NodeIt u(G); u != INVALID; ++u) {
-      for (typename Graph::NodeIt v(G); v != INVALID; ++v) {
-        for (ConEdgeIt<Graph> e(G, u, v); e != INVALID; ++e) {
-          check((G.u(e) == u && G.v(e) == v) ||
-                (G.u(e) == v && G.v(e) == u), "Wrong iterator.");
-          i += u == v ? 2 : 1;
-        }
-      }
-    }
-    check(2 * cnt == i, "Wrong iterator.");
-  }
-
-  template <typename Graph>
-  void checkArcDirections(const Graph& G) {
-    for (typename Graph::ArcIt a(G); a != INVALID; ++a) {
-      check(G.source(a) == G.target(G.oppositeArc(a)), "Wrong direction");
-      check(G.target(a) == G.source(G.oppositeArc(a)), "Wrong direction");
-      check(G.direct(a, G.direction(a)) == a, "Wrong direction");
-    }
-  }
-
-  template <typename Graph>
-  void checkNodeIds(const Graph& G) {
-    std::set<int> values;
-    for (typename Graph::NodeIt n(G); n != INVALID; ++n) {
-      check(G.nodeFromId(G.id(n)) == n, "Wrong id");
-      check(values.find(G.id(n)) == values.end(), "Wrong id");
-      check(G.id(n) <= G.maxNodeId(), "Wrong maximum id");
-      values.insert(G.id(n));
-    }
-  }
-
-  template <typename Graph>
-  void checkArcIds(const Graph& G) {
-    std::set<int> values;
-    for (typename Graph::ArcIt a(G); a != INVALID; ++a) {
-      check(G.arcFromId(G.id(a)) == a, "Wrong id");
-      check(values.find(G.id(a)) == values.end(), "Wrong id");
-      check(G.id(a) <= G.maxArcId(), "Wrong maximum id");
-      values.insert(G.id(a));
-    }
-  }
-
-  template <typename Graph>
-  void checkEdgeIds(const Graph& G) {
-    std::set<int> values;
-    for (typename Graph::EdgeIt e(G); e != INVALID; ++e) {
-      check(G.edgeFromId(G.id(e)) == e, "Wrong id");
-      check(values.find(G.id(e)) == values.end(), "Wrong id");
-      check(G.id(e) <= G.maxEdgeId(), "Wrong maximum id");
-      values.insert(G.id(e));
-    }
-  }
-
-  template <typename Graph>
-  void checkGraphNodeMap(const Graph& G) {
-    typedef typename Graph::Node Node;
-    typedef typename Graph::NodeIt NodeIt;
-
-    typedef typename Graph::template NodeMap<int> IntNodeMap;
-    IntNodeMap map(G, 42);
-    for (NodeIt it(G); it != INVALID; ++it) {
-      check(map[it] == 42, "Wrong map constructor.");
-    }
-    int s = 0;
-    for (NodeIt it(G); it != INVALID; ++it) {
-      map[it] = 0;
-      check(map[it] == 0, "Wrong operator[].");
-      map.set(it, s);
-      check(map[it] == s, "Wrong set.");
-      ++s;
-    }
-    s = s * (s - 1) / 2;
-    for (NodeIt it(G); it != INVALID; ++it) {
-      s -= map[it];
-    }
-    check(s == 0, "Wrong sum.");
-
-    // map = constMap<Node>(12);
-    // for (NodeIt it(G); it != INVALID; ++it) {
-    //   check(map[it] == 12, "Wrong operator[].");
-    // }
-  }
-
-  template <typename Graph>
-  void checkGraphArcMap(const Graph& G) {
-    typedef typename Graph::Arc Arc;
-    typedef typename Graph::ArcIt ArcIt;
-
-    typedef typename Graph::template ArcMap<int> IntArcMap;
-    IntArcMap map(G, 42);
-    for (ArcIt it(G); it != INVALID; ++it) {
-      check(map[it] == 42, "Wrong map constructor.");
-    }
-    int s = 0;
-    for (ArcIt it(G); it != INVALID; ++it) {
-      map[it] = 0;
-      check(map[it] == 0, "Wrong operator[].");
-      map.set(it, s);
-      check(map[it] == s, "Wrong set.");
-      ++s;
-    }
-    s = s * (s - 1) / 2;
-    for (ArcIt it(G); it != INVALID; ++it) {
-      s -= map[it];
-    }
-    check(s == 0, "Wrong sum.");
-
-    // map = constMap<Arc>(12);
-    // for (ArcIt it(G); it != INVALID; ++it) {
-    //   check(map[it] == 12, "Wrong operator[].");
-    // }
-  }
-
-  template <typename Graph>
-  void checkGraphEdgeMap(const Graph& G) {
-    typedef typename Graph::Edge Edge;
-    typedef typename Graph::EdgeIt EdgeIt;
-
-    typedef typename Graph::template EdgeMap<int> IntEdgeMap;
-    IntEdgeMap map(G, 42);
-    for (EdgeIt it(G); it != INVALID; ++it) {
-      check(map[it] == 42, "Wrong map constructor.");
-    }
-    int s = 0;
-    for (EdgeIt it(G); it != INVALID; ++it) {
-      map[it] = 0;
-      check(map[it] == 0, "Wrong operator[].");
-      map.set(it, s);
-      check(map[it] == s, "Wrong set.");
-      ++s;
-    }
-    s = s * (s - 1) / 2;
-    for (EdgeIt it(G); it != INVALID; ++it) {
-      s -= map[it];
-    }
-    check(s == 0, "Wrong sum.");
-
-    // map = constMap<Edge>(12);
-    // for (EdgeIt it(G); it != INVALID; ++it) {
-    //   check(map[it] == 12, "Wrong operator[].");
-    // }
-  }
-
-
-} //namespace lemon
-
-#endif
Index: st/graph_utils_test.cc
===================================================================
--- test/graph_utils_test.cc	(revision 301)
+++ 	(revision )
@@ -1,217 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <cstdlib>
-#include <ctime>
-
-#include <lemon/random.h>
-#include <lemon/list_graph.h>
-#include <lemon/smart_graph.h>
-#include <lemon/maps.h>
-
-#include "graph_test.h"
-#include "test_tools.h"
-
-using namespace lemon;
-
-template <typename Digraph>
-void checkFindArcs() {
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  {
-    Digraph digraph;
-    typename Digraph::template NodeMap<int> nodes(digraph);
-    std::vector<Node> invNodes;
-    for (int i = 0; i < 10; ++i) {
-      invNodes.push_back(digraph.addNode());
-      nodes[invNodes.back()]=invNodes.size()-1;
-    }
-    for (int i = 0; i < 100; ++i) {
-      int src = rnd[invNodes.size()];
-      int trg = rnd[invNodes.size()];
-      digraph.addArc(invNodes[src], invNodes[trg]);
-    }
-    typename Digraph::template ArcMap<bool> found(digraph, false);
-    for (NodeIt src(digraph); src != INVALID; ++src) {
-      for (NodeIt trg(digraph); trg != INVALID; ++trg) {
-        for (ConArcIt<Digraph> con(digraph, src, trg); con != INVALID; ++con) {
-          check(digraph.source(con) == src, "Wrong source.");
-          check(digraph.target(con) == trg, "Wrong target.");
-          check(found[con] == false, "The arc found already.");
-          found[con] = true;
-        }
-      }
-    }
-    for (ArcIt it(digraph); it != INVALID; ++it) {
-      check(found[it] == true, "The arc is not found.");
-    }
-  }
-
-  {
-    int num = 5;
-    Digraph fg;
-    std::vector<Node> nodes;
-    for (int i = 0; i < num; ++i) {
-      nodes.push_back(fg.addNode());
-    }
-    for (int i = 0; i < num * num; ++i) {
-      fg.addArc(nodes[i / num], nodes[i % num]);
-    }
-    check(countNodes(fg) == num, "Wrong node number.");
-    check(countArcs(fg) == num*num, "Wrong arc number.");
-    for (NodeIt src(fg); src != INVALID; ++src) {
-      for (NodeIt trg(fg); trg != INVALID; ++trg) {
-        ConArcIt<Digraph> con(fg, src, trg);
-        check(con != INVALID, "There is no connecting arc.");
-        check(fg.source(con) == src, "Wrong source.");
-        check(fg.target(con) == trg, "Wrong target.");
-        check(++con == INVALID, "There is more connecting arc.");
-      }
-    }
-    ArcLookUp<Digraph> al1(fg);
-    DynArcLookUp<Digraph> al2(fg);
-    AllArcLookUp<Digraph> al3(fg);
-    for (NodeIt src(fg); src != INVALID; ++src) {
-      for (NodeIt trg(fg); trg != INVALID; ++trg) {
-        Arc con1 = al1(src, trg);
-        Arc con2 = al2(src, trg);
-        Arc con3 = al3(src, trg);
-        Arc con4 = findArc(fg, src, trg);
-        check(con1 == con2 && con2 == con3 && con3 == con4,
-              "Different results.")
-        check(con1 != INVALID, "There is no connecting arc.");
-        check(fg.source(con1) == src, "Wrong source.");
-        check(fg.target(con1) == trg, "Wrong target.");
-        check(al3(src, trg, con3) == INVALID,
-              "There is more connecting arc.");
-        check(findArc(fg, src, trg, con4) == INVALID,
-              "There is more connecting arc.");
-      }
-    }
-  }
-}
-
-template <typename Graph>
-void checkFindEdges() {
-  TEMPLATE_GRAPH_TYPEDEFS(Graph);
-  Graph graph;
-  typename Graph::template NodeMap<int> nodes(graph);
-  std::vector<Node> invNodes;
-  for (int i = 0; i < 10; ++i) {
-    invNodes.push_back(graph.addNode());
-    nodes[invNodes.back()]=invNodes.size()-1;
-  }
-  for (int i = 0; i < 100; ++i) {
-    int src = rnd[invNodes.size()];
-    int trg = rnd[invNodes.size()];
-    graph.addEdge(invNodes[src], invNodes[trg]);
-  }
-  typename Graph::template EdgeMap<int> found(graph, 0);
-  for (NodeIt src(graph); src != INVALID; ++src) {
-    for (NodeIt trg(graph); trg != INVALID; ++trg) {
-      for (ConEdgeIt<Graph> con(graph, src, trg); con != INVALID; ++con) {
-        check( (graph.u(con) == src && graph.v(con) == trg) ||
-               (graph.v(con) == src && graph.u(con) == trg),
-               "Wrong end nodes.");
-        ++found[con];
-        check(found[con] <= 2, "The edge found more than twice.");
-      }
-    }
-  }
-  for (EdgeIt it(graph); it != INVALID; ++it) {
-    check( (graph.u(it) != graph.v(it) && found[it] == 2) ||
-           (graph.u(it) == graph.v(it) && found[it] == 1),
-           "The edge is not found correctly.");
-  }
-}
-
-template <class Digraph>
-void checkDeg()
-{
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  const int nodeNum = 10;
-  const int arcNum = 100;
-  Digraph digraph;
-  InDegMap<Digraph> inDeg(digraph);
-  OutDegMap<Digraph> outDeg(digraph);
-  std::vector<Node> nodes(nodeNum);
-  for (int i = 0; i < nodeNum; ++i) {
-    nodes[i] = digraph.addNode();
-  }
-  std::vector<Arc> arcs(arcNum);
-  for (int i = 0; i < arcNum; ++i) {
-    arcs[i] = digraph.addArc(nodes[rnd[nodeNum]], nodes[rnd[nodeNum]]);
-  }
-  for (int i = 0; i < nodeNum; ++i) {
-    check(inDeg[nodes[i]] == countInArcs(digraph, nodes[i]),
-          "Wrong in degree map");
-  }
-  for (int i = 0; i < nodeNum; ++i) {
-    check(outDeg[nodes[i]] == countOutArcs(digraph, nodes[i]),
-          "Wrong out degree map");
-  }
-}
-
-template <class Digraph>
-void checkSnapDeg()
-{
-  TEMPLATE_DIGRAPH_TYPEDEFS(Digraph);
-
-  Digraph g;
-  Node n1=g.addNode();
-  Node n2=g.addNode();
-
-  InDegMap<Digraph> ind(g);
-
-  g.addArc(n1,n2);
-
-  typename Digraph::Snapshot snap(g);
-
-  OutDegMap<Digraph> outd(g);
-
-  check(ind[n1]==0 && ind[n2]==1, "Wrong InDegMap value.");
-  check(outd[n1]==1 && outd[n2]==0, "Wrong OutDegMap value.");
-
-  g.addArc(n1,n2);
-  g.addArc(n2,n1);
-
-  check(ind[n1]==1 && ind[n2]==2, "Wrong InDegMap value.");
-  check(outd[n1]==2 && outd[n2]==1, "Wrong OutDegMap value.");
-
-  snap.restore();
-
-  check(ind[n1]==0 && ind[n2]==1, "Wrong InDegMap value.");
-  check(outd[n1]==1 && outd[n2]==0, "Wrong OutDegMap value.");
-}
-
-int main() {
-  // Checking ConArcIt, ConEdgeIt, ArcLookUp, AllArcLookUp, and DynArcLookUp
-  checkFindArcs<ListDigraph>();
-  checkFindArcs<SmartDigraph>();
-  checkFindEdges<ListGraph>();
-  checkFindEdges<SmartGraph>();
-
-  // Checking In/OutDegMap (and Snapshot feature)
-  checkDeg<ListDigraph>();
-  checkDeg<SmartDigraph>();
-  checkSnapDeg<ListDigraph>();
-  checkSnapDeg<SmartDigraph>();
-
-  return 0;
-}
Index: st/heap_test.cc
===================================================================
--- test/heap_test.cc	(revision 293)
+++ 	(revision )
@@ -1,187 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <iostream>
-#include <fstream>
-#include <string>
-#include <vector>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/heap.h>
-
-#include <lemon/smart_graph.h>
-
-#include <lemon/lgf_reader.h>
-#include <lemon/dijkstra.h>
-#include <lemon/maps.h>
-
-#include <lemon/bin_heap.h>
-
-#include "test_tools.h"
-
-using namespace lemon;
-using namespace lemon::concepts;
-
-typedef ListDigraph Digraph;
-DIGRAPH_TYPEDEFS(Digraph);
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "2\n"
-  "3\n"
-  "4\n"
-  "5\n"
-  "6\n"
-  "7\n"
-  "8\n"
-  "9\n"
-  "@arcs\n"
-  "                label   capacity\n"
-  "0       5       0       94\n"
-  "3       9       1       11\n"
-  "8       7       2       83\n"
-  "1       2       3       94\n"
-  "5       7       4       35\n"
-  "7       4       5       84\n"
-  "9       5       6       38\n"
-  "0       4       7       96\n"
-  "6       7       8       6\n"
-  "3       1       9       27\n"
-  "5       2       10      77\n"
-  "5       6       11      69\n"
-  "6       5       12      41\n"
-  "4       6       13      70\n"
-  "3       2       14      45\n"
-  "7       9       15      93\n"
-  "5       9       16      50\n"
-  "9       0       17      94\n"
-  "9       6       18      67\n"
-  "0       9       19      86\n"
-  "@attributes\n"
-  "source 3\n";
-
-int test_seq[] = { 2, 28, 19, 27, 33, 25, 13, 41, 10, 26,  1,  9,  4, 34};
-int test_inc[] = {20, 28, 34, 16,  0, 46, 44,  0, 42, 32, 14,  8,  6, 37};
-
-int test_len = sizeof(test_seq) / sizeof(test_seq[0]);
-
-template <typename Heap>
-void heapSortTest() {
-  RangeMap<int> map(test_len, -1);
-
-  Heap heap(map);
-
-  std::vector<int> v(test_len);
-
-  for (int i = 0; i < test_len; ++i) {
-    v[i] = test_seq[i];
-    heap.push(i, v[i]);
-  }
-  std::sort(v.begin(), v.end());
-  for (int i = 0; i < test_len; ++i) {
-    check(v[i] == heap.prio() ,"Wrong order in heap sort.");
-    heap.pop();
-  }
-}
-
-template <typename Heap>
-void heapIncreaseTest() {
-  RangeMap<int> map(test_len, -1);
-
-  Heap heap(map);
-
-  std::vector<int> v(test_len);
-
-  for (int i = 0; i < test_len; ++i) {
-    v[i] = test_seq[i];
-    heap.push(i, v[i]);
-  }
-  for (int i = 0; i < test_len; ++i) {
-    v[i] += test_inc[i];
-    heap.increase(i, v[i]);
-  }
-  std::sort(v.begin(), v.end());
-  for (int i = 0; i < test_len; ++i) {
-    check(v[i] == heap.prio() ,"Wrong order in heap increase test.");
-    heap.pop();
-  }
-}
-
-
-
-template <typename Heap>
-void dijkstraHeapTest(const Digraph& digraph, const IntArcMap& length,
-                      Node source) {
-
-  typename Dijkstra<Digraph, IntArcMap>::template SetStandardHeap<Heap>::
-    Create dijkstra(digraph, length);
-
-  dijkstra.run(source);
-
-  for(ArcIt a(digraph); a != INVALID; ++a) {
-    Node s = digraph.source(a);
-    Node t = digraph.target(a);
-    if (dijkstra.reached(s)) {
-      check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a],
-             "Error in a shortest path tree!");
-    }
-  }
-
-  for(NodeIt n(digraph); n != INVALID; ++n) {
-    if ( dijkstra.reached(n) && dijkstra.predArc(n) != INVALID ) {
-      Arc a = dijkstra.predArc(n);
-      Node s = digraph.source(a);
-      check( dijkstra.dist(n) - dijkstra.dist(s) == length[a],
-             "Error in a shortest path tree!");
-    }
-  }
-
-}
-
-int main() {
-
-  typedef int Item;
-  typedef int Prio;
-  typedef RangeMap<int> ItemIntMap;
-
-  Digraph digraph;
-  IntArcMap length(digraph);
-  Node source;
-
-  std::istringstream input(test_lgf);
-  digraphReader(digraph, input).
-    arcMap("capacity", length).
-    node("source", source).
-    run();
-
-  {
-    typedef BinHeap<Prio, ItemIntMap> IntHeap;
-    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
-    heapSortTest<IntHeap>();
-    heapIncreaseTest<IntHeap>();
-
-    typedef BinHeap<Prio, IntNodeMap > NodeHeap;
-    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
-    dijkstraHeapTest<NodeHeap>(digraph, length, source);
-  }
-
-  return 0;
-}
Index: st/kruskal_test.cc
===================================================================
--- test/kruskal_test.cc	(revision 209)
+++ 	(revision )
@@ -1,147 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <iostream>
-#include <vector>
-
-#include "test_tools.h"
-#include <lemon/maps.h>
-#include <lemon/kruskal.h>
-#include <lemon/list_graph.h>
-
-#include <lemon/concepts/maps.h>
-#include <lemon/concepts/digraph.h>
-#include <lemon/concepts/graph.h>
-
-using namespace std;
-using namespace lemon;
-
-void checkCompileKruskal()
-{
-  concepts::WriteMap<concepts::Digraph::Arc,bool> w;
-  concepts::WriteMap<concepts::Graph::Edge,bool> uw;
-
-  concepts::ReadMap<concepts::Digraph::Arc,int> r;
-  concepts::ReadMap<concepts::Graph::Edge,int> ur;
-
-  concepts::Digraph g;
-  concepts::Graph ug;
-
-  kruskal(g, r, w);
-  kruskal(ug, ur, uw);
-
-  std::vector<std::pair<concepts::Digraph::Arc, int> > rs;
-  std::vector<std::pair<concepts::Graph::Edge, int> > urs;
-
-  kruskal(g, rs, w);
-  kruskal(ug, urs, uw);
-
-  std::vector<concepts::Digraph::Arc> ws;
-  std::vector<concepts::Graph::Edge> uws;
-
-  kruskal(g, r, ws.begin());
-  kruskal(ug, ur, uws.begin());
-}
-
-int main() {
-
-  typedef ListGraph::Node Node;
-  typedef ListGraph::Edge Edge;
-  typedef ListGraph::NodeIt NodeIt;
-  typedef ListGraph::ArcIt ArcIt;
-
-  ListGraph G;
-
-  Node s=G.addNode();
-  Node v1=G.addNode();
-  Node v2=G.addNode();
-  Node v3=G.addNode();
-  Node v4=G.addNode();
-  Node t=G.addNode();
-
-  Edge e1 = G.addEdge(s, v1);
-  Edge e2 = G.addEdge(s, v2);
-  Edge e3 = G.addEdge(v1, v2);
-  Edge e4 = G.addEdge(v2, v1);
-  Edge e5 = G.addEdge(v1, v3);
-  Edge e6 = G.addEdge(v3, v2);
-  Edge e7 = G.addEdge(v2, v4);
-  Edge e8 = G.addEdge(v4, v3);
-  Edge e9 = G.addEdge(v3, t);
-  Edge e10 = G.addEdge(v4, t);
-
-  typedef ListGraph::EdgeMap<int> ECostMap;
-  typedef ListGraph::EdgeMap<bool> EBoolMap;
-
-  ECostMap edge_cost_map(G, 2);
-  EBoolMap tree_map(G);
-
-
-  //Test with const map.
-  check(kruskal(G, ConstMap<ListGraph::Edge,int>(2), tree_map)==10,
-        "Total cost should be 10");
-  //Test with an edge map (filled with uniform costs).
-  check(kruskal(G, edge_cost_map, tree_map)==10,
-        "Total cost should be 10");
-
-  edge_cost_map.set(e1, -10);
-  edge_cost_map.set(e2, -9);
-  edge_cost_map.set(e3, -8);
-  edge_cost_map.set(e4, -7);
-  edge_cost_map.set(e5, -6);
-  edge_cost_map.set(e6, -5);
-  edge_cost_map.set(e7, -4);
-  edge_cost_map.set(e8, -3);
-  edge_cost_map.set(e9, -2);
-  edge_cost_map.set(e10, -1);
-
-  vector<Edge> tree_edge_vec(5);
-
-  //Test with a edge map and inserter.
-  check(kruskal(G, edge_cost_map,
-                 tree_edge_vec.begin())
-        ==-31,
-        "Total cost should be -31.");
-
-  tree_edge_vec.clear();
-
-  check(kruskal(G, edge_cost_map,
-                back_inserter(tree_edge_vec))
-        ==-31,
-        "Total cost should be -31.");
-
-//   tree_edge_vec.clear();
-
-//   //The above test could also be coded like this:
-//   check(kruskal(G,
-//                 makeKruskalMapInput(G, edge_cost_map),
-//                 makeKruskalSequenceOutput(back_inserter(tree_edge_vec)))
-//         ==-31,
-//         "Total cost should be -31.");
-
-  check(tree_edge_vec.size()==5,"The tree should have 5 edges.");
-
-  check(tree_edge_vec[0]==e1 &&
-        tree_edge_vec[1]==e2 &&
-        tree_edge_vec[2]==e5 &&
-        tree_edge_vec[3]==e7 &&
-        tree_edge_vec[4]==e9,
-        "Wrong tree.");
-
-  return 0;
-}
Index: st/lgf_test.cc
===================================================================
--- test/lgf_test.cc	(revision 427)
+++ 	(revision )
@@ -1,169 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-#include <lemon/list_graph.h>
-#include <lemon/lgf_reader.h>
-#include "test_tools.h"
-
-using namespace lemon;
-
-char test_lgf[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     label\n"
-  "0 1  0\n"
-  "1 0  1\n"
-  "@attributes\n"
-  "source 0\n"
-  "target 1\n";
-
-char test_lgf_nomap[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     -\n"
-  "0 1\n";
-
-char test_lgf_bad1[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     - another\n"
-  "0 1\n";
-
-char test_lgf_bad2[] =
-  "@nodes\n"
-  "label\n"
-  "0\n"
-  "1\n"
-  "@arcs\n"
-  "     label -\n"
-  "0 1\n";
-
-
-int main()
-{
-  {
-    ListDigraph d;
-    ListDigraph::Node s,t;
-    ListDigraph::ArcMap<int> label(d);
-    std::istringstream input(test_lgf);
-    digraphReader(d, input).
-      node("source", s).
-      node("target", t).
-      arcMap("label", label).
-      run();
-    check(countNodes(d) == 2,"There should be 2 nodes");
-    check(countArcs(d) == 2,"There should be 2 arcs");
-  }
-  {
-    ListGraph g;
-    ListGraph::Node s,t;
-    ListGraph::EdgeMap<int> label(g);
-    std::istringstream input(test_lgf);
-    graphReader(g, input).
-      node("source", s).
-      node("target", t).
-      edgeMap("label", label).
-      run();
-    check(countNodes(g) == 2,"There should be 2 nodes");
-    check(countEdges(g) == 2,"There should be 2 arcs");
-  }
-
-  {
-    ListDigraph d;
-    std::istringstream input(test_lgf_nomap);
-    digraphReader(d, input).
-      run();
-    check(countNodes(d) == 2,"There should be 2 nodes");
-    check(countArcs(d) == 1,"There should be 1 arc");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_nomap);
-    graphReader(g, input).
-      run();
-    check(countNodes(g) == 2,"There should be 2 nodes");
-    check(countEdges(g) == 1,"There should be 1 edge");
-  }
-
-  {
-    ListDigraph d;
-    std::istringstream input(test_lgf_bad1);
-    bool ok=false;
-    try {
-      digraphReader(d, input).
-        run();
-    }
-    catch (FormatError& error)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_bad1);
-    bool ok=false;
-    try {
-      graphReader(g, input).
-        run();
-    }
-    catch (FormatError& error)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-
-  {
-    ListDigraph d;
-    std::istringstream input(test_lgf_bad2);
-    bool ok=false;
-    try {
-      digraphReader(d, input).
-        run();
-    }
-    catch (FormatError& error)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-  {
-    ListGraph g;
-    std::istringstream input(test_lgf_bad2);
-    bool ok=false;
-    try {
-      graphReader(g, input).
-        run();
-    }
-    catch (FormatError& error)
-      {
-        ok = true;
-      }
-    check(ok,"FormatError exception should have occured");
-  }
-}
Index: st/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 427)
+++ 	(revision )
@@ -1,356 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2011
- * 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.
- *
- */
-
-#include <deque>
-#include <set>
-
-#include <lemon/concept_check.h>
-#include <lemon/concepts/maps.h>
-#include <lemon/maps.h>
-
-#include "test_tools.h"
-
-using namespace lemon;
-using namespace lemon::concepts;
-
-struct A {};
-inline bool operator<(A, A) { return true; }
-struct B {};
-
-class C {
-  int x;
-public:
-  C(int _x) : x(_x) {}
-};
-
-class F {
-public:
-  typedef A argument_type;
-  typedef B result_type;
-
-  B operator()(const A&) const { return B(); }
-private:
-  F& operator=(const F&);
-};
-
-int func(A) { return 3; }
-
-int binc(int a, B) { return a+1; }
-
-typedef ReadMap<A, double> DoubleMap;
-typedef ReadWriteMap<A, double> DoubleWriteMap;
-typedef ReferenceMap<A, double, double&, const double&> DoubleRefMap;
-
-typedef ReadMap<A, bool> BoolMap;
-typedef ReadWriteMap<A, bool> BoolWriteMap;
-typedef ReferenceMap<A, bool, bool&, const bool&> BoolRefMap;
-
-int main()
-{
-  // Map concepts
-  checkConcept<ReadMap<A,B>, ReadMap<A,B> >();
-  checkConcept<ReadMap<A,C>, ReadMap<A,C> >();
-  checkConcept<WriteMap<A,B>, WriteMap<A,B> >();
-  checkConcept<WriteMap<A,C>, WriteMap<A,C> >();
-  checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >();
-  checkConcept<ReadWriteMap<A,C>, ReadWriteMap<A,C> >();
-  checkConcept<ReferenceMap<A,B,B&,const B&>,
-               ReferenceMap<A,B,B&,const B&> >();
-  checkConcept<ReferenceMap<A,C,C&,const C&>,
-               ReferenceMap<A,C,C&,const C&> >();
-
-  // NullMap
-  {
-    checkConcept<ReadWriteMap<A,B>, NullMap<A,B> >();
-    NullMap<A,B> map1;
-    NullMap<A,B> map2 = map1;
-    map1 = nullMap<A,B>();
-  }
-
-  // ConstMap
-  {
-    checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
-    checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
-    ConstMap<A,B> map1;
-    ConstMap<A,B> map2 = B();
-    ConstMap<A,B> map3 = map1;
-    map1 = constMap<A>(B());
-    map1 = constMap<A,B>();
-    map1.setAll(B());
-    ConstMap<A,C> map4(C(1));
-    ConstMap<A,C> map5 = map4;
-    map4 = constMap<A>(C(2));
-    map4.setAll(C(3));
-
-    checkConcept<ReadWriteMap<A,int>, ConstMap<A,int> >();
-    check(constMap<A>(10)[A()] == 10, "Something is wrong with ConstMap");
-
-    checkConcept<ReadWriteMap<A,int>, ConstMap<A,Const<int,10> > >();
-    ConstMap<A,Const<int,10> > map6;
-    ConstMap<A,Const<int,10> > map7 = map6;
-    map6 = constMap<A,int,10>();
-    map7 = constMap<A,Const<int,10> >();
-    check(map6[A()] == 10 && map7[A()] == 10,
-          "Something is wrong with ConstMap");
-  }
-
-  // IdentityMap
-  {
-    checkConcept<ReadMap<A,A>, IdentityMap<A> >();
-    IdentityMap<A> map1;
-    IdentityMap<A> map2 = map1;
-    map1 = identityMap<A>();
-
-    checkConcept<ReadMap<double,double>, IdentityMap<double> >();
-    check(identityMap<double>()[1.0] == 1.0 &&
-          identityMap<double>()[3.14] == 3.14,
-          "Something is wrong with IdentityMap");
-  }
-
-  // RangeMap
-  {
-    checkConcept<ReferenceMap<int,B,B&,const B&>, RangeMap<B> >();
-    RangeMap<B> map1;
-    RangeMap<B> map2(10);
-    RangeMap<B> map3(10,B());
-    RangeMap<B> map4 = map1;
-    RangeMap<B> map5 = rangeMap<B>();
-    RangeMap<B> map6 = rangeMap<B>(10);
-    RangeMap<B> map7 = rangeMap(10,B());
-
-    checkConcept< ReferenceMap<int, double, double&, const double&>,
-                  RangeMap<double> >();
-    std::vector<double> v(10, 0);
-    v[5] = 100;
-    RangeMap<double> map8(v);
-    RangeMap<double> map9 = rangeMap(v);
-    check(map9.size() == 10 && map9[2] == 0 && map9[5] == 100,
-          "Something is wrong with RangeMap");
-  }
-
-  // SparseMap
-  {
-    checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >();
-    SparseMap<A,B> map1;
-    SparseMap<A,B> map2 = B();
-    SparseMap<A,B> map3 = sparseMap<A,B>();
-    SparseMap<A,B> map4 = sparseMap<A>(B());
-
-    checkConcept< ReferenceMap<double, int, int&, const int&>,
-                  SparseMap<double, int> >();
-    std::map<double, int> m;
-    SparseMap<double, int> map5(m);
-    SparseMap<double, int> map6(m,10);
-    SparseMap<double, int> map7 = sparseMap(m);
-    SparseMap<double, int> map8 = sparseMap(m,10);
-
-    check(map5[1.0] == 0 && map5[3.14] == 0 &&
-          map6[1.0] == 10 && map6[3.14] == 10,
-          "Something is wrong with SparseMap");
-    map5[1.0] = map6[3.14] = 100;
-    check(map5[1.0] == 100 && map5[3.14] == 0 &&
-          map6[1.0] == 10 && map6[3.14] == 100,
-          "Something is wrong with SparseMap");
-  }
-
-  // ComposeMap
-  {
-    typedef ComposeMap<DoubleMap, ReadMap<B,A> > CompMap;
-    checkConcept<ReadMap<B,double>, CompMap>();
-    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
-    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
-
-    SparseMap<double, bool> m1(false); m1[3.14] = true;
-    RangeMap<double> m2(2); m2[0] = 3.0; m2[1] = 3.14;
-    check(!composeMap(m1,m2)[0] && composeMap(m1,m2)[1],
-          "Something is wrong with ComposeMap")
-  }
-
-  // CombineMap
-  {
-    typedef CombineMap<DoubleMap, DoubleMap, std::plus<double> > CombMap;
-    checkConcept<ReadMap<A,double>, CombMap>();
-    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
-    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
-
-    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
-          "Something is wrong with CombineMap");
-  }
-
-  // FunctorToMap, MapToFunctor
-  {
-    checkConcept<ReadMap<A,B>, FunctorToMap<F,A,B> >();
-    checkConcept<ReadMap<A,B>, FunctorToMap<F> >();
-    FunctorToMap<F> map1;
-    FunctorToMap<F> map2 = FunctorToMap<F>(F());
-    B b = functorToMap(F())[A()];
-
-    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
-    MapToFunctor<ReadMap<A,B> > map =
-      MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
-
-    check(functorToMap(&func)[A()] == 3,
-          "Something is wrong with FunctorToMap");
-    check(mapToFunctor(constMap<A,int>(2))(A()) == 2,
-          "Something is wrong with MapToFunctor");
-    check(mapToFunctor(functorToMap(&func))(A()) == 3 &&
-          mapToFunctor(functorToMap(&func))[A()] == 3,
-          "Something is wrong with FunctorToMap or MapToFunctor");
-    check(functorToMap(mapToFunctor(constMap<A,int>(2)))[A()] == 2,
-          "Something is wrong with FunctorToMap or MapToFunctor");
-  }
-
-  // ConvertMap
-  {
-    checkConcept<ReadMap<double,double>,
-      ConvertMap<ReadMap<double, int>, double> >();
-    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
-    ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
-  }
-
-  // ForkMap
-  {
-    checkConcept<DoubleWriteMap, ForkMap<DoubleWriteMap, DoubleWriteMap> >();
-
-    typedef RangeMap<double> RM;
-    typedef SparseMap<int, double> SM;
-    RM m1(10, -1);
-    SM m2(-1);
-    checkConcept<ReadWriteMap<int, double>, ForkMap<RM, SM> >();
-    checkConcept<ReadWriteMap<int, double>, ForkMap<SM, RM> >();
-    ForkMap<RM, SM> map1(m1,m2);
-    ForkMap<SM, RM> map2 = forkMap(m2,m1);
-    map2.set(5, 10);
-    check(m1[1] == -1 && m1[5] == 10 && m2[1] == -1 &&
-          m2[5] == 10 && map2[1] == -1 && map2[5] == 10,
-          "Something is wrong with ForkMap");
-  }
-
-  // Arithmetic maps:
-  // - AddMap, SubMap, MulMap, DivMap
-  // - ShiftMap, ShiftWriteMap, ScaleMap, ScaleWriteMap
-  // - NegMap, NegWriteMap, AbsMap
-  {
-    checkConcept<DoubleMap, AddMap<DoubleMap,DoubleMap> >();
-    checkConcept<DoubleMap, SubMap<DoubleMap,DoubleMap> >();
-    checkConcept<DoubleMap, MulMap<DoubleMap,DoubleMap> >();
-    checkConcept<DoubleMap, DivMap<DoubleMap,DoubleMap> >();
-
-    ConstMap<int, double> c1(1.0), c2(3.14);
-    IdentityMap<int> im;
-    ConvertMap<IdentityMap<int>, double> id(im);
-    check(addMap(c1,id)[0] == 1.0  && addMap(c1,id)[10] == 11.0,
-          "Something is wrong with AddMap");
-    check(subMap(id,c1)[0] == -1.0 && subMap(id,c1)[10] == 9.0,
-          "Something is wrong with SubMap");
-    check(mulMap(id,c2)[0] == 0    && mulMap(id,c2)[2]  == 6.28,
-          "Something is wrong with MulMap");
-    check(divMap(c2,id)[1] == 3.14 && divMap(c2,id)[2]  == 1.57,
-          "Something is wrong with DivMap");
-
-    checkConcept<DoubleMap, ShiftMap<DoubleMap> >();
-    checkConcept<DoubleWriteMap, ShiftWriteMap<DoubleWriteMap> >();
-    checkConcept<DoubleMap, ScaleMap<DoubleMap> >();
-    checkConcept<DoubleWriteMap, ScaleWriteMap<DoubleWriteMap> >();
-    checkConcept<DoubleMap, NegMap<DoubleMap> >();
-    checkConcept<DoubleWriteMap, NegWriteMap<DoubleWriteMap> >();
-    checkConcept<DoubleMap, AbsMap<DoubleMap> >();
-
-    check(shiftMap(id, 2.0)[1] == 3.0 && shiftMap(id, 2.0)[10] == 12.0,
-          "Something is wrong with ShiftMap");
-    check(shiftWriteMap(id, 2.0)[1] == 3.0 &&
-          shiftWriteMap(id, 2.0)[10] == 12.0,
-          "Something is wrong with ShiftWriteMap");
-    check(scaleMap(id, 2.0)[1] == 2.0 && scaleMap(id, 2.0)[10] == 20.0,
-          "Something is wrong with ScaleMap");
-    check(scaleWriteMap(id, 2.0)[1] == 2.0 &&
-          scaleWriteMap(id, 2.0)[10] == 20.0,
-          "Something is wrong with ScaleWriteMap");
-    check(negMap(id)[1] == -1.0 && negMap(id)[-10] == 10.0,
-          "Something is wrong with NegMap");
-    check(negWriteMap(id)[1] == -1.0 && negWriteMap(id)[-10] == 10.0,
-          "Something is wrong with NegWriteMap");
-    check(absMap(id)[1] == 1.0 && absMap(id)[-10] == 10.0,
-          "Something is wrong with AbsMap");
-  }
-
-  // Logical maps:
-  // - TrueMap, FalseMap
-  // - AndMap, OrMap
-  // - NotMap, NotWriteMap
-  // - EqualMap, LessMap
-  {
-    checkConcept<BoolMap, TrueMap<A> >();
-    checkConcept<BoolMap, FalseMap<A> >();
-    checkConcept<BoolMap, AndMap<BoolMap,BoolMap> >();
-    checkConcept<BoolMap, OrMap<BoolMap,BoolMap> >();
-    checkConcept<BoolMap, NotMap<BoolMap> >();
-    checkConcept<BoolWriteMap, NotWriteMap<BoolWriteMap> >();
-    checkConcept<BoolMap, EqualMap<DoubleMap,DoubleMap> >();
-    checkConcept<BoolMap, LessMap<DoubleMap,DoubleMap> >();
-
-    TrueMap<int> tm;
-    FalseMap<int> fm;
-    RangeMap<bool> rm(2);
-    rm[0] = true; rm[1] = false;
-    check(andMap(tm,rm)[0] && !andMap(tm,rm)[1] &&
-          !andMap(fm,rm)[0] && !andMap(fm,rm)[1],
-          "Something is wrong with AndMap");
-    check(orMap(tm,rm)[0] && orMap(tm,rm)[1] &&
-          orMap(fm,rm)[0] && !orMap(fm,rm)[1],
-          "Something is wrong with OrMap");
-    check(!notMap(rm)[0] && notMap(rm)[1],
-          "Something is wrong with NotMap");
-    check(!notWriteMap(rm)[0] && notWriteMap(rm)[1],
-          "Something is wrong with NotWriteMap");
-
-    ConstMap<int, double> cm(2.0);
-    IdentityMap<int> im;
-    ConvertMap<IdentityMap<int>, double> id(im);
-    check(lessMap(id,cm)[1] && !lessMap(id,cm)[2] && !lessMap(id,cm)[3],
-          "Something is wrong with LessMap");
-    check(!equalMap(id,cm)[1] && equalMap(id,cm)[2] && !equalMap(id,cm)[3],
-          "Something is wrong with EqualMap");
-  }
-
-  // LoggerBoolMap
-  {
-    typedef std::vector<int> vec;
-    vec v1;
-    vec v2(10);
-    LoggerBoolMap<std::back_insert_iterator<vec> >
-      map1(std::back_inserter(v1));
-    LoggerBoolMap<vec::iterator> map2(v2.begin());
-    map1.set(10, false);
-    map1.set(20, true);   map2.set(20, true);
-    map1.set(30, false);  map2.set(40, false);
-    map1.set(50, true);   map2.set(50, true);
-    map1.set(60, true);   map2.set(60, true);
-    check(v1.size() == 3 && v2.size() == 10 &&
-          v1[0]==20 && v1[1]==50 && v1[2]==60 &&
-          v2[0]==20 && v2[1]==50 && v2[2]==60,
-          "Something is wrong with LoggerBoolMap");
-
-    int i = 0;
-    for ( LoggerBoolMap<vec::iterator>::Iterator it = map2.begin();
-          it != map2.end(); ++it )
-      check(v1[i++] == *it, "Something is wrong with LoggerBoolMap");
-  }
-
-  return 0;
-}
Index: st/path_test.cc
===================================================================
--- test/path_test.cc	(revision 209)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <string>
-#include <iostream>
-
-#include <lemon/concepts/path.h>
-#include <lemon/concepts/digraph.h>
-
-#include <lemon/path.h>
-#include <lemon/list_graph.h>
-
-#include "test_tools.h"
-
-using namespace std;
-using namespace lemon;
-
-void check_concepts() {
-  checkConcept<concepts::Path<ListDigraph>, concepts::Path<ListDigraph> >();
-  checkConcept<concepts::Path<ListDigraph>, Path<ListDigraph> >();
-  checkConcept<concepts::Path<ListDigraph>, SimplePath<ListDigraph> >();
-  checkConcept<concepts::Path<ListDigraph>, StaticPath<ListDigraph> >();
-  checkConcept<concepts::Path<ListDigraph>, ListPath<ListDigraph> >();
-}
-
-int main() {
-  check_concepts();
-  return 0;
-}
Index: st/random_test.cc
===================================================================
--- test/random_test.cc	(revision 209)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/random.h>
-#include "test_tools.h"
-
-int seed_array[] = {1, 2};
-
-int main()
-{
-  double a=lemon::rnd();
-  check(a<1.0&&a>0.0,"This should be in [0,1)");
-  a=lemon::rnd.gauss();
-  a=lemon::rnd.gamma(3.45,0);
-  a=lemon::rnd.gamma(4);
-  //Does gamma work with integer k?
-  a=lemon::rnd.gamma(4.0,0);
-  a=lemon::rnd.poisson(.5);
-
-  lemon::rnd.seed(100);
-  lemon::rnd.seed(seed_array, seed_array +
-                  (sizeof(seed_array) / sizeof(seed_array[0])));
-
-  return 0;
-}
Index: st/test_tools.h
===================================================================
--- test/test_tools.h	(revision 209)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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_TEST_TEST_TOOLS_H
-#define LEMON_TEST_TEST_TOOLS_H
-
-///\ingroup misc
-///\file
-///\brief Some utilities to write test programs.
-
-#include <iostream>
-#include <stdlib.h>
-
-///If \c rc is fail, writes an error message and exits.
-
-///If \c rc is fail, writes an error message and exits.
-///The error message contains the file name and the line number of the
-///source code in a standard from, which makes it possible to go there
-///using good source browsers like e.g. \c emacs.
-///
-///For example
-///\code check(0==1,"This is obviously false.");\endcode will
-///print something like this (and then exits).
-///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim
-#define check(rc, msg) \
-  if(!(rc)) { \
-    std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
-    abort(); \
-  } else { } \
-
-#endif
Index: st/test_tools_fail.cc
===================================================================
--- test/test_tools_fail.cc	(revision 209)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include "test_tools.h"
-
-int main()
-{
-  check(false, "Don't panic. Failing is the right behaviour here.");
-  return 0;
-}
Index: st/test_tools_pass.cc
===================================================================
--- test/test_tools_pass.cc	(revision 209)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include "test_tools.h"
-
-int main()
-{
-  check(true, "It should pass.");
-  return 0;
-}
Index: st/time_measure_test.cc
===================================================================
--- test/time_measure_test.cc	(revision 209)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/time_measure.h>
-
-using namespace lemon;
-
-void f()
-{
-  double d=0;
-  for(int i=0;i<1000;i++)
-    d+=0.1;
-}
-
-void g()
-{
-  static Timer T;
-
-  for(int i=0;i<1000;i++)
-    TimeStamp x(T);
-}
-
-int main()
-{
-  Timer T;
-  unsigned int n;
-  for(n=0;T.realTime()<1.0;n++) ;
-  std::cout << T << " (" << n << " time queries)\n";
-  T.restart();
-  while(T.realTime()<2.0) ;
-  std::cout << T << '\n';
-  TimeStamp full;
-  TimeStamp t;
-  t=runningTimeTest(f,1,&n,&full);
-  std::cout << t << " (" << n << " tests)\n";
-  std::cout << "Total: " << full << "\n";
-
-  t=runningTimeTest(g,1,&n,&full);
-  std::cout << t << " (" << n << " tests)\n";
-  std::cout << "Total: " << full << "\n";
-
-  return 0;
-}
Index: st/unionfind_test.cc
===================================================================
--- test/unionfind_test.cc	(revision 209)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * 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.
- *
- */
-
-#include <lemon/list_graph.h>
-#include <lemon/maps.h>
-#include <lemon/unionfind.h>
-#include "test_tools.h"
-
-using namespace lemon;
-using namespace std;
-
-typedef UnionFindEnum<ListGraph::NodeMap<int> > UFE;
-
-int main() {
-  ListGraph g;
-  ListGraph::NodeMap<int> base(g);
-  UFE U(base);
-  vector<ListGraph::Node> n;
-
-  for(int i=0;i<20;i++) n.push_back(g.addNode());
-
-  U.insert(n[1]);
-  U.insert(n[2]);
-
-  check(U.join(n[1],n[2]) != -1, "Something is wrong with UnionFindEnum");
-
-  U.insert(n[3]);
-  U.insert(n[4]);
-  U.insert(n[5]);
-  U.insert(n[6]);
-  U.insert(n[7]);
-
-
-  check(U.join(n[1],n[4]) != -1, "Something is wrong with UnionFindEnum");
-  check(U.join(n[2],n[4]) == -1, "Something is wrong with UnionFindEnum");
-  check(U.join(n[3],n[5]) != -1, "Something is wrong with UnionFindEnum");
-
-
-  U.insert(n[8],U.find(n[5]));
-
-
-  check(U.size(U.find(n[4])) == 3, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[5])) == 3, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[6])) == 1, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[2])) == 3, "Something is wrong with UnionFindEnum");
-
-
-  U.insert(n[9]);
-  U.insert(n[10],U.find(n[9]));
-
-
-  check(U.join(n[8],n[10])  != -1, "Something is wrong with UnionFindEnum");
-
-
-  check(U.size(U.find(n[4])) == 3, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[9])) == 5, "Something is wrong with UnionFindEnum");
-
-  check(U.size(U.find(n[8])) == 5, "Something is wrong with UnionFindEnum");
-
-  U.erase(n[9]);
-  U.erase(n[1]);
-
-  check(U.size(U.find(n[10])) == 4, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[2]))  == 2, "Something is wrong with UnionFindEnum");
-
-  U.erase(n[6]);
-  U.split(U.find(n[8]));
-
-
-  check(U.size(U.find(n[4])) == 2, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[3])) == 1, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[2])) == 2, "Something is wrong with UnionFindEnum");
-
-
-  check(U.join(n[3],n[4]) != -1, "Something is wrong with UnionFindEnum");
-  check(U.join(n[2],n[4]) == -1, "Something is wrong with UnionFindEnum");
-
-
-  check(U.size(U.find(n[4])) == 3, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[3])) == 3, "Something is wrong with UnionFindEnum");
-  check(U.size(U.find(n[2])) == 3, "Something is wrong with UnionFindEnum");
-
-  U.eraseClass(U.find(n[4]));
-  U.eraseClass(U.find(n[7]));
-
-  return 0;
-}
Index: ols/Makefile.am
===================================================================
--- tools/Makefile.am	(revision 314)
+++ 	(revision )
@@ -1,6 +1,0 @@
-if WANT_TOOLS
-
-bin_PROGRAMS +=
-dist_bin_SCRIPTS += tools/lemon-0.x-to-1.x.sh
-
-endif WANT_TOOLS
Index: ols/lemon-0.x-to-1.x.sh
===================================================================
--- tools/lemon-0.x-to-1.x.sh	(revision 314)
+++ 	(revision )
@@ -1,127 +1,0 @@
-#!/bin/bash
-
-set -e
-
-if [ $# -eq 0 -o x$1 = "x-h" -o x$1 = "x-help" -o x$1 = "x--help" ]; then
-	echo "Usage:"
-	echo "  $0 source-file"
-	exit
-fi
-
-TMP=`mktemp`
-
-sed	-e "s/undirected graph/_gr_aph_label_/g"\
-	-e "s/undirected edge/_ed_ge_label_/g"\
-	-e "s/graph_/_gr_aph_label__/g"\
-	-e "s/_graph/__gr_aph_label_/g"\
-	-e "s/UGraph/_Gr_aph_label_/g"\
-	-e "s/uGraph/_gr_aph_label_/g"\
-	-e "s/ugraph/_gr_aph_label_/g"\
-	-e "s/Graph/_Digr_aph_label_/g"\
-	-e "s/graph/_digr_aph_label_/g"\
-	-e "s/UEdge/_Ed_ge_label_/g"\
-	-e "s/uEdge/_ed_ge_label_/g"\
-	-e "s/uedge/_ed_ge_label_/g"\
-	-e "s/IncEdgeIt/_In_cEd_geIt_label_/g"\
-	-e "s/Edge/_Ar_c_label_/g"\
-	-e "s/edge/_ar_c_label_/g"\
-	-e "s/ANode/_Re_d_label_/g"\
-	-e "s/BNode/_Blu_e_label_/g"\
-	-e "s/A-Node/_Re_d_label_/g"\
-	-e "s/B-Node/_Blu_e_label_/g"\
-	-e "s/anode/_re_d_label_/g"\
-	-e "s/bnode/_blu_e_label_/g"\
-	-e "s/aNode/_re_d_label_/g"\
-	-e "s/bNode/_blu_e_label_/g"\
-	-e "s/_Digr_aph_label_/Digraph/g"\
-	-e "s/_digr_aph_label_/digraph/g"\
-	-e "s/_Gr_aph_label_/Graph/g"\
-	-e "s/_gr_aph_label_/graph/g"\
-	-e "s/_Ar_c_label_/Arc/g"\
-	-e "s/_ar_c_label_/arc/g"\
-	-e "s/_Ed_ge_label_/Edge/g"\
-	-e "s/_ed_ge_label_/edge/g"\
-	-e "s/_In_cEd_geIt_label_/IncEdgeIt/g"\
-	-e "s/_Re_d_label_/Red/g"\
-	-e "s/_Blu_e_label_/Blue/g"\
-	-e "s/_re_d_label_/red/g"\
-	-e "s/_blu_e_label_/blue/g"\
-	-e "s/\(\W\)DefPredMap\(\W\)/\1SetPredMap\2/g"\
-	-e "s/\(\W\)DefPredMap$/\1SetPredMap/g"\
-	-e "s/^DefPredMap\(\W\)/SetPredMap\1/g"\
-	-e "s/^DefPredMap$/SetPredMap/g"\
-	-e "s/\(\W\)DefDistMap\(\W\)/\1SetDistMap\2/g"\
-	-e "s/\(\W\)DefDistMap$/\1SetDistMap/g"\
-	-e "s/^DefDistMap\(\W\)/SetDistMap\1/g"\
-	-e "s/^DefDistMap$/SetDistMap/g"\
-	-e "s/\(\W\)DefReachedMap\(\W\)/\1SetReachedMap\2/g"\
-	-e "s/\(\W\)DefReachedMap$/\1SetReachedMap/g"\
-	-e "s/^DefReachedMap\(\W\)/SetReachedMap\1/g"\
-	-e "s/^DefReachedMap$/SetReachedMap/g"\
-	-e "s/\(\W\)DefProcessedMap\(\W\)/\1SetProcessedMap\2/g"\
-	-e "s/\(\W\)DefProcessedMap$/\1SetProcessedMap/g"\
-	-e "s/^DefProcessedMap\(\W\)/SetProcessedMap\1/g"\
-	-e "s/^DefProcessedMap$/SetProcessedMap/g"\
-	-e "s/\(\W\)DefHeap\(\W\)/\1SetHeap\2/g"\
-	-e "s/\(\W\)DefHeap$/\1SetHeap/g"\
-	-e "s/^DefHeap\(\W\)/SetHeap\1/g"\
-	-e "s/^DefHeap$/SetHeap/g"\
-	-e "s/\(\W\)DefStandardHeap\(\W\)/\1SetStandradHeap\2/g"\
-	-e "s/\(\W\)DefStandardHeap$/\1SetStandradHeap/g"\
-	-e "s/^DefStandardHeap\(\W\)/SetStandradHeap\1/g"\
-	-e "s/^DefStandardHeap$/SetStandradHeap/g"\
-	-e "s/\(\W\)DefOperationTraits\(\W\)/\1SetOperationTraits\2/g"\
-	-e "s/\(\W\)DefOperationTraits$/\1SetOperationTraits/g"\
-	-e "s/^DefOperationTraits\(\W\)/SetOperationTraits\1/g"\
-	-e "s/^DefOperationTraits$/SetOperationTraits/g"\
-	-e "s/\(\W\)DefProcessedMapToBeDefaultMap\(\W\)/\1SetStandardProcessedMap\2/g"\
-	-e "s/\(\W\)DefProcessedMapToBeDefaultMap$/\1SetStandardProcessedMap/g"\
-	-e "s/^DefProcessedMapToBeDefaultMap\(\W\)/SetStandardProcessedMap\1/g"\
-	-e "s/^DefProcessedMapToBeDefaultMap$/SetStandardProcessedMap/g"\
-	-e "s/\(\W\)IntegerMap\(\W\)/\1RangeMap\2/g"\
-	-e "s/\(\W\)IntegerMap$/\1RangeMap/g"\
-	-e "s/^IntegerMap\(\W\)/RangeMap\1/g"\
-	-e "s/^IntegerMap$/RangeMap/g"\
-	-e "s/\(\W\)integerMap\(\W\)/\1rangeMap\2/g"\
-	-e "s/\(\W\)integerMap$/\1rangeMap/g"\
-	-e "s/^integerMap\(\W\)/rangeMap\1/g"\
-	-e "s/^integerMap$/rangeMap/g"\
-	-e "s/\(\W\)copyGraph\(\W\)/\1graphCopy\2/g"\
-	-e "s/\(\W\)copyGraph$/\1graphCopy/g"\
-	-e "s/^copyGraph\(\W\)/graphCopy\1/g"\
-	-e "s/^copyGraph$/graphCopy/g"\
-	-e "s/\(\W\)copyDigraph\(\W\)/\1digraphCopy\2/g"\
-	-e "s/\(\W\)copyDigraph$/\1digraphCopy/g"\
-	-e "s/^copyDigraph\(\W\)/digraphCopy\1/g"\
-	-e "s/^copyDigraph$/digraphCopy/g"\
-	-e "s/\(\W\)\([sS]\)tdMap\(\W\)/\1\2parseMap\3/g"\
-	-e "s/\(\W\)\([sS]\)tdMap$/\1\2parseMap/g"\
-	-e "s/^\([sS]\)tdMap\(\W\)/\1parseMap\2/g"\
-	-e "s/^\([sS]\)tdMap$/\1parseMap/g"\
-	-e "s/\(\W\)\([Ff]\)unctorMap\(\W\)/\1\2unctorToMap\3/g"\
-	-e "s/\(\W\)\([Ff]\)unctorMap$/\1\2unctorToMap/g"\
-	-e "s/^\([Ff]\)unctorMap\(\W\)/\1unctorToMap\2/g"\
-	-e "s/^\([Ff]\)unctorMap$/\1unctorToMap/g"\
-	-e "s/\(\W\)\([Mm]\)apFunctor\(\W\)/\1\2apToFunctor\3/g"\
-	-e "s/\(\W\)\([Mm]\)apFunctor$/\1\2apToFunctor/g"\
-	-e "s/^\([Mm]\)apFunctor\(\W\)/\1apToFunctor\2/g"\
-	-e "s/^\([Mm]\)apFunctor$/\1apToFunctor/g"\
-	-e "s/\(\W\)\([Ff]\)orkWriteMap\(\W\)/\1\2orkMap\3/g"\
-	-e "s/\(\W\)\([Ff]\)orkWriteMap$/\1\2orkMap/g"\
-	-e "s/^\([Ff]\)orkWriteMap\(\W\)/\1orkMap\2/g"\
-	-e "s/^\([Ff]\)orkWriteMap$/\1orkMap/g"\
-	-e "s/\(\W\)StoreBoolMap\(\W\)/\1LoggerBoolMap\2/g"\
-	-e "s/\(\W\)StoreBoolMap$/\1LoggerBoolMap/g"\
-	-e "s/^StoreBoolMap\(\W\)/LoggerBoolMap\1/g"\
-	-e "s/^StoreBoolMap$/LoggerBoolMap/g"\
-	-e "s/\(\W\)storeBoolMap\(\W\)/\1loggerBoolMap\2/g"\
-	-e "s/\(\W\)storeBoolMap$/\1loggerBoolMap/g"\
-	-e "s/^storeBoolMap\(\W\)/loggerBoolMap\1/g"\
-	-e "s/^storeBoolMap$/loggerBoolMap/g"\
-	-e "s/\(\W\)BoundingBox\(\W\)/\1Box\2/g"\
-	-e "s/\(\W\)BoundingBox$/\1Box/g"\
-	-e "s/^BoundingBox\(\W\)/Box\1/g"\
-	-e "s/^BoundingBox$/Box/g"\
-<$1 > $TMP
-
-mv $TMP $1
