Make it easy to filter states while iterating over an automaton.
* src/tgbaalgos/reachiter.hh (tgba_reachable_iterator::want_state): New method. * src/tgbaalgos/reachiter.cc (tgba_reachable_iterator::want_state): Implement it. (tgba_reachable_iterator::run): Call want_state before processing a state.
This commit is contained in:
parent
38148f87f8
commit
ac5dda1032
3 changed files with 33 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004, 2008 Laboratoire d'Informatique de Paris 6
|
||||
// Copyright (C) 2003, 2004, 2008, 2009 Laboratoire d'Informatique de Paris 6
|
||||
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||
// Pierre et Marie Curie.
|
||||
//
|
||||
|
|
@ -56,6 +56,10 @@ namespace spot
|
|||
virtual const state* next_state() = 0;
|
||||
/// \}
|
||||
|
||||
/// Called by add_state or next_states implementations to filter
|
||||
/// states. Default implementation always return true.
|
||||
virtual bool want_state(const state* s) const;
|
||||
|
||||
/// Called by run() before starting its iteration.
|
||||
virtual void start();
|
||||
/// Called by run() once all states have been explored.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue