Skip to content

Commit

Permalink
Update gabow.hpp for v1/3 (libsemigroups#578)
Browse files Browse the repository at this point in the history
* Update gabow.hpp for v1/3

* iwyu

---------

Co-authored-by: Joseph Edwards <[email protected]>
  • Loading branch information
james-d-mitchell and Joseph-Edwards authored Aug 6, 2024
1 parent cbd22a8 commit d84e47f
Show file tree
Hide file tree
Showing 7 changed files with 415 additions and 154 deletions.
4 changes: 2 additions & 2 deletions docs/DoxygenLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<tab type="user" visible="yes" url="@ref libsemigroups::Action" title="Action" />
<tab type="user" visible="yes" url="@ref libsemigroups::RightAction" title="RightAction" />
</tab>
<tab type="user" visible="yes" url="@ref aho_corasick_group" title="Aho Corasick">
</tab>
<tab type="user" visible="yes" url="@ref aho_corasick_group" title="Aho Corasick"/>
<tab type="user" visible="yes" url="@ref gabow_group" title="Gabow" />
<tab type="usergroup" visible="yes" url="@ref congruences_group" title="Congruences" >
<tab type="usergroup" visible="yes" url="group__congruences__group.html#nested-classes" title="Classes" >
<tab type="user" visible="yes" url="@ref libsemigroups::SimsStats" title="SimsStats" />
Expand Down
16 changes: 16 additions & 0 deletions docs/libsemigroups.bib
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@
%% Saved with string encoding Unicode (UTF-8)
@article{Gab00,
Author = {Harold N. Gabow},
Doi = {https://dx.doi.org/10.1016/S0020-0190(00)00051-X},
Issn = {0020-0190},
Journal = {Information Processing Letters},
Keywords = {Algorithms},
Number = {34},
Pages = {107 - 114},
Title = {Path-based depth-first search for strong and biconnected
components},
Url = {https://www.sciencedirect.com/science/article/pii/S002001900000051X},
Volume = {74},
Year = {2000},
Bdsk-Url-2 = {https://dx.doi.org/10.1016/S0020-0190(00)00051-X},
Bdsk-Url-1 = {https://www.sciencedirect.com/science/article/pii/S002001900000051X},
}

@misc{Anagnostopoulou-Merkouri2023aa,
author = {Anagnostopoulou-Merkouri, Marina and Mitchell, James D. and Tsalakou, Maria},
Expand Down
4 changes: 2 additions & 2 deletions include/libsemigroups/action.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ namespace libsemigroups {
if (started() && old_nr_gens < _gens.size()) {
// Generators were added after the last call to run
if (_pos > 0 && old_nr_gens < _gens.size()) {
_scc.reset();
_scc.init(_graph);
}
for (size_t i = 0; i < _pos; i++) {
for (size_t j = old_nr_gens; j < _gens.size(); ++j) {
Expand All @@ -241,7 +241,7 @@ namespace libsemigroups {
}
}
if (_pos < _orb.size() && !_gens.empty()) {
_scc.reset();
_scc.init(_graph);
}

detail::Timer t;
Expand Down
34 changes: 28 additions & 6 deletions include/libsemigroups/cutting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,33 @@
#ifndef LIBSEMIGROUPS_CUTTING_HPP_
#define LIBSEMIGROUPS_CUTTING_HPP_

#include "cong-intf.hpp" // for CongruenceInterface
#include "gabow.hpp"
#include "runner.hpp" // for Runner
#include "stephen.hpp"
#include "types.hpp"
#include <algorithm> // for for_each, copy
#include <cstddef> // for size_t
#include <cstdint> // for uint32_t, uin...
#include <memory> // for shared_ptr
#include <string> // for operator+
#include <tuple> // for tie
#include <unordered_map> // for operator==
#include <utility> // for swap, make_pair
#include <vector> // for vector

#include "constants.hpp" // for operator!=
#include "gabow.hpp" // for Gabow
#include "presentation.hpp" // for InversePresen...
#include "ranges.hpp" // for begin, end
#include "runner.hpp" // for Runner
#include "stephen.hpp" // for Stephen
#include "types.hpp" // for word_type
#include "word-graph-with-sources.hpp" // for WordGraphWith...
#include "word-graph.hpp" // for WordGraph
#include "word-graph.hpp" // for standardize

#include "detail/fmt.hpp" // for format, basic...
#include "detail/int-range.hpp" // for IntRange<>::v...
#include "detail/iterator.hpp" // for operator+
#include "detail/node-managed-graph.hpp" // for NodeManagedGr...
#include "detail/node-manager.hpp" // for NodeManager::...
#include "detail/report.hpp" // for Ticker::Ticker

namespace libsemigroups {
class Cutting : public Runner {
Expand All @@ -69,7 +91,7 @@ namespace libsemigroups {
_stephens(),
_finished(false),
_graph(0, p.alphabet().size()),
_gabow() {
_gabow(_graph) {
_presentation->validate();
_presentation->contains_empty_word(true); // TODO
_stephens.emplace_back(_presentation);
Expand Down
Loading

0 comments on commit d84e47f

Please sign in to comment.