diff --git a/alib2algo/src/stringology/exact/BoyerMoore.h b/alib2algo/src/stringology/exact/BoyerMoore.h index 344dfce1b1d443e3901289a1a50a30a4b9145baf..1fa39fbd567ee500b51b36e08f7e24d2c417cef2 100644 --- a/alib2algo/src/stringology/exact/BoyerMoore.h +++ b/alib2algo/src/stringology/exact/BoyerMoore.h @@ -17,6 +17,8 @@ #include <string/properties/BadCharacterShiftTable.h> #include <string/properties/GoodSuffixShiftTable.h> +#include <global/GlobalData.h> + namespace stringology { namespace exact { @@ -45,6 +47,11 @@ ext::set<unsigned> BoyerMoore::match(const string::LinearString < SymbolType >& ext::vector<size_t> gss = string::properties::GoodSuffixShiftTable::gss(pattern); measurements::end ( ); + if(common::GlobalData::verbose) { + common::Streams::log << "bcs = " << bcs << std::endl; + common::Streams::log << "gss = " << gss << std::endl; + } + measurements::start ( "Algorithm", measurements::Type::ALGORITHM ); size_t haystack_offset = 0; while(haystack_offset + pattern.getContent().size() <= string.getContent().size()) { diff --git a/alib2algo/src/stringology/exact/BoyerMooreHorspool.h b/alib2algo/src/stringology/exact/BoyerMooreHorspool.h index 972e66b9182a25d8d492539934924e4bb11d82d1..18d6fbfbd5dc643d93d4f12fa967bc3401dc2341 100644 --- a/alib2algo/src/stringology/exact/BoyerMooreHorspool.h +++ b/alib2algo/src/stringology/exact/BoyerMooreHorspool.h @@ -16,6 +16,8 @@ #include <string/properties/BadCharacterShiftTable.h> +#include <global/GlobalData.h> + namespace stringology { namespace exact { @@ -43,6 +45,9 @@ ext::set<unsigned> BoyerMooreHorspool::match(const string::LinearString < Symbol ext::map<SymbolType, size_t> bcs = string::properties::BadCharacterShiftTable::bcs(pattern); //NOTE: the subjects alphabet must be a subset or equal to the pattern measurements::end ( ); + if(common::GlobalData::verbose) + common::Streams::log << "bcs = " << bcs << std::endl; + measurements::start ( "Algorithm", measurements::Type::ALGORITHM ); size_t haystack_offset = 0; while(haystack_offset + pattern.getContent().size() <= string.getContent().size()) { diff --git a/alib2algo/src/stringology/exact/QuickSearch.h b/alib2algo/src/stringology/exact/QuickSearch.h index 56615849585654f687c9585efd45cc5d1ceda35f..58b984f266888d59e83b86ba1331549f67f59964 100644 --- a/alib2algo/src/stringology/exact/QuickSearch.h +++ b/alib2algo/src/stringology/exact/QuickSearch.h @@ -16,6 +16,8 @@ #include <string/properties/QuickSearchBadCharacterShiftTable.h> +#include <global/GlobalData.h> + namespace stringology { namespace exact { @@ -42,6 +44,9 @@ ext::set<unsigned> QuickSearch::match(const string::LinearString < SymbolType >& ext::map<SymbolType, size_t> bcs = string::properties::QuickSearchBadCharacterShiftTable::qsbcs(pattern); //NOTE: the subjects alphabet must be a subset or equal to the pattern measurements::end ( ); + if(common::GlobalData::verbose) + common::Streams::log << "bcs = " << bcs << std::endl; + measurements::start ( "Algorithm", measurements::Type::ALGORITHM ); size_t i = 0; size_t j;