Skip to content
Snippets Groups Projects
Commit f1ffe284 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

static compare functor

parent 8647ef70
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
...@@ -101,7 +101,7 @@ const SymbolType& NonlinearVariableSymbol < SymbolType >::getSymbol() const { ...@@ -101,7 +101,7 @@ const SymbolType& NonlinearVariableSymbol < SymbolType >::getSymbol() const {
   
template < class SymbolType > template < class SymbolType >
int NonlinearVariableSymbol < SymbolType >::compare ( const NonlinearVariableSymbol & other ) const { int NonlinearVariableSymbol < SymbolType >::compare ( const NonlinearVariableSymbol & other ) const {
std::compare < decltype ( m_symbol ) > comp; static std::compare < decltype ( m_symbol ) > comp;
   
return comp ( m_symbol, other.m_symbol ); return comp ( m_symbol, other.m_symbol );
} }
......
...@@ -31,7 +31,7 @@ const std::set<Symbol>& SymbolSetSymbol::getData() const { ...@@ -31,7 +31,7 @@ const std::set<Symbol>& SymbolSetSymbol::getData() const {
} }
   
int SymbolSetSymbol::compare(const SymbolSetSymbol& other) const { int SymbolSetSymbol::compare(const SymbolSetSymbol& other) const {
std::compare<std::set<Symbol>> comp; static std::compare<std::set<Symbol>> comp;
return comp(symbol, other.symbol); return comp(symbol, other.symbol);
} }
   
......
...@@ -115,7 +115,7 @@ int ranked_symbol < SymbolType, RankType >::compare(const ranked_symbol& other) ...@@ -115,7 +115,7 @@ int ranked_symbol < SymbolType, RankType >::compare(const ranked_symbol& other)
auto first = std::tie ( m_symbol, m_rank ); auto first = std::tie ( m_symbol, m_rank );
auto second = std::tie ( other.m_symbol, other.m_rank ); auto second = std::tie ( other.m_symbol, other.m_rank );
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -305,7 +305,7 @@ int CompactNFA < SymbolType, StateType >::compare ( const CompactNFA & other ) c ...@@ -305,7 +305,7 @@ int CompactNFA < SymbolType, StateType >::compare ( const CompactNFA & other ) c
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -272,7 +272,7 @@ int DFA<SymbolType, StateType>::compare ( const DFA & other ) const { ...@@ -272,7 +272,7 @@ int DFA<SymbolType, StateType>::compare ( const DFA & other ) const {
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.transitions ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.transitions );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -491,7 +491,7 @@ int EpsilonNFA < SymbolType, EpsilonType, StateType >::compare ( const EpsilonNF ...@@ -491,7 +491,7 @@ int EpsilonNFA < SymbolType, EpsilonType, StateType >::compare ( const EpsilonNF
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -323,7 +323,7 @@ int ExtendedNFA < SymbolType, StateType >::compare ( const ExtendedNFA & other ) ...@@ -323,7 +323,7 @@ int ExtendedNFA < SymbolType, StateType >::compare ( const ExtendedNFA & other )
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -313,7 +313,7 @@ int MultiInitialStateNFA < SymbolType, StateType >::compare ( const MultiInitial ...@@ -313,7 +313,7 @@ int MultiInitialStateNFA < SymbolType, StateType >::compare ( const MultiInitial
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialStates ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialStates ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialStates ( ), other.getFinalStates ( ), other.getTransitions ( ) ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialStates ( ), other.getFinalStates ( ), other.getTransitions ( ) );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -298,7 +298,7 @@ int NFA < SymbolType, StateType >::compare ( const NFA & other ) const { ...@@ -298,7 +298,7 @@ int NFA < SymbolType, StateType >::compare ( const NFA & other ) const {
auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ); auto first = std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions );
auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) ); auto second = std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
   
std::compare < decltype ( first ) > comp; static std::compare < decltype ( first ) > comp;
   
return comp ( first, second ); return comp ( first, second );
} }
......
...@@ -390,7 +390,7 @@ int DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c ...@@ -390,7 +390,7 @@ int DPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -366,7 +366,7 @@ int InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com ...@@ -366,7 +366,7 @@ int InputDrivenDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -362,7 +362,7 @@ int InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com ...@@ -362,7 +362,7 @@ int InputDrivenNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::com
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), getPushdownStoreOperations(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.getPushdownStoreOperations(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -278,7 +278,7 @@ int NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c ...@@ -278,7 +278,7 @@ int NPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType >::c
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -333,7 +333,7 @@ int NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolT ...@@ -333,7 +333,7 @@ int NPDTA < InputSymbolType, OutputSymbolType, EpsilonType, PushdownStoreSymbolT
auto first = std::tie(getStates(), getInputAlphabet(), getOutputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getOutputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getOutputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getOutputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
......
...@@ -545,7 +545,7 @@ int RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStor ...@@ -545,7 +545,7 @@ int RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, PushdownStor
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -439,7 +439,7 @@ int RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStor ...@@ -439,7 +439,7 @@ int RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStor
auto first = std::tie(getStates(), getInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -321,7 +321,7 @@ int SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State ...@@ -321,7 +321,7 @@ int SinglePopDPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -283,7 +283,7 @@ int SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State ...@@ -283,7 +283,7 @@ int SinglePopNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, State
auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions); auto first = std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions);
auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions); auto second = std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -461,7 +461,7 @@ int VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >: ...@@ -461,7 +461,7 @@ int VisiblyPushdownDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >:
auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions); auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions); auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
...@@ -400,7 +400,7 @@ int VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >: ...@@ -400,7 +400,7 @@ int VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >:
auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions); auto first = std::tie(getStates(), getCallInputAlphabet(), getReturnInputAlphabet(), getLocalInputAlphabet(), getInitialStates(), getFinalStates(), getPushdownStoreAlphabet(), getBottomOfTheStackSymbol(), callTransitions, returnTransitions, localTransitions);
auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions); auto second = std::tie(other.getStates(), other.getCallInputAlphabet(), other.getReturnInputAlphabet(), other.getLocalInputAlphabet(), other.getInitialStates(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getBottomOfTheStackSymbol(), other.callTransitions, other.returnTransitions, other.localTransitions);
   
std::compare<decltype(first)> comp; static std::compare<decltype(first)> comp;
return comp(first, second); return comp(first, second);
} }
   
......
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