spot 2.3.3

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | Protected Attributes | List of all members
spot::ta_reachable_iterator_breadth_first Class Reference
TA (Testing Automata) » TA algorithms » Algorithm patterns

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

`#include <spot/taalgos/reachiter.hh>`

Inheritance diagram for spot::ta_reachable_iterator_breadth_first:
Collaboration diagram for spot::ta_reachable_iterator_breadth_first:

## Public Member Functions
| ta_reachable_iterator_breadth_first (const const_ta_ptr &a)
virtual void | add_state (const state *s) override
| Called by run() to obtain the next state to process. More...
virtual const state * | next_state () override
| Called by run() to obtain the next state to process. More...
void | run ()
| Iterate over all reachable states of a spot::ta. 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)
virtual void | process_link (int in, int out, const ta_succ_iterator *si)

## Protected Attributes
std::deque< const state * > | todo
| A queue of states yet to explore. More...
const_ta_ptr | t_automata_
| The spot::ta to explore. More...
state_map< int > | seen
| States already seen. More...

## Detailed Description

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

## Member Function Documentation

virtual void spot::ta_reachable_iterator_breadth_first::add_state | ( | const state * | s | ) |
| override virtual

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

Implements spot::ta_reachable_iterator.

virtual void spot::ta_reachable_iterator::end | ( |  | ) |
| virtual inherited

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

virtual const state* spot::ta_reachable_iterator_breadth_first::next_state | ( |  | ) |
| override 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
| ) |  |
| virtual inherited

Called by run() to process a transition.

Parameters

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

virtual void spot::ta_reachable_iterator::process_state | ( | const state * | s,
|  | int | n
| ) |  |
| virtual inherited

Called by run() to process a state.

Parameters

  s | The current state.
  n | A unique number assigned to 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 | ( |  | ) |
| virtual inherited

Called by run() before starting its iteration.

virtual bool spot::ta_reachable_iterator::want_state | ( | const state * | s | ) | const
| virtual inherited

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

## Member Data Documentation

state_map<int> spot::ta_reachable_iterator::seen
| protected inherited

States already seen.

const_ta_ptr spot::ta_reachable_iterator::t_automata_
| protected inherited

The spot::ta to explore.

std::deque<const state*> spot::ta_reachable_iterator_breadth_first::todo
| protected

A queue of states yet to explore.

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

- spot/taalgos/reachiter.hh

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.