[Lemon-commits] Alpar Juttner: Merge bugfix #330

Lemon HG hg at lemon.cs.elte.hu
Thu Dec 10 17:25:44 CET 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/1b89e29c9fc7
changeset: 869:1b89e29c9fc7
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Thu Dec 10 17:18:25 2009 +0100
description:
	Merge bugfix #330

diffstat:

 CMakeLists.txt                    |     2 +
 Makefile.am                       |     2 +
 configure.ac                      |    17 +
 doc/CMakeLists.txt                |     3 +-
 doc/Doxyfile.in                   |     8 +-
 doc/Makefile.am                   |    14 +-
 doc/groups.dox                    |   233 ++-
 doc/mainpage.dox                  |    24 +-
 doc/min_cost_flow.dox             |     6 +-
 doc/references.bib                |   301 ++++
 lemon/Makefile.am                 |    11 +-
 lemon/adaptors.h                  |    24 +
 lemon/bellman_ford.h              |  1101 ++++++++++++++++
 lemon/bfs.h                       |   143 +-
 lemon/bin_heap.h                  |   220 +-
 lemon/binom_heap.h                |   445 ++++++
 lemon/bits/edge_set_extender.h    |     4 +-
 lemon/bits/graph_extender.h       |    16 +-
 lemon/bucket_heap.h               |   305 ++--
 lemon/cbc.cc                      |    12 +
 lemon/cbc.h                       |     1 +
 lemon/circulation.h               |    29 +-
 lemon/clp.cc                      |    13 +
 lemon/clp.h                       |     1 +
 lemon/concepts/digraph.h          |   343 ++--
 lemon/concepts/graph.h            |   668 +++++----
 lemon/concepts/graph_components.h |     4 +-
 lemon/concepts/heap.h             |   130 +-
 lemon/concepts/path.h             |    85 +-
 lemon/counter.h                   |     2 +-
 lemon/cplex.cc                    |    33 +
 lemon/cplex.h                     |     1 +
 lemon/dfs.h                       |   137 +-
 lemon/dijkstra.h                  |   128 +-
 lemon/dim2.h                      |    11 +-
 lemon/edge_set.h                  |    34 +-
 lemon/fib_heap.h                  |   243 +-
 lemon/fourary_heap.h              |   342 +++++
 lemon/full_graph.h                |   126 +-
 lemon/glpk.cc                     |    36 +
 lemon/glpk.h                      |     1 +
 lemon/gomory_hu.h                 |    14 +-
 lemon/graph_to_eps.h              |     8 +-
 lemon/grid_graph.h                |    74 +-
 lemon/hartmann_orlin.h            |   642 +++++++++
 lemon/howard.h                    |   597 ++++++++
 lemon/hypercube_graph.h           |    39 +-
 lemon/karp.h                      |   582 ++++++++
 lemon/kary_heap.h                 |   352 +++++
 lemon/lgf_reader.h                |     4 +-
 lemon/list_graph.h                |   489 ++++---
 lemon/lp_base.h                   |    26 +-
 lemon/lp_skeleton.cc              |     5 +
 lemon/lp_skeleton.h               |     2 +
 lemon/maps.h                      |  1462 ++++++++++++++++++++-
 lemon/min_cost_arborescence.h     |     4 +-
 lemon/network_simplex.h           |   186 +-
 lemon/pairing_heap.h              |   474 +++++++
 lemon/planarity.h                 |  2737 ++++++++++++++++++++++++++++++++++++++++
 lemon/preflow.h                   |    36 +-
 lemon/radix_heap.h                |   363 ++--
 lemon/smart_graph.h               |   344 ++--
 lemon/soplex.cc                   |    13 +
 lemon/soplex.h                    |     1 +
 lemon/static_graph.h              |   476 +++++++
 lemon/time_measure.h              |     2 +-
 lemon/unionfind.h                 |     4 +-
 m4/lx_check_coin.m4               |     2 +-
 scripts/Makefile.am               |     7 +
 scripts/bib2dox.py                |   811 ++++++++++++
 scripts/bootstrap.sh              |   142 ++
 scripts/chg-len.py                |    14 +
 scripts/mk-release.sh             |    14 +
 scripts/unify-sources.sh          |    14 +
 scripts/valgrind-wrapper.sh       |    22 +
 test/CMakeLists.txt               |     3 +
 test/Makefile.am                  |    10 +
 test/adaptors_test.cc             |    85 +-
 test/bellman_ford_test.cc         |   285 ++++
 test/circulation_test.cc          |     5 +
 test/digraph_test.cc              |   131 +
 test/graph_test.cc                |    28 +
 test/heap_test.cc                 |    74 +-
 test/maps_test.cc                 |   650 +++++++++-
 test/min_mean_cycle_test.cc       |   216 +++
 test/mip_test.cc                  |     3 +-
 test/planarity_test.cc            |   262 +++
 test/preflow_test.cc              |     5 +
 test/test_tools.h                 |    14 +-
 tools/lemon-0.x-to-1.x.sh         |     9 +-
 90 files changed, 14719 insertions(+), 2282 deletions(-)

