Awali
Another Weighted Automata library
automaton.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef DYN_MODULES_AUTOMATON_HH
18 #define DYN_MODULES_AUTOMATON_HH
19 
20 #include <unordered_map>
21 
23 
25 #include <awali/dyn/core/ratexp.hh>
28 
29 
30 namespace awali {
31  namespace dyn {
32 
42 
43 
53 
54 
71  options_t opts = {});
72 
82  void change_alphabet(automaton_t aut, const std::string& alphabet);
83 
94  void change_int_alphabet(automaton_t aut, int a, int b);
95 
103 
104 
127 
128 
151 
176 
194  void add_path(automaton_t aut, state_t p, state_t q, const std::string& s, bool strict_alphabet=true);
195 
216  }
217 }//end of ns awali::dyn
218 
219 #endif
An automaton_t is essentially a shared pointer to an abstract_automaton_t, but also contains static f...
Definition: automaton.hh:93
An options_t is a set of optional parameters that is passed on to called functions.
Definition: options.hh:86
Main class for representing rational expresson at the dynamical layer.
Definition: ratexp.hh:66
automaton_t right_mult(automaton_t aut, weight_t w, options_t opts={})
Produces an automaton that associates with every word the weight&#160;(x * w), where x is the weight assoc...
weightset_description weightset(const std::string &k)
automaton_t support(automaton_t aut, options_t opts={})
Computes the support of aut, that is the boolean automaton resulting from replacing any non-zero weig...
bool are_isomorphic(automaton_t aut1, automaton_t aut2)
Determines if two automata are isomorphic.
automaton_t left_mult(automaton_t aut, weight_t w, options_t opts={})
Produces an automaton that associates with every word the weight&#160;(w * x), where x is the weight assoc...
void change_alphabet(automaton_t aut, const std::string &alphabet)
Change the alphabet of the automaton.
automaton_t characteristic(automaton_t aut, std::string weightset, options_t opts={})
Computes the characteristic of aut over weightset.
void add_path(automaton_t aut, state_t p, state_t q, ratexp_t exp)
add a subautomaton realizing the series exp between states p and q of aut.
void change_int_alphabet(automaton_t aut, int a, int b)
Change the alphabet of the automaton.
unsigned state_t
Type representing automata states; currently simply identifiers of type unsigned, but this might chan...
Definition: typedefs.hh:28
automaton_t copy(automaton_t aut, options_t opts={})
Makes a deep copy of aut.
Main namespace of Awali.
Definition: ato.hh:22
Structure used to erase the type of labels/weights at the dyn layer.
Definition: any.hh:59