38namespace LinguisticProcessing {
50 {
return m_maxDepthStack; }
52 {
return m_maxTransitionsExplored; }
54 {
return m_maxNbResults; }
56 {
return m_maxResultSize; }
59 { m_maxDepthStack=val; }
61 { m_maxTransitionsExplored=val; }
63 { m_maxNbResults=val; }
65 { m_maxResultSize=val; }
68 uint64_t m_maxDepthStack;
69 uint64_t m_maxTransitionsExplored;
70 uint64_t m_maxNbResults;
71 uint64_t m_maxResultSize;
96 Automaton(
const std::string& automId =
"" );
127 Tstate numberOfStates()
const;
133 uint64_t numberOfTransitions()
const;
141 uint64_t numberOfTransitions(
const Tstate state)
const;
150 const uint64_t n)
const;
157 bool isFinalState(
const Tstate state)
const;
162 std::vector<Tstate> finalStates()
const;
168 std::vector<Transition>
const& getTransitionsState(
const Tstate state)
const;
173 bool hasTransitionsState(
const Tstate state)
const;
179 bool isDeterministic()
const;
191 void setActionHash(
const std::vector<std::pair<LimaString,Constraint> >& actionsWithOneArgument);
202 typedef std::set<AutomatonMatch,CompareAutomatonMatch>
269 Tstate addState(
bool is_final=
false);
278 bool addTransition(
Tstate initialState,
Tstate finalState,
281 void removeState(
const Tstate state);
282 void removeTransition(
const Tstate initialState,
288 void makeFinal(
const Tstate state);
293 void unMakeFinal(
const Tstate state);
301 void setDeterministic(
const bool det);
332 void initializeSearchStructures(MediaId language);
338 std::vector<std::pair<std::deque<LinguisticGraphVertex>,
const Transition*> >& matchingTransitions,
361 bool testFromState(
const Tstate firstState,
376 bool existsEpsilonPathToFinal(
const Tstate state)
const;
377 std::vector<TransitionUnit*> collectTransitions()
const;
378 bool isFinalSubset (
const SubSet& v)
const;
379 void reachableStates(
const SubSet& states,
382 void reachableStates(
const Tstate& state,
385 std::string subsetString(
const SubSet& subset)
const;
399 const uint64_t n)
const {
413inline std::vector<Transition>
const&
#define LIMA_AUTOMATON_EXPORT
QDebug & operator<<(QDebug &qd, const std::string &str)
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
␈rief a class for control parameters for the search using the automata
uint64_t getMaxTransitionsExplored() const
void setMaxResultSize(const uint64_t val)
uint64_t getMaxResultSize() const
uint64_t getMaxDepthStack() const
void setMaxNbResults(const uint64_t val)
uint64_t getMaxNbResults() const
void setMaxTransitionsExplored(const uint64_t val)
void setMaxDepthStack(const uint64_t val)
␈rief A class for the description of automata
bool m_deterministic
a boolean flag indicating if the automaton is deterministic or not
std::pair< RecognizerMatch, ConstraintCheckList > AutomatonMatch
types defined to store the result (or results of the application of the automaton on a graph
std::vector< Transition > const & getTransitionsState(const Tstate state) const
get the list of transitions leaving from a given state
uint64_t numberOfTransitions() const
get the number of transitions in the automaton
std::vector< bool > m_finalStates
which states are final states
Tstate numberOfStates() const
get the number of states of the automaton
Transition const & nthTransition(const Tstate state, const uint64_t n) const
find the nth transition leaving from a particular state
bool isFinalState(const Tstate state) const
test if a given state is a final state of the automaton
std::vector< std::vector< Transition > > m_transitions
the transitions
Tstate m_numberStates
number of states in the automaton
std::set< Tstate > SubSet
bool isDeterministic() const
test if the automaton is deterministic or not
std::vector< TransitionSearchStructure< Transition > * > m_searchStructures
std::set< AutomatonMatch, CompareAutomatonMatch > AutomatonMatchSet
An AnalysisData containing a LinguisticGraph with a language and an id.
SearchGraphSense
enumerated type to indicate in which sense the automaton should be built or searched
std::vector< ConstraintCheckListElement > ConstraintCheckList
PUGI__FN void reverse(I begin, I end)