From c79a0575d24d2b8b25fc83a62310e0306652c6a9 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 12 Apr 2018 14:26:20 +0200 Subject: [PATCH] improve QS BCS heuristics --- .../src/tree/properties/QuickSearchBadCharacterShiftTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alib2algo/src/tree/properties/QuickSearchBadCharacterShiftTable.h b/alib2algo/src/tree/properties/QuickSearchBadCharacterShiftTable.h index 4895407e54..241be238a1 100644 --- a/alib2algo/src/tree/properties/QuickSearchBadCharacterShiftTable.h +++ b/alib2algo/src/tree/properties/QuickSearchBadCharacterShiftTable.h @@ -49,7 +49,7 @@ ext::map < common::ranked_symbol < SymbolType, RankType >, size_t > QuickSearchB if ( symbol == pattern.getSubtreeWildcard ( ) || pattern.getNonlinearVariables ( ).count ( symbol ) || symbol == pattern.getVariablesBar ( ) ) continue; - bcs.insert ( std::make_pair ( symbol, pattern.getContent ( ).size ( ) ) ); + bcs.insert ( std::make_pair ( symbol, pattern.getContent ( ).size ( ) + 1 ) ); } // find the distance between the end of the pattern and the index -- GitLab