1.1 --- a/CMakeLists.txt Tue Apr 08 15:57:42 2014 +0200
1.2 +++ b/CMakeLists.txt Mon Jul 07 11:57:45 2014 +0200
1.3 @@ -1,5 +1,7 @@
1.4 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
1.5
1.6 +CMAKE_POLICY(SET CMP0048 OLD)
1.7 +
1.8 SET(PROJECT_NAME "LEMON")
1.9 PROJECT(${PROJECT_NAME})
1.10
1.11 @@ -186,11 +188,11 @@
1.12 "Flags used by the C compiler during maintainer builds."
1.13 )
1.14 SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
1.15 - "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
1.16 + "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
1.17 "Flags used for linking binaries during maintainer builds."
1.18 )
1.19 SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
1.20 - "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
1.21 + "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
1.22 "Flags used by the shared libraries linker during maintainer builds."
1.23 )
1.24 ENDIF()
2.1 --- a/lemon/CMakeLists.txt Tue Apr 08 15:57:42 2014 +0200
2.2 +++ b/lemon/CMakeLists.txt Mon Jul 07 11:57:45 2014 +0200
2.3 @@ -55,8 +55,13 @@
2.4 ENDIF()
2.5
2.6 ADD_LIBRARY(lemon ${LEMON_SOURCES})
2.7 +
2.8 +TARGET_LINK_LIBRARIES(lemon
2.9 + ${GLPK_LIBRARIES} ${COIN_LIBRARIES} ${ILOG_LIBRARIES} ${SOPLEX_LIBRARIES}
2.10 + )
2.11 +
2.12 IF(UNIX)
2.13 - SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
2.14 + SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon VERSION ${LEMON_VERSION} SOVERSION ${LEMON_VERSION})
2.15 ENDIF()
2.16
2.17 INSTALL(
3.1 --- a/lemon/dim2.h Tue Apr 08 15:57:42 2014 +0200
3.2 +++ b/lemon/dim2.h Mon Jul 07 11:57:45 2014 +0200
3.3 @@ -20,6 +20,7 @@
3.4 #define LEMON_DIM2_H
3.5
3.6 #include <iostream>
3.7 +#include <algorithm>
3.8
3.9 ///\ingroup geomdat
3.10 ///\file
4.1 --- a/lemon/math.h Tue Apr 08 15:57:42 2014 +0200
4.2 +++ b/lemon/math.h Mon Jul 07 11:57:45 2014 +0200
4.3 @@ -67,7 +67,7 @@
4.4
4.5 ///Round a value to its closest integer
4.6 inline double round(double r) {
4.7 - return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
4.8 + return (r > 0.0) ? std::floor(r + 0.5) : std::ceil(r - 0.5);
4.9 }
4.10
4.11 /// @}
5.1 --- a/test/arc_look_up_test.cc Tue Apr 08 15:57:42 2014 +0200
5.2 +++ b/test/arc_look_up_test.cc Mon Jul 07 11:57:45 2014 +0200
5.3 @@ -24,7 +24,6 @@
5.4
5.5 using namespace lemon;
5.6
5.7 -const int lgfn = 4;
5.8 const std::string lgf =
5.9 "@nodes\n"
5.10 "label\n"
6.1 --- a/tools/lgf-gen.cc Tue Apr 08 15:57:42 2014 +0200
6.2 +++ b/tools/lgf-gen.cc Mon Jul 07 11:57:45 2014 +0200
6.3 @@ -246,7 +246,7 @@
6.4
6.5 struct BeachIt;
6.6
6.7 - typedef std::multimap<double, BeachIt> SpikeHeap;
6.8 + typedef std::multimap<double, BeachIt*> SpikeHeap;
6.9
6.10 typedef std::multimap<Part, SpikeHeap::iterator, YLess> Beach;
6.11
6.12 @@ -329,6 +329,7 @@
6.13 Beach::iterator bit = beach.upper_bound(Part(site, site, site));
6.14
6.15 if (bit->second != spikeheap.end()) {
6.16 + delete bit->second->second;
6.17 spikeheap.erase(bit->second);
6.18 }
6.19
6.20 @@ -342,8 +343,8 @@
6.21 if (prev != -1 &&
6.22 circle_form(points[prev], points[curr], points[site])) {
6.23 double x = circle_point(points[prev], points[curr], points[site]);
6.24 - pit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end())));
6.25 - pit->second.it =
6.26 + pit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end())));
6.27 + pit->second->it =
6.28 beach.insert(std::make_pair(Part(prev, curr, site), pit));
6.29 } else {
6.30 beach.insert(std::make_pair(Part(prev, curr, site), pit));
6.31 @@ -355,8 +356,8 @@
6.32 if (next != -1 &&
6.33 circle_form(points[site], points[curr],points[next])) {
6.34 double x = circle_point(points[site], points[curr], points[next]);
6.35 - nit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end())));
6.36 - nit->second.it =
6.37 + nit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end())));
6.38 + nit->second->it =
6.39 beach.insert(std::make_pair(Part(site, curr, next), nit));
6.40 } else {
6.41 beach.insert(std::make_pair(Part(site, curr, next), nit));
6.42 @@ -366,7 +367,7 @@
6.43 } else {
6.44 sweep = spit->first;
6.45
6.46 - Beach::iterator bit = spit->second.it;
6.47 + Beach::iterator bit = spit->second->it;
6.48
6.49 int prev = bit->first.prev;
6.50 int curr = bit->first.curr;
6.51 @@ -399,10 +400,22 @@
6.52 Beach::iterator nbit = bit; ++nbit;
6.53 int nnt = nbit->first.next;
6.54
6.55 - if (bit->second != spikeheap.end()) spikeheap.erase(bit->second);
6.56 - if (pbit->second != spikeheap.end()) spikeheap.erase(pbit->second);
6.57 - if (nbit->second != spikeheap.end()) spikeheap.erase(nbit->second);
6.58 -
6.59 + if (bit->second != spikeheap.end())
6.60 + {
6.61 + delete bit->second->second;
6.62 + spikeheap.erase(bit->second);
6.63 + }
6.64 + if (pbit->second != spikeheap.end())
6.65 + {
6.66 + delete pbit->second->second;
6.67 + spikeheap.erase(pbit->second);
6.68 + }
6.69 + if (nbit->second != spikeheap.end())
6.70 + {
6.71 + delete nbit->second->second;
6.72 + spikeheap.erase(nbit->second);
6.73 + }
6.74 +
6.75 beach.erase(nbit);
6.76 beach.erase(bit);
6.77 beach.erase(pbit);
6.78 @@ -412,8 +425,8 @@
6.79 circle_form(points[ppv], points[prev], points[next])) {
6.80 double x = circle_point(points[ppv], points[prev], points[next]);
6.81 if (x < sweep) x = sweep;
6.82 - pit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end())));
6.83 - pit->second.it =
6.84 + pit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end())));
6.85 + pit->second->it =
6.86 beach.insert(std::make_pair(Part(ppv, prev, next), pit));
6.87 } else {
6.88 beach.insert(std::make_pair(Part(ppv, prev, next), pit));
6.89 @@ -424,8 +437,8 @@
6.90 circle_form(points[prev], points[next], points[nnt])) {
6.91 double x = circle_point(points[prev], points[next], points[nnt]);
6.92 if (x < sweep) x = sweep;
6.93 - nit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end())));
6.94 - nit->second.it =
6.95 + nit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end())));
6.96 + nit->second->it =
6.97 beach.insert(std::make_pair(Part(prev, next, nnt), nit));
6.98 } else {
6.99 beach.insert(std::make_pair(Part(prev, next, nnt), nit));