Stephen

class Stephen : public libsemigroups::Runner

Defined in stephen.hpp.

On this page we describe the functionality in libsemigroups relating to Stephen’s procedure for finitely presented semigroups. This class implements Stephen’s procedure for (possibly) constructing the word graph (ActionDigraph) corresponding to the left factors of a word in a finitely presented semigroup. The algorithm implemented in this class is closely related to the Todd-Coxeter algorithm (as implemented in congruence::ToddCoxeter) and originates in Applications of automata theory to presentations of monoids and inverse monoids by J. B. Stephen.

Member types

digraph_type

The return type of the function word_graph .

node_type

The type of the nodes of a digraph_type .

Constructor

Stephen()

Default constructor.

Stephen(P &&)

Construct from a presentation.

Stephen(Stephen &&) = default

Default move constructor.

Stephen(Stephen const &) = default

Default copy constructor.

operator=(Stephen &&) = default

Default move assignment operator.

operator=(Stephen const &) = default

Default copy assignment operator.

Initialization

init(P &&)

Initialize from a presentation.

set_word(word_type &&)

Set the word.

set_word(word_type const &)

Set the word.

Defining data

presentation() const noexcept

The input presentation.

word() const noexcept

The word.

Results of the algorithm

accept_state()

The accept state of the word graph.

word_graph() const noexcept

The word graph.

Member functions inherited from Runner

dead() const noexcept

Check if the runner is dead.

finished() const

Check if run has been run to completion or not.

kill() noexcept

Stop run from running (thread-safe).

report() const

Check if it is time to report.

report_every() const noexcept

Get the minimum elapsed time between reports.

report_every(TIntType)

Set the minimum elapsed time between reports.

report_every(std::chrono::nanoseconds)

Set the minimum elapsed time between reports.

report_why_we_stopped() const

Report why run stopped.

run()

Run until finished .

run_for(TIntType)

Run for a specified amount of time.

run_for(std::chrono::nanoseconds)

Run for a specified amount of time.

run_until(T&&)

Run until a nullary predicate returns true or finished .

run_until(bool(*)())

Run until a nullary predicate returns true or finished .

running() const noexcept

Check if currently running.

running_for() const noexcept

Check if the runner is currently running for a particular length of time.

running_until() const noexcept

Check if the runner is currently running until a nullary predicate returns true.

started() const

Check if run has been called at least once before.

stopped() const

Check if the runner is stopped.

stopped_by_predicate() const

Check if the runner was, or should, stop because of the argument for run_until .

timed_out() const

Check if the amount of time passed to run_for has elapsed.