11#include <string/LinearString.h>
24 template <
class SymbolType >
32 template <
class SymbolType >
36template <
class SymbolType >
42 match_rec ( occ,
string, pattern, fbcs, bbcs, 0,
string.getContent ( ).size ( ) - pattern.
getContent ( ).size ( ) + 1 );
46template <
class SymbolType >
48 if ( low >= high )
return;
50 int middle = ( low + high ) / 2;
57 if (
i == pattern.
getContent ( ).size ( ) ) occ.insert ( middle );
59 match_rec ( occ,
string, pattern, fbcs, bbcs, low, middle - bbcs[
string.getContent ( )[middle]] + 1 );
60 match_rec ( occ,
string, pattern, fbcs, bbcs, middle + fbcs[
string.getContent ( )[middle + pattern.
getContent ( ).size ( ) - 1]], high );
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
static ext::map< SymbolType, size_t > bcs(const string::LinearString< SymbolType > &pattern)
Definition: ReversedBadCharacterShiftTable.h:33
Definition: DeadZoneUsingBadCharacterShift.h:23
static ext::set< unsigned > match(const string::LinearString< SymbolType > &string, const string::LinearString< SymbolType > &pattern)
Definition: DeadZoneUsingBadCharacterShift.h:37
int i
Definition: AllEpsilonClosure.h:118
Definition: ArithmeticCompression.h:18