Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
BitParalelism.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <string/LinearString.h>
9
10
11namespace stringology {
12
13namespace simulations {
14
16public:
17 template <class SymbolType>
19};
20
21template <class SymbolType>
24
25 for(const SymbolType & symbol : alphabet) {
26 D_vectors[symbol] = ext::vector<bool>(pattern.getContent().size());
27
28 for(unsigned int i = 0; i<pattern.getContent().size(); i++) {
29 if(pattern.getContent()[i] != symbol) {
30 D_vectors[symbol][i] = 1;
31 } else {
32 D_vectors[symbol][i] = 0;
33 }
34 }
35 }
36
37 return D_vectors;
38}
39
40}
41
42}
43
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
Definition: set.hpp:44
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Linear string.
Definition: LinearString.h:57
const ext::vector< SymbolType > & getContent() const &
Definition: LinearString.h:238
Definition: BitParalelism.h:15
static ext::map< SymbolType, ext::vector< bool > > constructDVectors(const ext::set< SymbolType > &alphabet, const string::LinearString< SymbolType > &pattern)
Definition: BitParalelism.h:22
Definition: BarSymbol.cpp:12
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: ArithmeticCompression.h:18