Abstract interface listing the services provided by automata at the dynamical layer.
More...
|
virtual | ~abstract_automaton_t () |
|
virtual weight_t | add_eps_transition (state_t src, state_t dst)=0 |
| Adds an epsilon transition going from src to dst . More...
|
|
virtual weight_t | add_eps_transition (state_t src, state_t dst, weight_t weight)=0 |
| Adds an epsilon transition going from src to dst and weighted by weight . More...
|
|
virtual weight_t | add_final (state_t s, weight_t w)=0 |
| Adds some final weight of state s to w (useful only for weighted automata). More...
|
|
virtual weight_t | add_initial (state_t s, weight_t w)=0 |
| Adds some initial weight of state s to w (useful only for weighted automata). More...
|
|
virtual state_t | add_state ()=0 |
| Adds a new isolated states. More...
|
|
virtual state_t | add_state (std::string name)=0 |
| Adds a new isolated states with a custom name. More...
|
|
virtual weight_t | add_transition (state_t src, state_t dst, label_t label)=0 |
| Adds a transition going from src to dst , labelled by label . More...
|
|
virtual weight_t | add_transition (state_t src, state_t dst, label_t label, weight_t weight)=0 |
| Adds a transition going from src to dst , labelled by label and with weight weight ; or adds weight to an existing transition. More...
|
|
virtual weight_t | add_weight (transition_t tr, weight_t w)=0 |
| Adds w to the weight of transition tr . More...
|
|
virtual std::vector< label_t > | alphabet () const =0 |
| Return the alphabet of this abstract_automaton_t. More...
|
|
virtual bool | are_words_allowed () const =0 |
| Returns true if words are allowed as labels. More...
|
|
virtual void | del_eps_transition (state_t src, state_t dst)=0 |
| Deletes the epsilon transition going from state src to state dst . More...
|
|
virtual void | del_state (state_t s)=0 |
| Deletes state s from this abstract_automaton_t. More...
|
|
virtual void | del_transition (state_t src, state_t dst)=0 |
| Deletes all transitions going from state src to state dst . More...
|
|
virtual transition_t | del_transition (state_t src, state_t dst, label_t label)=0 |
| Deletes the transition labelled by label and going from state src to state dst . More...
|
|
virtual void | del_transition (transition_t tr)=0 |
| Deletes transition tr . More...
|
|
virtual state_t | dst_of (transition_t t) const =0 |
| Returns the destination state of transition t . More...
|
|
virtual std::vector< state_t > | final_states () const =0 |
| Returns the final states of this abstract_automaton_t. More...
|
|
virtual context_t | get_context () const =0 |
| Gets the context of this abstract_automaton_t. More...
|
|
virtual const std::string & | get_desc () const =0 |
| Return the description of this abstract_automaton_t. More...
|
|
virtual weight_t | get_final_weight (state_t s) const =0 |
| Gets the final weight of s . More...
|
|
virtual weight_t | get_initial_weight (state_t s) const =0 |
| Gets the initial weight of s . More...
|
|
virtual const std::string & | get_name () const =0 |
| Return the name of this abstract_automaton_t. More...
|
|
virtual state_t | get_state_by_name (std::string name) const =0 |
| Gets one of the state with given name. More...
|
|
virtual std::string | get_state_name (state_t s) const =0 |
| Gets the name of state s . More...
|
|
virtual transition_t | get_transition (state_t src, state_t dst, label_t label) const =0 |
| Gets the transition identifier going from state src to state dst and labelled by label . More...
|
|
virtual bool | has_explicit_name (state_t s) const =0 |
| Returns true if state s has a name set. More...
|
|
virtual bool | has_state (state_t s) const =0 |
| Returns true if this abstract_automaton_t contains state s . More...
|
|
virtual bool | has_transition (state_t src, state_t dst, label_t label) const =0 |
| Returns true if there is a transition going from state src to state dst and labelled by label . More...
|
|
virtual bool | has_transition (transition_t t) const =0 |
| Returns true if a transition with identifier t exists in this abstract_automaton_t. More...
|
|
virtual history_kind_t | history_kind () const =0 |
| [experimental] Gives the kind of data this abstract_automaton_t comes from. More...
|
|
virtual std::vector< transition_t > | in (state_t s, label_t label) const |
| Alias to incoming(state_t,label_t)const. More...
|
|
std::vector< transition_t > | in (state_t s, options_t opts={}) const |
| Alias to incoming. More...
|
|
virtual std::vector< transition_t > | incoming (state_t s, label_t label) const =0 |
| Returns the transitions coming in state s and labelled by label . More...
|
|
std::vector< transition_t > | incoming (state_t s, options_t opts={}) const |
| Returns the transitions coming in state s . More...
|
|
virtual std::vector< state_t > | initial_states () const =0 |
| Returns the initial states of this abstract_automaton_t. More...
|
|
virtual bool | is_eps_allowed () const =0 |
| Returns true if epsilon transitions are allowed. More...
|
|
virtual bool | is_eps_transition (transition_t t) const =0 |
| Returns true if transition t is an epsilon-transition. More...
|
|
virtual bool | is_final (state_t s) const =0 |
| Returns true if given state s is final in this abstract_automaton_t. More...
|
|
virtual bool | is_initial (state_t s) const =0 |
| Returns true if given state s is initial in this abstract_automaton_t. More...
|
|
virtual bool | is_int_automaton () const =0 |
| Returns true if the labelset of this abstract_automaton_t is Z. More...
|
|
virtual bool | is_transducer () const =0 |
| Returns true if this abstract_automaton_t has multiple tapes. More...
|
|
virtual label_t | label_of (transition_t t) const =0 |
| Returns the label of transition t . More...
|
|
virtual label_t | label_of (transition_t t, unsigned i) const =0 |
| Returns the label of the i -th tape on the transition t (transducers only). More...
|
|
virtual std::list< label_t > | labels_of (transition_t t) const =0 |
| Returns the label of all tapes on the transition t (transducers only). More...
|
|
virtual weight_t | lmul_weight (transition_t tr, weight_t w)=0 |
| Multiplies by w on the left the weight of transition tr . More...
|
|
virtual state_t | null_state () const =0 |
| Returns the phony state, used for instance when no state is found. More...
|
|
virtual transition_t | null_transition () const =0 |
| Returns the phony transition_t, used for instance when transition is found. More...
|
|
virtual size_t | num_finals () const =0 |
| Returns the number of final states in this abstract_automaton_t. More...
|
|
virtual size_t | num_initials () const =0 |
| Returns the number of initial states in this abstract_automaton_t. More...
|
|
virtual size_t | num_states () const =0 |
| Returns the number of states in this abstract_automaton_t. More...
|
|
virtual size_t | num_transitions () const =0 |
| Returns the number of transitions in this abstract_automaton_t. More...
|
|
virtual state_t | origin_of (state_t s) const =0 |
| [experimental] Gives the the origin of state s , in the case where it comes from a single state. More...
|
|
virtual std::vector< state_t > | origins_of (state_t s) const =0 |
| [experimental] Gives the origin of state s , in the case where it comes from a tuple of states. More...
|
|
std::vector< transition_t > | out (state_t s, label_t label) const |
| Alias to outgoing(state_t, label_t)const. More...
|
|
std::vector< transition_t > | out (state_t s, options_t opts={}) const |
| Alias to outgoing. More...
|
|
virtual std::vector< transition_t > | outgoing (state_t s, label_t label) const =0 |
| Returns the transitions going out of state s and labelled by label . More...
|
|
std::vector< transition_t > | outgoing (state_t s, options_t opts={}) const |
| Returns the transitions going out ofstate s . More...
|
|
virtual std::vector< transition_t > | outin (state_t src, state_t dst) const =0 |
| Returns all transitions going from src to dst . More...
|
|
virtual state_t | post () const =0 |
| Returns the postfinal state. More...
|
|
virtual state_t | pre () const =0 |
| Returns the preinitial state. More...
|
|
virtual std::vector< state_t > | predecessors (state_t s) const =0 |
| Returns the sources of all transitions coming in state s . More...
|
|
virtual std::vector< state_t > | predecessors (state_t s, label_t label) const =0 |
| Returns the sources of all transitions labelled by label that are coming in state s . More...
|
|
virtual weight_t | rmul_weight (transition_t tr, weight_t we)=0 |
| Multiplies by w on the right the weight of transition tr . More...
|
|
virtual void | set_desc (const std::string &desc)=0 |
| Sets the description of this abstract_automaton_t. More...
|
|
virtual transition_t | set_eps_transition (state_t src, state_t dst)=0 |
| Sets an epsilon transition going from src to dst . More...
|
|
virtual transition_t | set_eps_transition (state_t src, state_t dst, weight_t weight)=0 |
| Sets an epsilon transition going from src to dst and weighted by weight . More...
|
|
virtual void | set_final (state_t s)=0 |
| Sets state s as final. More...
|
|
virtual void | set_final (state_t s, weight_t w)=0 |
| Sets final weight of state s to w (useful only for weightset automata). More...
|
|
virtual void | set_initial (state_t s)=0 |
| Sets state s as initial. More...
|
|
virtual void | set_initial (state_t s, weight_t w)=0 |
| Sets initial weight of state s to w (useful only for weightset automata). More...
|
|
virtual void | set_name (const std::string &name)=0 |
| Sets the name of this abstract_automaton_t. More...
|
|
virtual void | set_state_name (state_t s, std::string name)=0 |
| Sets to name the name of s . More...
|
|
virtual void | set_state_names_from_history ()=0 |
| [experimental] Sets the name of each state based on its history. More...
|
|
virtual transition_t | set_transition (state_t src, state_t dst, label_t label)=0 |
| Sets a transition going from src to dst and labelled by label . More...
|
|
virtual transition_t | set_transition (state_t src, state_t dst, label_t label, weight_t weight)=0 |
| Sets (and possibly replaces) a transition going from src to dst , labelled by label and with weight weight . More...
|
|
virtual weight_t | set_weight (transition_t tr, weight_t w)=0 |
| Sets to w the weight of transition tr . More...
|
|
virtual state_t | src_of (transition_t t) const =0 |
| Returns the source state of transition t . More...
|
|
std::vector< state_t > | states (options_t opts={}) const |
| Returns the states of this abstract_automaton_t. More...
|
|
virtual void | strip_history ()=0 |
| Deletes all state history. More...
|
|
virtual std::vector< state_t > | successors (state_t s) const =0 |
| Returns the destinations of all transitions going out of s . More...
|
|
virtual std::vector< state_t > | successors (state_t s, label_t label) const =0 |
| Returns the destinations of all transitions labelled by label going out of s . More...
|
|
std::vector< transition_t > | transitions (options_t opts={}) const |
| Returns the transitions in this abstract_automaton_t. More...
|
|
virtual void | unset_final (state_t s)=0 |
| Sets state s as non-final. More...
|
|
virtual void | unset_initial (state_t s)=0 |
| Sets state s as non-initial. More...
|
|
virtual weight_t | weight_of (transition_t t) const =0 |
| Returns the weight of transition t . More...
|
|
Abstract interface listing the services provided by automata at the dynamical layer.
Difference between adding and setting transitions.
First, note that there is no difference if the automaton is Booolean (that is, if it as "classical" automaton).
In the following, let us assume that the automaton is weighted over a semiring (W,+,x).
Let src
and dst
be two states and lbl
be a label. (lbl
might be epsilon if the automaton allows it, or a tuple in the case of transducers.) In Awali, there is at most one transitions tr
going from src
to dst
and labelled by lbl
. In addition, This transition also bears weight wght
.
When modifying the transition going from src
to dst
and labelled by lbl
, one has to decide what to do with wght
.
set_transition(src,dst,lbl,new_wght)
ignores wght
, and sets the weight of tr
to new_wght
add_transition(src,dst,lbl,new_wght)
modifies the weights of tr
so that it now is wght+new_wght
.
If the automaton features no transition going from src
to dst
and labelled by lbl
, everything behaves as if it had such a transition weighted by zero (in fact, the neutral element for +). In this case both functions above do the same thing.