Skip to content

Commit

Permalink
Try rebasing on to v3, fail, cry, fix some issues, get stuck, flip ta…
Browse files Browse the repository at this point in the history
…ble, clock off.
  • Loading branch information
reiniscirpons committed Dec 2, 2024
1 parent 0c6b097 commit 720038f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions include/libsemigroups/sims.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2951,7 +2951,7 @@ namespace libsemigroups {
//! Default constructor.
explicit SimsRefinerIdeals()
: _knuth_bendices(std::thread::hardware_concurrency() + 1,
KnuthBendix_(congruence_kind::twosided)) {
KnuthBendix_()) {
init();
}

Expand All @@ -2962,7 +2962,7 @@ namespace libsemigroups {
//!
//! \returns A reference to \c *this.
SimsRefinerIdeals& init() {
_knuth_bendices[0].init(congruence_kind::twosided).run();
_knuth_bendices[0].init();
std::fill(_knuth_bendices.begin() + 1,
_knuth_bendices.end(),
_knuth_bendices[0]);
Expand All @@ -2981,7 +2981,7 @@ namespace libsemigroups {
template <typename Word>
explicit SimsRefinerIdeals(Presentation<Word> const& p)
: _knuth_bendices(std::thread::hardware_concurrency() + 1,
KnuthBendix_(congruence_kind::twosided)) {
KnuthBendix_(congruence_kind::twosided, p)) {
init(p);
}

Expand Down
6 changes: 4 additions & 2 deletions include/libsemigroups/sims.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ namespace libsemigroups {
return false;
}

ToddCoxeter tc(congruence_kind::right);
ToddCoxeter tc;

auto tree = word_graph::spanning_tree(wg, 0);
size_t N = wg.number_of_active_nodes();
Expand All @@ -171,7 +171,9 @@ namespace libsemigroups {
// TODO(2) avoid the copy here
copy.induced_subgraph_no_checks(static_cast<Node>(0),
wg.number_of_active_nodes());
tc.init(tc.kind(), p, copy).add_pair(wx, wy);
tc.init(congruence_kind::onesided, copy)
.add_generating_pair_no_checks(
wx.cbegin(), wx.cend(), wy.cbegin(), wy.cend());
LIBSEMIGROUPS_ASSERT(tc.word_graph().number_of_nodes()
== wg.number_of_active_nodes());
// fmt::print("x = {}, y = {}\n", x, y);
Expand Down
2 changes: 1 addition & 1 deletion src/sims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ namespace libsemigroups {
auto const& v = p.second;
// TODO(1) change this to be const_contains for knuth
// bendix when we have it
if (!kb.contains(u, v)) {
if (!kb.contains(u.cbegin(), u.cend(), v.cbegin(), v.cend())) {
auto beta
= word_graph::follow_path_no_checks(wg, 0, u.cbegin(), u.cend());
if (sink == UNDEFINED) {
Expand Down
5 changes: 0 additions & 5 deletions tests/test-sims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4933,7 +4933,6 @@ namespace libsemigroups {
using words::operator+;

Presentation<word_type> p;
ToddCoxeter tc(congruence_kind::twosided);
// plusses indicate that the result was reached but could not be verified.
std::vector<size_t> results = {1, 2, 7, 22, +84, +364, +1734, +8943};
WordGraph<node_type> wg;
Expand Down Expand Up @@ -4983,7 +4982,6 @@ namespace libsemigroups {
using words::operator+;

Presentation<word_type> p;
ToddCoxeter tc(congruence_kind::twosided);
// plusses indicate that the result was reached but could not be verified.
std::vector<size_t> results = {1,
1,
Expand Down Expand Up @@ -5050,7 +5048,6 @@ namespace libsemigroups {
using words::operator+;

Presentation<word_type> p;
ToddCoxeter tc(congruence_kind::twosided);
// plusses indicate that the result was reached but could not be verified.
std::vector<size_t> results = {1, 2, 6, 14, +39, +117, +383, +1311, +7080};
WordGraph<node_type> wg;
Expand Down Expand Up @@ -5097,7 +5094,6 @@ namespace libsemigroups {
using words::operator+;

Presentation<word_type> p;
ToddCoxeter tc(congruence_kind::twosided);
// plusses indicate that the result was reached but could not be verified.
std::vector<size_t> results
= {1, 2, 6, 13, +31, +77, +197, +513, +1354, +3611, +9714};
Expand Down Expand Up @@ -5147,7 +5143,6 @@ namespace libsemigroups {
using words::operator+;

Presentation<word_type> p;
ToddCoxeter tc(congruence_kind::twosided);
// plusses indicate that the result was reached but could not be verified.
std::vector<size_t> results = {1, 1, 3, 7, 22, 46, +196, +523};
WordGraph<node_type> wg;
Expand Down

0 comments on commit 720038f

Please sign in to comment.