Awali
Another Weighted Automata library
description_types.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2021 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_CONTEXT_DESCRIPTION_TYPES_HH
18 #define DYN_CONTEXT_DESCRIPTION_TYPES_HH
19 
20 #include<vector>
21 #include<memory>
22 
23 namespace awali {
24 namespace dyn {
25 namespace context {
26 
30 
31  using context_description = std::shared_ptr<context_description_impl>;
32  using labelset_description = std::shared_ptr<labelset_description_impl>;
33  using weightset_description = std::shared_ptr<weightset_description_impl>;
34 
35 
36  enum class CTypes {
38  };
39 
40  struct WTypes {
41  static const int RATEXP = -1;
42  static const int SERIES = -2;
43  static const int TUPLE = -3;
44  };
45 
48  std::vector<std::string> alphabet;
49  std::vector<int> int_alphabet;
50  std::vector<labelset_description> children_;
51  };
52 
56  };
57 
58 
60  int type_;
62  std::vector<weightset_description> children_;
64  };
65 
66  //***********************
67 
68  inline
70  return std::make_shared<labelset_description_impl>();
71  }
72 
73  inline
75  return std::make_shared<weightset_description_impl>();
76  }
77 
78  inline
80  return std::make_shared<context_description_impl>();
81  }
82 
83  //**************************
84 
85 }}} //end of namespaces awali::dyn::context, awali::dyn, and awali
86 
87 #endif
std::shared_ptr< weightset_description_impl > weightset_description
Definition: description_types.hh:33
std::vector< labelset_description > children_
Definition: description_types.hh:50
context_description make_context_description()
Definition: description_types.hh:79
CTypes
Definition: description_types.hh:36
std::shared_ptr< labelset_description_impl > labelset_description
Definition: description_types.hh:32
labelset_description make_labelset_description()
Definition: description_types.hh:69
int type_
Definition: description_types.hh:60
int characteristic
Definition: description_types.hh:63
labelset_description ls_
Definition: description_types.hh:54
std::vector< weightset_description > children_
Definition: description_types.hh:62
CTypes type_
Definition: description_types.hh:47
weightset_description ws_
Definition: description_types.hh:55
std::vector< int > int_alphabet
Definition: description_types.hh:49
std::shared_ptr< context_description_impl > context_description
Definition: description_types.hh:31
std::vector< std::string > alphabet
Definition: description_types.hh:48
context_description ct_
Definition: description_types.hh:61
weightset_description make_weightset_description()
Definition: description_types.hh:74
Definition: description_types.hh:53
Definition: description_types.hh:46
Definition: description_types.hh:59
Main namespace of Awali.
Definition: ato.hh:22
Definition: description_types.hh:40
static const int RATEXP
Definition: description_types.hh:41
static const int TUPLE
Definition: description_types.hh:43
static const int SERIES
Definition: description_types.hh:42