Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
NaiveDAWGMatcherConstruction.h
Go to the documentation of this file.
1
6/*
7 * Author: Radovan Cerveny
8 */
9
10#pragma once
11
12#include <automaton/FSM/DFA.h>
13#include <string/LinearString.h>
14
21
22namespace stringology {
23
24namespace matching {
25
27public:
32 template < class SymbolType >
34
35};
36
37template < class SymbolType >
39 auto patternData = pattern.getContent ( );
40 reverse ( patternData.begin ( ), patternData.end ( ) );
41 string::LinearString < SymbolType > reversedPattern ( pattern.getAlphabet ( ), std::move ( patternData ) );
42
45
46 return indexes::stringology::SuffixAutomaton < SymbolType > ( std::move ( res ), pattern.getContent ( ).size ( ) );
47}
48
49} /* namespace matching */
50
51} /* namespace stringology */
52
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
Epsilon nondeterministic finite automaton. Accepts regular languages.
Definition: EpsilonNFA.h:74
static automaton::DFA< SymbolType, StateType > determinize(const automaton::DFA< SymbolType, StateType > &automaton)
Definition: Determinize.h:276
static automaton::NFA< SymbolType, StateType > remove(const automaton::EpsilonNFA< SymbolType, StateType > &fsm)
Definition: EpsilonRemoverIncoming.h:96
static automaton::DFA< SymbolType, StateType > minimize(const automaton::DFA< SymbolType, StateType > &dfa)
Definition: Minimize.h:62
static Rename::RenamedAutomaton< T > rename(const T &fsm)
Suffix automaton string index. Automaton representation of all suffixes. The automaton is general det...
Definition: SuffixAutomaton.h:50
Linear string.
Definition: LinearString.h:57
const ext::set< SymbolType > & getAlphabet() const &
Definition: LinearString.h:103
const ext::vector< SymbolType > & getContent() const &
Definition: LinearString.h:238
static automaton::EpsilonNFA< SymbolType, unsigned > construct(const string::LinearString< SymbolType > &pattern)
Definition: NondeterministicExactSuffixEpsilonAutomaton.h:31
Definition: NaiveDAWGMatcherConstruction.h:26
static indexes::stringology::SuffixAutomaton< SymbolType > naiveConstruct(const string::LinearString< SymbolType > &pattern)
Definition: NaiveDAWGMatcherConstruction.h:38
return res
Definition: MinimizeByPartitioning.h:145
Definition: ArithmeticCompression.h:18