/* * Author: Radovan Cerveny */ #ifndef EXACT_FACTOR_ORACLE_AUTOMATON_H_ #define EXACT_FACTOR_ORACLE_AUTOMATON_H_ #include <automaton/Automaton.h> #include <automaton/FSM/DFA.h> #include <string/LinearString.h> #include <string/String.h> #include <core/multipleDispatch.hpp> namespace stringology { namespace indexing { class ExactFactorOracleAutomaton : public alib::SingleDispatch < ExactFactorOracleAutomaton, automaton::Automaton, const string::StringBase & > { private: static void oracleAddLetter ( automaton::DFA < > & oracle, const DefaultSymbolType & symbol, std::map < DefaultStateType, DefaultStateType > & supplyFunction ); public: /** * Constructs factor oracle automaton for given pattern. * @return factor oracle automaton for given pattern */ static automaton::Automaton construct ( const string::String & pattern ); static automaton::DFA < > construct ( const string::LinearString < > & pattern ); }; } /* namespace indexing */ } /* namespace stringology */ #endif /* EXACT_FACTOR_ORACLE_AUTOMATON_H_ */