diffs (truncated from 22187 to 300 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,8 @@
 CHECK_TYPE_SIZE("long long" LONG_LONG)
 SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
 
+INCLUDE(FindPythonInterp)
+
 ENABLE_TESTING()
 
 ADD_SUBDIRECTORY(lemon)
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,6 +17,7 @@
 	cmake/FindCPLEX.cmake \
 	cmake/FindGLPK.cmake \
 	cmake/FindCOIN.cmake \
+	cmake/LEMONConfig.cmake.in \
 	cmake/version.cmake.in \
 	cmake/version.cmake \
 	cmake/nsis/lemon.ico \
@@ -43,6 +44,7 @@
 include test/Makefile.am
 include doc/Makefile.am
 include tools/Makefile.am
+include scripts/Makefile.am
 
 DIST_SUBDIRS = demo
 
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,7 @@
 AC_PROG_LIBTOOL
 
 AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
+AC_CHECK_PROG([python_found],[python],[yes],[no])
 AC_CHECK_PROG([gs_found],[gs],[yes],[no])
 
 dnl Detect Intel compiler.
@@ -82,6 +83,21 @@
 fi
 AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
 
+dnl Support for running test cases using valgrind.
+use_valgrind=no
+AC_ARG_ENABLE([valgrind],
+AS_HELP_STRING([--enable-valgrind], [use valgrind when running tests]),
+              [use_valgrind=yes])
+
+if [[ "$use_valgrind" = "yes" ]]; then
+  AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
+
+  if [[ "$HAVE_VALGRIND" = "no" ]]; then
+    AC_MSG_ERROR([Valgrind not found in PATH.])
+  fi
+fi
+AM_CONDITIONAL(USE_VALGRIND, [test "$use_valgrind" = "yes"])
+
 dnl Checks for header files.
 AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
 
@@ -127,6 +143,7 @@
 echo CBC support................... : $lx_cbc_found
 echo
 echo Build additional tools........ : $enable_tools
+echo Use valgrind for tests........ : $use_valgrind
 echo
 echo The packace will be installed in
 echo -n '  '
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -9,7 +9,7 @@
   @ONLY
 )
 
-IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
+IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
   FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
   SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
   ADD_CUSTOM_TARGET(html
@@ -28,6 +28,7 @@
     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
     COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
     COMMAND ${CMAKE_COMMAND} -E remove_directory html
+    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
     COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   )
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -1,4 +1,4 @@
-# Doxyfile 1.5.7.1
+# Doxyfile 1.5.9
 
 #---------------------------------------------------------------------------
 # Project related configuration options
@@ -21,7 +21,6 @@
 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
@@ -91,7 +90,8 @@
                          "@abs_top_srcdir@/lemon/concepts" \
                          "@abs_top_srcdir@/demo" \
                          "@abs_top_srcdir@/tools" \
-                         "@abs_top_srcdir@/test/test_tools.h"
+                         "@abs_top_srcdir@/test/test_tools.h" \
+                         "@abs_top_builddir@/doc/references.dox"
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = *.h \
                          *.cc \
@@ -223,7 +223,7 @@
 EXPAND_AS_DEFINED      = 
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
-# Configuration::additions related to external references   
+# Options related to the search engine   
 #---------------------------------------------------------------------------
 TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
 GENERATE_TAGFILE       = html/lemon.tag
diff --git a/doc/Makefile.am b/doc/Makefile.am
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -66,7 +66,19 @@
 	  exit 1; \
 	fi
 
-html-local: $(DOC_PNG_IMAGES)
+references.dox: doc/references.bib
+	if test ${python_found} = yes; then \
+	  cd doc; \
+	  python @abs_top_srcdir@/scripts/bib2dox.py @abs_top_builddir@/$< >$@; \
+	  cd ..; \
+	else \
+	  echo; \
+	  echo "Python not found."; \
+	  echo; \
+	  exit 1; \
+	fi
+
+html-local: $(DOC_PNG_IMAGES) references.dox
 	if test ${doxygen_found} = yes; then \
 	  cd doc; \
 	  doxygen Doxyfile; \
