[Lemon-commits] Alpar Juttner: Merge #293
Lemon HG
hg at lemon.cs.elte.hu
Thu Nov 5 15:54:36 CET 2009
details: http://lemon.cs.elte.hu/hg/lemon/rev/ef88c0a30f85
changeset: 844:ef88c0a30f85
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Thu Nov 05 15:48:01 2009 +0100
description:
Merge #293
diffstat:
.hgignore | 5 +-
CMakeLists.txt | 133 +-
INSTALL | 39 +-
LICENSE | 11 +-
Makefile.am | 19 +-
NEWS | 94 +
README | 6 +-
cmake/FindCOIN.cmake | 88 +
cmake/FindCPLEX.cmake | 38 +
cmake/FindGLPK.cmake | 61 +
cmake/FindGhostscript.cmake | 2 +-
cmake/LEMONConfig.cmake.in | 13 +
cmake/nsis/lemon.ico |
cmake/version.cmake.in | 1 +
configure.ac | 45 +-
demo/CMakeLists.txt | 14 +-
demo/Makefile.am | 25 +-
demo/graph_to_eps_demo.cc | 2 +-
doc/CMakeLists.txt | 79 +-
doc/Doxyfile.in | 8 +-
doc/Makefile.am | 47 +-
doc/groups.dox | 360 +++--
doc/images/bipartite_matching.eps | 586 +++++++++
doc/images/bipartite_partitions.eps | 114 +
doc/images/connected_components.eps | 159 ++
doc/images/edge_biconnected_components.eps | 159 ++
doc/images/node_biconnected_components.eps | 159 ++
doc/images/strongly_connected_components.eps | 180 ++
doc/mainpage.dox | 40 +-
doc/min_cost_flow.dox | 153 ++
doc/references.bib | 301 ++++
lemon/CMakeLists.txt | 60 +-
lemon/Makefile.am | 43 +-
lemon/adaptors.h | 1469 +++++++++++-----------
lemon/base.cc | 2 +-
lemon/bellman_ford.h | 1101 +++++++++++++++++
lemon/bfs.h | 213 +-
lemon/bin_heap.h | 327 ++--
lemon/binom_heap.h | 445 ++++++
lemon/bits/array_map.h | 14 +-
lemon/bits/base_extender.h | 494 -------
lemon/bits/default_map.h | 14 +-
lemon/bits/edge_set_extender.h | 191 +-
lemon/bits/graph_adaptor_extender.h | 8 +-
lemon/bits/graph_extender.h | 37 +-
lemon/bits/map_extender.h | 55 +-
lemon/bits/path_dump.h | 7 +-
lemon/bits/solver_bits.h | 2 +
lemon/bits/traits.h | 166 +-
lemon/bits/vector_map.h | 16 +-
lemon/bits/windows.cc | 132 ++
lemon/bits/windows.h | 34 +
lemon/bucket_heap.h | 594 +++++++++
lemon/cbc.cc | 475 +++++++
lemon/cbc.h | 130 ++
lemon/circulation.h | 364 +++--
lemon/clp.cc | 41 +-
lemon/clp.h | 31 +-
lemon/concepts/digraph.h | 354 ++--
lemon/concepts/graph.h | 718 +++++-----
lemon/concepts/graph_components.h | 1087 ++++++++--------
lemon/concepts/heap.h | 144 +-
lemon/concepts/maps.h | 9 +-
lemon/concepts/path.h | 21 +-
lemon/config.h.cmake | 8 +
lemon/config.h.in | 21 +-
lemon/connectivity.h | 624 +++++----
lemon/core.h | 238 ++-
lemon/cplex.cc | 89 +-
lemon/cplex.h | 39 +-
lemon/dfs.h | 207 +-
lemon/dijkstra.h | 237 +-
lemon/dim2.h | 11 +-
lemon/dimacs.h | 179 ++-
lemon/edge_set.h | 454 +++---
lemon/elevator.h | 193 +-
lemon/euler.h | 287 ++++
lemon/fib_heap.h | 475 +++++++
lemon/fourary_heap.h | 342 +++++
lemon/full_graph.h | 136 +-
lemon/glpk.cc | 207 ++-
lemon/glpk.h | 100 +-
lemon/gomory_hu.h | 570 ++++++++
lemon/graph_to_eps.h | 93 +-
lemon/grid_graph.h | 78 +-
lemon/hao_orlin.h | 350 ++--
lemon/hartmann_orlin.h | 640 ++++++++++
lemon/howard.h | 597 +++++++++
lemon/hypercube_graph.h | 43 +-
lemon/karp.h | 582 +++++++++
lemon/kary_heap.h | 352 +++++
lemon/kruskal.h | 20 +-
lemon/lemon.pc.in | 4 +-
lemon/lgf_reader.h | 302 ++-
lemon/lgf_writer.h | 292 ++-
lemon/list_graph.h | 503 ++++---
lemon/lp.h | 16 +-
lemon/lp_base.cc | 6 +-
lemon/lp_base.h | 178 +-
lemon/lp_skeleton.cc | 15 +-
lemon/lp_skeleton.h | 72 +-
lemon/maps.h | 1895 +++++++++++++++++++++++------
lemon/max_matching.h | 638 ++++++---
lemon/math.h | 9 +
lemon/min_cost_arborescence.h | 807 ++++++++++++
lemon/network_simplex.h | 1485 +++++++++++++++++++++++
lemon/pairing_heap.h | 474 +++++++
lemon/path.h | 86 +-
lemon/preflow.h | 165 +-
lemon/radix_heap.h | 438 ++++++
lemon/radix_sort.h | 16 +-
lemon/random.h | 46 +-
lemon/smart_graph.h | 358 ++--
lemon/soplex.cc | 48 +-
lemon/soplex.h | 13 +-
lemon/static_graph.h | 474 +++++++
lemon/suurballe.h | 230 ++-
lemon/time_measure.h | 33 +-
lemon/tolerance.h | 228 +---
lemon/unionfind.h | 42 +-
m4/lx_check_clp.m4 | 73 -
m4/lx_check_coin.m4 | 136 ++
m4/lx_check_cplex.m4 | 6 +-
m4/lx_check_glpk.m4 | 6 +-
m4/lx_check_soplex.m4 | 8 +-
scripts/bib2dox.py | 811 ++++++++++++
scripts/bootstrap.sh | 134 ++
scripts/chg-len.py | 14 +
scripts/mk-release.sh | 49 +
scripts/unify-sources.sh | 34 +-
test/CMakeLists.txt | 101 +-
test/Makefile.am | 20 +-
test/bellman_ford_test.cc | 285 ++++
test/bfs_test.cc | 59 +-
test/circulation_test.cc | 44 +-
test/connectivity_test.cc | 297 ++++
test/counter_test.cc | 103 +-
test/dfs_test.cc | 53 +-
test/digraph_test.cc | 131 ++
test/dijkstra_test.cc | 92 +-
test/edge_set_test.cc | 8 +-
test/euler_test.cc | 223 +++
test/gomory_hu_test.cc | 123 +
test/graph_test.cc | 28 +
test/graph_utils_test.cc | 12 +-
test/hao_orlin_test.cc | 134 +-
test/heap_test.cc | 109 +-
test/kruskal_test.cc | 20 +-
test/lp_test.cc | 50 +-
test/maps_test.cc | 459 +++++++-
test/max_matching_test.cc | 136 +-
test/min_cost_arborescence_test.cc | 206 +++
test/min_cost_flow_test.cc | 450 +++++++
test/min_mean_cycle_test.cc | 216 +++
test/mip_test.cc | 63 +-
test/preflow_test.cc | 41 +-
test/suurballe_test.cc | 157 +-
test/test_tools.h | 14 +-
test/time_measure_test.cc | 10 +-
tools/CMakeLists.txt | 31 +
tools/Makefile.am | 9 +-
tools/dimacs-to-lgf.cc | 274 +++-
tools/dimacs-to-lgf.cc | 13 +-
tools/lemon-0.x-to-1.x.sh | 33 +-
tools/lgf-gen.cc | 834 +++++++++++++
165 files changed, 26617 insertions(+), 7276 deletions(-)
diffs (truncated from 48513 to 300 lines):
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -22,6 +22,7 @@
lemon/libemon.la
lemon/stamp-h2
doc/Doxyfile
+cmake/version.cmake
.dirstamp
.libs/*
.deps/*
@@ -39,11 +40,11 @@
^doc/.*\.tag
^autom4te.cache/.*
^build-aux/.*
-^objs.*/.*
+^.*objs.*/.*
^test/[a-z_]*$
^tools/[a-z-_]*$
^demo/.*_demo$
-^build/.*
+^.*build.*/.*
^doc/gen-images/.*
CMakeFiles
DartTestfile.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,34 +1,75 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(PROJECT_NAME "LEMON")
-SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.")
-
PROJECT(${PROJECT_NAME})
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
+ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
+ELSEIF(DEFINED ENV{LEMON_VERSION})
+ SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
+ELSE()
+ EXECUTE_PROCESS(
+ COMMAND hg id -i
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE HG_REVISION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ IF(HG_REVISION STREQUAL "")
+ SET(HG_REVISION "hg-tip")
+ ENDIF()
+ SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
+ENDIF()
-INCLUDE(FindDoxygen)
-INCLUDE(FindGhostscript)
+SET(PROJECT_VERSION ${LEMON_VERSION})
+
+SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+
+FIND_PACKAGE(Doxygen)
+FIND_PACKAGE(Ghostscript)
+FIND_PACKAGE(GLPK 4.33)
+FIND_PACKAGE(CPLEX)
+FIND_PACKAGE(COIN)
+
+INCLUDE(CheckTypeSize)
+CHECK_TYPE_SIZE("long long" LONG_LONG)
+SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
+
+INCLUDE(FindPythonInterp)
ENABLE_TESTING()
ADD_SUBDIRECTORY(lemon)
-ADD_SUBDIRECTORY(demo)
-ADD_SUBDIRECTORY(doc)
-ADD_SUBDIRECTORY(test)
+IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
+ ADD_SUBDIRECTORY(demo)
+ ADD_SUBDIRECTORY(tools)
+ ADD_SUBDIRECTORY(doc)
+ ADD_SUBDIRECTORY(test)
+ENDIF()
-IF(WIN32)
- INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico
- DESTINATION bin)
-ENDIF(WIN32)
+CONFIGURE_FILE(
+ ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
+ ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
+ @ONLY
+)
+IF(UNIX)
+ INSTALL(
+ FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
+ DESTINATION share/lemon/cmake
+ )
+ELSEIF(WIN32)
+ INSTALL(
+ FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
+ DESTINATION cmake
+ )
+ENDIF()
-IF(WIN32)
+IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR} AND WIN32)
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
- SET(CPACK_PACKAGE_VENDOR
- "EGRES - Egervary Research Group on Combinatorial Optimization")
+ 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")
+ "LEMON - Library for Efficient Modeling and Optimization in Networks")
+ SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
@@ -37,48 +78,50 @@
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
"${PROJECT_NAME} ${PROJECT_VERSION}")
- # Variables to generate a component-based installer.
- #SET(CPACK_COMPONENTS_ALL headers library html_documentation)
+ SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
- #SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
- #SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library")
- #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
+ SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
+ SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
+ SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
- #SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
- # "C++ header files for use with the LEMON library")
- #SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
- # "Static library used to build programs with LEMON")
- #SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
- # "Doxygen generated documentation")
+ SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "C++ header files")
+ SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
+ "DLL and import library")
+ SET(CPACK_COMPONENT_BIN_DESCRIPTION
+ "Command line utilities")
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
+ "Doxygen generated documentation")
- #SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
+ 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_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_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_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_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_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
+ SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
+ #SET(CPACK_PACKAGE_ICON "${PROJECT_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 at lemon.cs.elte.hu")
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
- CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\"
+ CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
")
SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
@@ -86,4 +129,4 @@
")
INCLUDE(CPack)
-ENDIF(WIN32)
+ENDIF()
diff --git a/INSTALL b/INSTALL
--- a/INSTALL
+++ b/INSTALL
@@ -5,6 +5,12 @@
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:
@@ -21,8 +27,8 @@
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.
+ file. It also compiles the programs in the tools subdirectory by
+ default.
4. `make check'
@@ -69,14 +75,6 @@
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).
@@ -152,3 +150,26 @@
--without-soplex
Disable SoPlex support.
+
+--with-coin[=PREFIX]
+
+ Enable support for COIN-OR solvers (CLP and CBC). You should
+ specify the prefix too. (by default, COIN-OR tools install
+ themselves to the source code directory). This command enables the
+ solvers that are actually found.
+
+--with-coin-includedir=DIR
+
+ The directory where the COIN-OR header files are located. This is
+ only useful when the COIN-OR headers and libraries are not under
+ the same prefix (which is unlikely).
+
+--with-coin-libdir=DIR
+
+ The directory where the COIN-OR libraries are located. This is only
+ useful when the COIN-OR headers and libraries are not under the
+ same prefix (which is unlikely).
+
+--without-coin
+
+ Disable COIN-OR support.
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,10 +1,14 @@
-LEMON code without an explicit copyright is covered by the following
+LEMON code without an explicit copyright notice is covered by the following
copyright/license.
Copyright (C) 2003-2009 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,
@@ -26,8 +30,3 @@
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.
-
-===========================================================================
-This license is a verbatim copy of the Boost Software License, Version 1.0.
More information about the Lemon-commits
mailing list