diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h index 087839b46cf37ced8d8fa3181690419a246c3bdb..13eb9521b827212a221c7809d5b0d531c2b42ca2 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.h +++ b/alib2data/src/automaton/FSM/CompactNFA.h @@ -447,11 +447,11 @@ template < class EpsilonType > CompactNFA < SymbolType, StateType >::CompactNFA ( const MultiInitialStateEpsilonNFA < SymbolType, EpsilonType, StateType > & other ) : CompactNFA ( other.getStates ( ) + ext::set < StateType > { common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ) }, other.getInputAlphabet ( ), common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) if ( transition.first.second.template is < EpsilonType > ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { } ), transition.second ); else - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second.template get < SymbolType > ( ) } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second.template get < SymbolType > ( ) } ), transition.second ); - transitions.insert_or_assign ( ext::make_pair ( this->getInitialState ( ), ext::vector < SymbolType > { } ), other.getInitialStates ( ) ); + transitions.insert ( ext::make_pair ( this->getInitialState ( ), ext::vector < SymbolType > { } ), other.getInitialStates ( ) ); } template < class SymbolType, class StateType > @@ -459,29 +459,29 @@ template < class EpsilonType > CompactNFA < SymbolType, StateType >::CompactNFA ( const EpsilonNFA < SymbolType, EpsilonType, StateType > & other ) : CompactNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) if ( transition.first.second.template is < EpsilonType > ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { } ), transition.second ); else - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second.template get < SymbolType > ( ) } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second.template get < SymbolType > ( ) } ), transition.second ); } template < class SymbolType, class StateType > CompactNFA < SymbolType, StateType >::CompactNFA ( const MultiInitialStateNFA < SymbolType, StateType > & other ) : CompactNFA ( other.getStates ( ) + ext::set < StateType > { common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ) }, other.getInputAlphabet ( ), common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), transition.second ); - transitions.insert_or_assign ( ext::make_pair ( this->getInitialState ( ), ext::vector < SymbolType > { } ), other.getInitialStates ( ) ); + transitions.insert ( ext::make_pair ( this->getInitialState ( ), ext::vector < SymbolType > { } ), other.getInitialStates ( ) ); } template < class SymbolType, class StateType > CompactNFA < SymbolType, StateType >::CompactNFA ( const NFA < SymbolType, StateType > & other ) : CompactNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), transition.second ); } template < class SymbolType, class StateType > CompactNFA < SymbolType, StateType >::CompactNFA ( const DFA < SymbolType, StateType > & other ) : CompactNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), ext::set < StateType > { transition.second } ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::vector < SymbolType > { transition.first.second } ), ext::set < StateType > { transition.second } ); } template < class SymbolType, class StateType > diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h index e375f3058b8ca72240ab6b260b24fa9305c95ea9..8fe6191a6da3851606632091cc447bf1e1affc1e 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.h +++ b/alib2data/src/automaton/FSM/EpsilonNFA.h @@ -570,22 +570,22 @@ EpsilonNFA < SymbolType, EpsilonType, StateType >::EpsilonNFA ( StateType initia template<class SymbolType, class EpsilonType, class StateType > EpsilonNFA < SymbolType, EpsilonType, StateType >::EpsilonNFA ( const MultiInitialStateNFA < SymbolType, StateType > & other ) : EpsilonNFA ( other.getStates ( ) + ext::set < StateType > { common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ) }, other.getInputAlphabet ( ), common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), transition.second ); - transitions.insert_or_assign ( ext::make_pair ( getInitialState ( ), ext::variant < EpsilonType, SymbolType >::template from < EpsilonType > ( ) ), other.getInitialStates ( ) ); + transitions.insert ( ext::make_pair ( getInitialState ( ), ext::variant < EpsilonType, SymbolType >::template from < EpsilonType > ( ) ), other.getInitialStates ( ) ); } template<class SymbolType, class EpsilonType, class StateType > EpsilonNFA < SymbolType, EpsilonType, StateType >::EpsilonNFA ( const NFA < SymbolType, StateType > & other ) : EpsilonNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), transition.second ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), transition.second ); } template<class SymbolType, class EpsilonType, class StateType > EpsilonNFA < SymbolType, EpsilonType, StateType >::EpsilonNFA ( const DFA < SymbolType, StateType > & other ) : EpsilonNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) { for ( const auto & transition : other.getTransitions ( ) ) - transitions.insert_or_assign ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), ext::set < StateType > { transition.second } ); + transitions.insert ( ext::make_pair ( transition.first.first, ext::variant < EpsilonType, SymbolType > ( transition.first.second ) ), ext::set < StateType > { transition.second } ); } template<class SymbolType, class EpsilonType, class StateType >