00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH
00019
00020 # include <vaucanson/automata/implementation/automaton_view.hh>
00021 # include <vaucanson/design_pattern/predecls.hh>
00022
00023 namespace vcsn {
00024
00035 template <class T>
00036 struct TransposeView : public IdentityView<T>
00037 {
00038 TransposeView();
00039 TransposeView(const T&);
00040 TransposeView(T&);
00041 TransposeView(const TransposeView&);
00042 };
00043
00045
00046 template <class T>
00047 struct transpose_traits
00048 {
00049 typedef undefined_type type;
00050 };
00051
00052 template <class S, class T>
00053 struct transpose_traits<Element<S, T> >
00054 {
00055 typedef Element<S, TransposeView<T> > type;
00056 };
00065 template <class S, class T>
00066 Element<S, TransposeView<T> >
00067 transpose_view(Element<S, T>&);
00068
00069 template <class S, class T>
00070 const Element<S, TransposeView<T> >
00071 transpose_view(const Element<S, T>&);
00074
00075 template <typename T>
00076 struct automaton_traits<TransposeView<T> >
00077 {
00078 typedef typename automaton_traits<T>::label_t label_t;
00079 typedef typename automaton_traits<T>::series_set_elt_value_t
00080 series_set_elt_value_t;
00081 typedef typename automaton_traits<T>::word_value_t word_value_t;
00082 typedef typename automaton_traits<T>::semiring_elt_value_t
00083 semiring_elt_value_t;
00084 typedef typename automaton_traits<T>::letter_t letter_t;
00085 typedef typename automaton_traits<T>::tag_t tag_t;
00086 typedef typename automaton_traits<T>::states_t states_t;
00087
00088 typedef typename automaton_traits<T>::state_iterator
00089 state_iterator;
00090 typedef typename automaton_traits<T>::transitions_t transitions_t;
00091
00092 typedef typename automaton_traits<T>::transition_iterator transition_iterator;
00093 typedef typename automaton_traits<T>::initial_t initial_t;
00094 typedef typename automaton_traits<T>::initial_iterator
00095 initial_iterator;
00096 typedef typename automaton_traits<T>::initial_support_t
00097 initial_support_t;
00098 typedef typename automaton_traits<T>::final_t final_t;
00099 typedef typename automaton_traits<T>::final_iterator
00100 final_iterator;
00101 typedef typename automaton_traits<T>::final_support_t
00102 final_support_t;
00103 typedef typename automaton_traits<T>::geometry_t geometry_t;
00104 typedef typename automaton_traits<T>::geometry_t::coords_t geometry_coords_t;
00105
00106
00107 typedef typename automaton_traits<T>::hstate_t hstate_t;
00108 typedef typename automaton_traits<T>::htransition_t htransition_t;
00109
00110 typedef typename automaton_traits<T>::rdelta_state_iterator delta_state_iterator;
00111 typedef typename automaton_traits<T>::rdelta_transition_iterator delta_transition_iterator;
00112 typedef typename automaton_traits<T>::delta_state_iterator rdelta_state_iterator;
00113 typedef typename automaton_traits<T>::delta_transition_iterator rdelta_transition_iterator;
00114 };
00115
00116 #define AutoType(Type) \
00117 typename Element<S, TransposeView<T> >::Type
00118
00120
00121 template <class S, class T>
00122 typename automaton_traits<TransposeView<T> >::initial_support_t
00123 op_initial(const AutomataBase<S>&, const TransposeView<T>&);
00124
00125 template <class S, class T>
00126 typename automaton_traits<TransposeView<T> >::final_support_t
00127 op_final(const AutomataBase<S>&, const TransposeView<T>&);
00128
00129 template <class S, class T>
00130 void
00131 op_set_initial(const AutomataBase<S>&, TransposeView<T>&,
00132 const typename automaton_traits<T>::hstate_t& state,
00133 const AutoType(series_set_elt_t)& s);
00134
00135 template <class S, class T>
00136 AutoType(series_set_elt_t)
00137 op_get_initial(const AutomataBase<S>&,
00138 const TransposeView<T>&,
00139 const typename automaton_traits<T>::hstate_t&);
00140
00141 template <class S, class T>
00142 void
00143 op_set_final(const AutomataBase<S>&, TransposeView<T>&,
00144 const typename automaton_traits<T>::hstate_t& state,
00145 const typename Element<S, T>::series_set_elt_t& s);
00146
00147 template <class S, class T>
00148 typename Element<S, T>::series_set_elt_t
00149 op_get_final(const AutomataBase<S>&,
00150 const TransposeView<T>&,
00151 const typename automaton_traits<T>::hstate_t& state);
00152
00153 template <class S, class T>
00154 void
00155 op_clear_initial(const AutomataBase<S>&, TransposeView<T>&);
00156
00157 template <class S, class T>
00158 void
00159 op_clear_final(const AutomataBase<S>&, TransposeView<T>&);
00160
00161 template <class S, class T>
00162 typename automaton_traits<T>::hstate_t
00163 op_src_of(const AutomataBase<S>&, const TransposeView<T>&,
00164 const typename automaton_traits<T>::htransition_t&);
00165
00166 template <class S, class T>
00167 typename automaton_traits<T>::hstate_t
00168 op_dst_of(const AutomataBase<S>&, const TransposeView<T>&,
00169 const typename automaton_traits<T>::htransition_t&);
00170
00173
00174
00175
00176
00178 template <class S, class T,
00179 typename Container>
00180 void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00181 Container& res, const typename automaton_traits<T>::hstate_t& from, delta_kind::transitions k);
00182
00189 template <class S, class T,
00190 typename Container, typename L>
00191 void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00192 Container& res,
00193 const typename automaton_traits<T>::hstate_t& from,
00194 const L& query,
00195 delta_kind::transitions k);
00196
00203 template <class S, class T,
00204 typename Container, typename L>
00205 void op_letter_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00206 Container& res,
00207 const typename automaton_traits<T>::hstate_t& from,
00208 const L& letter,
00209 delta_kind::transitions k);
00210
00212 template <class S, class T, class Container>
00213 void op_spontaneous_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00214 Container& res,
00215 const typename automaton_traits<T>::hstate_t& from,
00216 delta_kind::transitions k);
00217
00218
00219
00220
00221
00228 template<class S, class T, typename Container>
00229 void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00230 Container& res, const typename automaton_traits<T>::hstate_t& from, delta_kind::states k);
00231
00238 template<class S, class T, typename Container, typename L>
00239 void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00240 Container& res,
00241 const typename automaton_traits<T>::hstate_t& from,
00242 const L& query,
00243 delta_kind::states k);
00244
00251 template<class S, class T, typename Container, typename L>
00252 void op_letter_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00253 Container& res,
00254 const typename automaton_traits<T>::hstate_t& from,
00255 const L& letter,
00256 delta_kind::states k);
00257
00259 template<class S, class T, typename Container>
00260 void op_spontaneous_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00261 Container& res,
00262 const typename automaton_traits<T>::hstate_t& from,
00263 delta_kind::states k);
00264
00265
00266
00267
00268
00274 template<class S, class T, typename Container>
00275 void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00276 Container& res, const typename automaton_traits<T>::hstate_t& from, delta_kind::transitions k);
00277
00284 template<class S, class T, typename Container, typename L>
00285 void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00286 Container& res,
00287 const typename automaton_traits<T>::hstate_t& from,
00288 const L& query,
00289 delta_kind::transitions k);
00290
00297 template<class S, class T, typename Container, typename L>
00298 void op_letter_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00299 Container& res,
00300 const typename automaton_traits<T>::hstate_t& from,
00301 const L& letter,
00302 delta_kind::transitions k);
00303
00305 template<class S, class T, typename Container>
00306 void op_spontaneous_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00307 Container& res,
00308 const typename automaton_traits<T>::hstate_t& from,
00309 delta_kind::transitions k);
00310
00311
00312
00313
00314
00321 template<class S, class T, typename Container>
00322 void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00323 Container& res, const typename automaton_traits<T>::hstate_t& from, delta_kind::states k);
00324
00331 template<class S, class T, typename Container, typename L>
00332 void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00333 Container& res,
00334 const typename automaton_traits<T>::hstate_t& from,
00335 const L& query,
00336 delta_kind::states k);
00337
00344 template<class S, class T, typename Container, typename L>
00345 void op_letter_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00346 Container& res,
00347 const typename automaton_traits<T>::hstate_t& from,
00348 const L& letter,
00349 delta_kind::states k);
00350
00352 template<class S, class T, typename Container>
00353 void op_spontaneous_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00354 Container& res,
00355 const typename automaton_traits<T>::hstate_t& from,
00356 delta_kind::states k);
00357
00358 template <class S, class T>
00359 const typename automaton_traits<T>::geometry_t&
00360 op_geometry(const AutomataBase<S>& s, const TransposeView<T>& v);
00361
00362 template <class S, class T>
00363 typename automaton_traits<T>::geometry_t&
00364 op_geometry(const AutomataBase<S>& s, TransposeView<T>& v);
00365
00366 }
00367
00368 # undef AutoType
00369
00370
00371 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00372 # include <vaucanson/automata/implementation/transpose_view.hxx>
00373 #endif // VCSN_USE_INTERFACE_ONLY
00374
00375
00376 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH