- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# 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
    00044   template<typename S, typename R, typename T>
    00045   R op_convert(const AutomataBase<S> &se,
    00046                SELECTOR(R), const T& data);
    00047
    00048   template<typename S, typename T>
    00049   const T& op_convert(const AutomataBase<S>&,
    00050                       SELECTOR(T), const T& from_data);
    00051
    00053   template<typename S, typename T, typename U>
    00054   void
    00055   op_assign(const AutomataBase<S>& s,
    00056             T& dst, const U& src);
    00057
    00058   template<typename S, typename T>
    00059   void
    00060   op_assign(const AutomataBase<S>& concept, T& dst, const T& src);
    00061
    00062   template <class S, class T>
    00063   const typename automaton_traits<T>::tag_t&
    00064   op_get_tag(const AutomataBase<S>&, const T&);
    00065
    00066   template <class S, class T>
    00067   typename automaton_traits<T>::tag_t&
    00068   op_get_tag(const AutomataBase<S>&, T&);
    00069
    00070   template <class S, class T>
    00071   const typename automaton_traits<T>::geometry_t&
    00072   op_get_geometry(const AutomataBase<S>&, const T&);
    00073
    00074   template <class S, class T>
    00075   typename automaton_traits<T>::geometry_t&
    00076   op_get_geometry(const AutomataBase<S>&, T&);
    00077
    00078   template <class S, class T>
    00079   bool
    00080   op_exists(const AutomataBase<S>& s, const T&);
    00081
    00082   template <class S, class T>
    00083   typename automaton_traits<T>::states_t
    00084   op_states(const AutomataBase<S>&, const T&);
    00085
    00086   template <class S, class T>
    00087   typename automaton_traits<T>::hstate_t
    00088   op_get_state(const AutomataBase<S>&, const T&, int state);
    00089
    00090   template <class S, class T>
    00091   typename automaton_traits<T>::transitions_t
    00092   op_transitions(const AutomataBase<S>&, const T&);
    00093
    00094   template <class S, class T>
    00095   typename automaton_traits<T>::initial_support_t
    00096   op_initial(const AutomataBase<S>&, const T&);
    00097
    00098   template <class S, class T>
    00099   typename automaton_traits<T>::final_support_t
    00100   op_final(const AutomataBase<S>&, const T&);
    00101
    00102   template <class S, class T>
    00103   void
    00104   op_set_initial(const AutomataBase<S>&, T&,
    00105                  const typename automaton_traits<T>::hstate_t& state,
    00106                  const AutoType(series_set_elt_t)& s);
    00107
    00108   template <class S, class T>
    00109   AutoType(series_set_elt_t)
    00110   op_get_initial(const AutomataBase<S>&,
    00111                  const T&,
    00112                  const typename automaton_traits<T>::hstate_t& state);
    00113
    00114   template <class S, class T>
    00115   bool
    00116   op_is_initial(const AutomataBase<S>&,
    00117                 const T&,
    00118                 const typename automaton_traits<T>::hstate_t& state);
    00119
    00120   template <class S, class T>
    00121   void
    00122   op_set_final(const AutomataBase<S>&, T&,
    00123                const typename automaton_traits<T>::hstate_t& state,
    00124                const typename Element<S, T>::series_set_elt_t& s);
    00125
    00126   template <class S, class T>
    00127   typename Element<S, T>::series_set_elt_t
    00128   op_get_final(const AutomataBase<S>&,
    00129                const T&,
    00130                const typename automaton_traits<T>::hstate_t& state);
    00131
    00132   template <class S, class T>
    00133   bool
    00134   op_is_final(const AutomataBase<S>&,
    00135               const T&,
    00136               const typename automaton_traits<T>::hstate_t& state);
    00137
    00138   template <class S, class T>
    00139   void
    00140   op_set_initial(const AutomataBase<S>&, T&,
    00141                  int state,
    00142                  const AutoType(series_set_elt_t)& s);
    00143
    00144   template <class S, class T>
    00145   AutoType(series_set_elt_t)
    00146   op_get_initial(const AutomataBase<S>&,
    00147                  const T&,
    00148                  int state);
    00149
    00150   template <class S, class T>
    00151   bool
    00152   op_is_initial(const AutomataBase<S>&,
    00153                 const T&,
    00154                 int state);
    00155
    00156   template <class S, class T>
    00157   void
    00158   op_set_final(const AutomataBase<S>&, T&,
    00159                int state,
    00160                const typename Element<S, T>::series_set_elt_t& s);
    00161
    00162   template <class S, class T>
    00163   typename Element<S, T>::series_set_elt_t
    00164   op_get_final(const AutomataBase<S>&,
    00165                const T&,
    00166                int state);
    00167
    00168   template <class S, class T>
    00169   bool
    00170   op_is_final(const AutomataBase<S>&,
    00171               const T&,
    00172               int state);
    00173
    00174   template <class S, class T>
    00175   void
    00176   op_clear_initial(const AutomataBase<S>&, T&);
    00177
    00178   template <class S, class T>
    00179   void
    00180   op_clear_final(const AutomataBase<S>&, T&);
    00181
    00182   template <class S, class T>
    00183   typename automaton_traits<T>::hstate_t
    00184   op_add_state(const AutomataBase<S>&, T&);
    00185
    00186   template <class S, class T>
    00187   typename automaton_traits<T>::hstate_t
    00188   op_choose_state(const AutomataBase<S>&, T&);
    00189
    00190   template <class S, class T>
    00191   typename automaton_traits<T>::htransition_t
    00192   op_add_transition(const AutomataBase<S>&, T&,
    00193                     const typename automaton_traits<T>::hstate_t& from,
    00194                     const typename automaton_traits<T>::hstate_t& to,
    00195                     const typename Element<S, T>::label_t& label);
    00196
    00197   template<class S, class T>
    00198   typename automaton_traits<T>::htransition_t
    00199   op_add_weighted_transition(const AutomataBase<S>&, T&,
    00200                              const typename automaton_traits<T>::hstate_t& from,
    00201                              const typename automaton_traits<T>::hstate_t& to,
    00202                              const typename Element<S, T>::semiring_elt_t& w,
    00203                              const typename Element<S, T>::monoid_elt_value_t& m);
    00204
    00205   template <class S, class T>
    00206   typename automaton_traits<T>::htransition_t
    00207   op_add_series_transition(const AutomataBase<S>&, T&,
    00208                            const typename automaton_traits<T>::hstate_t& from,
    00209                            const typename automaton_traits<T>::hstate_t& to,
    00210                            const typename Element<S, T>::series_set_elt_t&);
    00211
    00212   template <class S, class T>
    00213   typename automaton_traits<T>::htransition_t
    00214   op_add_spontaneous(const AutomataBase<S>&, T&,
    00215                      const typename automaton_traits<T>::hstate_t& from,
    00216                      const typename automaton_traits<T>::hstate_t& to,
    00217                      const typename Element<S, T>::semiring_elt_t&);
    00218
    00219   template <class S, class T>
    00220   typename automaton_traits<T>::htransition_t
    00221   op_add_letter_transition(const AutomataBase<S>&, T&,
    00222                            const typename automaton_traits<T>::hstate_t& from,
    00223                            const typename automaton_traits<T>::hstate_t& to,
    00224                            const typename Element<S, T>::letter_t&);
    00225
    00226   template <class S, class T>
    00227   typename automaton_traits<T>::htransition_t
    00228   op_add_transition(const AutomataBase<S>&, T&,
    00229                     int from,
    00230                     int to,
    00231                     const typename Element<S, T>::label_t& label);
    00232
    00233   template<class S, class T>
    00234   typename automaton_traits<T>::htransition_t
    00235   op_add_weighted_transition(const AutomataBase<S>&, T&,
    00236                              int from,
    00237                              int to,
    00238                              const typename Element<S, T>::semiring_elt_t& w,
    00239                              const typename Element<S, T>::monoid_elt_value_t& m);
    00240
    00241   template <class S, class T>
    00242   typename automaton_traits<T>::htransition_t
    00243   op_add_series_transition(const AutomataBase<S>&, T&,
    00244                            int from,
    00245                            int to,
    00246                            const typename Element<S, T>::series_set_elt_t&);
    00247
    00248   template <class S, class T>
    00249   typename automaton_traits<T>::htransition_t
    00250   op_add_spontaneous(const AutomataBase<S>&, T&,
    00251                      int from,
    00252                      int to,
    00253                      const typename Element<S, T>::semiring_elt_t&);
    00254
    00255   template <class S, class T>
    00256   typename automaton_traits<T>::htransition_t
    00257   op_add_letter_transition(const AutomataBase<S>&, T&,
    00258                            int from,
    00259                            int to,
    00260                            const typename Element<S, T>::letter_t&);
    00261
    00262   template <class S, class T>
    00263   void
    00264   op_update(const AutomataBase<S>&, T&,
    00265             const typename automaton_traits<T>::htransition_t&,
    00266             const AutoType(label_t)& l);
    00267
    00268   template <class S, class T>
    00269   void
    00270   op_del_state(const AutomataBase<S>&, T&,
    00271                const typename automaton_traits<T>::hstate_t&);
    00272
    00273   template <class S, class T>
    00274   void
    00275   op_del_state(const AutomataBase<S>&, T&,
    00276                int);
    00277
    00278   template <class S, class T>
    00279   void
    00280   op_del_transition(const AutomataBase<S>&, T&,
    00281                     const typename automaton_traits<T>::htransition_t&);
    00282
    00283   template <class S, class T>
    00284   bool
    00285   op_has_state(const AutomataBase<S>&, const T&,
    00286                const typename automaton_traits<T>::hstate_t&);
    00287
    00288   template <class S, class T>
    00289   bool
    00290   op_has_state(const AutomataBase<S>&, const T&,
    00291                int);
    00292
    00293   template <class S, class T>
    00294   bool
    00295   op_has_transition(const AutomataBase<S>&, const T&,
    00296                     const typename automaton_traits<T>::htransition_t&);
    00297
    00298   template <class S, class T>
    00299   typename automaton_traits<T>::hstate_t
    00300   op_src_of(const AutomataBase<S>&, const T&,
    00301             const typename automaton_traits<T>::htransition_t&);
    00302
    00303   template <class S, class T>
    00304   typename automaton_traits<T>::hstate_t
    00305   op_dst_of(const AutomataBase<S>&, const T&,
    00306             const typename automaton_traits<T>::htransition_t&);
    00307
    00308   template <class S, class T>
    00309   typename Element<S, T>::label_t
    00310   op_label_of(const AutomataBase<S>&, const T&,
    00311               const typename automaton_traits<T>::htransition_t&);
    00312
    00313   template <class S, class T>
    00314   const typename Element<S, T>::series_set_elt_t
    00315   op_series_of(const AutomataBase<S>&, const T&,
    00316                const typename automaton_traits<T>::htransition_t&);
    00317
    00318   template <class S, class T>
    00319   typename Element<S, T>::series_set_elt_value_t
    00320   op_series_value_of(const AutomataBase<S>&, const T&,
    00321                      const typename automaton_traits<T>::htransition_t&);
    00322
    00323
    00324   template <class S, class T>
    00325   typename Element<S, T>::monoid_elt_t
    00326   op_word_of(const AutomataBase<S>&, const T&,
    00327              const typename automaton_traits<T>::htransition_t&);
    00328
    00329   template <class S, class T>
    00330   typename Element<S, T>::semiring_elt_t
    00331   op_weight_of(const AutomataBase<S>&, const T&,
    00332                const typename automaton_traits<T>::htransition_t&);
    00333
    00334   template <class S, class T>
    00335   typename Element<S, T>::monoid_elt_value_t
    00336   op_word_value_of(const AutomataBase<S>&, const T&,
    00337                    const typename automaton_traits<T>::htransition_t&);
    00338
    00339   template <class S, class T>
    00340   typename Element<S, T>::letter_t
    00341   op_letter_of(const AutomataBase<S>&, const T&,
    00342                const typename automaton_traits<T>::htransition_t&);
    00343
    00344   template <class S, class T>
    00345   bool
    00346   op_is_spontaneous(const AutomataBase<S>&, const T&,
    00347                     const typename automaton_traits<T>::htransition_t&);
    00348
    00350
    00354 } // vcsn
    00355
    00356
    00357 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
    00358 #  include <vaucanson/automata/concept/automata_ops.hxx>
    00359 # endif // VCSN_USE_INTERFACE_ONLY
    00360
    00361 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_OPS_HH