Runner¶
-
class Runner¶
Many of the classes in
libsemigroups
implementing the algorithms, that are the reason for the existence of this library, are derived from Runner.The Runner class exists to collect various common tasks required by such a derived class with a possibly long running run. These common tasks include:
running for a given amount of time (run_for)
running until a nullary predicate is true (run_until)
reporting after a given amount of time (report_every)
checking if the given amount of time has elapsed since last report (report)
checking the status of the algorithm: has it started? finished? been killed by another thread (dead)? has it timed out (timed_out)? has it stopped for any reason?
permit the function run to be killed from another thread (kill).
Subclassed by libsemigroups::Action< TElementType, TPointType, TActionType, TTraits, TLeftOrRight >, libsemigroups::CongruenceInterface, libsemigroups::FpSemigroupInterface, libsemigroups::FroidurePinBase, libsemigroups::Konieczny< TElementType, TTraits >
Constructors¶
Default constructor. |
|
Copy constructor. |
|
Move constructor. |
Deleted constructors¶
Deleted. |
|
Deleted. |
Reporting¶
Check if it is time to report. |
|
Get the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Report why |
State¶
Check if the runner is dead. |
|
Check if |
|
Check if currently running. |
|
Check if |
|
Check if the runner is stopped. |
|
Check if the runner was, or should, stop because of the argument for |
|
Check if the amount of time passed to |
Operators¶
Stop |
|
Run until |
|
Run for a specified amount of time. |
|
Run for a specified amount of time. |
|
Run until a nullary predicate returns |
|
Run until a nullary predicate returns |
|
Check if the runner is currently running for a particular length of time. |
|
Check if the runner is currently running until a nullary predicate returns |