diff --git a/doc/groups.dox b/doc/groups.dox
--- a/doc/groups.dox
+++ b/doc/groups.dox
@@ -226,14 +226,6 @@
 */
 
 /**
- at defgroup matrices Matrices
- at ingroup datas
-\brief Two dimensional data storages implemented in LEMON.
-
-This group contains two dimensional data storages implemented in LEMON.
-*/
-
-/**
 @defgroup paths Path Structures
 @ingroup datas
 \brief %Path structures implemented in LEMON.
@@ -246,7 +238,36 @@
 efficient to have e.g. the Dijkstra algorithm to store its result in
 any kind of path structure.
 
-\sa lemon::concepts::Path
+\sa \ref concepts::Path "Path concept"
+*/
+
+/**
+ at defgroup heaps Heap Structures
+ at ingroup datas
+\brief %Heap structures implemented in LEMON.
+
+This group contains the heap structures implemented in LEMON.
+
+LEMON provides several heap classes. They are efficient implementations
+of the abstract data type \e priority \e queue. They store items with
+specified values called \e priorities in such a way that finding and
+removing the item with minimum priority are efficient.
+The basic operations are adding and erasing items, changing the priority
+of an item, etc.
+
+Heaps are crucial in several algorithms, such as Dijkstra and Prim.
+The heap implementations have the same interface, thus any of them can be
+used easily in such algorithms.
+
+\sa \ref concepts::Heap "Heap concept"
+*/
+
+/**
+ at defgroup matrices Matrices
+ at ingroup datas
+\brief Two dimensional data storages implemented in LEMON.
+
+This group contains two dimensional data storages implemented in LEMON.
 */
 
 /**
@@ -259,6 +280,28 @@
 */
 
 /**
+ at defgroup geomdat Geometric Data Structures
+ at ingroup auxdat
+\brief Geometric data structures implemented in LEMON.
+
+This group contains geometric data structures implemented in LEMON.
+
+ - \ref lemon::dim2::Point "dim2::Point" implements a two dimensional
+   vector with the usual operations.
+ - \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.
+*/
+
+/**
+ at defgroup matrices Matrices
+ at ingroup auxdat
+\brief Two dimensional data storages implemented in LEMON.
+
+This group contains two dimensional data storages implemented in LEMON.
+*/
+
+/**
 @defgroup algs Algorithms
 \brief This group contains the several algorithms
 implemented in LEMON.
@@ -273,7 +316,8 @@
 \brief Common graph search algorithms.
 
 This group contains the common graph search algorithms, namely
-\e breadth-first \e search (BFS) and \e depth-first \e search (DFS).
+\e breadth-first \e search (BFS) and \e depth-first \e search (DFS)
+\ref clrs01algorithms.
 */
 
 /**
@@ -281,7 +325,8 @@
 @ingroup algs
 \brief Algorithms for finding shortest paths.
 
-This group contains the algorithms for finding shortest paths in digraphs.
+This group contains the algorithms for finding shortest paths in digraphs
+\ref clrs01algorithms.
 
  - \ref Dijkstra algorithm for finding shortest paths from a source node
    when all arc lengths are non-negative.
@@ -298,12 +343,21 @@
 */
 
 /**
+ at defgroup spantree Minimum Spanning Tree Algorithms
+ at ingroup algs
+\brief Algorithms for finding minimum cost spanning trees and arborescences.
+
+This group contains the algorithms for finding minimum cost spanning
+trees and arborescences \ref clrs01algorithms.
+*/
+
+/**
 @defgroup max_flow Maximum Flow Algorithms
 @ingroup algs
 \brief Algorithms for finding maximum flows.
 
 This group contains the algorithms for finding maximum flows and
-feasible circulations.
+feasible circulations \ref clrs01algorithms, \ref amo93networkflows.
 
 The \e maximum \e flow \e problem is to find a flow of maximum value between
 a single source and a single target. Formally, there is a \f$G=(V,A)\f$
@@ -318,12 +372,16 @@
 \f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f]
 
 LEMON contains several algorithms for solving maximum flow problems:
-- \ref EdmondsKarp Edmonds-Karp algorithm.
-- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm.
-- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees.
-- \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees.
+- \ref EdmondsKarp Edmonds-Karp algorithm
+  \ref edmondskarp72theoretical.
+- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm
+  \ref goldberg88newapproach.
+- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees
+  \ref dinic70algorithm, \ref sleator83dynamic.
+- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees
+  \ref goldberg88newapproach, \ref sleator83dynamic.
 
-In most cases the \ref Preflow "Preflow" algorithm provides the
+In most cases the \ref Preflow algorithm provides the
 fastest method for computing a maximum flow. All implementations



More information about the Lemon-commits mailing list