mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
153 lines
5.2 KiB
Diff
153 lines
5.2 KiB
Diff
diff --git a/src/semigrp.h b/src/semigrp.h
|
|
index f2d5463a..327a7f14 100644
|
|
--- a/src/semigrp.h
|
|
+++ b/src/semigrp.h
|
|
@@ -23,6 +23,7 @@
|
|
|
|
#include "compiled.h" // GAP headers
|
|
|
|
+#include "libsemigroups/element-adapters.hpp"
|
|
#include "libsemigroups/froidure-pin.hpp"
|
|
|
|
#include "converter.h"
|
|
diff --git a/src/pkg.cc b/src/pkg.cc
|
|
index 31987a1c..cd94e0d9 100644
|
|
--- a/src/pkg.cc
|
|
+++ b/src/pkg.cc
|
|
@@ -35,10 +35,10 @@
|
|
#include "libsemigroups/blocks.hpp"
|
|
#include "libsemigroups/cong.hpp"
|
|
#include "libsemigroups/froidure-pin.hpp"
|
|
-#include "libsemigroups/uf.hpp"
|
|
+#include "libsemigroups/uf-old.hpp"
|
|
|
|
using libsemigroups::Congruence;
|
|
-using libsemigroups::detail::UF;
|
|
+using libsemigroups::detail::UFOld;
|
|
|
|
#if !defined(SIZEOF_VOID_P)
|
|
#error Something is wrong with this GAP installation: SIZEOF_VOID_P not defined
|
|
@@ -102,7 +102,7 @@ void TSemiObjFreeFunc(Obj o) {
|
|
SEMIGROUPS_ASSERT(TNUM_OBJ(o) == T_SEMI);
|
|
switch (SUBTYPE_OF_T_SEMI(o)) {
|
|
case T_SEMI_SUBTYPE_UF: {
|
|
- delete CLASS_OBJ<UF*>(o);
|
|
+ delete CLASS_OBJ<UFOld*>(o);
|
|
break;
|
|
}
|
|
case T_SEMI_SUBTYPE_CONG: {
|
|
@@ -157,7 +157,7 @@ void TSemiObjSaveFunc(Obj o) {
|
|
|
|
switch (SUBTYPE_OF_T_SEMI(o)) {
|
|
case T_SEMI_SUBTYPE_UF: {
|
|
- UF* uf = CLASS_OBJ<UF*>(o);
|
|
+ UFOld* uf = CLASS_OBJ<UFOld*>(o);
|
|
SaveUInt(uf->get_size());
|
|
for (size_t i = 0; i < uf->get_size(); i++) {
|
|
SaveUInt(uf->find(i));
|
|
@@ -196,7 +196,7 @@ void TSemiObjLoadFunc(Obj o) {
|
|
for (size_t i = 0; i < size; i++) {
|
|
table->push_back(LoadUInt());
|
|
}
|
|
- ADDR_OBJ(o)[1] = reinterpret_cast<Obj>(new UF(*table));
|
|
+ ADDR_OBJ(o)[1] = reinterpret_cast<Obj>(new UFOld(*table));
|
|
break;
|
|
}
|
|
case T_SEMI_SUBTYPE_CONG: {
|
|
diff --git a/src/uf.cc b/src/uf.cc
|
|
index b7fd7c96..7fa34162 100644
|
|
--- a/src/uf.cc
|
|
+++ b/src/uf.cc
|
|
@@ -26,28 +26,28 @@
|
|
#include "semigroups-debug.h"
|
|
#include "src/compiled.h"
|
|
|
|
-#include "libsemigroups/uf.hpp"
|
|
+#include "libsemigroups/uf-old.hpp"
|
|
|
|
-using libsemigroups::detail::UF;
|
|
+using libsemigroups::detail::UFOld;
|
|
|
|
// GAP level functions
|
|
|
|
Obj UF_NEW(Obj self, Obj size) {
|
|
SEMIGROUPS_ASSERT(IS_INTOBJ(size) && INT_INTOBJ(size) > 0);
|
|
- return OBJ_CLASS(new UF(INT_INTOBJ(size)), T_SEMI_SUBTYPE_UF);
|
|
+ return OBJ_CLASS(new UFOld(INT_INTOBJ(size)), T_SEMI_SUBTYPE_UF);
|
|
}
|
|
|
|
Obj UF_COPY(Obj self, Obj uf) {
|
|
- return OBJ_CLASS(new UF(*CLASS_OBJ<UF*>(uf)), T_SEMI_SUBTYPE_UF);
|
|
+ return OBJ_CLASS(new UFOld(*CLASS_OBJ<UFOld*>(uf)), T_SEMI_SUBTYPE_UF);
|
|
}
|
|
|
|
Obj UF_SIZE(Obj self, Obj uf) {
|
|
- return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->get_size());
|
|
+ return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->get_size());
|
|
}
|
|
|
|
Obj UF_FIND(Obj self, Obj uf, Obj i) {
|
|
SEMIGROUPS_ASSERT(IS_INTOBJ(i) && INT_INTOBJ(i) > 0);
|
|
- return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->find(INT_INTOBJ(i) - 1) + 1);
|
|
+ return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->find(INT_INTOBJ(i) - 1) + 1);
|
|
}
|
|
|
|
Obj UF_UNION(Obj self, Obj uf, Obj pair) {
|
|
@@ -56,18 +56,18 @@ Obj UF_UNION(Obj self, Obj uf, Obj pair) {
|
|
&& INT_INTOBJ(ELM_PLIST(pair, 1)) > 0);
|
|
SEMIGROUPS_ASSERT(IS_INTOBJ(ELM_PLIST(pair, 2))
|
|
&& INT_INTOBJ(ELM_PLIST(pair, 2)) > 0);
|
|
- CLASS_OBJ<UF*>(uf)->unite(INT_INTOBJ(ELM_PLIST(pair, 1)) - 1,
|
|
+ CLASS_OBJ<UFOld*>(uf)->unite(INT_INTOBJ(ELM_PLIST(pair, 1)) - 1,
|
|
INT_INTOBJ(ELM_PLIST(pair, 2)) - 1);
|
|
return 0L;
|
|
}
|
|
|
|
Obj UF_FLATTEN(Obj self, Obj uf) {
|
|
- CLASS_OBJ<UF*>(uf)->flatten();
|
|
+ CLASS_OBJ<UFOld*>(uf)->flatten();
|
|
return 0L;
|
|
}
|
|
|
|
Obj UF_TABLE(Obj self, Obj uf) {
|
|
- UF::table_type* table = CLASS_OBJ<UF*>(uf)->get_table();
|
|
+ UFOld::table_type* table = CLASS_OBJ<UFOld*>(uf)->get_table();
|
|
size_t size = table->size();
|
|
Obj gap_table = NEW_PLIST_IMM(T_PLIST_CYC, size);
|
|
// IMMUTABLE since it should not be altered on the GAP level
|
|
@@ -79,7 +79,7 @@ Obj UF_TABLE(Obj self, Obj uf) {
|
|
}
|
|
|
|
Obj UF_BLOCKS(Obj self, Obj uf) {
|
|
- UF::blocks_type const* blocks = CLASS_OBJ<UF*>(uf)->get_blocks();
|
|
+ UFOld::blocks_type const* blocks = CLASS_OBJ<UFOld*>(uf)->get_blocks();
|
|
size_t size = blocks->size();
|
|
size_t i, j;
|
|
|
|
@@ -105,13 +105,13 @@ Obj UF_BLOCKS(Obj self, Obj uf) {
|
|
gap_int_t UF_NR_BLOCKS(Obj self, Obj uf) {
|
|
SEMIGROUPS_ASSERT(TNUM_OBJ(uf) == T_SEMI
|
|
&& SUBTYPE_OF_T_SEMI(uf) == T_SEMI_SUBTYPE_UF);
|
|
- return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->nr_blocks());
|
|
+ return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->nr_blocks());
|
|
}
|
|
|
|
gap_list_t UF_BLOCK_REPS(Obj self, Obj uf) {
|
|
SEMIGROUPS_ASSERT(TNUM_OBJ(uf) == T_SEMI
|
|
&& SUBTYPE_OF_T_SEMI(uf) == T_SEMI_SUBTYPE_UF);
|
|
- UF* uf_cpp = CLASS_OBJ<UF*>(uf);
|
|
+ UFOld* uf_cpp = CLASS_OBJ<UFOld*>(uf);
|
|
uf_cpp->reset_next_rep();
|
|
size_t next_rep = uf_cpp->next_rep();
|
|
|
|
@@ -132,8 +132,8 @@ Obj UF_JOIN(Obj self, Obj uf1, Obj uf2) {
|
|
SEMIGROUPS_ASSERT(TNUM_OBJ(uf2) == T_SEMI
|
|
&& SUBTYPE_OF_T_SEMI(uf2) == T_SEMI_SUBTYPE_UF);
|
|
SEMIGROUPS_ASSERT(CLASS_OBJ<UF*>(uf1)->get_size()
|
|
- == CLASS_OBJ<UF*>(uf2)->get_size());
|
|
+ == CLASS_OBJ<UFOld*>(uf2)->get_size());
|
|
Obj uf_join = UF_COPY(self, uf1);
|
|
- CLASS_OBJ<UF*>(uf_join)->join(CLASS_OBJ<UF*>(uf2));
|
|
+ CLASS_OBJ<UFOld*>(uf_join)->join(CLASS_OBJ<UFOld*>(uf2));
|
|
return uf_join;
|
|
}
|