lemongraph 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +8 -0
  3. data/LICENSE +674 -0
  4. data/README.md +6 -0
  5. data/ext/lemon-1.3.1/AUTHORS +26 -0
  6. data/ext/lemon-1.3.1/CMakeLists.txt +371 -0
  7. data/ext/lemon-1.3.1/INSTALL +167 -0
  8. data/ext/lemon-1.3.1/LICENSE +32 -0
  9. data/ext/lemon-1.3.1/NEWS +337 -0
  10. data/ext/lemon-1.3.1/README +50 -0
  11. data/ext/lemon-1.3.1/cmake/FindCOIN.cmake +110 -0
  12. data/ext/lemon-1.3.1/cmake/FindGLPK.cmake +55 -0
  13. data/ext/lemon-1.3.1/cmake/FindGhostscript.cmake +10 -0
  14. data/ext/lemon-1.3.1/cmake/FindILOG.cmake +102 -0
  15. data/ext/lemon-1.3.1/cmake/FindSOPLEX.cmake +23 -0
  16. data/ext/lemon-1.3.1/cmake/LEMONConfig.cmake.in +13 -0
  17. data/ext/lemon-1.3.1/cmake/nsis/lemon.ico +0 -0
  18. data/ext/lemon-1.3.1/cmake/nsis/uninstall.ico +0 -0
  19. data/ext/lemon-1.3.1/cmake/version.cmake +1 -0
  20. data/ext/lemon-1.3.1/cmake/version.cmake.in +1 -0
  21. data/ext/lemon-1.3.1/contrib/CMakeLists.txt +19 -0
  22. data/ext/lemon-1.3.1/lemon/CMakeLists.txt +91 -0
  23. data/ext/lemon-1.3.1/lemon/adaptors.h +3638 -0
  24. data/ext/lemon-1.3.1/lemon/arg_parser.cc +474 -0
  25. data/ext/lemon-1.3.1/lemon/arg_parser.h +440 -0
  26. data/ext/lemon-1.3.1/lemon/assert.h +214 -0
  27. data/ext/lemon-1.3.1/lemon/base.cc +37 -0
  28. data/ext/lemon-1.3.1/lemon/bellman_ford.h +1116 -0
  29. data/ext/lemon-1.3.1/lemon/bfs.h +1754 -0
  30. data/ext/lemon-1.3.1/lemon/bin_heap.h +347 -0
  31. data/ext/lemon-1.3.1/lemon/binomial_heap.h +445 -0
  32. data/ext/lemon-1.3.1/lemon/bits/alteration_notifier.h +472 -0
  33. data/ext/lemon-1.3.1/lemon/bits/array_map.h +351 -0
  34. data/ext/lemon-1.3.1/lemon/bits/bezier.h +174 -0
  35. data/ext/lemon-1.3.1/lemon/bits/default_map.h +182 -0
  36. data/ext/lemon-1.3.1/lemon/bits/edge_set_extender.h +627 -0
  37. data/ext/lemon-1.3.1/lemon/bits/enable_if.h +131 -0
  38. data/ext/lemon-1.3.1/lemon/bits/graph_adaptor_extender.h +401 -0
  39. data/ext/lemon-1.3.1/lemon/bits/graph_extender.h +1332 -0
  40. data/ext/lemon-1.3.1/lemon/bits/lock.h +65 -0
  41. data/ext/lemon-1.3.1/lemon/bits/map_extender.h +332 -0
  42. data/ext/lemon-1.3.1/lemon/bits/path_dump.h +177 -0
  43. data/ext/lemon-1.3.1/lemon/bits/solver_bits.h +194 -0
  44. data/ext/lemon-1.3.1/lemon/bits/traits.h +388 -0
  45. data/ext/lemon-1.3.1/lemon/bits/variant.h +494 -0
  46. data/ext/lemon-1.3.1/lemon/bits/vector_map.h +244 -0
  47. data/ext/lemon-1.3.1/lemon/bits/windows.cc +166 -0
  48. data/ext/lemon-1.3.1/lemon/bits/windows.h +44 -0
  49. data/ext/lemon-1.3.1/lemon/bucket_heap.h +594 -0
  50. data/ext/lemon-1.3.1/lemon/capacity_scaling.h +1014 -0
  51. data/ext/lemon-1.3.1/lemon/cbc.cc +460 -0
  52. data/ext/lemon-1.3.1/lemon/cbc.h +129 -0
  53. data/ext/lemon-1.3.1/lemon/christofides_tsp.h +254 -0
  54. data/ext/lemon-1.3.1/lemon/circulation.h +807 -0
  55. data/ext/lemon-1.3.1/lemon/clp.cc +464 -0
  56. data/ext/lemon-1.3.1/lemon/clp.h +164 -0
  57. data/ext/lemon-1.3.1/lemon/color.cc +44 -0
  58. data/ext/lemon-1.3.1/lemon/color.h +204 -0
  59. data/ext/lemon-1.3.1/lemon/concept_check.h +77 -0
  60. data/ext/lemon-1.3.1/lemon/concepts/bpgraph.h +1029 -0
  61. data/ext/lemon-1.3.1/lemon/concepts/digraph.h +491 -0
  62. data/ext/lemon-1.3.1/lemon/concepts/graph.h +788 -0
  63. data/ext/lemon-1.3.1/lemon/concepts/graph_components.h +2134 -0
  64. data/ext/lemon-1.3.1/lemon/concepts/heap.h +324 -0
  65. data/ext/lemon-1.3.1/lemon/concepts/maps.h +223 -0
  66. data/ext/lemon-1.3.1/lemon/concepts/path.h +312 -0
  67. data/ext/lemon-1.3.1/lemon/config.h.in +22 -0
  68. data/ext/lemon-1.3.1/lemon/connectivity.h +1688 -0
  69. data/ext/lemon-1.3.1/lemon/core.h +2506 -0
  70. data/ext/lemon-1.3.1/lemon/cost_scaling.h +1607 -0
  71. data/ext/lemon-1.3.1/lemon/counter.h +249 -0
  72. data/ext/lemon-1.3.1/lemon/cplex.cc +994 -0
  73. data/ext/lemon-1.3.1/lemon/cplex.h +292 -0
  74. data/ext/lemon-1.3.1/lemon/cycle_canceling.h +1230 -0
  75. data/ext/lemon-1.3.1/lemon/dfs.h +1637 -0
  76. data/ext/lemon-1.3.1/lemon/dheap.h +352 -0
  77. data/ext/lemon-1.3.1/lemon/dijkstra.h +1303 -0
  78. data/ext/lemon-1.3.1/lemon/dim2.h +726 -0
  79. data/ext/lemon-1.3.1/lemon/dimacs.h +448 -0
  80. data/ext/lemon-1.3.1/lemon/edge_set.h +1420 -0
  81. data/ext/lemon-1.3.1/lemon/edmonds_karp.h +556 -0
  82. data/ext/lemon-1.3.1/lemon/elevator.h +982 -0
  83. data/ext/lemon-1.3.1/lemon/error.h +276 -0
  84. data/ext/lemon-1.3.1/lemon/euler.h +287 -0
  85. data/ext/lemon-1.3.1/lemon/fib_heap.h +475 -0
  86. data/ext/lemon-1.3.1/lemon/fractional_matching.h +2139 -0
  87. data/ext/lemon-1.3.1/lemon/full_graph.h +1082 -0
  88. data/ext/lemon-1.3.1/lemon/glpk.cc +1012 -0
  89. data/ext/lemon-1.3.1/lemon/glpk.h +263 -0
  90. data/ext/lemon-1.3.1/lemon/gomory_hu.h +568 -0
  91. data/ext/lemon-1.3.1/lemon/graph_to_eps.h +1186 -0
  92. data/ext/lemon-1.3.1/lemon/greedy_tsp.h +251 -0
  93. data/ext/lemon-1.3.1/lemon/grid_graph.h +699 -0
  94. data/ext/lemon-1.3.1/lemon/grosso_locatelli_pullan_mc.h +840 -0
  95. data/ext/lemon-1.3.1/lemon/hao_orlin.h +1015 -0
  96. data/ext/lemon-1.3.1/lemon/hartmann_orlin_mmc.h +654 -0
  97. data/ext/lemon-1.3.1/lemon/howard_mmc.h +651 -0
  98. data/ext/lemon-1.3.1/lemon/hypercube_graph.h +459 -0
  99. data/ext/lemon-1.3.1/lemon/insertion_tsp.h +533 -0
  100. data/ext/lemon-1.3.1/lemon/karp_mmc.h +590 -0
  101. data/ext/lemon-1.3.1/lemon/kruskal.h +324 -0
  102. data/ext/lemon-1.3.1/lemon/lemon.pc.in +10 -0
  103. data/ext/lemon-1.3.1/lemon/lgf_reader.h +3854 -0
  104. data/ext/lemon-1.3.1/lemon/lgf_writer.h +2687 -0
  105. data/ext/lemon-1.3.1/lemon/list_graph.h +2510 -0
  106. data/ext/lemon-1.3.1/lemon/lp.h +95 -0
  107. data/ext/lemon-1.3.1/lemon/lp_base.cc +30 -0
  108. data/ext/lemon-1.3.1/lemon/lp_base.h +2147 -0
  109. data/ext/lemon-1.3.1/lemon/lp_skeleton.cc +143 -0
  110. data/ext/lemon-1.3.1/lemon/lp_skeleton.h +234 -0
  111. data/ext/lemon-1.3.1/lemon/maps.h +4057 -0
  112. data/ext/lemon-1.3.1/lemon/matching.h +3505 -0
  113. data/ext/lemon-1.3.1/lemon/math.h +77 -0
  114. data/ext/lemon-1.3.1/lemon/max_cardinality_search.h +794 -0
  115. data/ext/lemon-1.3.1/lemon/min_cost_arborescence.h +808 -0
  116. data/ext/lemon-1.3.1/lemon/nagamochi_ibaraki.h +702 -0
  117. data/ext/lemon-1.3.1/lemon/nauty_reader.h +113 -0
  118. data/ext/lemon-1.3.1/lemon/nearest_neighbor_tsp.h +238 -0
  119. data/ext/lemon-1.3.1/lemon/network_simplex.h +1659 -0
  120. data/ext/lemon-1.3.1/lemon/opt2_tsp.h +367 -0
  121. data/ext/lemon-1.3.1/lemon/pairing_heap.h +474 -0
  122. data/ext/lemon-1.3.1/lemon/path.h +1164 -0
  123. data/ext/lemon-1.3.1/lemon/planarity.h +2754 -0
  124. data/ext/lemon-1.3.1/lemon/preflow.h +985 -0
  125. data/ext/lemon-1.3.1/lemon/quad_heap.h +343 -0
  126. data/ext/lemon-1.3.1/lemon/radix_heap.h +438 -0
  127. data/ext/lemon-1.3.1/lemon/radix_sort.h +487 -0
  128. data/ext/lemon-1.3.1/lemon/random.cc +29 -0
  129. data/ext/lemon-1.3.1/lemon/random.h +1005 -0
  130. data/ext/lemon-1.3.1/lemon/smart_graph.h +1344 -0
  131. data/ext/lemon-1.3.1/lemon/soplex.cc +465 -0
  132. data/ext/lemon-1.3.1/lemon/soplex.h +158 -0
  133. data/ext/lemon-1.3.1/lemon/static_graph.h +476 -0
  134. data/ext/lemon-1.3.1/lemon/suurballe.h +776 -0
  135. data/ext/lemon-1.3.1/lemon/time_measure.h +610 -0
  136. data/ext/lemon-1.3.1/lemon/tolerance.h +242 -0
  137. data/ext/lemon-1.3.1/lemon/unionfind.h +1824 -0
  138. data/ext/lemon-1.3.1/scripts/unify-sources.sh +390 -0
  139. data/ext/lemon-1.3.1/scripts/valgrind-wrapper.sh +22 -0
  140. data/ext/lemongraph/arc_map.cc +1007 -0
  141. data/ext/lemongraph/digraph.cc +282 -0
  142. data/ext/lemongraph/digraph_arc.cc +153 -0
  143. data/ext/lemongraph/digraph_node.cc +277 -0
  144. data/ext/lemongraph/edge_map.cc +770 -0
  145. data/ext/lemongraph/extconf.rb +53 -0
  146. data/ext/lemongraph/graph.cc +351 -0
  147. data/ext/lemongraph/graph_arc.cc +95 -0
  148. data/ext/lemongraph/graph_edge.cc +153 -0
  149. data/ext/lemongraph/graph_item.cc +76 -0
  150. data/ext/lemongraph/graph_node.cc +321 -0
  151. data/ext/lemongraph/lemongraph.cc +260 -0
  152. data/ext/lemongraph/lemongraph.hh +295 -0
  153. data/ext/lemongraph/lemongraph.map +6 -0
  154. data/ext/lemongraph/lemongraph_export.hh +31 -0
  155. data/ext/lemongraph/node_map.cc +1011 -0
  156. data/lemongraph.gemspec +176 -0
  157. data/lib/lemongraph/graphviz.rb +240 -0
  158. data/lib/lemongraph/version.rb +4 -0
  159. data/lib/lemongraph.rb +21 -0
  160. data/samples/lemondeps.rb +38 -0
  161. metadata +202 -0
