Awali
Another Weighted Automata library
labelset.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 AWALI_LABELSET_LABELSET_HH
18 # define AWALI_LABELSET_LABELSET_HH
19 
22 
23 namespace awali {
24  namespace sttc {
25 
26  namespace internal
27  {
28  /*---------------.
29  | make_wordset. |
30  `---------------*/
31 
32  template <typename LabelSet>
34 
36  template <typename LabelSet>
37  inline law_t<LabelSet>
38  make_wordset(const LabelSet& ls)
39  {
41  }
42 
43  /*--------------------.
44  | make_word_context. |
45  `--------------------*/
46 
47  template <typename Ctx>
50 
52  template <typename LabelSet, typename WeightSet>
55  {
56  return {make_wordset(*ctx.labelset()), *ctx.weightset()};
57  }
58 
59  /*--------------------------.
60  | make_word_polynomialset. |
61  `--------------------------*/
62 
63  template <typename Ctx>
65 
68  template <typename Ctx>
69  inline auto
70  make_word_polynomialset(const Ctx& ctx)
72  {
73  return make_word_context(ctx);
74  }
75  }
76 
77  }
78 }//end of ns awali::stc
79 
80 #endif // !AWALI_LABELSET_LABELSET_HH
carries the algebraic settings of automata
Definition: context.hh:40
const weightset_ptr & weightset() const
Definition: context.hh:157
const labelset_ptr & labelset() const
Definition: context.hh:152
Linear combination of labels: map labels to weights.
Definition: polynomialset.hh:69
static constexpr TOP< void > value
Definition: priority.hh:93
typename labelset_trait< LabelSet >::wordset_t law_t
Definition: labelset.hh:33
law_t< LabelSet > make_wordset(const LabelSet &ls)
The wordset of a labelset.
Definition: labelset.hh:38
word_context_t< context< LabelSet, WeightSet > > make_word_context(const context< LabelSet, WeightSet > &ctx)
The wordset context of a labelset.
Definition: labelset.hh:54
auto make_word_polynomialset(const Ctx &ctx) -> word_polynomialset_t< Ctx >
The polynomialset of words of a labelset (not necessarily on words itself).
Definition: labelset.hh:70
typename internal::weightset_t_of_impl< internal::base_t< ValueSet > >::type weightset_t_of
Helper to retrieve the type of the weightset of a value set.
Definition: traits.hh:86
Main namespace of Awali.
Definition: ato.hh:22
L wordset_t
Definition: traits.hh:38