twagraph: improve doc
Based on report by Michaël Cadilhac. * spot/graph/graph.hh, spot/twa/twagraph.hh (defrag_state): Clarify that only unreachable states are meant to be removed. * spot/twa/twagraph.hh (merge_edges): Typo in comment. Fixes #454. * THANKS: Add Michaël.
This commit is contained in:
parent
57b508c767
commit
0b048e1c05
3 changed files with 28 additions and 10 deletions
|
|
@ -1289,10 +1289,19 @@ namespace spot
|
|||
|
||||
/// \brief Rename and remove states.
|
||||
///
|
||||
/// \param newst A vector indicating how each state should be renumbered.
|
||||
/// Use -1U to erase a state. All other numbers are expected to
|
||||
/// satisfy newst[i] ≤ i for all i.
|
||||
/// \param used_states the number of states used (after renumbering)
|
||||
/// This method is used to remove some states that have been
|
||||
/// previously detected to be unreachable in order to "defragment"
|
||||
/// the state vector. When a state is removed, all its outgoing
|
||||
/// transition are removed as well. Removing reachable states
|
||||
/// should NOT be attempted, because the incoming edges will be
|
||||
/// dangling.
|
||||
///
|
||||
/// \param newst A vector indicating how each state should be
|
||||
/// renumbered. Use -1U to erase an unreachable state. All other
|
||||
/// numbers are expected to satisfy newst[i] ≤ i for all i.
|
||||
///
|
||||
/// \param used_states the number of states used (after
|
||||
/// renumbering)
|
||||
void defrag_states(std::vector<unsigned>&& newst, unsigned used_states)
|
||||
{
|
||||
SPOT_ASSERT(newst.size() >= states_.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue