Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

spot::tgba_reachable_iterator_breadth_first Class Reference

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

#include <reachiter.hh>

Inheritance diagram for spot::tgba_reachable_iterator_breadth_first:

Inheritance graph
[legend]
Collaboration diagram for spot::tgba_reachable_iterator_breadth_first:

Collaboration graph
[legend]
List of all members.

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.

void run ()
 Iterate over all reachable states of a spot::tgba.

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, tgba_succ_iterator *si)
virtual void process_link (int in, 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.

const tgbaautomata_
 The spot::tgba to explore.

seen_map seen
 States already seen.


Detailed Description

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


Member Typedef Documentation

typedef Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal> spot::tgba_reachable_iterator::seen_map [protected, inherited]
 


Constructor & Destructor Documentation

spot::tgba_reachable_iterator_breadth_first::tgba_reachable_iterator_breadth_first const tgba a  ) 
 


Member Function Documentation

virtual void spot::tgba_reachable_iterator_breadth_first::add_state const state s  )  [virtual]
 

Implements spot::tgba_reachable_iterator.

virtual void spot::tgba_reachable_iterator::end  )  [virtual, inherited]
 

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.

Implements spot::tgba_reachable_iterator.

virtual void spot::tgba_reachable_iterator::process_link int  in,
int  out,
const tgba_succ_iterator si
[virtual, inherited]
 

Called by run() to process a transition.

Parameters:
in The source state number.
out The destination state number.
si The spot::tgba_succ_iterator positionned on the current transition.

virtual void spot::tgba_reachable_iterator::process_state const state s,
int  n,
tgba_succ_iterator si
[virtual, inherited]
 

Called by run() to process a state.

Parameters:
s The current state.
n An unique number assigned to s.
si The spot::tgba_succ_iterator for s.

void spot::tgba_reachable_iterator::run  )  [inherited]
 

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

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::tgba_reachable_iterator::start  )  [virtual, inherited]
 

Called by run() before starting its iteration.


Member Data Documentation

const tgba* spot::tgba_reachable_iterator::automata_ [protected, inherited]
 

The spot::tgba to explore.

seen_map spot::tgba_reachable_iterator::seen [protected, inherited]
 

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:
Generated on Tue Jan 13 18:22:08 2004 for spot by doxygen 1.3.5