stopped_by_predicate

inline bool libsemigroups::Action::stopped_by_predicate() const

Check if the runner was, or should, stop because the nullary predicate passed as first argument to Runner::run_until.

If this is running, then the nullary predicate is called and its return value is returned. If this is not running, then true is returned if and only if the last time this was running it was stopped by a call to the nullary predicate passed to Runner::run_until.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

Complexity

Constant.

Parameters

(None)

Returns

A bool.