File tree Expand file tree Collapse file tree
include/libsemigroups/detail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ namespace libsemigroups {
172172 return *this ;
173173 }
174174 }
175+ // TODO Can this be improved so that we don't revisit suffixes that we
176+ // have already checked?
175177 while (_first != _last && _prefix != UNDEFINED) {
176178 auto x = *_first;
177179 ++_first;
Original file line number Diff line number Diff line change @@ -826,6 +826,8 @@ namespace libsemigroups {
826826 detail::Ticker ticker;
827827 // TODO bool old_ticker_running = _ticker_running;
828828
829+ // TODO add some way of accumulating the newly added rules, so we can
830+ // reintroduce the stuff with the new rule trie.
829831 while (_rules.number_of_pending_rules () != 0 ) {
830832 while (_rules.number_of_pending_rules () != 0 ) {
831833 Rule* new_rule = _rules.pop_pending_rule ();
@@ -873,6 +875,10 @@ namespace libsemigroups {
873875 auto const first = _rules.active_rules ().begin ();
874876 auto const last = _rules.active_rules ().end ();
875877
878+ // For every lhs and rhs (<word>) of every active rule (<rule>), find
879+ // every rule (<match>) whose lhs is a subword of <word>. If such a
880+ // <match> exists, and it is not equal to <rule>, then the system is
881+ // not reduced, so we make <rule> pending.
876882 for (auto it = first; it != last; ++it) {
877883 Rule* rule = *it;
878884 for (auto const & word : {rule->lhs (), rule->rhs ()}) {
Original file line number Diff line number Diff line change @@ -81,11 +81,6 @@ namespace libsemigroups {
8181 return _rhs;
8282 }
8383
84- // TODO rm
85- [[nodiscard]] bool empty () const noexcept {
86- return _lhs.empty () && _rhs.empty ();
87- }
88-
8984 // TODO rm
9085 void reorder () {
9186 // if (ReductionOrder()(_lhs, _rhs)) {
You can’t perform that action at this time.
0 commit comments