17 #ifndef VCSN_AUTOMATA_CONCEPT_TRANSDUCER_BASE_HXX
18 # define VCSN_AUTOMATA_CONCEPT_TRANSDUCER_BASE_HXX
20 # include <vaucanson/automata/concept/transducer_base.hh>
21 # include <vaucanson/automata/concept/transducer_ops.hh>
25 template <
typename Self>
29 template <
typename Self>
34 template <
typename Self,
typename T>
38 template <
typename Self,
typename T>
43 template <
typename Self,
typename T>
47 return op_input_of(this->structure(), this->value(), e);
50 template <
typename Self,
typename T>
54 return op_output_of(this->structure(), this->value(), e);
57 template <
typename Self,
typename T>
58 template <
typename U,
typename V>
59 typename automaton_traits<T>::htransition_t
61 add_io_transition(
typename automaton_traits<T>::hstate_t from,
62 typename automaton_traits<T>::hstate_t to,
68 w = algebra::identity_as<output_semiring_elt_value_t>
69 ::of(this->series().semiring().semiring());
71 i_elt (this->structure().series().monoid(), i);
73 o_elt (this->structure().series().semiring().monoid(), o);
74 return op_add_io_transition(this->structure(), this->value(),
75 from, to, i_elt, o_elt, w);
78 template <
typename Self,
typename T>
80 typename automaton_traits<T>::htransition_t
82 add_o_transition(
typename automaton_traits<T>::hstate_t from,
83 typename automaton_traits<T>::hstate_t to,
88 w = algebra::identity_as<output_semiring_elt_value_t>
89 ::of(this->series().semiring().semiring());
91 o_elt (this->structure().series().semiring().monoid(), o);
92 return op_add_o_transition(this->structure(), this->value(),
96 template <
typename Self,
typename T>
98 typename automaton_traits<T>::htransition_t
100 add_i_transition(
typename automaton_traits<T>::hstate_t from,
101 typename automaton_traits<T>::hstate_t to,
106 w = algebra::identity_as<output_semiring_elt_value_t>
107 ::of(this->series().semiring().semiring());
109 i_elt (this->structure().series().monoid(), i);
110 return op_add_i_transition(this->structure(), this->value(),
114 template <
typename Self,
typename T>
115 template <
typename U>
118 set_o_final(
typename automaton_traits<T>::hstate_t
final,
122 o_elt (this->structure().series().semiring().monoid(), o);
123 op_set_o_final(this->structure(), this->value(),
final, o_elt.
value());
126 template <
typename Self,
typename T>
127 template <
typename U>
130 set_o_initial(
typename automaton_traits<T>::hstate_t initial,
134 o_elt (this->structure().series().semiring().monoid(), o);
135 op_set_o_initial(this->structure(), this->value(), initial, o_elt.
value());
140 #endif // ! VCSN_AUTOMATA_CONCEPT_TRANSDUCER_BASE_HXX