Add trivial() and one_state_of() functions to scc_map.
* src/tgbaalgos/scc.hh, src/tgbaalgos/scc.cc (scc_map::trivial, scc_map::one_state_of): Two new helper functions.
This commit is contained in:
parent
5bc6d1d4ff
commit
37a8d1dc92
3 changed files with 37 additions and 2 deletions
|
|
@ -105,6 +105,13 @@ namespace spot
|
|||
/// \pre This should only be called once build_map() has run.
|
||||
const succ_type& succ(unsigned n) const;
|
||||
|
||||
/// \brief Return whether an SCC is trivial.
|
||||
///
|
||||
/// Trivial SCCs have one state and no self-loop.
|
||||
///
|
||||
/// \pre This should only be called once build_map() has run.
|
||||
bool trivial(unsigned n) const;
|
||||
|
||||
/// \brief Return whether an SCC is accepting.
|
||||
///
|
||||
/// \pre This should only be called once build_map() has run.
|
||||
|
|
@ -150,6 +157,14 @@ namespace spot
|
|||
/// \pre This should only be called once build_map() has run.
|
||||
const std::list<const state*>& states_of(unsigned n) const;
|
||||
|
||||
/// \brief Return one state of an SCC.
|
||||
///
|
||||
/// The state in the returned list is still owned by the scc_map
|
||||
/// instance. It should NOT be deleted by the client code.
|
||||
///
|
||||
/// \pre This should only be called once build_map() has run.
|
||||
const state* one_state_of(unsigned n) const;
|
||||
|
||||
/// \brief Return the number of the SCC a state belongs too.
|
||||
///
|
||||
/// \pre This should only be called once build_map() has run.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue