11#include <string/LinearString.h>
29 template <
class SymbolType >
34template <
class SymbolType >
39 if (
string.getContent ( ).size ( ) < pattern.
getContent ( ).size ( ) )
43 size_t i =
string.getContent ( ).size ( ) - pattern.
getContent ( ).size ( );
49 while ( j < pattern.
getContent ( ).size ( ) &&
string.getContent ( ) [
i + j ] == pattern.
getContent ( ) [ j ] )
53 if ( j == pattern.
getContent ( ).size ( ) ) occ.insert (
i );
56 size_t shift = bcs [
string.getContent ( ) [
i ] ];
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: ReversedBadCharacterShiftTable.h:33
Definition: ReversedBoyerMooreHorspool.h:23
static ext::set< unsigned > match(const string::LinearString< SymbolType > &string, const string::LinearString< SymbolType > &pattern)
Definition: ReversedBoyerMooreHorspool.h:35
int i
Definition: AllEpsilonClosure.h:118
Definition: ArithmeticCompression.h:18