diff --git a/alib2data/src/tree/ranked/PostfixRankedTree.h b/alib2data/src/tree/ranked/PostfixRankedTree.h index 541e00f6a7368ed71fc8dc1104aa0c88ac4844ff..887be8606630a0956738dc321a02d461b7d28c6c 100644 --- a/alib2data/src/tree/ranked/PostfixRankedTree.h +++ b/alib2data/src/tree/ranked/PostfixRankedTree.h @@ -370,7 +370,7 @@ namespace core { * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint < ::tree::PostfixRankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint < tree::PostfixRankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: /** * Returns true if the symbol is still used in the tree. @@ -380,7 +380,7 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PostfixRankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PostfixRankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = tree.getContent ( ); return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ); @@ -394,7 +394,7 @@ public: * * \returns true */ - static bool available ( const ::tree::PostfixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PostfixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } @@ -404,7 +404,7 @@ public: * \param tree the tested tree * \param symbol the tested symbol */ - static void valid ( const ::tree::PostfixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PostfixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; diff --git a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h index b266c2b9972716f46fdb6ca44fca876c12b46b3b..dd8f58edc50fa49b1c444195dbfa76f44cb485c0 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarNonlinearPattern.h @@ -350,85 +350,85 @@ object::ObjectBase* PrefixRankedBarNonlinearPattern < SymbolType, RankType >::in namespace core { template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = pattern.getContent ( ); - return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < ::tree::VariablesBarSymbol > ( ).get ( ) == symbol || pattern.template accessComponent < ::tree::BarSymbols > ( ).get ( ).count ( symbol ) || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol || pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol ) || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } - static bool available ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } - static void valid ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::BarSymbols > { +class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::BarSymbols > { public: - static bool used ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = pattern.getContent ( ); - return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < ::tree::VariablesBarSymbol > ( ).get ( ) == symbol; + return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol; } - static bool available ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::NonlinearAlphabet > { +class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::NonlinearAlphabet > { public: - static bool used ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool used ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return false; } - static bool available ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if ( ( unsigned ) symbol.getRank ( ) != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); + if ( pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if ( ( unsigned ) symbol.getRank ( ) != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); + if ( pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::VariablesBarSymbol > { +class ElementConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::VariablesBarSymbol > { public: - static bool available ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::BarSymbols > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedBarNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { if ( ( unsigned ) symbol.getRank ( ) != 0 ) - throw ::tree::TreeException ( "VariablesBarSymbol has nonzero arity" ); + throw tree::TreeException ( "VariablesBarSymbol has nonzero arity" ); } }; diff --git a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h index 1245864ef1b42868f4a74094f44e58811f68e2c5..73f2f4a86047463154f1c68e20091812cac50e2f 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarPattern.h @@ -494,7 +494,7 @@ namespace core { * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: /** * Returns true if the symbol is still used in the pattern. @@ -504,10 +504,10 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = pattern.getContent ( ); - return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < ::tree::VariablesBarSymbol > ( ).get ( ) == symbol || pattern.template accessComponent < ::tree::BarSymbols > ( ).get ( ).count ( symbol ) || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol || pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol ) || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } /** @@ -518,7 +518,7 @@ public: * * \returns true */ - static bool available ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } @@ -528,7 +528,7 @@ public: * \param pattern the tested pattern * \param symbol the tested symbol */ - static void valid ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; @@ -539,7 +539,7 @@ public: * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::BarSymbols > { +class SetConstraint< tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::BarSymbols > { public: /** * Returns true if the symbol is still used in the pattern. @@ -549,10 +549,10 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = pattern.getContent ( ); - return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < ::tree::VariablesBarSymbol > ( ).get ( ) == symbol; + return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol; } /** @@ -563,8 +563,8 @@ public: * * \returns true if the symbol is already in the alphabet of the pattern */ - static bool available ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } /** @@ -573,7 +573,7 @@ public: * \param pattern the tested pattern * \param symbol the tested symbol */ - static void valid ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; @@ -584,7 +584,7 @@ public: * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: /** * Determines whether the symbol is available in the pattern's alphabet. @@ -594,8 +594,8 @@ public: * * \returns true if the symbol is already in the alphabet of the pattern */ - static bool available ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } /** @@ -606,9 +606,9 @@ public: * * \throws TreeException if the symbol does not have zero arity */ - static void valid ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); } }; @@ -619,7 +619,7 @@ public: * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::VariablesBarSymbol > { +class ElementConstraint< tree::PrefixRankedBarPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::VariablesBarSymbol > { public: /** * Determines whether the symbol is available in the pattern's alphabet. @@ -629,7 +629,7 @@ public: * * \returns true if the symbol is already in the alphabet of the pattern */ - static bool available ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool available ( const tree::PrefixRankedBarPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { return pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol ); } @@ -641,7 +641,7 @@ public: * * \throws TreeException if the symbol does not have zero arity */ - static void valid ( const ::tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedBarPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) throw tree::TreeException ( "VariablesBarSymbol has nonzero arity" ); } diff --git a/alib2data/src/tree/ranked/PrefixRankedBarTree.h b/alib2data/src/tree/ranked/PrefixRankedBarTree.h index ad0e7b61ee4377b867f716107bfd4e807bb15e0e..e18bb6c714b661f35325fa70938bc1870f2fb2e2 100644 --- a/alib2data/src/tree/ranked/PrefixRankedBarTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedBarTree.h @@ -428,7 +428,7 @@ namespace core { * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedBarTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: /** * Returns true if the symbol is still used in the tree. @@ -438,7 +438,7 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = tree.getContent ( ); return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ); @@ -452,7 +452,7 @@ public: * * \returns true */ - static bool available ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } @@ -462,7 +462,7 @@ public: * \param tree the tested tree * \param symbol the tested symbol */ - static void valid ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; @@ -473,7 +473,7 @@ public: * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedBarTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::BarSymbols > { +class SetConstraint< tree::PrefixRankedBarTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::BarSymbols > { public: /** * Returns true if the symbol is still used in the tree. @@ -483,7 +483,7 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = tree.getContent ( ); return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ); @@ -497,8 +497,8 @@ public: * * \returns true if the symbol is already in the bar set of the tree */ - static bool available ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return tree.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedBarTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return tree.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } /** @@ -507,7 +507,7 @@ public: * \param tree the tested tree * \param symbol the tested symbol */ - static void valid ( const ::tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedBarTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h index 5069b8c87303c21c275f2acaaa7c85168f6a00d5..e71bd2bbd972d3e83aa969c14b1ff7b1138ccf33 100644 --- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.h @@ -289,55 +289,55 @@ object::ObjectBase* PrefixRankedNonlinearPattern < SymbolType, RankType >::inc() namespace core { template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & m_content = pattern.getContent ( ); - return std::find ( m_content.begin ( ), m_content.end ( ), symbol ) != m_content.end ( ) || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find ( m_content.begin ( ), m_content.end ( ), symbol ) != m_content.end ( ) || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } - static bool available ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } - static void valid ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::NonlinearAlphabet > { +class SetConstraint< tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::NonlinearAlphabet > { public: - static bool used ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool used ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return false; } - static bool available ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if ( ( unsigned ) symbol.getRank ( ) != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); + if ( pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::PrefixRankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if ( ( unsigned ) symbol.getRank ( ) != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); + if ( pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); } }; diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.h b/alib2data/src/tree/ranked/PrefixRankedPattern.h index 7ba8a58fdcd413621905ac77f92d0c48333a89e7..a990fc400738bac0efc17df48dfcda45bed5a52f 100644 --- a/alib2data/src/tree/ranked/PrefixRankedPattern.h +++ b/alib2data/src/tree/ranked/PrefixRankedPattern.h @@ -255,32 +255,32 @@ object::ObjectBase* PrefixRankedPattern < SymbolType, RankType >::inc() && { namespace core { template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::PrefixRankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = pattern.getContent ( ); - return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } - static bool available ( const ::tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } - static void valid ( const ::tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::PrefixRankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::PrefixRankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::PrefixRankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixRankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::PrefixRankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); } }; diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.h b/alib2data/src/tree/ranked/PrefixRankedTree.h index d25f3b29f3d79bc5a3267895f9c106c2a5deae83..6b56e2f9db84980ec41eccb6c341eaee97f12414 100644 --- a/alib2data/src/tree/ranked/PrefixRankedTree.h +++ b/alib2data/src/tree/ranked/PrefixRankedTree.h @@ -380,7 +380,7 @@ namespace core { * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::PrefixRankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixRankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: /** * Returns true if the symbol is still used in the tree. @@ -390,7 +390,7 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::PrefixRankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::PrefixRankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::vector < common::ranked_symbol < SymbolType, RankType > > & content = tree.getContent ( ); return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ); @@ -404,7 +404,7 @@ public: * * \returns true */ - static bool available ( const ::tree::PrefixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::PrefixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } @@ -414,7 +414,7 @@ public: * \param tree the tested tree * \param symbol the tested symbol */ - static void valid ( const ::tree::PrefixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::PrefixRankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; diff --git a/alib2data/src/tree/ranked/RankedNonlinearPattern.h b/alib2data/src/tree/ranked/RankedNonlinearPattern.h index fd4e2b766687c2e4c5ffb778efa4f433e926dae8..ddc071af12605768b7f33127f9381c7f36a73c88 100644 --- a/alib2data/src/tree/ranked/RankedNonlinearPattern.h +++ b/alib2data/src/tree/ranked/RankedNonlinearPattern.h @@ -271,54 +271,54 @@ object::ObjectBase* RankedNonlinearPattern < SymbolType, RankType >::inc() && { namespace core { template < class SymbolType, class RankType > -class SetConstraint< ::tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::tree < common::ranked_symbol < SymbolType, RankType > > & m_content = pattern.getContent ( ); - return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol || pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ); + return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol || pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ); } - static bool available ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } - static void valid ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class SetConstraint< ::tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::NonlinearAlphabet > { +class SetConstraint< tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::NonlinearAlphabet > { public: - static bool used ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool used ( const tree::RankedNonlinearPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return false; } - static bool available ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); + if ( pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::RankedNonlinearPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::RankedNonlinearPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); - if ( pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); + if ( pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); } }; diff --git a/alib2data/src/tree/ranked/RankedPattern.h b/alib2data/src/tree/ranked/RankedPattern.h index 660b1cfdc0bba61f2199dfd1643b1433d0df413b..ac0e30a2618140c44cb3012bc46112dc26c34e3c 100644 --- a/alib2data/src/tree/ranked/RankedPattern.h +++ b/alib2data/src/tree/ranked/RankedPattern.h @@ -255,31 +255,31 @@ object::ObjectBase* RankedPattern < SymbolType, RankType >::inc() && { namespace core { template < class SymbolType, class RankType > -class SetConstraint< ::tree::RankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::RankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::RankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::RankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::tree < common::ranked_symbol < SymbolType, RankType > > & m_content = pattern.getContent ( ); - return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } - static bool available ( const ::tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } - static void valid ( const ::tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; template < class SymbolType, class RankType > -class ElementConstraint< ::tree::RankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::RankedPattern < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::RankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::RankedPattern < SymbolType, RankType > & pattern, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { + static void valid ( const tree::RankedPattern < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & symbol) { if( ( unsigned ) symbol.getRank() != 0 ) - throw ::tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); + throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" ); } }; diff --git a/alib2data/src/tree/ranked/RankedTree.h b/alib2data/src/tree/ranked/RankedTree.h index 7a7babb8af732310d30a8e47371612eb50137cc9..a69824d488543f31bef8e060b2446ec3b34eee84 100644 --- a/alib2data/src/tree/ranked/RankedTree.h +++ b/alib2data/src/tree/ranked/RankedTree.h @@ -389,7 +389,7 @@ namespace core { * \tparam RankType used for the rank part of the ranked symbols of the alphabet of the pattern. */ template < class SymbolType, class RankType > -class SetConstraint< ::tree::RankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, ::tree::GeneralAlphabet > { +class SetConstraint< tree::RankedTree < SymbolType, RankType >, common::ranked_symbol < SymbolType, RankType >, tree::GeneralAlphabet > { public: /** * Returns true if the symbol is still used in the tree. @@ -399,7 +399,7 @@ public: * * \returns true if the symbol is used, false othervise */ - static bool used ( const ::tree::RankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { + static bool used ( const tree::RankedTree < SymbolType, RankType > & tree, const common::ranked_symbol < SymbolType, RankType > & symbol ) { const ext::tree < common::ranked_symbol < SymbolType, RankType > > & m_content = tree.getContent ( ); return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end(); } @@ -412,7 +412,7 @@ public: * * \returns true */ - static bool available ( const ::tree::RankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static bool available ( const tree::RankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { return true; } @@ -422,7 +422,7 @@ public: * \param tree the tested tree * \param symbol the tested symbol */ - static void valid ( const ::tree::RankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { + static void valid ( const tree::RankedTree < SymbolType, RankType > &, const common::ranked_symbol < SymbolType, RankType > & ) { } }; diff --git a/alib2data/src/tree/unranked/PrefixBarTree.h b/alib2data/src/tree/unranked/PrefixBarTree.h index c5ae6f03ecaed549c2df1c714c8b09eb9d23fd1c..ceb72d83446aca955e1b5faa994f651411dec342 100644 --- a/alib2data/src/tree/unranked/PrefixBarTree.h +++ b/alib2data/src/tree/unranked/PrefixBarTree.h @@ -253,30 +253,30 @@ object::ObjectBase* PrefixBarTree < SymbolType >::inc() && { namespace core { template < class SymbolType > -class SetConstraint< ::tree::PrefixBarTree < SymbolType >, SymbolType, ::tree::GeneralAlphabet > { +class SetConstraint< tree::PrefixBarTree < SymbolType >, SymbolType, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::PrefixBarTree < SymbolType > & tree, const SymbolType & symbol ) { + static bool used ( const tree::PrefixBarTree < SymbolType > & tree, const SymbolType & symbol ) { const ext::vector < SymbolType > & content = tree.getContent ( ); return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ); } - static bool available ( const ::tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { + static bool available ( const tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { return true; } - static void valid ( const ::tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { } }; template < class SymbolType > -class ElementConstraint< ::tree::PrefixBarTree < SymbolType >, SymbolType, ::tree::BarSymbol > { +class ElementConstraint< tree::PrefixBarTree < SymbolType >, SymbolType, tree::BarSymbol > { public: - static bool available ( const ::tree::PrefixBarTree < SymbolType > & tree, const SymbolType & symbol ) { - return tree.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::PrefixBarTree < SymbolType > & tree, const SymbolType & symbol ) { + return tree.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::PrefixBarTree < SymbolType > &, const SymbolType & ) { } }; diff --git a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h index 0392677faa3223ed4ceabaac50c28458debe3943..5d05ff98ef6a6fee0e1eb3bfecd46ed2abbe63e8 100644 --- a/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h +++ b/alib2data/src/tree/unranked/UnrankedNonlinearPattern.h @@ -264,48 +264,48 @@ object::ObjectBase* UnrankedNonlinearPattern < SymbolType >::inc() && { namespace core { template < class SymbolType > -class SetConstraint< ::tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, ::tree::GeneralAlphabet > { +class SetConstraint< tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { + static bool used ( const tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { const ext::tree<SymbolType>& m_content = pattern.getContent ( ); - return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol || pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ); + return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol || pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ); } - static bool available ( const ::tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { + static bool available ( const tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { return true; } - static void valid ( const ::tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { } }; template < class SymbolType > -class SetConstraint< ::tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, ::tree::NonlinearAlphabet > { +class SetConstraint< tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, tree::NonlinearAlphabet > { public: - static bool used ( const ::tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { + static bool used ( const tree::UnrankedNonlinearPattern < SymbolType > &, const SymbolType & ) { return false; } - static bool available ( const ::tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol) { - if ( pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); + static void valid ( const tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol) { + if ( pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" ); } }; template < class SymbolType > -class ElementConstraint< ::tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::UnrankedNonlinearPattern < SymbolType >, SymbolType, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol) { - if ( pattern.template accessComponent < ::tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) - throw ::tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); + static void valid ( const tree::UnrankedNonlinearPattern < SymbolType > & pattern, const SymbolType & symbol) { + if ( pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) ) + throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" ); } }; diff --git a/alib2data/src/tree/unranked/UnrankedPattern.h b/alib2data/src/tree/unranked/UnrankedPattern.h index 593f0a03883b75b4cbd78e39c1c8db7cff7be96c..02a1a93c51307115c6335f351e1188fcf3591ef6 100644 --- a/alib2data/src/tree/unranked/UnrankedPattern.h +++ b/alib2data/src/tree/unranked/UnrankedPattern.h @@ -242,29 +242,29 @@ object::ObjectBase* UnrankedPattern < SymbolType >::inc() && { namespace core { template < class SymbolType > -class SetConstraint< ::tree::UnrankedPattern < SymbolType >, SymbolType, ::tree::GeneralAlphabet > { +class SetConstraint< tree::UnrankedPattern < SymbolType >, SymbolType, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::UnrankedPattern < SymbolType > & pattern, const SymbolType & symbol ) { + static bool used ( const tree::UnrankedPattern < SymbolType > & pattern, const SymbolType & symbol ) { const ext::tree<SymbolType>& m_content = pattern.getContent ( ); - return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < ::tree::SubtreeWildcard > ( ).get ( ) == symbol; + return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end() || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol; } - static bool available ( const ::tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { + static bool available ( const tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { return true; } - static void valid ( const ::tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { } }; template < class SymbolType > -class ElementConstraint< ::tree::UnrankedPattern < SymbolType >, SymbolType, ::tree::SubtreeWildcard > { +class ElementConstraint< tree::UnrankedPattern < SymbolType >, SymbolType, tree::SubtreeWildcard > { public: - static bool available ( const ::tree::UnrankedPattern < SymbolType > & pattern, const SymbolType & symbol ) { - return pattern.template accessComponent < ::tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); + static bool available ( const tree::UnrankedPattern < SymbolType > & pattern, const SymbolType & symbol ) { + return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol ); } - static void valid ( const ::tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::UnrankedPattern < SymbolType > &, const SymbolType & ) { } }; diff --git a/alib2data/src/tree/unranked/UnrankedTree.h b/alib2data/src/tree/unranked/UnrankedTree.h index 489ee16930a10c2a051eeebfed516bd92f86ffa0..a48543656af5d0fa4347d90699283c1b8d5db462 100644 --- a/alib2data/src/tree/unranked/UnrankedTree.h +++ b/alib2data/src/tree/unranked/UnrankedTree.h @@ -231,18 +231,18 @@ object::ObjectBase* UnrankedTree < SymbolType >::inc() && { namespace core { template < class SymbolType > -class SetConstraint< ::tree::UnrankedTree < SymbolType >, SymbolType, ::tree::GeneralAlphabet > { +class SetConstraint< tree::UnrankedTree < SymbolType >, SymbolType, tree::GeneralAlphabet > { public: - static bool used ( const ::tree::UnrankedTree < SymbolType > & tree, const SymbolType & symbol ) { + static bool used ( const tree::UnrankedTree < SymbolType > & tree, const SymbolType & symbol ) { const ext::tree<SymbolType>& m_content = tree.getContent ( ); return std::find(m_content.prefix_begin(), m_content.prefix_end(), symbol) != m_content.prefix_end(); } - static bool available ( const ::tree::UnrankedTree < SymbolType > &, const SymbolType & ) { + static bool available ( const tree::UnrankedTree < SymbolType > &, const SymbolType & ) { return true; } - static void valid ( const ::tree::UnrankedTree < SymbolType > &, const SymbolType & ) { + static void valid ( const tree::UnrankedTree < SymbolType > &, const SymbolType & ) { } };