17 #ifndef VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HXX
18 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HXX
20 # include <vaucanson/automata/concept/copy.hh>
21 # include <vaucanson/automata/concept/automata_base.hh>
26 template <
typename Self>
30 template <
typename Self>
35 template <
typename Self>
39 return this->
self().series();
44 template <
typename Self,
typename T>
49 template <
typename Self,
typename T>
55 template <
typename Self,
typename T>
59 return op_tag(this->structure(), this->value());
63 template <
typename Self,
typename T>
67 return op_tag(this->structure(), this->value());
71 template <
typename Self,
typename T>
75 return op_geometry(this->structure(), this->value());
79 template <
typename Self,
typename T>
83 return op_geometry(this->structure(), this->value());
87 template <
typename Self,
typename T>
91 return op_exists(this->structure(), this->value());
95 template <
typename Self,
typename T>
96 typename automaton_traits<T>::states_t
99 return op_states(this->structure(), this->value());
103 template <
typename Self,
typename T>
104 typename automaton_traits<T>::transitions_t
111 template <
typename Self,
typename T>
115 return this->structure().series();
119 template <
typename Self,
typename T>
120 typename automaton_traits<T>::initial_support_t
123 return op_initial(this->structure(), this->value());
127 template <
typename Self,
typename T>
128 typename automaton_traits<T>::final_support_t
132 return op_final(this->structure(), this->value());
137 template <
typename Self,
typename T>
141 return op_is_initial(this->structure(), this->value(), state);
144 template <
typename Self,
typename T>
148 return op_is_initial(this->structure(), this->value(), state);
152 template <
typename Self,
typename T>
156 return op_is_final(this->structure(), this->value(), state);
159 template <
typename Self,
typename T>
163 return op_is_final(this->structure(), this->value(), state);
167 template <
typename Self,
typename T>
174 this->structure().series().
178 template <
typename Self,
typename T>
185 this->structure().series().
190 template <
typename Self,
typename T>
193 set_initial(
const typename automaton_traits<T>::hstate_t& state,
const series_set_elt_t& s)
198 template <
typename Self,
typename T>
201 set_initial(
unsigned state,
const series_set_elt_t& s)
207 template <
typename Self,
typename T>
214 this->structure().series().
218 template <
typename Self,
typename T>
225 this->structure().series().
230 template <
typename Self,
typename T>
233 set_final(
const typename automaton_traits<T>::hstate_t& state,
const series_set_elt_t& s)
235 op_set_final(this->structure(), this->value(), state, s);
238 template <
typename Self,
typename T>
241 set_final(
unsigned state,
const series_set_elt_t& s)
243 op_set_final(this->structure(), this->value(), state, s);
247 template <
typename Self,
typename T>
254 algebra::zero_as<series_set_elt_value_t>::
255 of(this->structure().series()));
258 template <
typename Self,
typename T>
265 algebra::zero_as<series_set_elt_value_t>::
266 of(this->structure().series()));
270 template <
typename Self,
typename T>
277 algebra::zero_as<series_set_elt_value_t>::
278 of(this->structure().series()));
281 template <
typename Self,
typename T>
288 algebra::zero_as<series_set_elt_value_t>::
289 of(this->structure().series()));
293 template <
typename Self,
typename T>
301 template <
typename Self,
typename T>
309 template <
typename Self,
typename T>
316 template <
typename Self,
typename T>
324 template <
typename Self,
typename T>
328 return op_get_final(this->structure(), this->value(), state);
331 template <
typename Self,
typename T>
335 return op_get_final(this->structure(), this->value(), state);
339 template <
typename Self,
typename T>
340 typename automaton_traits<T>::hstate_t
347 template <
typename Self,
typename T>
348 typename automaton_traits<T>::hstate_t
351 return op_get_state(this->structure(), this->value(), state);
356 template <
typename Self,
typename T>
357 typename automaton_traits<T>::hstate_t
364 template <
typename Self,
typename T>
365 typename automaton_traits<T>::htransition_t
367 const typename automaton_traits<T>::hstate_t& dst,
368 const label_t& label)
374 template <
typename Self,
typename T>
375 typename automaton_traits<T>::htransition_t
378 const label_t& label)
385 template <
typename Self,
typename T>
386 typename automaton_traits<T>::htransition_t
388 add_weighted_transition(
const typename automaton_traits<T>::hstate_t& src,
389 const typename automaton_traits<T>::hstate_t& dst,
390 const semiring_elt_t& w,
391 const monoid_elt_value_t& m)
397 template <
typename Self,
typename T>
398 typename automaton_traits<T>::htransition_t
400 add_weighted_transition(
unsigned src,
402 const semiring_elt_t& w,
403 const monoid_elt_value_t& m)
412 template <
typename Self,
typename T>
413 typename automaton_traits<T>::htransition_t
415 const typename automaton_traits<T>::hstate_t& dst,
416 const series_set_elt_t& e)
422 template <
typename Self,
typename T>
423 typename automaton_traits<T>::htransition_t
426 const series_set_elt_t& e)
433 template <
typename Self,
typename T>
434 typename automaton_traits<T>::htransition_t
436 const typename automaton_traits<T>::hstate_t& dst)
438 semiring_elt_t w(this->structure().series().semiring());
439 w = algebra::identity_as<semiring_elt_value_t>
440 ::of(this->structure().series().semiring());
444 template <
typename Self,
typename T>
445 typename automaton_traits<T>::htransition_t
449 semiring_elt_t w(this->structure().series().semiring());
450 w = algebra::identity_as<semiring_elt_value_t>
451 ::of(this->structure().series().semiring());
455 template <
typename Self,
typename T>
456 typename automaton_traits<T>::htransition_t
458 const typename automaton_traits<T>::hstate_t& dst,
459 const semiring_elt_t& w)
464 template <
typename Self,
typename T>
465 typename automaton_traits<T>::htransition_t
468 const semiring_elt_t& w)
474 template <
typename Self,
typename T>
475 typename automaton_traits<T>::htransition_t
477 const typename automaton_traits<T>::hstate_t& dst,
484 template <
typename Self,
typename T>
485 typename automaton_traits<T>::htransition_t
496 template <
typename Self,
typename T>
497 typename automaton_traits<T>::htransition_t
499 const typename automaton_traits<T>::hstate_t& dst,
500 const std::string& l)
503 src, dst, algebra::letter_traits<letter_t>::
504 literal_to_letter(l).second);
507 template <
typename Self,
typename T>
508 typename automaton_traits<T>::htransition_t
511 const std::string& l)
514 src, dst, algebra::letter_traits<letter_t>::
515 literal_to_letter(l).second);
519 template <
typename Self,
typename T>
523 op_update(this->structure(), this->value(), e, l);
527 template <
typename Self,
typename T>
531 return op_del_state(this->structure(), this->value(), s);
534 template <
typename Self,
typename T>
538 return op_del_state(this->structure(), this->value(), state);
542 template <
typename Self,
typename T>
550 template <
typename Self,
typename T>
554 return op_has_state(this->structure(), this->value(), s);
557 template <
typename Self,
typename T>
561 return op_has_state(this->structure(), this->value(), state);
565 template <
typename Self,
typename T>
573 template <
typename Self,
typename T>
574 typename automaton_traits<T>::hstate_t
577 return op_src_of(this->structure(), this->value(), e);
581 template <
typename Self,
typename T>
582 typename automaton_traits<T>::hstate_t
585 return op_dst_of(this->structure(), this->value(), e);
589 template <
typename Self,
typename T>
590 typename automaton_traits<T>::label_t
593 return op_label_of(this->structure(), this->value(), e);
597 template <
typename Self,
typename T>
601 return op_series_of(this->structure(), this->value(), e);
605 template <
typename Self,
typename T>
613 template <
typename Self,
typename T>
621 template <
typename Self,
typename T>
625 return op_word_of(this->structure(), this->value(), e);
629 template <
typename Self,
typename T>
633 return op_weight_of(this->structure(), this->value(), e);
637 template <
typename Self,
typename T>
647 template <
typename Self,
typename T>
651 return op_letter_of(this->structure(), this->value(), e);
654 template<
typename S,
typename St,
typename T>
659 << r.states().size() <<
" states, "
660 << r.transitions().size() <<
" transitions, "
661 <<
"#I = " << r.initial().size() <<
", "
662 <<
"#T = " << r.final().size()
671 template <
typename Auto_>
672 typename generalized_traits<Auto_>::automaton_t
673 generalized(
const Auto_& from)
675 typename generalized_traits<Auto_>::automaton_t to(from.structure());
682 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HXX