aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-01-01 06:47:02 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-01-01 06:47:02 +0000
commitab26381b11495fbb4ff42db2a1f5608938bda42f (patch)
tree568caf2cb35c6e2cdea2e38ecad91719177e20b1 /math
parentcd37294284bdd7076c79432de3507a56155c842a (diff)
downloadports-ab26381b11495fbb4ff42db2a1f5608938bda42f.tar.gz
ports-ab26381b11495fbb4ff42db2a1f5608938bda42f.zip
New port: math/permlib: C++ header-only library for permutation computations
Notes
Notes: svn path=/head/; revision=559809
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/permlib/Makefile27
-rw-r--r--math/permlib/distinfo3
-rw-r--r--math/permlib/files/patch-CMakeLists.txt16
-rw-r--r--math/permlib/files/patch-boost-from-arch100
-rw-r--r--math/permlib/pkg-descr7
-rw-r--r--math/permlib/pkg-plist84
7 files changed, 238 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 6c40d0c64954..055332f17798 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -696,6 +696,7 @@
SUBDIR += pear-Math_Combinatorics
SUBDIR += pecl-bitset
SUBDIR += pecl-stats2
+ SUBDIR += permlib
SUBDIR += petiga
SUBDIR += php73-bcmath
SUBDIR += php73-gmp
diff --git a/math/permlib/Makefile b/math/permlib/Makefile
new file mode 100644
index 000000000000..42201be8d7e2
--- /dev/null
+++ b/math/permlib/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= permlib
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.2.9
+CATEGORIES= math
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= C++ header-only library for permutation computations
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= boost-libs>0:devel/boost-libs
+
+USE_GITHUB= yes
+GH_ACCOUNT= tremlin
+GH_PROJECT= PermLib
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+do-install:
+ cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
+ ${FIND} ${STAGEDIR}${PREFIX}/include -name "*.orig" -delete
+
+.include <bsd.port.mk>
diff --git a/math/permlib/distinfo b/math/permlib/distinfo
new file mode 100644
index 000000000000..1bdf9111b542
--- /dev/null
+++ b/math/permlib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1609481998
+SHA256 (tremlin-PermLib-v0.2.9_GH0.tar.gz) = 40b9c03df57d73412d75ee4098937706d95e252b4f40d091cc13633a0c56d20e
+SIZE (tremlin-PermLib-v0.2.9_GH0.tar.gz) = 151895
diff --git a/math/permlib/files/patch-CMakeLists.txt b/math/permlib/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..f117f817870d
--- /dev/null
+++ b/math/permlib/files/patch-CMakeLists.txt
@@ -0,0 +1,16 @@
+--- CMakeLists.txt.orig 2021-01-01 06:23:17 UTC
++++ CMakeLists.txt
+@@ -27,7 +27,11 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D
+
+ enable_testing()
+
+-add_subdirectory(example)
+-add_subdirectory(test)
++if (BUILD_EXAMPLES)
++ add_subdirectory(example)
++endif()
++if (BUILD_TESTS)
++ add_subdirectory(test)
++endif()
+
+ exec_program( ${CMAKE_COMMAND} ARGS -E copy_directory ${PROJECT_SOURCE_DIR}/data ${PROJECT_BINARY_DIR}/data )
diff --git a/math/permlib/files/patch-boost-from-arch b/math/permlib/files/patch-boost-from-arch
new file mode 100644
index 000000000000..c5ca1ee7bd03
--- /dev/null
+++ b/math/permlib/files/patch-boost-from-arch
@@ -0,0 +1,100 @@
+--- include/permlib/bsgs.h.orig 2016-07-16 17:37:15 UTC
++++ include/permlib/bsgs.h
+@@ -39,6 +39,7 @@
+
+ #include <boost/cstdint.hpp>
+ #include <boost/foreach.hpp>
++#include <boost/next_prior.hpp>
+ #include <boost/scoped_ptr.hpp>
+ #include <boost/shared_ptr.hpp>
+ #include <boost/utility.hpp>
+--- include/permlib/change/base_transpose.h.orig 2016-07-16 17:37:15 UTC
++++ include/permlib/change/base_transpose.h
+@@ -38,6 +38,7 @@
+
+ #include <boost/scoped_ptr.hpp>
+ #include <boost/iterator/indirect_iterator.hpp>
++#include <boost/next_prior.hpp>
+
+ namespace permlib {
+
+--- include/permlib/generator/schreier_generator.h.orig 2016-07-16 17:37:15 UTC
++++ include/permlib/generator/schreier_generator.h
+@@ -39,6 +39,7 @@
+ #include <stack>
+ #include <boost/scoped_ptr.hpp>
+ #include <boost/tuple/tuple.hpp>
++#include <boost/next_prior.hpp>
+
+ namespace permlib {
+
+--- include/permlib/permutation.h.orig 2016-07-16 17:37:15 UTC
++++ 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;
+ }
+--- include/permlib/test/giant_test.h.orig 2016-07-16 17:37:15 UTC
++++ 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>::determi
+ 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;
+ }
+--- include/permlib/test/primitivity_sgs_test.h.orig 2016-07-16 17:37:15 UTC
++++ include/permlib/test/primitivity_sgs_test.h
+@@ -39,6 +39,7 @@
+ #include <boost/foreach.hpp>
+ #include <boost/scoped_ptr.hpp>
+ #include <boost/utility.hpp>
++#include <boost/next_prior.hpp>
+ #include <vector>
+ #include <list>
+
+--- include/permlib/test/type_recognition.h.orig 2016-07-16 17:37:15 UTC
++++ 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>::largeSym
+
+ 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 a/math/permlib/pkg-descr b/math/permlib/pkg-descr
new file mode 100644
index 000000000000..0d2102251fa2
--- /dev/null
+++ b/math/permlib/pkg-descr
@@ -0,0 +1,7 @@
+PermLib is a C++ library for permutation computations. Currently it supports set
+stabilizer and in-orbit computations, based on bases and strong generating sets
+(BSGS). Additionally, it computes automorphisms of symmetric matrices and find
+the lexicographically smallest set in an orbit of sets. It also features a very
+basic recognition of permutation group types.
+
+WWW: http://www.math.uni-rostock.de/~rehn/software/permlib.html
diff --git a/math/permlib/pkg-plist b/math/permlib/pkg-plist
new file mode 100644
index 000000000000..7e33777c278a
--- /dev/null
+++ b/math/permlib/pkg-plist
@@ -0,0 +1,84 @@
+include/permlib/abstract_bsgs.h
+include/permlib/abstract_bsgs_helpers.h
+include/permlib/abstract_permutation_group.h
+include/permlib/abstract_symmetric_product.h
+include/permlib/bsgs.h
+include/permlib/bsgs_core.h
+include/permlib/change/base_change.h
+include/permlib/change/base_transpose.h
+include/permlib/change/conjugating_base_change.h
+include/permlib/change/deterministic_base_transpose.h
+include/permlib/change/new_base_change.h
+include/permlib/change/random_base_transpose.h
+include/permlib/change/simple_base_change.h
+include/permlib/common.h
+include/permlib/construct/base_construction.h
+include/permlib/construct/cyclic_group_construction.h
+include/permlib/construct/known_bsgs_construction.h
+include/permlib/construct/random_schreier_sims_construction.h
+include/permlib/construct/schreier_sims_construction.h
+include/permlib/export/bsgs_schreier_export.h
+include/permlib/generator/bsgs_generator.h
+include/permlib/generator/bsgs_random_generator.h
+include/permlib/generator/generator.h
+include/permlib/generator/product_replacement_generator.h
+include/permlib/generator/random_generator.h
+include/permlib/generator/random_schreier_generator.h
+include/permlib/generator/schreier_generator.h
+include/permlib/permlib_api.h
+include/permlib/permutation.h
+include/permlib/permutationword.h
+include/permlib/predicate/group_intersection_predicate.h
+include/permlib/predicate/identity_predicate.h
+include/permlib/predicate/lex_smaller_image_predicate.h
+include/permlib/predicate/matrix_automorphism_predicate.h
+include/permlib/predicate/pointwise_stabilizer_predicate.h
+include/permlib/predicate/set_image_predicate.h
+include/permlib/predicate/setwise_stabilizer_predicate.h
+include/permlib/predicate/stabilizes_point_predicate.h
+include/permlib/predicate/subgroup_predicate.h
+include/permlib/predicate/vector_stabilizer_predicate.h
+include/permlib/prime_helper.h
+include/permlib/redundant_base_point_insertion_strategy.h
+include/permlib/search/base_search.h
+include/permlib/search/classic/backtrack_search.h
+include/permlib/search/classic/intersection_search.h
+include/permlib/search/classic/lex_smaller_image_search.h
+include/permlib/search/classic/set_image_search.h
+include/permlib/search/classic/set_stabilizer_search.h
+include/permlib/search/dset.h
+include/permlib/search/orbit_lex_min_search.h
+include/permlib/search/partition/backtrack_refinement.h
+include/permlib/search/partition/group_refinement.h
+include/permlib/search/partition/intersection_search.h
+include/permlib/search/partition/matrix_automorphism_search.h
+include/permlib/search/partition/matrix_refinement1.h
+include/permlib/search/partition/matrix_refinement2.h
+include/permlib/search/partition/partition.h
+include/permlib/search/partition/r_base.h
+include/permlib/search/partition/refinement.h
+include/permlib/search/partition/refinement_family.h
+include/permlib/search/partition/set_image_refinement.h
+include/permlib/search/partition/set_image_search.h
+include/permlib/search/partition/set_stabilize_refinement.h
+include/permlib/search/partition/set_stabilizer_search.h
+include/permlib/search/partition/vector_stabilizer_search.h
+include/permlib/sorter/base_sorter.h
+include/permlib/sorter/group_sorter.h
+include/permlib/sorter/trivial_sorter.h
+include/permlib/symmetric_group.h
+include/permlib/test/giant_test.h
+include/permlib/test/group_type.h
+include/permlib/test/primitivity_sgs_test.h
+include/permlib/test/primitivity_test.h
+include/permlib/test/type_recognition.h
+include/permlib/test/type_recognition_heuristic.h
+include/permlib/transversal/explicit_transversal.h
+include/permlib/transversal/orbit.h
+include/permlib/transversal/orbit_list.h
+include/permlib/transversal/orbit_set.h
+include/permlib/transversal/schreier_tree_transversal.h
+include/permlib/transversal/shallow_schreier_tree_transversal.h
+include/permlib/transversal/symmetric_group_transversal.h
+include/permlib/transversal/transversal.h
+include/permlib/version.h