spot  1.0
Public Member Functions | Protected Types | Protected Attributes | List of all members
spot::ta_reachable_iterator_depth_first Class Reference

An implementation of spot::ta_reachable_iterator that browses states depth first. More...

#include <taalgos/reachiter.hh>

Inheritance diagram for spot::ta_reachable_iterator_depth_first:
Inheritance graph
Collaboration diagram for spot::ta_reachable_iterator_depth_first:
Collaboration graph

Public Member Functions

 ta_reachable_iterator_depth_first (const ta *a)
virtual void add_state (const state *s)
virtual const statenext_state ()
 Called by run() to obtain the next state to process.
void run ()
 Iterate over all reachable states of a spot::ta.
virtual bool want_state (const state *s) const
virtual void start ()
 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)
virtual void process_link (int in, int out, const ta_succ_iterator *si)

Protected Types

typedef Sgi::hash_map< const
state *, int, state_ptr_hash,
state_ptr_equal
seen_map

Protected Attributes

std::stack< const state * > todo
 A stack of states yet to explore.
const tat_automata_
 The spot::ta to explore.
seen_map seen
 States already seen.

Detailed Description

An implementation of spot::ta_reachable_iterator that browses states depth first.

Member Typedef Documentation

Constructor & Destructor Documentation

spot::ta_reachable_iterator_depth_first::ta_reachable_iterator_depth_first ( const ta a)

Member Function Documentation

virtual void spot::ta_reachable_iterator_depth_first::add_state ( const state s)
virtual
virtual void spot::ta_reachable_iterator::end ( )
virtualinherited

Called by run() once all states have been explored.

virtual const state* spot::ta_reachable_iterator_depth_first::next_state ( )
virtual

Called by run() to obtain the next state to process.

Implements spot::ta_reachable_iterator.

virtual void spot::ta_reachable_iterator::process_link ( int  in,
int  out,
const ta_succ_iterator si 
)
virtualinherited

Called by run() to process a transition.

Parameters
in_sThe source state
inThe source state number.
out_sThe destination state
outThe destination state number.
siThe spot::tgba_succ_iterator positionned on the current transition.

The in_s and out_s states are owned by the spot::ta_reachable_iterator instance and destroyed when the instance is destroyed.

virtual void spot::ta_reachable_iterator::process_state ( const state s,
int  n 
)
virtualinherited

Called by run() to process a state.

Parameters
sThe current state.
nA unique number assigned to s.
siThe spot::ta_succ_iterator for s.
void spot::ta_reachable_iterator::run ( )
inherited

Iterate over all reachable states of a spot::ta.

This is a template method that will call add_state(), next_state(), start(), end(), process_state(), and process_link(), while it iterates over states.

virtual void spot::ta_reachable_iterator::start ( )
virtualinherited

Called by run() before starting its iteration.

virtual bool spot::ta_reachable_iterator::want_state ( const state s) const
virtualinherited

Called by add_state or next_states implementations to filter states. Default implementation always return true.

Member Data Documentation

seen_map spot::ta_reachable_iterator::seen
protectedinherited

States already seen.

const ta* spot::ta_reachable_iterator::t_automata_
protectedinherited

The spot::ta to explore.

std::stack<const state*> spot::ta_reachable_iterator_depth_first::todo
protected

A stack of states yet to explore.


The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Sat Oct 27 2012 09:34:33 for spot by doxygen 1.8.1.2