[Lemon-commits] Alpar Juttner: Merge

Lemon HG hg at lemon.cs.elte.hu
Thu Nov 5 10:35:05 CET 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/ceb2756dea2a
changeset: 842:ceb2756dea2a
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Thu Nov 05 10:27:17 2009 +0100
description:
	Merge

diffstat:

 CMakeLists.txt                    |    2 +
 Makefile.am                       |    1 +
 configure.ac                      |    1 +
 doc/CMakeLists.txt                |    3 +-
 doc/Doxyfile.in                   |    8 +-
 doc/Makefile.am                   |   14 +-
 doc/groups.dox                    |   96 +++-
 doc/mainpage.dox                  |   24 +-
 doc/min_cost_flow.dox             |    2 +-
 doc/references.bib                |  301 +++++++++++++++
 lemon/Makefile.am                 |    4 +
 lemon/bits/graph_extender.h       |   10 +-
 lemon/cbc.cc                      |   12 +
 lemon/cbc.h                       |    1 +
 lemon/clp.cc                      |   13 +
 lemon/clp.h                       |    1 +
 lemon/concepts/digraph.h          |  335 ++++++++--------
 lemon/concepts/graph.h            |  656 ++++++++++++++++---------------
 lemon/concepts/graph_components.h |    2 +-
 lemon/cplex.cc                    |   33 +
 lemon/cplex.h                     |    1 +
 lemon/edge_set.h                  |    6 +-
 lemon/full_graph.h                |  118 +++--
 lemon/glpk.cc                     |   36 +
 lemon/glpk.h                      |    1 +
 lemon/grid_graph.h                |   72 +-
 lemon/hartmann_orlin.h            |  640 ++++++++++++++++++++++++++++++++
 lemon/howard.h                    |  597 +++++++++++++++++++++++++++++
 lemon/hypercube_graph.h           |   37 +-
 lemon/karp.h                      |  582 +++++++++++++++++++++++++++++
 lemon/list_graph.h                |  479 ++++++++++++-----------
 lemon/lp_base.h                   |   22 +-
 lemon/lp_skeleton.cc              |    5 +
 lemon/lp_skeleton.h               |    2 +
 lemon/network_simplex.h           |    4 +-
 lemon/path.h                      |   10 +-
 lemon/preflow.h                   |    3 +-
 lemon/smart_graph.h               |  340 ++++++++--------
 lemon/soplex.cc                   |   13 +
 lemon/soplex.h                    |    1 +
 lemon/static_graph.h              |  474 +++++++++++++++++++++++
 m4/lx_check_coin.m4               |    2 +-
 scripts/bib2dox.py                |  811 ++++++++++++++++++++++++++++++++++++++++
 scripts/bootstrap.sh              |  134 ++++++
 scripts/chg-len.py                |   14 +
 scripts/mk-release.sh             |   14 +
 scripts/unify-sources.sh          |   14 +
 test/CMakeLists.txt               |    1 +
 test/Makefile.am                  |    2 +
 test/digraph_test.cc              |  131 ++++++
 test/graph_test.cc                |   28 +
 test/min_mean_cycle_test.cc       |  216 ++++++++++
 test/mip_test.cc                  |    3 +-
 test/test_tools.h                 |   14 +-
 54 files changed, 5302 insertions(+), 1044 deletions(-)

diffs (truncated from 8412 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 \
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.
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
@@ -316,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.
 */
 
 /**
@@ -324,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.
@@ -346,7 +348,7 @@
 \brief Algorithms for finding minimum cost spanning trees and arborescences.
 
 This group contains the algorithms for finding minimum cost spanning
-trees and arborescences.
+trees and arborescences \ref clrs01algorithms.
 */
 
 /**
@@ -355,7 +357,7 @@
 \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$
@@ -370,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.
@@ -393,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.
@@ -443,6 +453,43 @@
 */
 
 /**
+ at defgroup min_mean_cycle Minimum Mean Cycle Algorithms
+ at ingroup algs
+\brief Algorithms for finding minimum mean cycles.
+
+This group contains the algorithms for finding minimum mean cycles
+\ref clrs01algorithms, \ref amo93networkflows.
+
+The \e minimum \e mean \e cycle \e problem is to find a directed cycle
+of minimum mean length (cost) in a digraph.
+The mean length of a cycle is the average length of its arcs, i.e. the
+ratio between the total length of the cycle and the number of arcs on it.
+
+This problem has an important connection to \e conservative \e length
+\e functions, too. A length function on the arcs of a digraph is called
+conservative if and only if there is no directed cycle of negative total
+length. For an arbitrary length function, the negative of the minimum
+cycle mean is the smallest \f$\epsilon\f$ value so that increasing the
+arc lengths uniformly by \f$\epsilon\f$ results in a conservative length
+function.
+
+LEMON contains three algorithms for solving the minimum mean cycle problem:
+- \ref Karp "Karp"'s original algorithm \ref amo93networkflows,
+  \ref dasdan98minmeancycle.
+- \ref HartmannOrlin "Hartmann-Orlin"'s algorithm, which is an improved
+  version of Karp's algorithm \ref dasdan98minmeancycle.
+- \ref Howard "Howard"'s policy iteration algorithm
+  \ref dasdan98minmeancycle.
+
+In practice, the Howard algorithm proved to be by far the most efficient
+one, though the best known theoretical bound on its running time is
+exponential.
+Both Karp and HartmannOrlin algorithms run in time O(ne) and use space
+O(n<sup>2</sup>+e), but the latter one is typically faster due to the
+applied early termination scheme.
+*/
+
+/**
 @defgroup matching Matching Algorithms
 @ingroup algs
 \brief Algorithms for finding matchings in graphs and bipartite graphs.
@@ -534,13 +581,16 @@
 */
 
 /**
- at defgroup lp_group Lp and Mip Solvers
+ at defgroup lp_group LP and MIP Solvers
 @ingroup gen_opt_group
-\brief Lp and Mip solver interfaces for LEMON.
+\brief LP and MIP solver interfaces for LEMON.
 
-This group contains Lp and Mip solver interfaces for LEMON. The
-various LP solvers could be used in the same manner with this
-interface.
+This group contains LP and MIP solver interfaces for LEMON.
+Various LP solvers could be used in the same manner with this
+high-level interface.
+
+The currently supported solvers are \ref glpk, \ref clp, \ref cbc,
+\ref cplex, \ref soplex.
 */
 
 /**
@@ -679,8 +729,8 @@
 @ingroup concept
 \brief Skeleton and concept checking classes for graph structures
 
-This group contains the skeletons and concept checking classes of LEMON's
-graph structures and helper classes used to implement these.
+This group contains the skeletons and concept checking classes of
+graph structures.
 */
 
 /**
diff --git a/doc/mainpage.dox b/doc/mainpage.dox
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -21,14 +21,11 @@
 
 \section intro Introduction
 
-\subsection whatis What is LEMON
-
-LEMON stands for <b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling
-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</b> stands for <i><b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling



More information about the Lemon-commits mailing list