Awali
Another Weighted Automata library
promotion.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_PROMOTION_HH
18 #define DYN_MODULES_PROMOTION_HH
19 
20 #include<string>
23 
24 namespace awali {
25  namespace dyn {
26 
37 
47  bool is_promotable(const std::string& src_ws, const std::string& dest_ws);
48 
65  automaton_t promote_automaton(automaton_t aut, const std::string& ws, options_t opts = {});
66 
79  ratexp_t promote_ratexp(ratexp_t exp, const std::string& weightset);
80 
82 // context_t join_context(context_t c1, context_t c2);
83 
84 
85 }}//end of ns awali::dyn
86 
87 #endif
An automaton_t is essentially a shared pointer to an abstract_automaton_t, but also contains static f...
Definition: automaton.hh:93
Dynamical wrapper for a context, that is a weightset and a labelset.
Definition: context.hh:43
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
weightset_description weightset(const std::string &k)
ratexp_t promote_ratexp(ratexp_t exp, const std::string &weightset)
Computes a new expression with the specified weightset.
bool is_promotable(const std::string &src_ws, const std::string &dest_ws)
Tests whether a promotion is possible from one weightset to the other one.
context_t make_context_with_another_semiring(context_t ctx, const std::string &ws)
Computes a context with the same labelset as ctx and the weightset ws.
automaton_t promote_automaton(automaton_t aut, const std::string &ws, options_t opts={})
Computes a new automaton with the specified weightset.
Main namespace of Awali.
Definition: ato.hh:22