[Lemon-commits] Alpar Juttner: Merge #62

Lemon HG hg at lemon.cs.elte.hu
Wed Dec 9 11:30:51 CET 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/6be1f9bd2ac0
changeset: 863:6be1f9bd2ac0
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Wed Dec 09 11:14:06 2009 +0100
description:
	Merge #62

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                    |  194 ++++++---
 doc/mainpage.dox                  |   24 +-
 doc/min_cost_flow.dox             |    6 +-
 doc/references.bib                |  301 +++++++++++++++
 lemon/Makefile.am                 |    4 +
 lemon/adaptors.h                  |   24 +
 lemon/bellman_ford.h              |    9 +-
 lemon/bfs.h                       |  143 +++---
 lemon/bits/graph_extender.h       |   10 +-
 lemon/bits/map_extender.h         |    4 +
 lemon/cbc.cc                      |   12 +
 lemon/cbc.h                       |    1 +
 lemon/circulation.h               |   17 +-
 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/maps.h             |    3 +-
 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/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/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                      |  537 ++++++++++++++++++++++----
 lemon/min_cost_arborescence.h     |    4 +-
 lemon/network_simplex.h           |  186 ++++----
 lemon/path.h                      |  104 ++--
 lemon/preflow.h                   |   22 +-
 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                 |    2 +-
 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               |    1 +
 test/Makefile.am                  |    6 +
 test/adaptors_test.cc             |   85 +--
 test/bellman_ford_test.cc         |    4 +-
 test/digraph_test.cc              |  131 ++++++
 test/graph_test.cc                |   28 +
 test/maps_test.cc                 |  432 +++++++++++++++++++++-
 test/min_mean_cycle_test.cc       |  216 ++++++++++
 test/mip_test.cc                  |    3 +-
 test/test_tools.h                 |   14 +-
 77 files changed, 6848 insertions(+), 1692 deletions(-)

diffs (truncated from 12717 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
@@ -280,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.
@@ -294,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.
 */
 
 /**
@@ -302,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.
@@ -319,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$
@@ -339,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
 also provide functions to query the minimum cut, which is the dual
 problem of maximum flow.
@@ -362,18 +399,22 @@
 \brief Algorithms for finding minimum cost flows and circulations.
 
 This group contains the algorithms for finding minimum cost flows and
-circulations. For more information about this problem and its dual
-solution see \ref min_cost_flow "Minimum Cost Flow Problem".
+circulations \ref amo93networkflows. For more information about this
+problem and its dual solution, see \ref min_cost_flow
+"Minimum Cost Flow Problem".
 
 LEMON contains several algorithms for this problem.
  - \ref NetworkSimplex Primal Network Simplex algorithm with various
-   pivot strategies.
+   pivot strategies \ref dantzig63linearprog, \ref kellyoneill91netsimplex.
  - \ref CostScaling Push-Relabel and Augment-Relabel algorithms based on
-   cost scaling.
+   cost scaling \ref goldberg90approximation, \ref goldberg97efficient,
+   \ref bunnagel98efficient.
  - \ref CapacityScaling Successive Shortest %Path algorithm with optional
-   capacity scaling.
- - \ref CancelAndTighten The Cancel and Tighten algorithm.
- - \ref CycleCanceling Cycle-Canceling algorithms.
+   capacity scaling \ref edmondskarp72theoretical.
+ - \ref CancelAndTighten The Cancel and Tighten algorithm
+   \ref goldberg89cyclecanceling.
+ - \ref CycleCanceling Cycle-Canceling algorithms
+   \ref klein67primal, \ref goldberg89cyclecanceling.
 
 In general NetworkSimplex is the most efficient implementation,
 but in special cases other algorithms could be faster.
@@ -396,7 +437,7 @@
 cut is the \f$X\f$ solution of the next optimization problem:
 
 \f[ \min_{X \subset V, X\not\in \{\emptyset, V\}}
-    \sum_{uv\in A, u\in X, v\not\in X}cap(uv) \f]
+    \sum_{uv\in A: u\in X, v\not\in X}cap(uv) \f]
 
 LEMON contains several algorithms related to minimum cut problems:
 
@@ -412,27 +453,40 @@
 */
 
 /**
- at defgroup graph_properties Connectivity and Other Graph Properties
+ at defgroup min_mean_cycle Minimum Mean Cycle Algorithms
 @ingroup algs
-\brief Algorithms for discovering the graph properties
+\brief Algorithms for finding minimum mean cycles.
 
-This group contains the algorithms for discovering the graph properties
-like connectivity, bipartiteness, euler property, simplicity etc.



More information about the Lemon-commits mailing list