@@ -0,0 +1,26 @@
1
+ The main developers of release series 1.x are
2
+
3
+ * Balazs Dezso <deba@inf.elte.hu>
4
+ * Alpar Juttner <alpar@cs.elte.hu>
5
+ * Peter Kovacs <kpeter@inf.elte.hu>
6
+ * Akos Ladanyi <ladanyi@tmit.bme.hu>
7
+
8
+ For more complete list of contributors, please visit the history of
9
+ the LEMON source code repository: http://lemon.cs.elte.hu/hg/lemon
10
+
11
+ Moreover, this version is heavily based on version 0.x of LEMON. Here
12
+ is the list of people who contributed to those versions.
13
+
14
+ * Mihaly Barasz <klao@cs.elte.hu>
15
+ * Johanna Becker <beckerjc@cs.elte.hu>
16
+ * Attila Bernath <athos@cs.elte.hu>
17
+ * Balazs Dezso <deba@inf.elte.hu>
18
+ * Peter Hegyi <hegyi@tmit.bme.hu>
19
+ * Alpar Juttner <alpar@cs.elte.hu>
20
+ * Peter Kovacs <kpeter@inf.elte.hu>
21
+ * Akos Ladanyi <ladanyi@tmit.bme.hu>
22
+ * Marton Makai <marci@cs.elte.hu>
23
+ * Jacint Szabo <jacint@cs.elte.hu>
24
+
25
+ Again, please visit the history of the old LEMON repository for more
26
+ details: http://lemon.cs.elte.hu/hg/lemon-0.x
@@ -0,0 +1,371 @@
1
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2
+
3
+ CMAKE_POLICY(SET CMP0048 OLD)
4
+
5
+ SET(PROJECT_NAME "LEMON")
6
+ PROJECT(${PROJECT_NAME})
7
+
8
+ INCLUDE(FindPythonInterp)
9
+ INCLUDE(FindWget)
10
+
11
+ IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
12
+ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
13
+ ELSEIF(DEFINED ENV{LEMON_VERSION})
14
+ SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
15
+ ELSE()
16
+ EXECUTE_PROCESS(
17
+ COMMAND
18
+ hg log -r. --template "{latesttag}"
19
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
20
+ OUTPUT_VARIABLE HG_REVISION_TAG
21
+ ERROR_QUIET
22
+ OUTPUT_STRIP_TRAILING_WHITESPACE
23
+ )
24
+ EXECUTE_PROCESS(
25
+ COMMAND
26
+ hg log -r. --template "{latesttagdistance}"
27
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
28
+ OUTPUT_VARIABLE HG_REVISION_DIST
29
+ ERROR_QUIET
30
+ OUTPUT_STRIP_TRAILING_WHITESPACE
31
+ )
32
+ EXECUTE_PROCESS(
33
+ COMMAND
34
+ hg log -r. --template "{node|short}"
35
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
36
+ OUTPUT_VARIABLE HG_REVISION_ID
37
+ ERROR_QUIET
38
+ OUTPUT_STRIP_TRAILING_WHITESPACE
39
+ )
40
+
41
+ IF(HG_REVISION_TAG STREQUAL "")
42
+ SET(HG_REVISION_ID "hg-tip")
43
+ ELSE()
44
+ IF(HG_REVISION_TAG STREQUAL "null")
45
+ SET(HG_REVISION_TAG "trunk")
46
+ ELSEIF(HG_REVISION_TAG MATCHES "^r")
47
+ STRING(SUBSTRING ${HG_REVISION_TAG} 1 -1 HG_REVISION_TAG)
48
+ ENDIF()
49
+ IF(HG_REVISION_DIST STREQUAL "0")
50
+ SET(HG_REVISION ${HG_REVISION_TAG})
51
+ ELSE()
52
+ SET(HG_REVISION
53
+ "${HG_REVISION_TAG}+${HG_REVISION_DIST}-${HG_REVISION_ID}")
54
+ ENDIF()
55
+ ENDIF()
56
+
57
+ SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
58
+ ENDIF()
59
+
60
+ SET(PROJECT_VERSION ${LEMON_VERSION})
61
+
62
+ SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
63
+
64
+ FIND_PACKAGE(Doxygen)
65
+ FIND_PACKAGE(Ghostscript)
66
+
67
+ SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
68
+ SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
69
+ SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
70
+ SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.")
71
+
72
+ IF(LEMON_ENABLE_GLPK)
73
+ FIND_PACKAGE(GLPK 4.33)
74
+ ENDIF(LEMON_ENABLE_GLPK)
75
+ IF(LEMON_ENABLE_ILOG)
76
+ FIND_PACKAGE(ILOG)
77
+ ENDIF(LEMON_ENABLE_ILOG)
78
+ IF(LEMON_ENABLE_COIN)
79
+ FIND_PACKAGE(COIN)
80
+ ENDIF(LEMON_ENABLE_COIN)
81
+ IF(LEMON_ENABLE_SOPLEX)
82
+ FIND_PACKAGE(SOPLEX)
83
+ ENDIF(LEMON_ENABLE_SOPLEX)
84
+
85
+ IF(GLPK_FOUND)
86
+ SET(LEMON_HAVE_LP TRUE)
87
+ SET(LEMON_HAVE_MIP TRUE)
88
+ SET(LEMON_HAVE_GLPK TRUE)
89
+ ENDIF(GLPK_FOUND)
90
+ IF(ILOG_FOUND)
91
+ SET(LEMON_HAVE_LP TRUE)
92
+ SET(LEMON_HAVE_MIP TRUE)
93
+ SET(LEMON_HAVE_CPLEX TRUE)
94
+ ENDIF(ILOG_FOUND)
95
+ IF(COIN_FOUND)
96
+ SET(LEMON_HAVE_LP TRUE)
97
+ SET(LEMON_HAVE_MIP TRUE)
98
+ SET(LEMON_HAVE_CLP TRUE)
99
+ SET(LEMON_HAVE_CBC TRUE)
100
+ ENDIF(COIN_FOUND)
101
+ IF(SOPLEX_FOUND)
102
+ SET(LEMON_HAVE_LP TRUE)
103
+ SET(LEMON_HAVE_SOPLEX TRUE)
104
+ ENDIF(SOPLEX_FOUND)
105
+
106
+ IF(ILOG_FOUND)
107
+ SET(DEFAULT_LP "CPLEX")
108
+ SET(DEFAULT_MIP "CPLEX")
109
+ ELSEIF(COIN_FOUND)
110
+ SET(DEFAULT_LP "CLP")
111
+ SET(DEFAULT_MIP "CBC")
112
+ ELSEIF(GLPK_FOUND)
113
+ SET(DEFAULT_LP "GLPK")
114
+ SET(DEFAULT_MIP "GLPK")
115
+ ELSEIF(SOPLEX_FOUND)
116
+ SET(DEFAULT_LP "SOPLEX")
117
+ ENDIF()
118
+
119
+ IF(NOT LEMON_DEFAULT_LP OR
120
+ (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
121
+ (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
122
+ (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR
123
+ (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX")))
124
+ SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
125
+ "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
126
+ ELSE()
127
+ SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
128
+ "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)")
129
+ ENDIF()
130
+ IF(NOT LEMON_DEFAULT_MIP OR
131
+ (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
132
+ (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
133
+ (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
134
+ SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
135
+ "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
136
+ ELSE()
137
+ SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
138
+ "Default MIP solver backend (GLPK, CPLEX or CBC)")
139
+ ENDIF()
140
+
141
+
142
+ IF(DEFINED ENV{LEMON_CXX_WARNING})
143
+ SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
144
+ ELSE()
145
+ IF(CMAKE_COMPILER_IS_GNUCXX)
146
+ SET(CXX_WARNING "-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 -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas")
147
+ SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb")
148
+ SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
149
+ ELSEIF(MSVC)
150
+ # This part is unnecessary 'casue the same is set by the lemon/core.h.
151
+ # Still keep it as an example.
152
+ SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
153
+ # Suppressed warnings:
154
+ # C4250: 'class1' : inherits 'class2::member' via dominance
155
+ # C4355: 'this' : used in base member initializer list
156
+ # C4503: 'function' : decorated name length exceeded, name was truncated
157
+ # C4800: 'type' : forcing value to bool 'true' or 'false'
158
+ # (performance warning)
159
+ # C4996: 'function': was declared deprecated
160
+ ELSE()
161
+ SET(CXX_WARNING "-Wall")
162
+ ENDIF()
163
+ ENDIF()
164
+ SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
165
+
166
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
167
+
168
+ IF(MSVC)
169
+ SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
170
+ "Flags used by the C++ compiler during maintainer builds."
171
+ )
172
+ SET( CMAKE_C_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
173
+ "Flags used by the C compiler during maintainer builds."
174
+ )
175
+ SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
176
+ "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
177
+ "Flags used for linking binaries during maintainer builds."
178
+ )
179
+ SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
180
+ "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
181
+ "Flags used by the shared libraries linker during maintainer builds."
182
+ )
183
+ ELSE()
184
+ SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
185
+ "Flags used by the C++ compiler during maintainer builds."
186
+ )
187
+ SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
188
+ "Flags used by the C compiler during maintainer builds."
189
+ )
190
+ SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
191
+ "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
192
+ "Flags used for linking binaries during maintainer builds."
193
+ )
194
+ SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
195
+ "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
196
+ "Flags used by the shared libraries linker during maintainer builds."
197
+ )
198
+ ENDIF()
199
+
200
+ MARK_AS_ADVANCED(
201
+ CMAKE_CXX_FLAGS_MAINTAINER
202
+ CMAKE_C_FLAGS_MAINTAINER
203
+ CMAKE_EXE_LINKER_FLAGS_MAINTAINER
204
+ CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
205
+
206
+ IF(CMAKE_CONFIGURATION_TYPES)
207
+ LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
208
+ LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
209
+ SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
210
+ "Add the configurations that we need"
211
+ FORCE)
212
+ endif()
213
+
214
+ IF(NOT CMAKE_BUILD_TYPE)
215
+ SET(CMAKE_BUILD_TYPE "Release")
216
+ ENDIF()
217
+
218
+ SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
219
+ "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Maintainer."
220
+ FORCE )
221
+
222
+
223
+ INCLUDE(CheckTypeSize)
224
+ CHECK_TYPE_SIZE("long long" LONG_LONG)
225
+ SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
226
+
227
+ INCLUDE(FindThreads)
228
+
229
+ IF(NOT LEMON_THREADING)
230
+ IF(CMAKE_USE_PTHREADS_INIT)
231
+ SET(LEMON_THREADING "Pthread")
232
+ ELSEIF(CMAKE_USE_WIN32_THREADS_INIT)
233
+ SET(LEMON_THREADING "Win32")
234
+ ELSE()
235
+ SET(LEMON_THREADING "None")
236
+ ENDIF()
237
+ ENDIF()
238
+
239
+ SET( LEMON_THREADING "${LEMON_THREADING}" CACHE STRING
240
+ "Choose the threading library, options are: Pthread Win32 None."
241
+ FORCE )
242
+
243
+ IF(LEMON_THREADING STREQUAL "Pthread")
244
+ SET(LEMON_USE_PTHREAD TRUE)
245
+ ELSEIF(LEMON_THREADING STREQUAL "Win32")
246
+ SET(LEMON_USE_WIN32_THREADS TRUE)
247
+ ENDIF()
248
+
249
+ ENABLE_TESTING()
250
+
251
+ IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
252
+ ADD_CUSTOM_TARGET(check ALL COMMAND ${CMAKE_CTEST_COMMAND})
253
+ ELSE()
254
+ ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
255
+ ENDIF()
256
+
257
+ ADD_SUBDIRECTORY(lemon)
258
+ IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
259
+ ADD_SUBDIRECTORY(contrib)
260
+ ENDIF()
261
+
262
+ CONFIGURE_FILE(
263
+ ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
264
+ ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
265
+ @ONLY
266
+ )
267
+ IF(UNIX)
268
+ INSTALL(
269
+ FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
270
+ DESTINATION share/lemon/cmake
271
+ )
272
+ ELSEIF(WIN32)
273
+ INSTALL(
274
+ FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
275
+ DESTINATION cmake
276
+ )
277
+ ENDIF()
278
+
279
+ CONFIGURE_FILE(
280
+ ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in
281
+ ${PROJECT_BINARY_DIR}/cmake/version.cmake
282
+ @ONLY
283
+ )
284
+
285
+ SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME})
286
+ STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME)
287
+ SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION})
288
+ ADD_CUSTOM_TARGET(dist
289
+ COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
290
+ COMMAND hg archive ${ARCHIVE_NAME}
291
+ COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake
292
+ COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME}
293
+ COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME}
294
+ COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html
295
+ COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME}
296
+ COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME}
297
+ COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
298
+ COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
299
+ COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
300
+ COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
301
+ COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
302
+ DEPENDS html
303
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
304
+
305
+ # CPACK config (Basically for NSIS)
306
+ IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
307
+ SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
308
+ SET(CPACK_PACKAGE_VENDOR "EGRES")
309
+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
310
+ "LEMON - Library for Efficient Modeling and Optimization in Networks")
311
+ SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
312
+
313
+ SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
314
+
315
+ SET(CPACK_PACKAGE_INSTALL_DIRECTORY
316
+ "${PROJECT_NAME} ${PROJECT_VERSION}")
317
+ SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
318
+ "${PROJECT_NAME} ${PROJECT_VERSION}")
319
+
320
+ SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
321
+
322
+ SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
323
+ SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
324
+ SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
325
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
326
+
327
+ SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
328
+ "C++ header files")
329
+ SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
330
+ "DLL and import library")
331
+ SET(CPACK_COMPONENT_BIN_DESCRIPTION
332
+ "Command line utilities")
333
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
334
+ "Doxygen generated documentation")
335
+
336
+ SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
337
+
338
+ SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
339
+ SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
340
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
341
+
342
+ SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
343
+ "Components needed to develop software using LEMON")
344
+ SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
345
+ "Documentation of LEMON")
346
+
347
+ SET(CPACK_ALL_INSTALL_TYPES Full Developer)
348
+
349
+ SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
350
+ SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
351
+ SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
352
+
353
+ SET(CPACK_GENERATOR "NSIS")
354
+ SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
355
+ SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
356
+ #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
357
+ SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
358
+ SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
359
+ SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
360
+ SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
361
+ SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
362
+ SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
363
+ CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
364
+ ")
365
+ SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
366
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
367
+ Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
368
+ ")
369
+
370
+ INCLUDE(CPack)
371
+ ENDIF()
@@ -0,0 +1,167 @@
1
+ Installation Instructions
2
+ =========================
3
+
4
+ This file contains instructions for building and installing LEMON from
5
+ source on Linux. The process on Windows is similar.
6
+
7
+ Note that it is not necessary to install LEMON in order to use
8
+ it. Instead, you can easily integrate it with your own code
9
+ directly. For instructions, see
10
+ https://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile
11
+
12
+
13
+ In order to install LEMON from the extracted source tarball you have to
14
+ issue the following commands:
15
+
16
+ 1. Step into the root of the source directory.
17
+
18
+ $ cd lemon-x.y.z
19
+
20
+ 2. Create a build subdirectory and step into it.
21
+
22
+ $ mkdir build
23
+ $ cd build
24
+
25
+ 3. Perform system checks and create the makefiles.
26
+
27
+ $ cmake ..
28
+
29
+ 4. Build LEMON.
30
+
31
+ $ make
32
+
33
+ This command compiles the non-template part of LEMON into
34
+ libemon.a file. It also compiles the programs in the 'tools' and
35
+ 'demo' subdirectories.
36
+
37
+ 5. [Optional] Compile and run the self-tests.
38
+
39
+ $ make check
40
+
41
+ 5. [Optional] Generate the user documentation.
42
+
43
+ $ make html
44
+
45
+ The release tarballs already include the documentation.
46
+
47
+ Note that for this step you need to have the following tools
48
+ installed: Python, Doxygen, Graphviz, Ghostscript, LaTeX.
49
+
50
+ 6. [Optional] Install LEMON
51
+
52
+ $ make install
53
+
54
+ This command installs LEMON under /usr/local (you will need root
55
+ privileges to be able to do that). If you want to install it to
56
+ some other location, then pass the
57
+ -DCMAKE_INSTALL_PREFIX=DIRECTORY flag to cmake in Step 3.
58
+ For example:
59
+
60
+ $ cmake -DCMAKE_INSTALL_PREFIX=/home/username/lemon'
61
+
62
+ Configure Options and Variables
63
+ ===============================
64
+
65
+ In Step 3, you can customize the build process by passing options to CMAKE.
66
+
67
+ $ cmake [OPTIONS] ..
68
+
69
+ You find a list of the most useful options below.
70
+
71
+ -DCMAKE_INSTALL_PREFIX=PREFIX
72
+
73
+ Set the installation prefix to PREFIX. By default it is /usr/local.
74
+
75
+ -DCMAKE_BUILD_TYPE=[Release|Debug|Maintainer|...]
76
+
77
+ This sets the compiler options. The choices are the following
78
+
79
+ 'Release': A strong optimization is turned on (-O3 with gcc). This
80
+ is the default setting and we strongly recommend using this for
81
+ the final compilation.
82
+
83
+ 'Debug': Optimization is turned off and debug info is added (-O0
84
+ -ggdb with gcc). If is recommended during the development.
85
+
86
+ 'Maintainer': The same as 'Debug' but the compiler warnings are
87
+ converted to errors (-Werror with gcc). In addition, 'make' will
88
+ also automatically compile and execute the test codes. It is the
89
+ best way of ensuring that LEMON codebase is clean and safe.
90
+
91
+ 'RelWithDebInfo': Optimized build with debug info.
92
+
93
+ 'MinSizeRel': Size optimized build (-Os with gcc)
94
+
95
+ -DTEST_WITH_VALGRIND=YES
96
+
97
+ Using this, the test codes will be executed using valgrind. It is a
98
+ very effective way of identifying indexing problems and memory leaks.
99
+
100
+ -DCMAKE_CXX_COMPILER=path-to-compiler
101
+
102
+ Change the compiler to be used.
103
+
104
+ -DBUILD_SHARED_LIBS=TRUE
105
+
106
+ Build shared library instead of static one. Think twice if you
107
+ really want to use this option.
108
+
109
+ -DLEMON_DOC_SOURCE_BROWSER=YES
110
+
111
+ Include the browsable cross referenced LEMON source code into the
112
+ doc. It makes the doc quite bloated, but may be useful for
113
+ developing LEMON itself.
114
+
115
+ -DLEMON_DOC_USE_MATHJAX=YES
116
+
117
+ Use MathJax (http://mathjax.org) for rendering the math formulae in
118
+ the doc. It of much higher quality compared to the default LaTeX
119
+ generated static images and it allows copy&paste of the formulae to
120
+ LaTeX, Open Office, MS Word etc. documents.
121
+
122
+ On the other hand, it needs either Internet access or a locally
123
+ installed version of MathJax to properly render the doc.
124
+
125
+ -DLEMON_DOC_MATHJAX_RELPATH=DIRECTORY
126
+
127
+ The location of the MathJax library. It defaults to
128
+ http://www.mathjax.org/mathjax, which necessitates Internet access
129
+ for proper rendering. The easiest way to make it usable offline is
130
+ to set this parameter to 'mathjax' and copy all files of the MathJax
131
+ library into the 'doc/html/mathjax' subdirectory of the build
132
+ location.
133
+
134
+ See http://docs.mathjax.org/en/latest/installation.html for more details.
135
+
136
+
137
+ -DLEMON_ENABLE_GLPK=NO
138
+ -DLEMON_ENABLE_COIN=NO
139
+ -DLEMON_ENABLE_ILOG=NO
140
+
141
+ Enable optional third party libraries. They are all enabled by default.
142
+
143
+ -DLEMON_DEFAULT_LP=GLPK
144
+
145
+ Sets the default LP solver backend. The supported values are
146
+ CPLEX, CLP and GLPK. By default, it is set to the first one which
147
+ is enabled and succesfully discovered.
148
+
149
+ -DLEMON_DEFAULT_MIP=GLPK
150
+
151
+ Sets the default MIP solver backend. The supported values are
152
+ CPLEX, CBC and GLPK. By default, it is set to the first one which
153
+ is enabled and succesfully discovered.
154
+
155
+ -DGLPK_ROOT_DIR=DIRECTORY
156
+ -DCOIN_ROOT_DIR=DIRECTORY
157
+ -DILOG_ROOT_DIR=DIRECTORY
158
+
159
+ Root directory prefixes of optional third party libraries.
160
+
161
+ Makefile Variables
162
+ ==================
163
+
164
+ make VERBOSE=1
165
+
166
+ This results in a more verbose output by showing the full
167
+ compiler and linker commands.
@@ -0,0 +1,32 @@
1
+ LEMON code without an explicit copyright notice is covered by the following
2
+ copyright/license.
3
+
4
+ Copyright (C) 2003-2012 Egervary Jeno Kombinatorikus Optimalizalasi
5
+ Kutatocsoport (Egervary Combinatorial Optimization Research Group,
6
+ EGRES).
7
+
8
+ ===========================================================================
9
+ Boost Software License, Version 1.0
10
+ ===========================================================================
11
+
12
+ Permission is hereby granted, free of charge, to any person or organization
13
+ obtaining a copy of the software and accompanying documentation covered by
14
+ this license (the "Software") to use, reproduce, display, distribute,
15
+ execute, and transmit the Software, and to prepare derivative works of the
16
+ Software, and to permit third-parties to whom the Software is furnished to
17
+ do so, all subject to the following:
18
+
19
+ The copyright notices in the Software and this entire statement, including
20
+ the above license grant, this restriction and the following disclaimer,
21
+ must be included in all copies of the Software, in whole or in part, and
22
+ all derivative works of the Software, unless such copies or derivative
23
+ works are solely in the form of machine-executable object code generated by
24
+ a source language processor.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
29
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
30
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
31
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
32
+ DEALINGS IN THE SOFTWARE.