From 1f91ca7aeb9ebf4594842456bd0926adc9bc488a Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 28 May 2020 12:55:53 +0200 Subject: [PATCH] more simplifications in ExactPatternMatch --- alib2algo/src/arbology/exact/ExactPatternMatch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alib2algo/src/arbology/exact/ExactPatternMatch.h b/alib2algo/src/arbology/exact/ExactPatternMatch.h index 608f31a756..6e00cc5223 100644 --- a/alib2algo/src/arbology/exact/ExactPatternMatch.h +++ b/alib2algo/src/arbology/exact/ExactPatternMatch.h @@ -80,7 +80,7 @@ private: static bool matchUnorderedHelper ( const ext::tree < common::ranked_symbol < SymbolType > > & subject, const ext::tree < common::ranked_symbol < SymbolType > > & pattern, const common::ranked_symbol < SymbolType > & subtreeVariable ); template < class SymbolType > - static void matchUnorderedInternal ( unsigned & index, ext::set < unsigned > & occ, const ext::tree < common::ranked_symbol < SymbolType > > & subject, const ext::tree < common::ranked_symbol < SymbolType > > & pattern, const common::ranked_symbol < SymbolType > & subtreeVariable ); + static void matchUnorderedInternal ( unsigned & index, ext::set < unsigned > & occ, const ext::tree < SymbolType > & subject, const ext::tree < SymbolType > & pattern, const SymbolType & subtreeVariable ); }; @@ -190,12 +190,12 @@ bool ExactPatternMatch::matchUnorderedHelper ( const ext::tree < common::ranked_ } template < class SymbolType > -void ExactPatternMatch::matchUnorderedInternal ( unsigned & index, ext::set < unsigned > & occ, const ext::tree < common::ranked_symbol < SymbolType > > & subject, const ext::tree < common::ranked_symbol < SymbolType > > & pattern, const common::ranked_symbol < SymbolType > & subtreeVariable ) { +void ExactPatternMatch::matchUnorderedInternal ( unsigned & index, ext::set < unsigned > & occ, const ext::tree < SymbolType > & subject, const ext::tree < SymbolType > & pattern, const SymbolType & subtreeVariable ) { if ( matchUnorderedHelper ( subject, pattern, subtreeVariable ) ) occ.insert ( index ); index++; - for ( const ext::tree < common::ranked_symbol < SymbolType > > & child : subject.getChildren ( ) ) + for ( const ext::tree < SymbolType > & child : subject.getChildren ( ) ) matchUnorderedInternal ( index, occ, child, pattern, subtreeVariable ); } -- GitLab