10#include <alib/measure>
12#include <string/LinearString.h>
32 template <
class SymbolType >
37template <
class SymbolType >
49 size_t haystack_offset = 0;
50 while(haystack_offset + pattern.
getContent().size() <=
string.getContent().size()) {
52 while(
i > 0 &&
string.getContent()[haystack_offset +
i - 1] == pattern.
getContent()[
i - 1]) {
57 if(
i == 0) occ.insert(haystack_offset);
58 haystack_offset += bcs[
string.getContent()[haystack_offset + pattern.
getContent().size() - 1]];
static bool verbose
Verbose flag. Some algorithms print additional runtime information about internal datastructures or t...
Definition: GlobalData.h:24
static ext::reference_wrapper< ext::ostream > log
Standard loging stream. Mapped to descriptor 4.
Definition: GlobalData.h:78
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
Linear string.
Definition: LinearString.h:57
const ext::vector< SymbolType > & getContent() const &
Definition: LinearString.h:238
static ext::map< SymbolType, size_t > bcs(const string::LinearString< SymbolType > &pattern)
Definition: BadCharacterShiftTable.h:33
Definition: BoyerMooreHorspool.h:26
static ext::set< unsigned > match(const string::LinearString< SymbolType > &string, const string::LinearString< SymbolType > &pattern)
Definition: BoyerMooreHorspool.h:38
int i
Definition: AllEpsilonClosure.h:118
void start(measurements::stealth_string name, measurements::Type type)
Definition: measurements.cpp:14
void end()
Definition: measurements.cpp:19
Definition: ArithmeticCompression.h:18