automata_ops.hh

Go to the documentation of this file.
00001 // automata_ops.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 #ifndef VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH
00018 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH
00019 
00030 # include <vaucanson/automata/concept/automata_base.hh>
00031 
00032 namespace vcsn {
00033 
00034 #define AutoType(Type)                          \
00035   typename Element<S, T>::Type
00036 
00040 
00041 
00042 
00043   template <class S, class T>
00044   const typename automaton_traits<T>::tag_t&
00045   op_get_tag(const AutomataBase<S>&, const T&);
00046 
00047   template <class S, class T>
00048   typename automaton_traits<T>::tag_t&
00049   op_get_tag(const AutomataBase<S>&, T&);
00050 
00051   template <class S, class T>
00052   const typename automaton_traits<T>::geometry_t&
00053   op_get_geometry(const AutomataBase<S>&, const T&);
00054 
00055   template <class S, class T>
00056   typename automaton_traits<T>::geometry_t&
00057   op_get_geometry(const AutomataBase<S>&, T&);
00058 
00059   template <class S, class T>
00060   bool
00061   op_exists(const AutomataBase<S>& s, const T&);
00062 
00063   template <class S, class T>
00064   typename automaton_traits<T>::states_t
00065   op_states(const AutomataBase<S>&, const T&);
00066 
00067   template <class S, class T>
00068   typename automaton_traits<T>::transitions_t
00069   op_transitions(const AutomataBase<S>&, const T&);
00070 
00071   template <class S, class T>
00072   typename automaton_traits<T>::initial_support_t
00073   op_initial(const AutomataBase<S>&, const T&);
00074 
00075   template <class S, class T>
00076   typename automaton_traits<T>::final_support_t
00077   op_final(const AutomataBase<S>&, const T&);
00078 
00079   template <class S, class T>
00080   void
00081   op_set_initial(const AutomataBase<S>&, T&,
00082                  hstate_t state,
00083                  const AutoType(series_set_elt_t)& s);
00084 
00085   template <class S, class T>
00086   AutoType(series_set_elt_t)
00087   op_get_initial(const AutomataBase<S>&,
00088                  const T&,
00089                  hstate_t state);
00090 
00091   template <class S, class T>
00092   void
00093   op_set_final(const AutomataBase<S>&, T&,
00094                hstate_t state,
00095                const typename Element<S, T>::series_set_elt_t& s);
00096 
00097   template <class S, class T>
00098   typename Element<S, T>::series_set_elt_t
00099   op_get_final(const AutomataBase<S>&,
00100                const T&,
00101                hstate_t state);
00102 
00103   template <class S, class T>
00104   void
00105   op_clear_initial(const AutomataBase<S>&, T&);
00106 
00107   template <class S, class T>
00108   void
00109   op_clear_final(const AutomataBase<S>&, T&);
00110 
00111   template <class S, class T>
00112   hstate_t
00113   op_add_state(const AutomataBase<S>&, T&);
00114 
00115   template <class S, class T>
00116   hstate_t
00117   op_choose_state(const AutomataBase<S>&, T&);
00118 
00119   template <class S, class T>
00120   htransition_t
00121   op_add_transition(const AutomataBase<S>&, T&,
00122                     hstate_t from,
00123                     hstate_t to,
00124                     const typename Element<S, T>::label_t& label);
00125 
00126   template<class S, class T>
00127   htransition_t
00128   op_add_weighted_transition(const AutomataBase<S>&, T&,
00129                              hstate_t from,
00130                              hstate_t to,
00131                              const typename Element<S, T>::semiring_elt_t& w,
00132                              const typename Element<S, T>::monoid_elt_value_t& m);
00133 
00134   template <class S, class T>
00135   htransition_t
00136   op_add_series_transition(const AutomataBase<S>&, T&,
00137                            hstate_t from,
00138                            hstate_t to,
00139                            const typename Element<S, T>::series_set_elt_t&);
00140 
00141   template <class S, class T>
00142   htransition_t
00143   op_add_spontaneous(const AutomataBase<S>&, T&,
00144                      hstate_t from,
00145                      hstate_t to,
00146                      const typename Element<S, T>::semiring_elt_t&);
00147 
00148   template <class S, class T>
00149   htransition_t
00150   op_add_letter_transition(const AutomataBase<S>&, T&,
00151                            hstate_t from,
00152                            hstate_t to,
00153                            const typename Element<S, T>::letter_t&);
00154 
00155   template <class S, class T>
00156   void
00157   op_update(const AutomataBase<S>&, T&,
00158             htransition_t,
00159             const AutoType(label_t)& l);
00160 
00161   template <class S, class T>
00162   void
00163   op_del_state(const AutomataBase<S>&, T&,
00164                hstate_t);
00165 
00166   template <class S, class T>
00167   void
00168   op_del_transition(const AutomataBase<S>&, T&,
00169                     htransition_t);
00170 
00171   template <class S, class T>
00172   bool
00173   op_has_state(const AutomataBase<S>&, const T&,
00174                hstate_t);
00175 
00176   template <class S, class T>
00177   bool
00178   op_has_transition(const AutomataBase<S>&, const T&,
00179                     htransition_t);
00180 
00181   template <class S, class T>
00182   hstate_t
00183   op_src_of(const AutomataBase<S>&, const T&,
00184             htransition_t);
00185 
00186   template <class S, class T>
00187   hstate_t
00188   op_dst_of(const AutomataBase<S>&, const T&,
00189             htransition_t);
00190 
00191   template <class S, class T>
00192   typename Element<S, T>::label_t
00193   op_label_of(const AutomataBase<S>&, const T&,
00194               htransition_t);
00195 
00196   template <class S, class T>
00197   const typename Element<S, T>::series_set_elt_t
00198   op_series_of(const AutomataBase<S>&, const T&,
00199                htransition_t);
00200 
00201   template <class S, class T>
00202   typename Element<S, T>::series_set_elt_value_t
00203   op_series_value_of(const AutomataBase<S>&, const T&,
00204                      htransition_t);
00205 
00206 
00207   template <class S, class T>
00208   typename Element<S, T>::monoid_elt_t
00209   op_word_of(const AutomataBase<S>&, const T&,
00210              htransition_t);
00211 
00212   template <class S, class T>
00213   typename Element<S, T>::semiring_elt_t
00214   op_weight_of(const AutomataBase<S>&, const T&,
00215                htransition_t);
00216 
00217   template <class S, class T>
00218   typename Element<S, T>::monoid_elt_value_t
00219   op_word_value_of(const AutomataBase<S>&, const T&,
00220                    htransition_t);
00221 
00222   template <class S, class T>
00223   typename Element<S, T>::letter_t
00224   op_letter_of(const AutomataBase<S>&, const T&,
00225                htransition_t);
00226 
00227   template <class S, class T>
00228   bool
00229   op_is_spontaneous(const AutomataBase<S>&, const T&,
00230                     htransition_t);
00231 
00233 
00234   // output_return_type = OutputIterator
00235   // output_type        = htransition_t
00236   // direction          = output
00237 
00239   template <class S, class T,
00240             typename OutputIterator, typename Kind>
00241   void op_delta(const AutomataBase<S>&, const T&,
00242                 OutputIterator res,
00243                 hstate_t from,
00244                 delta_kind::kind<Kind> k);
00245 
00252   template <class S, class T,
00253             typename OutputIterator, typename L, typename Kind>
00254   void op_delta(const AutomataBase<S>&, const T&,
00255                 OutputIterator res,
00256                 hstate_t from,
00257                 const L& query,
00258                 delta_kind::kind<Kind> k);
00259 
00266   template <class S, class T,
00267             typename OutputIterator, typename L, typename Kind>
00268   void op_letter_delta(const AutomataBase<S>&, const T&,
00269                        OutputIterator res,
00270                        hstate_t from,
00271                        const L& letter,
00272                        delta_kind::kind<Kind> k);
00273 
00275   template <class S, class T,
00276             typename OutputIterator, typename Kind>
00277   void op_spontaneous_delta(const AutomataBase<S>&, const T&,
00278                             OutputIterator res,
00279                             hstate_t from,
00280                             delta_kind::kind<Kind> k);
00281 
00282   // output_return_type = Container
00283   // output_type        = htransition_t
00284   // direction          = output
00285 
00287   template <class S, class T,
00288             typename Container, typename Kind>
00289   void op_deltac(const AutomataBase<S>&, const T&,
00290                  Container& res, hstate_t from, delta_kind::kind<Kind> k);
00291 
00298   template <class S, class T,
00299             typename Container, typename L, typename Kind>
00300   void op_deltac(const AutomataBase<S>&, const T&,
00301                  Container& res,
00302                  hstate_t from,
00303                  const L& query,
00304                  delta_kind::kind<Kind> k);
00305 
00312   template <class S, class T,
00313             typename Container, typename L, typename Kind>
00314   void op_letter_deltac(const AutomataBase<S>&, const T&,
00315                         Container& res,
00316                         hstate_t from,
00317                         const L& letter,
00318                         delta_kind::kind<Kind> k);
00319 
00321   template <class S, class T, class Container, typename Kind>
00322   void op_spontaneous_deltac(const AutomataBase<S>&, const T&,
00323                              Container& res,
00324                              hstate_t from,
00325                              delta_kind::kind<Kind> k);
00326 
00327   // output_return_type = OutputIterator
00328   // output_type        = hstate_t
00329   // direction          = output
00330 
00331   // output_return_type = OutputIterator
00332   // output_type        = htransition_t
00333   // direction          = input
00334 
00336   template<class S, class T, typename OutputIterator, typename Kind>
00337   void op_rdelta(const AutomataBase<S>&, const T&,
00338                  OutputIterator res,
00339                  hstate_t from,
00340                  delta_kind::kind<Kind> k);
00341 
00348   template<class S, class T, typename OutputIterator, typename L, typename Kind>
00349   void op_rdelta(const AutomataBase<S>&, const T&,
00350                  OutputIterator res,
00351                  hstate_t from,
00352                  const L& query,
00353                  delta_kind::kind<Kind> k);
00354 
00361   template<class S, class T, typename OutputIterator, typename L, typename Kind>
00362   void op_letter_rdelta(const AutomataBase<S>&, const T&,
00363                         OutputIterator res,
00364                         hstate_t from,
00365                         const L& letter,
00366                         delta_kind::kind<Kind> k);
00367 
00369   template<class S, class T, typename OutputIterator, typename Kind>
00370   void op_spontaneous_rdelta(const AutomataBase<S>&, const T&,
00371                              OutputIterator res,
00372                              hstate_t from,
00373                              delta_kind::kind<Kind> k);
00374 
00375   // output_return_type = Container
00376   // output_type        = htransition_t
00377   // direction          = input
00378 
00380   template<class S, class T, typename Container, typename Kind>
00381   void op_rdeltac(const AutomataBase<S>&, const T&,
00382                   Container& res, hstate_t from, delta_kind::kind<Kind> k);
00383 
00390   template<class S, class T, typename Container, typename L, typename Kind>
00391   void op_rdeltac(const AutomataBase<S>&, const T&,
00392                   Container& res,
00393                   hstate_t from,
00394                   const L& query,
00395                   delta_kind::kind<Kind> k);
00396 
00403   template<class S, class T, typename Container, typename L, typename Kind>
00404   void op_letter_rdeltac(const AutomataBase<S>&, const T&,
00405                          Container& res,
00406                          hstate_t from,
00407                          const L& letter,
00408                          delta_kind::kind<Kind> k);
00409 
00411   template<class S, class T, typename Container, typename Kind>
00412   void op_spontaneous_rdeltac(const AutomataBase<S>&, const T&,
00413                               Container& res,
00414                               hstate_t from,
00415                               delta_kind::kind<Kind> k);
00416 
00417   // output_return_type = OutputIterator
00418   // output_type        = hstate_t
00419   // direction          = input
00420 
00424 } // vcsn
00425 
00426 
00427 # ifndef VCSN_USE_INTERFACE_ONLY
00428 #  include <vaucanson/automata/concept/automata_ops.hxx>
00429 # endif // VCSN_USE_INTERFACE_ONLY
00430 
00431 
00432 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH

Generated on Sat Jul 29 17:12:58 2006 for Vaucanson by  doxygen 1.4.6