Vaucanson  1.4.1
automata_ops.hh
Go to the documentation of this file.
1 // automata_ops.hh: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH
18 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH
19 
30 # include <vaucanson/automata/concept/automata_base.hh>
31 
32 namespace vcsn {
33 
34 #define AutoType(Type) \
35  typename Element<S, T>::Type
36 
40 
41 
42 
44  template<typename S, typename R, typename T>
45  R op_convert(const AutomataBase<S> &se,
46  SELECTOR(R), const T& data);
47 
48  template<typename S, typename T>
49  const T& op_convert(const AutomataBase<S>&,
50  SELECTOR(T), const T& from_data);
51 
53  template<typename S, typename T, typename U>
54  void
55  op_assign(const AutomataBase<S>& s,
56  T& dst, const U& src);
57 
58  template<typename S, typename T>
59  void
60  op_assign(const AutomataBase<S>& concept, T& dst, const T& src);
61 
62  template <class S, class T>
63  const typename automaton_traits<T>::tag_t&
64  op_get_tag(const AutomataBase<S>&, const T&);
65 
66  template <class S, class T>
67  typename automaton_traits<T>::tag_t&
68  op_get_tag(const AutomataBase<S>&, T&);
69 
70  template <class S, class T>
71  const typename automaton_traits<T>::geometry_t&
72  op_get_geometry(const AutomataBase<S>&, const T&);
73 
74  template <class S, class T>
75  typename automaton_traits<T>::geometry_t&
76  op_get_geometry(const AutomataBase<S>&, T&);
77 
78  template <class S, class T>
79  bool
80  op_exists(const AutomataBase<S>& s, const T&);
81 
82  template <class S, class T>
83  typename automaton_traits<T>::states_t
84  op_states(const AutomataBase<S>&, const T&);
85 
86  template <class S, class T>
87  typename automaton_traits<T>::hstate_t
88  op_get_state(const AutomataBase<S>&, const T&, int state);
89 
90  template <class S, class T>
91  typename automaton_traits<T>::transitions_t
92  op_transitions(const AutomataBase<S>&, const T&);
93 
94  template <class S, class T>
95  typename automaton_traits<T>::initial_support_t
96  op_initial(const AutomataBase<S>&, const T&);
97 
98  template <class S, class T>
99  typename automaton_traits<T>::final_support_t
100  op_final(const AutomataBase<S>&, const T&);
101 
102  template <class S, class T>
103  void
104  op_set_initial(const AutomataBase<S>&, T&,
105  const typename automaton_traits<T>::hstate_t& state,
106  const AutoType(series_set_elt_t)& s);
107 
108  template <class S, class T>
109  AutoType(series_set_elt_t)
110  op_get_initial(const AutomataBase<S>&,
111  const T&,
112  const typename automaton_traits<T>::hstate_t& state);
113 
114  template <class S, class T>
115  bool
116  op_is_initial(const AutomataBase<S>&,
117  const T&,
118  const typename automaton_traits<T>::hstate_t& state);
119 
120  template <class S, class T>
121  void
122  op_set_final(const AutomataBase<S>&, T&,
123  const typename automaton_traits<T>::hstate_t& state,
124  const typename Element<S, T>::series_set_elt_t& s);
125 
126  template <class S, class T>
127  typename Element<S, T>::series_set_elt_t
128  op_get_final(const AutomataBase<S>&,
129  const T&,
130  const typename automaton_traits<T>::hstate_t& state);
131 
132  template <class S, class T>
133  bool
134  op_is_final(const AutomataBase<S>&,
135  const T&,
136  const typename automaton_traits<T>::hstate_t& state);
137 
138  template <class S, class T>
139  void
140  op_set_initial(const AutomataBase<S>&, T&,
141  int state,
142  const AutoType(series_set_elt_t)& s);
143 
144  template <class S, class T>
145  AutoType(series_set_elt_t)
146  op_get_initial(const AutomataBase<S>&,
147  const T&,
148  int state);
149 
150  template <class S, class T>
151  bool
152  op_is_initial(const AutomataBase<S>&,
153  const T&,
154  int state);
155 
156  template <class S, class T>
157  void
158  op_set_final(const AutomataBase<S>&, T&,
159  int state,
160  const typename Element<S, T>::series_set_elt_t& s);
161 
162  template <class S, class T>
163  typename Element<S, T>::series_set_elt_t
164  op_get_final(const AutomataBase<S>&,
165  const T&,
166  int state);
167 
168  template <class S, class T>
169  bool
170  op_is_final(const AutomataBase<S>&,
171  const T&,
172  int state);
173 
174  template <class S, class T>
175  void
176  op_clear_initial(const AutomataBase<S>&, T&);
177 
178  template <class S, class T>
179  void
180  op_clear_final(const AutomataBase<S>&, T&);
181 
182  template <class S, class T>
183  typename automaton_traits<T>::hstate_t
184  op_add_state(const AutomataBase<S>&, T&);
185 
186  template <class S, class T>
187  typename automaton_traits<T>::hstate_t
188  op_choose_state(const AutomataBase<S>&, T&);
189 
190  template <class S, class T>
191  typename automaton_traits<T>::htransition_t
192  op_add_transition(const AutomataBase<S>&, T&,
193  const typename automaton_traits<T>::hstate_t& from,
194  const typename automaton_traits<T>::hstate_t& to,
195  const typename Element<S, T>::label_t& label);
196 
197  template<class S, class T>
198  typename automaton_traits<T>::htransition_t
199  op_add_weighted_transition(const AutomataBase<S>&, T&,
200  const typename automaton_traits<T>::hstate_t& from,
201  const typename automaton_traits<T>::hstate_t& to,
202  const typename Element<S, T>::semiring_elt_t& w,
203  const typename Element<S, T>::monoid_elt_value_t& m);
204 
205  template <class S, class T>
206  typename automaton_traits<T>::htransition_t
207  op_add_series_transition(const AutomataBase<S>&, T&,
208  const typename automaton_traits<T>::hstate_t& from,
209  const typename automaton_traits<T>::hstate_t& to,
210  const typename Element<S, T>::series_set_elt_t&);
211 
212  template <class S, class T>
213  typename automaton_traits<T>::htransition_t
214  op_add_spontaneous(const AutomataBase<S>&, T&,
215  const typename automaton_traits<T>::hstate_t& from,
216  const typename automaton_traits<T>::hstate_t& to,
217  const typename Element<S, T>::semiring_elt_t&);
218 
219  template <class S, class T>
220  typename automaton_traits<T>::htransition_t
221  op_add_letter_transition(const AutomataBase<S>&, T&,
222  const typename automaton_traits<T>::hstate_t& from,
223  const typename automaton_traits<T>::hstate_t& to,
224  const typename Element<S, T>::letter_t&);
225 
226  template <class S, class T>
227  typename automaton_traits<T>::htransition_t
228  op_add_transition(const AutomataBase<S>&, T&,
229  int from,
230  int to,
231  const typename Element<S, T>::label_t& label);
232 
233  template<class S, class T>
234  typename automaton_traits<T>::htransition_t
235  op_add_weighted_transition(const AutomataBase<S>&, T&,
236  int from,
237  int to,
238  const typename Element<S, T>::semiring_elt_t& w,
239  const typename Element<S, T>::monoid_elt_value_t& m);
240 
241  template <class S, class T>
242  typename automaton_traits<T>::htransition_t
243  op_add_series_transition(const AutomataBase<S>&, T&,
244  int from,
245  int to,
246  const typename Element<S, T>::series_set_elt_t&);
247 
248  template <class S, class T>
249  typename automaton_traits<T>::htransition_t
250  op_add_spontaneous(const AutomataBase<S>&, T&,
251  int from,
252  int to,
253  const typename Element<S, T>::semiring_elt_t&);
254 
255  template <class S, class T>
256  typename automaton_traits<T>::htransition_t
257  op_add_letter_transition(const AutomataBase<S>&, T&,
258  int from,
259  int to,
260  const typename Element<S, T>::letter_t&);
261 
262  template <class S, class T>
263  void
264  op_update(const AutomataBase<S>&, T&,
265  const typename automaton_traits<T>::htransition_t&,
266  const AutoType(label_t)& l);
267 
268  template <class S, class T>
269  void
270  op_del_state(const AutomataBase<S>&, T&,
271  const typename automaton_traits<T>::hstate_t&);
272 
273  template <class S, class T>
274  void
275  op_del_state(const AutomataBase<S>&, T&,
276  int);
277 
278  template <class S, class T>
279  void
280  op_del_transition(const AutomataBase<S>&, T&,
281  const typename automaton_traits<T>::htransition_t&);
282 
283  template <class S, class T>
284  bool
285  op_has_state(const AutomataBase<S>&, const T&,
286  const typename automaton_traits<T>::hstate_t&);
287 
288  template <class S, class T>
289  bool
290  op_has_state(const AutomataBase<S>&, const T&,
291  int);
292 
293  template <class S, class T>
294  bool
295  op_has_transition(const AutomataBase<S>&, const T&,
296  const typename automaton_traits<T>::htransition_t&);
297 
298  template <class S, class T>
299  typename automaton_traits<T>::hstate_t
300  op_src_of(const AutomataBase<S>&, const T&,
301  const typename automaton_traits<T>::htransition_t&);
302 
303  template <class S, class T>
304  typename automaton_traits<T>::hstate_t
305  op_dst_of(const AutomataBase<S>&, const T&,
306  const typename automaton_traits<T>::htransition_t&);
307 
308  template <class S, class T>
309  typename Element<S, T>::label_t
310  op_label_of(const AutomataBase<S>&, const T&,
311  const typename automaton_traits<T>::htransition_t&);
312 
313  template <class S, class T>
314  const typename Element<S, T>::series_set_elt_t
315  op_series_of(const AutomataBase<S>&, const T&,
316  const typename automaton_traits<T>::htransition_t&);
317 
318  template <class S, class T>
319  typename Element<S, T>::series_set_elt_value_t
320  op_series_value_of(const AutomataBase<S>&, const T&,
321  const typename automaton_traits<T>::htransition_t&);
322 
323 
324  template <class S, class T>
325  typename Element<S, T>::monoid_elt_t
326  op_word_of(const AutomataBase<S>&, const T&,
327  const typename automaton_traits<T>::htransition_t&);
328 
329  template <class S, class T>
330  typename Element<S, T>::semiring_elt_t
331  op_weight_of(const AutomataBase<S>&, const T&,
332  const typename automaton_traits<T>::htransition_t&);
333 
334  template <class S, class T>
335  typename Element<S, T>::monoid_elt_value_t
336  op_word_value_of(const AutomataBase<S>&, const T&,
337  const typename automaton_traits<T>::htransition_t&);
338 
339  template <class S, class T>
340  typename Element<S, T>::letter_t
341  op_letter_of(const AutomataBase<S>&, const T&,
342  const typename automaton_traits<T>::htransition_t&);
343 
344  template <class S, class T>
345  bool
346  op_is_spontaneous(const AutomataBase<S>&, const T&,
347  const typename automaton_traits<T>::htransition_t&);
348 
350 
354 } // vcsn
355 
356 
357 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
358 # include <vaucanson/automata/concept/automata_ops.hxx>
359 # endif // VCSN_USE_INTERFACE_ONLY
360 
361 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH