diff --git a/alib2data/src/alphabet/NonlinearVariableSymbol.h b/alib2data/src/alphabet/NonlinearVariableSymbol.h index 2357cdaf69a7f0a14a3c81588796ec74d7e16bc3..1014187840182ca891f83a733e1f1776926c6641 100644 --- a/alib2data/src/alphabet/NonlinearVariableSymbol.h +++ b/alib2data/src/alphabet/NonlinearVariableSymbol.h @@ -75,6 +75,9 @@ public: virtual SymbolBase * inc ( ) &&; virtual SymbolBase * normalize ( ) && { + if ( typeid ( NonlinearVariableSymbol < > ) == typeid ( NonlinearVariableSymbol < SymbolType > ) ) + return this; + return new NonlinearVariableSymbol < > ( SymbolNormalize::normalizeSymbol ( std::move ( this->getSymbol ( ) ) ) ); } }; diff --git a/alib2data/src/alphabet/RankedSymbol.h b/alib2data/src/alphabet/RankedSymbol.h index c2ef21ba30ee91b27d81af94a9fe8b533541abd6..8adaf52eb33d7b66740061cfe1c166496e1a6871 100644 --- a/alib2data/src/alphabet/RankedSymbol.h +++ b/alib2data/src/alphabet/RankedSymbol.h @@ -71,6 +71,9 @@ public: } virtual SymbolBase * normalize ( ) && { + if ( typeid ( RankedSymbol < > ) == typeid ( RankedSymbol < SymbolType, RankType > ) ) + return this; + return new RankedSymbol < > ( normalizeRaw ( std::move ( *this ) ) ); } }; diff --git a/alib2data/src/automaton/FSM/CompactNFA.h b/alib2data/src/automaton/FSM/CompactNFA.h index 2f5d2f43fa8f2adff84f3d64e516d74c999a3011..96a07c0b4f5b09361972f3987089afae7b2e1adf 100644 --- a/alib2data/src/automaton/FSM/CompactNFA.h +++ b/alib2data/src/automaton/FSM/CompactNFA.h @@ -184,6 +184,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( CompactNFA < > ) == typeid ( CompactNFA < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/FSM/DFA.h b/alib2data/src/automaton/FSM/DFA.h index dd6e719c0976a9be1541acd57c64d6fcc782d246..5156aaa8e095ad7eba2f53cd87cd58ee01f37f17 100644 --- a/alib2data/src/automaton/FSM/DFA.h +++ b/alib2data/src/automaton/FSM/DFA.h @@ -175,6 +175,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( DFA < > ) == typeid ( DFA < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/FSM/EpsilonNFA.h b/alib2data/src/automaton/FSM/EpsilonNFA.h index 0b34800711aff2d59de2bac2bbfcfdc3a299618e..7d4f210ab7d82b4fa23264ee3bd40c72cbe756c0 100644 --- a/alib2data/src/automaton/FSM/EpsilonNFA.h +++ b/alib2data/src/automaton/FSM/EpsilonNFA.h @@ -277,6 +277,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( EpsilonNFA < > ) == typeid ( EpsilonNFA < SymbolType, EpsilonType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/FSM/ExtendedNFA.h b/alib2data/src/automaton/FSM/ExtendedNFA.h index 8cf9cfc9663240778fabef6fdfcaa3b4d21fc363..ad51588e94f0b81f2e8ff9584da4ee9e2692936c 100644 --- a/alib2data/src/automaton/FSM/ExtendedNFA.h +++ b/alib2data/src/automaton/FSM/ExtendedNFA.h @@ -188,6 +188,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( ExtendedNFA < > ) == typeid ( ExtendedNFA < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h index d7b04e49c946cb1fce3fbd6888e1a3f83ae22d8b..ba75d0c412180a3252f50a293f56fe1c5e261608 100644 --- a/alib2data/src/automaton/FSM/MultiInitialStateNFA.h +++ b/alib2data/src/automaton/FSM/MultiInitialStateNFA.h @@ -202,6 +202,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( MultiInitialStateNFA < > ) == typeid ( MultiInitialStateNFA < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > initialStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < InitialStates > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/FSM/NFA.h b/alib2data/src/automaton/FSM/NFA.h index e2eabec3a1d9f2b8ee6f3c0fa1fa623eb35050f6..cbf2077c1c60ebd44fc999dec52124c1905a56ec 100644 --- a/alib2data/src/automaton/FSM/NFA.h +++ b/alib2data/src/automaton/FSM/NFA.h @@ -194,6 +194,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( NFA < > ) == typeid ( NFA < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); DefaultStateType initialState = AutomatonNormalize::normalizeState ( std::move ( this->template accessElement < InitialState > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/DPDA.h b/alib2data/src/automaton/PDA/DPDA.h index a50a8960d17d8d4d2fc270eab7d4c8873e390942..ab99f5dab605d58b43df80b8e48037cc5375dca5 100644 --- a/alib2data/src/automaton/PDA/DPDA.h +++ b/alib2data/src/automaton/PDA/DPDA.h @@ -209,6 +209,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( DPDA < > ) == typeid ( DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/InputDrivenDPDA.h b/alib2data/src/automaton/PDA/InputDrivenDPDA.h index b12dc84995a84be6218d2329c81753eab497451f..979e7ad6f3cd7e226e2591970d574bc92e5166d4 100644 --- a/alib2data/src/automaton/PDA/InputDrivenDPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenDPDA.h @@ -213,6 +213,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( InputDrivenDPDA < > ) == typeid ( InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/InputDrivenNPDA.h b/alib2data/src/automaton/PDA/InputDrivenNPDA.h index c9f8ccb935567701ffa78d68a18411466199a529..f916b2c964dd58420f3d1c9d078bd62e882765f5 100644 --- a/alib2data/src/automaton/PDA/InputDrivenNPDA.h +++ b/alib2data/src/automaton/PDA/InputDrivenNPDA.h @@ -222,6 +222,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( InputDrivenNPDA < > ) == typeid ( InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/NPDA.h b/alib2data/src/automaton/PDA/NPDA.h index 26515eb58cfc3d27965dcb8fc0ac3c2951f8b5b0..9a6dad36d6f619ec8420fc74a427eb1a82a7d0ca 100644 --- a/alib2data/src/automaton/PDA/NPDA.h +++ b/alib2data/src/automaton/PDA/NPDA.h @@ -207,6 +207,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( NPDA < > ) == typeid ( NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/NPDTA.h b/alib2data/src/automaton/PDA/NPDTA.h index c0b8624383217635bb705c008b0e030eabb47c60..e84338d4341226b906eba5432f4189732616c7a3 100644 --- a/alib2data/src/automaton/PDA/NPDTA.h +++ b/alib2data/src/automaton/PDA/NPDTA.h @@ -231,6 +231,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( NPDTA < > ) == typeid ( NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > outputAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < OutputAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h index 9baee2c97f90894265a00bd3f46c262ebe852ad2..b7e521310ad307000f9f5db6bb0c6d4e214db178 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h @@ -235,6 +235,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( RealTimeHeightDeterministicDPDA < > ) == typeid ( RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h index 06159756d1efffa4a1973762a4612ef7d4eaba8e..0718f3ea9a13dbd4fe1b6a0c0a8fb8ba4b62e8cd 100644 --- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h +++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicNPDA.h @@ -276,6 +276,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( RealTimeHeightDeterministicNPDA < > ) == typeid ( RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BottomOfTheStackSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/SinglePopDPDA.h b/alib2data/src/automaton/PDA/SinglePopDPDA.h index 58b7ea44f56687c148a5a9126f409e160fbc3d99..0a6d722ae1b7ab1501e299a2b4d9007dd592d95a 100644 --- a/alib2data/src/automaton/PDA/SinglePopDPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopDPDA.h @@ -200,6 +200,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( SinglePopDPDA < > ) == typeid ( SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/SinglePopNPDA.h b/alib2data/src/automaton/PDA/SinglePopNPDA.h index 6de608b29e14c65904bb53fca5e176c317f4b1f0..f134968944a43dbff1c7677fc36a775f69984d78 100644 --- a/alib2data/src/automaton/PDA/SinglePopNPDA.h +++ b/alib2data/src/automaton/PDA/SinglePopNPDA.h @@ -207,6 +207,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( SinglePopNPDA < > ) == typeid ( SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) ) ); DefaultSymbolType bottomSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h index 10214d3f9523e067b984eb295e276c3cdd7c94f5..cd5e4aa8c1d103ed957f921a2984d1ac3b2465af 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h @@ -268,6 +268,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( VisiblyPushdownDPDA < > ) == typeid ( VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h index fc4f4ef46e2631e77fa756910ea7a3c6fb0be759..51002ae3800a998388a2a23a21698b0c3c8c9411 100644 --- a/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h +++ b/alib2data/src/automaton/PDA/VisiblyPushdownNPDA.h @@ -303,6 +303,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( VisiblyPushdownNPDA < > ) == typeid ( VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > call_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < CallAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > return_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < ReturnAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > local_alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < LocalAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/TA/DFTA.h b/alib2data/src/automaton/TA/DFTA.h index cd7ca3f7b89d286c5391de395ec7bce7a7fbd286..6efe2375b951494eb3ebf83ca8616299b1d6a54b 100644 --- a/alib2data/src/automaton/TA/DFTA.h +++ b/alib2data/src/automaton/TA/DFTA.h @@ -151,6 +151,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( DFTA < > ) == typeid ( DFTA < SymbolType, RankType, StateType > ) ) + return this; + std::set < std::ranked_symbol < DefaultSymbolType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > finalStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < FinalStates > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/TA/NFTA.h b/alib2data/src/automaton/TA/NFTA.h index ae74bfb84510dfc46574d2493bf86a57c51fdcc0..53129b580460ec686d45d0e140e544629b0da153 100644 --- a/alib2data/src/automaton/TA/NFTA.h +++ b/alib2data/src/automaton/TA/NFTA.h @@ -169,6 +169,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( NFTA < > ) == typeid ( NFTA < SymbolType, RankType, StateType > ) ) + return this; + std::set < std::ranked_symbol < DefaultSymbolType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); std::set < DefaultStateType > states = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < States > ( ).get ( ) ) ); std::set < DefaultStateType > finalStates = AutomatonNormalize::normalizeStates ( std::move ( this->template accessComponent < FinalStates > ( ).get ( ) ) ); diff --git a/alib2data/src/automaton/TM/OneTapeDTM.h b/alib2data/src/automaton/TM/OneTapeDTM.h index 3ae785c6b753073792c7d11f1858899a210cd5f6..dbd2d5b774d7b8d95823e925e6f11dd96efc4f0b 100644 --- a/alib2data/src/automaton/TM/OneTapeDTM.h +++ b/alib2data/src/automaton/TM/OneTapeDTM.h @@ -188,6 +188,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual AutomatonBase * normalize ( ) && { + if ( typeid ( OneTapeDTM < > ) == typeid ( OneTapeDTM < SymbolType, StateType > ) ) + return this; + std::set < DefaultSymbolType > tapeAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TapeAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) ) ); DefaultSymbolType blankSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BlankSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextFree/CFG.h b/alib2data/src/grammar/ContextFree/CFG.h index bd0df7736afb73336275c9ec0458daa3979401d5..319df67569efe04b766edfcf9e01207fb21e55d9 100644 --- a/alib2data/src/grammar/ContextFree/CFG.h +++ b/alib2data/src/grammar/ContextFree/CFG.h @@ -122,6 +122,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( CFG < > ) == typeid ( CFG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextFree/CNF.h b/alib2data/src/grammar/ContextFree/CNF.h index 3fe253bb52096efc0049e00815c445ed86dd5f98..99dec2db973bab63621dda8787fd7c17be9c4e0f 100644 --- a/alib2data/src/grammar/ContextFree/CNF.h +++ b/alib2data/src/grammar/ContextFree/CNF.h @@ -129,6 +129,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( CNF < > ) == typeid ( CNF < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h index 5b57b76af044e922c837c7b317662d02bc5a8b0b..7f48583bf1e4cc40b02f63e5e45710609cbce851 100644 --- a/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h +++ b/alib2data/src/grammar/ContextFree/EpsilonFreeCFG.h @@ -124,6 +124,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( EpsilonFreeCFG < > ) == typeid ( EpsilonFreeCFG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextFree/GNF.h b/alib2data/src/grammar/ContextFree/GNF.h index 345b4fa6990de8dc0ee2f3f67c492431892841d6..a7d85cc85c63c18fa803ff03f2234227ed8edc33 100644 --- a/alib2data/src/grammar/ContextFree/GNF.h +++ b/alib2data/src/grammar/ContextFree/GNF.h @@ -125,6 +125,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( GNF < > ) == typeid ( GNF < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextFree/LG.h b/alib2data/src/grammar/ContextFree/LG.h index 75408d84b31f8a5e1b511889ff9f8e62bf52d60f..b45d22cc70735b0a9789f407390fae2e0b520b49 100644 --- a/alib2data/src/grammar/ContextFree/LG.h +++ b/alib2data/src/grammar/ContextFree/LG.h @@ -126,6 +126,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( LG < > ) == typeid ( LG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextSensitive/CSG.h b/alib2data/src/grammar/ContextSensitive/CSG.h index c5bb81460d67c484a093958f7a0678a1821f8a32..60798f44cb8ba19409b58943b41b16525755eb7e 100644 --- a/alib2data/src/grammar/ContextSensitive/CSG.h +++ b/alib2data/src/grammar/ContextSensitive/CSG.h @@ -118,6 +118,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( CSG < > ) == typeid ( CSG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h index d58ad2e126e8fd70ebdce67372a9c23f8e1e3f22..c46365433fb1dac30016b83c65ecaa309a64287b 100644 --- a/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h +++ b/alib2data/src/grammar/ContextSensitive/NonContractingGrammar.h @@ -118,6 +118,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( NonContractingGrammar < > ) == typeid ( NonContractingGrammar < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Regular/LeftLG.h b/alib2data/src/grammar/Regular/LeftLG.h index 46ed0d4836be0db406bd33e8b6c5bed6f273e4b2..accb91d52ba377a27fec22937eebb480139a99b0 100644 --- a/alib2data/src/grammar/Regular/LeftLG.h +++ b/alib2data/src/grammar/Regular/LeftLG.h @@ -125,6 +125,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( LeftLG < > ) == typeid ( LeftLG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Regular/LeftRG.h b/alib2data/src/grammar/Regular/LeftRG.h index 845122fde36e713de030db30a786aca7620e8bdc..9808617bf71fedee9566c9e28ad77519fbeaca97 100644 --- a/alib2data/src/grammar/Regular/LeftRG.h +++ b/alib2data/src/grammar/Regular/LeftRG.h @@ -206,6 +206,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( LeftRG < > ) == typeid ( LeftRG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Regular/RightLG.h b/alib2data/src/grammar/Regular/RightLG.h index 9e64bbc2f15420f055968c08850754f4fd393e0f..0daa2873f5ce68e669d4e17248bda3f5608cb687 100644 --- a/alib2data/src/grammar/Regular/RightLG.h +++ b/alib2data/src/grammar/Regular/RightLG.h @@ -125,6 +125,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( RightLG < > ) == typeid ( RightLG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Regular/RightRG.h b/alib2data/src/grammar/Regular/RightRG.h index 876065f5f2cfb86e306621a59026cfc37c6bcdd4..c7fbce6e9f7abbf8af2d13e702ee7601aab6fa79 100644 --- a/alib2data/src/grammar/Regular/RightRG.h +++ b/alib2data/src/grammar/Regular/RightRG.h @@ -146,6 +146,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( RightRG < > ) == typeid ( RightRG < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h index 0474341fdc8c44f57c9154d165b8e9c9ef619c4b..deccf917d8f09098d6a3bf17d0f377be8057e508 100644 --- a/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h +++ b/alib2data/src/grammar/Unrestricted/ContextPreservingUnrestrictedGrammar.h @@ -114,6 +114,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( ContextPreservingUnrestrictedGrammar < > ) == typeid ( ContextPreservingUnrestrictedGrammar < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h index b1b35c1c8e44a5699ba3038d3e94934253cb5164..8ec51e336fd3a69b6f332e91367f7521001f2bee 100644 --- a/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h +++ b/alib2data/src/grammar/Unrestricted/UnrestrictedGrammar.h @@ -114,6 +114,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual GrammarBase * normalize ( ) && { + if ( typeid ( UnrestrictedGrammar < > ) == typeid ( UnrestrictedGrammar < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > nonterminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonterminalAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > terminals = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < TerminalAlphabet > ( ).get ( ) ) ); DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < InitialSymbol > ( ).get ( ) ) ); diff --git a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h index 214f5aa3124021a925da85e0dbc9466a5674adc2..2ada29763ec11c63566e56fc15c7436dd64a368f 100644 --- a/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h +++ b/alib2data/src/indexes/arbology/CompressedBitParallelTreeIndex.h @@ -120,6 +120,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual ObjectBase * normalize ( ) && { + if ( typeid ( CompressedBitParallelTreeIndex < > ) == typeid ( CompressedBitParallelTreeIndex < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::map < DefaultSymbolType, common::SparseBoolVector > vectors; for ( std::pair < SymbolType, common::SparseBoolVector > && vector : std::make_moveable_map ( m_vectors ) ) diff --git a/alib2data/src/indexes/arbology/FullAndLinearIndex.h b/alib2data/src/indexes/arbology/FullAndLinearIndex.h index 1f27a248a048426a1afd403197adf4874fb4b72a..ffb7fdd283d8f18fc9a676f0efb40b3f6df04781 100644 --- a/alib2data/src/indexes/arbology/FullAndLinearIndex.h +++ b/alib2data/src/indexes/arbology/FullAndLinearIndex.h @@ -115,6 +115,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual ObjectBase * normalize ( ) && { + if ( typeid ( FullAndLinearIndex < > ) == typeid ( FullAndLinearIndex < SymbolType > ) ) + return this; + indexes::stringology::PositionHeap < DefaultSymbolType > stringIndex = std::move ( m_StringIndex ).normalizeRaw ( ); return new FullAndLinearIndex < > ( std::move ( stringIndex ), std::move ( m_JumpTable ) ); diff --git a/alib2data/src/indexes/stringology/BitParallelIndex.h b/alib2data/src/indexes/stringology/BitParallelIndex.h index 8b984af866e4d20585107c60127eb19b6b7a33c0..bb6e5074568533fd5053e98e72fc0a9f71b985ac 100644 --- a/alib2data/src/indexes/stringology/BitParallelIndex.h +++ b/alib2data/src/indexes/stringology/BitParallelIndex.h @@ -113,6 +113,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual ObjectBase * normalize ( ) && { + if ( typeid ( BitParallelIndex < > ) == typeid ( BitParallelIndex < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::map < DefaultSymbolType, std::vector < bool > > vectors; for ( std::pair < SymbolType, std::vector < bool > > && vector : std::make_moveable_map ( m_vectors ) ) diff --git a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h index f2e75d5ef51698885f2394a40736d7f847d24491..53bd95dd1317540e1863d7426fd56e636e6ece1e 100644 --- a/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h +++ b/alib2data/src/indexes/stringology/CompressedBitParallelIndex.h @@ -113,6 +113,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual ObjectBase * normalize ( ) && { + if ( typeid ( CompressedBitParallelIndex < > ) == typeid ( CompressedBitParallelIndex < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::map < DefaultSymbolType, common::SparseBoolVector > vectors; for ( std::pair < SymbolType, common::SparseBoolVector > && vector : std::make_moveable_map ( m_vectors ) ) diff --git a/alib2data/src/indexes/stringology/PositionHeap.h b/alib2data/src/indexes/stringology/PositionHeap.h index 960824bb627aa677e0f6c8d9f816b29099f31887..5e76e2b0178144a6f8acaf33a9cfa4aba6637caf 100644 --- a/alib2data/src/indexes/stringology/PositionHeap.h +++ b/alib2data/src/indexes/stringology/PositionHeap.h @@ -131,6 +131,9 @@ public: } virtual alib::ObjectBase * normalize ( ) && { + if ( typeid ( PositionHeap < > ) == typeid ( PositionHeap < SymbolType > ) ) + return this; + return std::move ( * this ).normalizeRaw ( ).plunder ( ); } }; diff --git a/alib2data/src/indexes/stringology/SuffixArray.h b/alib2data/src/indexes/stringology/SuffixArray.h index e9aefeadc5e59a60d15a67083b4aa6fa70d42c75..1ba1070828d544c4a072a6fe83723cef3055764e 100644 --- a/alib2data/src/indexes/stringology/SuffixArray.h +++ b/alib2data/src/indexes/stringology/SuffixArray.h @@ -117,6 +117,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual ObjectBase * normalize ( ) && { + if ( typeid ( SuffixArray < > ) == typeid ( SuffixArray < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < DefaultSymbolType > string = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( m_string ) ); diff --git a/alib2data/src/indexes/stringology/SuffixTrie.h b/alib2data/src/indexes/stringology/SuffixTrie.h index f7a730e386fd827a7b3cb98e3de1cd132c4fa4ab..cbca5fb2d91b64986610b50846641704613decc2 100644 --- a/alib2data/src/indexes/stringology/SuffixTrie.h +++ b/alib2data/src/indexes/stringology/SuffixTrie.h @@ -123,6 +123,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual alib::ObjectBase * normalize ( ) && { + if ( typeid ( SuffixTrie < > ) == typeid ( SuffixTrie < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::trie < DefaultSymbolType, std::variant < void, unsigned > > trie = IndexesNormalize::normalizeTrie ( std::move ( m_trie ) ); diff --git a/alib2data/src/regexp/formal/FormalRegExp.h b/alib2data/src/regexp/formal/FormalRegExp.h index 2358959b055a5ac25c973789beb8db4d0eb6b3fb..22652937fe941d8c5f26ddc81629be7f9286f6ca 100644 --- a/alib2data/src/regexp/formal/FormalRegExp.h +++ b/alib2data/src/regexp/formal/FormalRegExp.h @@ -106,6 +106,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RegExpBase * normalize ( ) && { + if ( typeid ( FormalRegExp < > ) == typeid ( FormalRegExp < SymbolType > ) ) + return this; + return new FormalRegExp < > ( std::move ( m_regExp ).normalize ( ) ); } }; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExp.h b/alib2data/src/regexp/unbounded/UnboundedRegExp.h index c171ea25fe1dd4b6d20cb9019ed57c7a7b3556a3..9b7d00665296564a65108d442480e2f95ef44da1 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExp.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExp.h @@ -106,6 +106,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RegExpBase * normalize ( ) && { + if ( typeid ( UnboundedRegExp < > ) == typeid ( UnboundedRegExp < SymbolType > ) ) + return this; + return new UnboundedRegExp < > ( std::move ( m_regExp ).normalize ( ) ); } }; diff --git a/alib2data/src/rte/formal/FormalRTE.h b/alib2data/src/rte/formal/FormalRTE.h index fea59dae95dbfb8e2b06407918e370b269788192..6425a592cf11810e21d6f93adf55f436131869f1 100644 --- a/alib2data/src/rte/formal/FormalRTE.h +++ b/alib2data/src/rte/formal/FormalRTE.h @@ -143,6 +143,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RTEBase * normalize ( ) && { + if ( typeid ( FormalRTE < > ) == typeid ( FormalRTE < SymbolType > ) ) + return this; + return new FormalRTE < > ( std::move ( m_rte ).normalize ( ) ); } }; diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h index 5bdce66015a4099cb87182186a853fe45f77f89c..2cd9b23b4b76316da23a11922bb6eb9098727321 100644 --- a/alib2data/src/string/CyclicString.h +++ b/alib2data/src/string/CyclicString.h @@ -93,6 +93,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual StringBase * normalize ( ) && { + if ( typeid ( CyclicString < > ) == typeid ( CyclicString < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < DefaultSymbolType > content = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( m_Data ) ); return new CyclicString < > ( std::move ( alphabet ), std::move ( content ) ); diff --git a/alib2data/src/string/Epsilon.h b/alib2data/src/string/Epsilon.h index f2ff86ebd90c63e2628301be9a5a70b74d3cb70d..77cfeef8d77842600f6b28a42590fd81569c5bda 100644 --- a/alib2data/src/string/Epsilon.h +++ b/alib2data/src/string/Epsilon.h @@ -86,6 +86,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual StringBase * normalize ( ) && { + if ( typeid ( Epsilon < > ) == typeid ( Epsilon < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); return new Epsilon < > ( std::move ( alphabet ) ); } diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h index d1ffbe02e944c1516551e9558c59319ce284eb83..31d190498b3f52d212894c01e97007a04d74445e 100644 --- a/alib2data/src/string/LinearString.h +++ b/alib2data/src/string/LinearString.h @@ -113,6 +113,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual StringBase * normalize ( ) && { + if ( typeid ( LinearString < > ) == typeid ( LinearString < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < DefaultSymbolType > content = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( m_Data ) ); return new LinearString < > ( std::move ( alphabet ), std::move ( content ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h index 0551f639ecf5031293749aa2cf98784de6ca8cdb..63cc98e7a1dd3cbee806d497b160567c878166ad 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h @@ -129,6 +129,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedBarNonlinearPattern < > ) == typeid ( PrefixRankedBarNonlinearPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > variablesBars = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < VariablesBarSymbol > ( ).get ( ) ) ); std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > nonlinearAlphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < NonlinearAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h index 1e9d1cf8287d0da65c8de1dba662ef3422ab7558..ef9cdf1fb3546842b6a502d9afa40cb9336121e5 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h @@ -118,6 +118,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedBarPattern < > ) == typeid ( PrefixRankedBarPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > variablesBars = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < VariablesBarSymbol > ( ).get ( ) ) ); std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > bars = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < BarSymbols > ( ).get ( ) ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h index 82dfd8ee06d5de5591549c0e36facd5df3c197a5..a85b7bccb9f92681ea63156e7a630c989c46161f 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h @@ -105,6 +105,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedBarTree < > ) == typeid ( PrefixRankedBarTree < SymbolType, RankType > ) ) + return this; + std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > bars = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < BarSymbols > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > content = alphabet::SymbolNormalize::normalizeRankedSymbols ( std::move ( m_Data ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h index 5f5d1fc9d153bdfee256ab18e393f74104ecc705..d6a08ae232237836b4a0b45bfd985fb5abbf8d66 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h @@ -113,6 +113,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedNonlinearPattern < > ) == typeid ( PrefixRankedNonlinearPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > nonlinearAlphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < NonlinearAlphabet > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h index ec5681c0cada8d0e3850d2570fe97c3c77cbf3c0..57d3f06fb49f727e62362c6591199db7d8a3cb58 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h @@ -104,6 +104,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedPattern < > ) == typeid ( PrefixRankedPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > content = alphabet::SymbolNormalize::normalizeRankedSymbols ( std::move ( m_Data ) ); diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h index 4b45896935938780f4821649478fbb33af098b0d..fb766abb055cb4304158a63f9a70da5311a1863a 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedTree.h @@ -96,6 +96,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixRankedTree < > ) == typeid ( PrefixRankedTree < SymbolType, RankType > ) ) + return this; + std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > content = alphabet::SymbolNormalize::normalizeRankedSymbols ( std::move ( m_Data ) ); diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/ranked/RankedNonlinearPattern.h index def29fc92029274b9dbeead11c5bc8ff41a28dfd..6204c489890ac59e3beffd226c2c3c81a2122ea8 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.h @@ -121,6 +121,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( RankedNonlinearPattern < > ) == typeid ( RankedNonlinearPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > nonlinearAlphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < NonlinearAlphabet > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h index 1f3c9788b1d909de3a0421163219fafd14adff19..f2191f1e0e84916226b61432f5bdaf97b5e93486 100644 --- a/alib2data/src/tree/ranked/RankedPattern.h +++ b/alib2data/src/tree/ranked/RankedPattern.h @@ -115,6 +115,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( RankedPattern < > ) == typeid ( RankedPattern < SymbolType, RankType > ) ) + return this; + std::ranked_symbol < DefaultSymbolType, DefaultRankType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::tree < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > content = TreeNormalize::normalizeRankedTree ( std::move ( m_content ) ); diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h index d72fdbf9ce869f7253791e9aedc661b9fad2555d..dfe20350070b9dd459d95257a16201d7086daf64 100644 --- a/alib2data/src/tree/ranked/RankedTree.h +++ b/alib2data/src/tree/ranked/RankedTree.h @@ -111,6 +111,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual RankedTreeBase * normalize ( ) && { + if ( typeid ( RankedTree < > ) == typeid ( RankedTree < SymbolType, RankType > ) ) + return this; + std::set < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > alphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::tree < std::ranked_symbol < DefaultSymbolType, DefaultRankType > > content = TreeNormalize::normalizeRankedTree ( std::move ( m_content ) ); diff --git a/alib2data/src/tree/unranked/PrefixBarTree.h b/alib2data/src/tree/unranked/PrefixBarTree.h index 3c7b27078b011dd852260dc210b7942e053f19f2..bb465edfd48cff5dd44fe2c73bae7bfb186e6366 100644 --- a/alib2data/src/tree/unranked/PrefixBarTree.h +++ b/alib2data/src/tree/unranked/PrefixBarTree.h @@ -102,6 +102,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual UnrankedTreeBase * normalize ( ) && { + if ( typeid ( PrefixBarTree < > ) == typeid ( PrefixBarTree < SymbolType > ) ) + return this; + DefaultSymbolType bar = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < BarSymbol > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::vector < DefaultSymbolType > content = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( m_Data ) ); diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h index ecbe5f2c0c32f4772a341db625e6cf40ac37c7ea..7cbb4d6a73efcdd65c5315c79429d57d9cd105a7 100644 --- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h +++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h @@ -125,6 +125,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual UnrankedTreeBase * normalize ( ) && { + if ( typeid ( UnrankedNonlinearPattern < > ) == typeid ( UnrankedNonlinearPattern < SymbolType > ) ) + return this; + DefaultSymbolType wildcard = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < DefaultSymbolType > nonlinearAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < NonlinearAlphabet > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); diff --git a/alib2data/src/tree/unranked/UnrankedPattern.h b/alib2data/src/tree/unranked/UnrankedPattern.h index 97f754b23c7f1d1750dcc056a0ea47aabc245d7d..712d8ed1949b05fbcf03e3883bd18e83c4b1b4b7 100644 --- a/alib2data/src/tree/unranked/UnrankedPattern.h +++ b/alib2data/src/tree/unranked/UnrankedPattern.h @@ -113,6 +113,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual UnrankedTreeBase * normalize ( ) && { + if ( typeid ( UnrankedPattern < > ) == typeid ( UnrankedPattern < SymbolType > ) ) + return this; + DefaultSymbolType wildcard = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( this->template accessElement < SubtreeWildcard > ( ).get ( ) ) ); std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::tree < DefaultSymbolType > content = TreeNormalize::normalizeTree ( std::move ( m_content ) ); diff --git a/alib2data/src/tree/unranked/UnrankedTree.h b/alib2data/src/tree/unranked/UnrankedTree.h index 66973126a586dc1644d4d66d5c98aab9893b257e..ef7a640e4a19b2da0f75f81dc3215e71097ddf8e 100644 --- a/alib2data/src/tree/unranked/UnrankedTree.h +++ b/alib2data/src/tree/unranked/UnrankedTree.h @@ -108,6 +108,9 @@ public: virtual alib::ObjectBase * inc ( ) &&; virtual UnrankedTreeBase * normalize ( ) && { + if ( typeid ( UnrankedTree < > ) == typeid ( UnrankedTree < SymbolType > ) ) + return this; + std::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) ) ); std::tree < DefaultSymbolType > content = TreeNormalize::normalizeTree ( std::move ( m_content ) );