spot
0.8.2
|
Iterate over all reachable states of a spot::evtgba. More...
#include <evtgbaalgos/reachiter.hh>
Public Member Functions | |
evtgba_reachable_iterator (const evtgba *a) | |
virtual | ~evtgba_reachable_iterator () |
void | run () |
Iterate over all reachable states of a spot::evtgba. | |
virtual void | start (int n) |
Called by run() before starting its iteration. | |
virtual void | end () |
Called by run() once all states have been explored. | |
virtual void | process_state (const state *s, int n, evtgba_iterator *si) |
virtual void | process_link (int in, int out, const evtgba_iterator *si) |
Todo list management. | |
Called by run() to register newly discovered states. spot::evtgba_reachable_iterator_depth_first and spot::evtgba_reachable_iterator_breadth_first offer two precanned implementations for these functions. | |
virtual void | add_state (const state *s)=0 |
virtual const state * | next_state ()=0 |
Called by run() to obtain the. | |
Protected Types | |
typedef Sgi::hash_map< const state *, int, state_ptr_hash, state_ptr_equal > | seen_map |
Protected Attributes | |
const evtgba * | automata_ |
The spot::evtgba to explore. | |
seen_map | seen |
States already seen. |
Iterate over all reachable states of a spot::evtgba.
typedef Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal> spot::evtgba_reachable_iterator::seen_map [protected] |
virtual spot::evtgba_reachable_iterator::~evtgba_reachable_iterator | ( | ) | [virtual] |
virtual void spot::evtgba_reachable_iterator::add_state | ( | const state * | s | ) | [pure virtual] |
Implemented in spot::evtgba_reachable_iterator_breadth_first, and spot::evtgba_reachable_iterator_depth_first.
virtual void spot::evtgba_reachable_iterator::end | ( | ) | [virtual] |
Called by run() once all states have been explored.
virtual const state* spot::evtgba_reachable_iterator::next_state | ( | ) | [pure virtual] |
Called by run() to obtain the.
Implemented in spot::evtgba_reachable_iterator_breadth_first, and spot::evtgba_reachable_iterator_depth_first.
virtual void spot::evtgba_reachable_iterator::process_link | ( | int | in, |
int | out, | ||
const evtgba_iterator * | si | ||
) | [virtual] |
Called by run() to process a transition.
in | The source state number. |
out | The destination state number. |
si | The spot::evtgba_iterator positionned on the current transition. |
virtual void spot::evtgba_reachable_iterator::process_state | ( | const state * | s, |
int | n, | ||
evtgba_iterator * | si | ||
) | [virtual] |
Called by run() to process a state.
s | The current state. |
n | An unique number assigned to s. |
si | The spot::evtgba_iterator for s. |
void spot::evtgba_reachable_iterator::run | ( | ) |
Iterate over all reachable states of a spot::evtgba.
This is a template method that will call add_state(), next_state(), start(), end(), process_state(), and process_link(), while it iterate over state.
virtual void spot::evtgba_reachable_iterator::start | ( | int | n | ) | [virtual] |
Called by run() before starting its iteration.
n | The number of initial states. |
const evtgba* spot::evtgba_reachable_iterator::automata_ [protected] |
The spot::evtgba to explore.
seen_map spot::evtgba_reachable_iterator::seen [protected] |
States already seen.