Skip to content
Snippets Groups Projects
Commit dfd357b6 authored by Tomáš Pecka's avatar Tomáš Pecka Committed by Tomáš Pecka
Browse files

automaton::simplify::Total: No op for FSM with total transition function (Closes #177)

parent 1b6f3bd5
No related branches found
No related tags found
1 merge request!112Dev tp
Pipeline #54322 canceled
......@@ -81,6 +81,9 @@ template < class T >
ext::require < isDFA < T > || isNFA < T >, T > Total::total ( const T & automaton ) {
using StateType = typename T::StateType;
 
if ( automaton.isTotal ( ) )
return automaton;
T res ( automaton );
StateType nullState = common::createUnique ( label::FailStateLabel::instance < StateType > ( ), automaton.getStates ( ) );
res.addState ( nullState );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment