From 76fe40eff33b88a6b0a521c0adc39aae3a8b6750 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Sat, 30 Mar 2019 23:08:08 +0100 Subject: [PATCH] remove not needed specialisation --- .../properties/efficient/UsefulStates.h | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/alib2elgo/src/automaton/properties/efficient/UsefulStates.h b/alib2elgo/src/automaton/properties/efficient/UsefulStates.h index 20ab8c3d73..6bcf0341f2 100644 --- a/alib2elgo/src/automaton/properties/efficient/UsefulStates.h +++ b/alib2elgo/src/automaton/properties/efficient/UsefulStates.h @@ -33,8 +33,6 @@ public: */ template < class T > static ext::set < typename automaton::StateTypeOfAutomaton < T > > usefulStates( const T & fsm ); - template < class SymbolType, class StateType > - static ext::set<StateType> usefulStates( const automaton::ExtendedNFA < SymbolType, StateType > & fsm ); }; template < class T > @@ -61,28 +59,6 @@ ext::set < typename automaton::StateTypeOfAutomaton < T > > UsefulStates::useful return visited; } -template < class SymbolType, class StateType > -ext::set<StateType> UsefulStates::usefulStates( const automaton::ExtendedNFA < SymbolType, StateType > & fsm ) { - ext::map<StateType, ext::set<StateType>> reversedTransitions; - for(const auto& transition : fsm.getTransitions()) - reversedTransitions[transition.second].insert(transition.first.first); - - ext::deque<StateType> queue ( fsm.getFinalStates( ).begin(), fsm.getFinalStates().end() ); - ext::set<StateType> visited = fsm.getFinalStates( ); - - while( !queue.empty() ) { - const ext::set<StateType>& to = reversedTransitions[queue.front()]; - queue.pop_front(); - - for(const StateType& process : to) - if(visited.insert(process).second) { - queue.push_back(std::move(const_cast<StateType&>(process))); - } - } - - return visited; -} - } /* namespace efficient */ } /* namespace properties */ -- GitLab