|
spot 2.16
|
Lazily enumerate lasso-shaped accepted runs/words of bounded size. More...
#include <spot/twaalgos/lasso.hh>
Public Member Functions | |
| lasso_enumerator (const const_twa_graph_ptr &aut, unsigned min_stem, unsigned max_stem, unsigned min_cycle, unsigned max_cycle) | |
| Construct a lasso enumerator. | |
| lasso_enumerator (const lasso_enumerator &)=delete | |
| lasso_enumerator & | operator= (const lasso_enumerator &)=delete |
| twa_run_ptr | next_run () |
| Return the next accepted run, or nullptr when exhausted. | |
| twa_word_ptr | next_word () |
| Return the next accepted word, or nullptr when exhausted. | |
Lazily enumerate lasso-shaped accepted runs/words of bounded size.
A lasso consists of a finite stem path followed by an infinite cycle. Given bounds on the stem and cycle lengths, this class enumerates all accepted lasso-shaped runs in order of increasing total length (stem + cycle), breaking ties by shorter stem first.
All acceptance conditions are supported.
If the automaton is non-deterministic, the enumeration does not remove duplicate words or runs.
| spot::lasso_enumerator::lasso_enumerator | ( | const const_twa_graph_ptr & | aut, |
| unsigned | min_stem, | ||
| unsigned | max_stem, | ||
| unsigned | min_cycle, | ||
| unsigned | max_cycle | ||
| ) |
Construct a lasso enumerator.
| aut | automaton with any acceptance condition |
| min_stem | minimum stem length (≥0) |
| max_stem | maximum stem length (≥min_stem; UINT_MAX = unbounded) |
| min_cycle | minimum cycle length (≥1) |
| max_cycle | maximum cycle length (≥min_cycle; UINT_MAX = unbounded) |
| std::invalid_argument | if the bounds are inconsistent. |
| twa_run_ptr spot::lasso_enumerator::next_run | ( | ) |
Return the next accepted run, or nullptr when exhausted.
| twa_word_ptr spot::lasso_enumerator::next_word | ( | ) |
Return the next accepted word, or nullptr when exhausted.
1.9.8