Skip to content

Commit

Permalink
This works???
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniscirpons committed Dec 20, 2023
1 parent 83fcf10 commit cff55d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/libsemigroups/sims2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace libsemigroups {
for (size_t j = i + 1; j <= num_edges; ++j) {
_used_slots[j] = _used_slots[i];
}
LIBSEMIGROUPS_ASSERT(_used_slots[num_edges] < _2_sided_include.size());
LIBSEMIGROUPS_ASSERT(_used_slots[num_edges] <= _2_sided_include.size());
return _used_slots[num_edges];
}
};
Expand Down
26 changes: 13 additions & 13 deletions src/sims2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@ namespace libsemigroups {
size_type start = current.num_edges;
// TODO avoid extra copies here
// One relation in _2_sided_include for every non-tree edge
while (start < _felsch_graph.definitions().size()) {
for (size_t i = start; i < _felsch_graph.definitions().size(); ++i) {
auto const& e = _felsch_graph.definitions()[i]; // TODO reference
if (current.target_is_new_node && e.first == current.source
&& e.second == current.generator) {
continue;
}
word_type u = _2_sided_words[e.first];
u.push_back(e.second);
_2_sided_include.add_rule(
u,
_2_sided_words[_felsch_graph.target_no_checks(e.first, e.second)],
current.num_edges);
for (size_t i = start; i < _felsch_graph.definitions().size(); ++i) {
auto const& e = _felsch_graph.definitions()[i]; // TODO reference
if (current.target_is_new_node && e.first == current.source
&& e.second == current.generator) {
continue;
}
word_type u = _2_sided_words[e.first];
u.push_back(e.second);
_2_sided_include.add_rule(
u,
_2_sided_words[_felsch_graph.target_no_checks(e.first, e.second)],
current.num_edges);
}
while (start < _felsch_graph.definitions().size()) {
// TODO different things if current.target is a new node

auto first = _2_sided_include.begin(current.num_edges);
Expand Down

0 comments on commit cff55d5

Please sign in to comment.