spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
spot::tgba_reachable_iterator_breadth_first Class Reference

An implementation of spot::tgba_reachable_iterator that browses states breadth first. More...

#include <tgbaalgos/reachiter.hh>

Inheritance diagram for spot::tgba_reachable_iterator_breadth_first:
Inheritance graph
Collaboration diagram for spot::tgba_reachable_iterator_breadth_first:
Collaboration graph

Public Member Functions

 tgba_reachable_iterator_breadth_first (const tgba *a)
 
virtual void add_state (const state *s)
 
virtual const statenext_state ()
 Called by run() to obtain the next state to process. More...
 
virtual void run ()
 Iterate over all reachable states of a spot::tgba. More...
 
virtual bool want_state (const state *s) const
 
virtual void start ()
 Called by run() before starting its iteration. More...
 
virtual void end ()
 Called by run() once all states have been explored. More...
 
virtual void process_state (const state *s, int n, tgba_succ_iterator *si)
 
virtual void process_link (const state *in_s, int in, const state *out_s, int out, const tgba_succ_iterator *si)
 

Protected Types

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

Protected Attributes

std::deque< const state * > todo
 A queue of states yet to explore. More...
 
const tgbaaut_
 The spot::tgba to explore. More...
 
seen_map seen
 States already seen. More...
 

Detailed Description

An implementation of spot::tgba_reachable_iterator that browses states breadth first.

Member Function Documentation

virtual void spot::tgba_reachable_iterator::end ( )
virtualinherited

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

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

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

Implements spot::tgba_reachable_iterator.

virtual void spot::tgba_reachable_iterator::process_link ( const state in_s,
int  in,
const state out_s,
int  out,
const tgba_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::tgba_reachable_iterator instance and destroyed when the instance is destroyed.

virtual void spot::tgba_reachable_iterator::process_state ( const state s,
int  n,
tgba_succ_iterator si 
)
virtualinherited

Called by run() to process a state.

Parameters
sThe current state.
nA unique number assigned to s.
siThe spot::tgba_succ_iterator for s.
virtual void spot::tgba_reachable_iterator::run ( )
virtualinherited

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

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

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

Called by run() before starting its iteration.

virtual bool spot::tgba_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

const tgba* spot::tgba_reachable_iterator::aut_
protectedinherited

The spot::tgba to explore.

seen_map spot::tgba_reachable_iterator::seen
protectedinherited

States already seen.

std::deque<const state*> spot::tgba_reachable_iterator_breadth_first::todo
protected

A queue of states yet to explore.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:12 for spot by doxygen 1.8.4