Files

142 lines
4.6 KiB
Diff
Raw Permalink Normal View History

2023-06-12 19:01:14 +02:00
https://github.com/tremlin/PermLib/pull/8
diff --git CMakeLists.txt CMakeLists.txt
index df7167c..98739dd 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -1,13 +1,17 @@
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.10)
project (PermLib)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(UseDoxygen OPTIONAL)
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
SET (Boost_FIND_REQUIRED TRUE)
SET (Boost_FIND_QUIETLY TRUE)
SET (Boost_USE_MULTITHREADED TRUE)
-find_package(Boost 1.34.1 REQUIRED)
+find_package(Boost 1.67 REQUIRED)
IF( NOT CMAKE_BUILD_TYPE )
SET( CMAKE_BUILD_TYPE Debug CACHE STRING
diff --git include/permlib/abstract_bsgs.h include/permlib/abstract_bsgs.h
index 51bcc3f..8a78c74 100644
--- include/permlib/abstract_bsgs.h
+++ include/permlib/abstract_bsgs.h
@@ -136,7 +136,7 @@ AbstractPermutationGroup* AbstractBSGS<TRANS>::setStabilizer(const std::vector<d
// start the search
boost::shared_ptr<PermutationGroup> stabilizer(new PermutationGroup(copy.n));
backtrackSearch.search(*stabilizer);
- return new AbstractBSGS<TRANS>(stabilizer, m_support);
+ return new AbstractBSGS<TRANS>(stabilizer, bool(m_support));
}
template <class TRANS>
diff --git include/permlib/bsgs.h include/permlib/bsgs.h
index 5a78234..81f7232 100644
--- include/permlib/bsgs.h
+++ include/permlib/bsgs.h
@@ -41,7 +41,7 @@
#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
+#include <boost/next_prior.hpp>
#include <permlib/bsgs_core.h>
diff --git include/permlib/permutation.h include/permlib/permutation.h
index b11cca7..8bc8baa 100644
--- include/permlib/permutation.h
+++ include/permlib/permutation.h
@@ -48,7 +48,7 @@
#include <boost/dynamic_bitset.hpp>
#include <boost/foreach.hpp>
#include <boost/cstdint.hpp>
-#include <boost/math/common_factor_rt.hpp>
+#include <boost/integer/common_factor_rt.hpp>
namespace permlib {
@@ -343,7 +343,7 @@ inline boost::uint64_t Permutation::order() const {
std::list<CyclePair> cycleList = this->cycles();
boost::uint64_t ord = 1;
BOOST_FOREACH(const CyclePair& cyc, cycleList) {
- ord = boost::math::lcm(ord, static_cast<boost::uint64_t>(cyc.second));
+ ord = boost::integer::lcm(ord, static_cast<boost::uint64_t>(cyc.second));
}
return ord;
}
diff --git include/permlib/test/giant_test.h include/permlib/test/giant_test.h
index ca49d29..f619428 100644
--- include/permlib/test/giant_test.h
+++ include/permlib/test/giant_test.h
@@ -40,7 +40,7 @@
#include <permlib/prime_helper.h>
#include <boost/foreach.hpp>
-#include <boost/math/common_factor_rt.hpp>
+#include <boost/integer/common_factor_rt.hpp>
#include <cmath>
#include <algorithm>
@@ -195,7 +195,7 @@ GiantTestBase::GiantGroupType GiantTest<PERM>::determineGiantType(double eps, un
for (unsigned int k = 0; k < cycleLength.size(); ++k) {
if (j == k)
continue;
- if (boost::math::gcd(cycleLength[j], cycleLength[k]) != 1) {
+ if (boost::integer::gcd(cycleLength[j], cycleLength[k]) != 1) {
isCoprime = false;
break;
}
diff --git include/permlib/test/type_recognition.h include/permlib/test/type_recognition.h
index 76585f9..279fae8 100644
--- include/permlib/test/type_recognition.h
+++ include/permlib/test/type_recognition.h
@@ -44,7 +44,7 @@
#include <permlib/permlib_api.h>
#include <boost/shared_ptr.hpp>
-#include <boost/math/common_factor_rt.hpp>
+#include <boost/integer/common_factor_rt.hpp>
#include <iostream>
@@ -344,7 +344,7 @@ GroupType* TypeRecognition<PERM,TRANSVERSAL>::largeSymmetricDiagonalSubgroup(std
size_t orbitGCD = orbits.front()->size();
BOOST_FOREACH(const OrbitPtr& orbit, orbits) {
- orbitGCD = boost::math::gcd(orbitGCD, orbit->size());
+ orbitGCD = boost::integer::gcd(orbitGCD, orbit->size());
}
GroupType* lastType = 0;
diff --git test/CMakeLists.txt test/CMakeLists.txt
index 5edd1da..a4e1fa9 100644
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package(Boost 1.34.1 REQUIRED unit_test_framework)
+find_package(Boost 1.67 REQUIRED unit_test_framework)
include_directories(../include)
diff --git test/test-test.cpp test/test-test.cpp
index 6e3fdb6..2b1f7dc 100644
--- test/test-test.cpp
+++ test/test-test.cpp
@@ -33,7 +33,7 @@
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE group test tests
#include <boost/test/unit_test.hpp>
-#include <boost/test/output_test_stream.hpp>
+#include <boost/test/tools/output_test_stream.hpp>
using boost::test_tools::output_test_stream;
#include <permlib/permutation.h>