automata_base.hh

00001 // automata_base.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, 2007, 2008 The Vaucanson
00006 // Group.
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 2
00011 // of the License, or (at your option) any later version.
00012 //
00013 // The complete GNU General Public Licence Notice can be found as the
00014 // `COPYING' file in the root directory.
00015 //
00016 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00017 //
00018 #ifndef VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HH
00019 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HH
00020 
00021 # include <iterator>
00022 # include <vaucanson/design_pattern/design_pattern.hh>
00023 # include <vaucanson/automata/concept/handlers.hh>
00024 # include <vaucanson/automata/concept/delta_kind.hh>
00025 # include <vaucanson/algebra/concept/series_base.hh>
00026 
00027 namespace vcsn {
00028     
00032   /*-------------------.
00033   | AutomataBase<Self> |
00034   `-------------------*/
00036 
00040   template <typename Self>
00041   struct AutomataBase
00042     : Structure<Self>
00043   {
00044     public:
00046       typedef typename virtual_types<Self>::series_set_t  series_set_t;
00047 
00048     protected:
00050       AutomataBase();
00051 
00053       AutomataBase(const AutomataBase& other);
00054 
00055     public:
00057       const series_set_t& series() const;
00058   };
00059 
00060   // FIXME: it must be renamed to automaton_impl_traits
00061   // traits for automaton implementation.
00062   template <typename T>
00063   struct automaton_traits
00064   {
00065       typedef undefined_type label_t;
00066       typedef undefined_type series_set_elt_value_t;
00067       typedef undefined_type word_value_t;
00068       typedef undefined_type semiring_elt_value_t;
00069       typedef undefined_type letter_t;
00070       typedef undefined_type tag_t;
00071       typedef undefined_type states_t;
00072       typedef undefined_type state_iterator;
00073       typedef undefined_type transitions_t;
00074       typedef undefined_type transition_iterator;
00075       typedef undefined_type initial_iterator;
00076       typedef undefined_type initial_t;
00077       typedef undefined_type initial_support_t;
00078       typedef undefined_type final_iterator;
00079       typedef undefined_type final_t;
00080       typedef undefined_type final_support_t;
00081       typedef undefined_type geometry_t;
00082       typedef undefined_type hstate_t;
00083       typedef undefined_type htransition_t;
00084       typedef undefined_type delta_state_iterator;
00085       typedef undefined_type delta_transition_iterator;
00086       typedef undefined_type rdelta_state_iterator;
00087       typedef undefined_type rdelta_transition_iterator;
00088   };
00089 
00090 # define VCSN_MAKE_AUTOMATON_TRAITS(Type)                                       \
00091   template <typename Kind,                                                      \
00092             typename WordValue,                                                 \
00093             typename WeightValue,                                               \
00094             typename SeriesValue,                                               \
00095             typename Letter,                                                    \
00096             typename Tag,                                                       \
00097             typename GeometryCoords>                                            \
00098   struct automaton_traits<Type<Kind, WordValue, WeightValue, SeriesValue,       \
00099                           Letter, Tag, GeometryCoords> >                        \
00100   {                                                                             \
00101     typedef Type<Kind, WordValue, WeightValue, SeriesValue,                     \
00102                  Letter, Tag, GeometryCoords>           graph_t;                \
00103     typedef typename graph_t::semiring_elt_value_t      semiring_elt_value_t;   \
00104     typedef typename graph_t::monoid_elt_value_t        monoid_elt_value_t;     \
00105     typedef typename graph_t::word_value_t              word_value_t;           \
00106     typedef typename graph_t::series_set_elt_value_t    series_set_elt_value_t; \
00107     typedef typename graph_t::letter_t                  letter_t;               \
00108     typedef typename graph_t::tag_t                     tag_t;                  \
00109     typedef typename graph_t::geometry_t                geometry_t;             \
00110     typedef typename graph_t::label_t                   label_t;                \
00111     typedef typename graph_t::states_t                  states_t;               \
00112     typedef typename states_t::iterator                 state_iterator;         \
00113     typedef typename graph_t::hstate_t                  hstate_t;               \
00114     typedef typename graph_t::edges_t                   transitions_t;          \
00115     typedef typename transitions_t::iterator            transition_iterator;    \
00116     typedef typename graph_t::htransition_t             htransition_t;          \
00117     typedef typename graph_t::initial_t                 initial_t;              \
00118     typedef typename graph_t::initial_support_t         initial_support_t;      \
00119     typedef typename initial_support_t::iterator        initial_iterator;       \
00120     typedef typename graph_t::final_t                   final_t;                \
00121     typedef typename graph_t::final_support_t           final_support_t;        \
00122     typedef typename final_support_t::iterator          final_iterator;         \
00123     typedef typename graph_t::delta_state_iterator      delta_state_iterator;   \
00124     typedef typename graph_t::delta_transition_iterator delta_transition_iterator; \
00125     typedef typename graph_t::rdelta_state_iterator     rdelta_state_iterator;  \
00126     typedef typename graph_t::rdelta_transition_iterator        rdelta_transition_iterator; \
00127   }
00128 
00129   // traits for generalized automaton implementation.
00130   template <typename Auto>
00131   struct generalized_traits
00132   {
00133     typedef undefined_type automaton_t;
00134   };
00135 
00136 # define VCSN_MAKE_GENERALIZED_AUTOMATON_TRAITS(Type)                           \
00137   template <typename Struct,                                                    \
00138             typename Kind,                                                      \
00139             typename WordValue,                                                 \
00140             typename WeightValue,                                               \
00141             typename SeriesValue,                                               \
00142             typename Letter,                                                    \
00143             typename Tag,                                                       \
00144             typename GeometryCoords>                                            \
00145   struct generalized_traits<Element<Struct, Type<Kind, WordValue,               \
00146                             WeightValue, SeriesValue, Letter,                   \
00147                             Tag, GeometryCoords> > >                            \
00148   {                                                                             \
00149     typedef Element<Struct, Type<Kind, WordValue, WeightValue, SeriesValue,     \
00150                     Letter, Tag, GeometryCoords> > Auto_;                       \
00151     typedef typename Auto_::series_set_t                series_set_t;           \
00152     typedef typename series_set_t::monoid_t             monoid_t;               \
00153     typedef typename Auto_::series_set_elt_t            series_set_elt_t;       \
00154     typedef typename series_set_elt_t::monoid_elt_t     monoid_elt_t;           \
00155     typedef typename monoid_elt_t::value_t              monoid_elt_value_t;     \
00156     typedef typename series_set_elt_t::semiring_elt_t   semiring_elt_t;         \
00157     typedef typename semiring_elt_t::value_t            semiring_elt_value_t;   \
00158     typedef typename Auto_::value_t::geometry_t         geometry_t;             \
00159     typedef vcsn::Element<vcsn::Automata<series_set_t>,                         \
00160                           Type<labels_are_series,                               \
00161                           monoid_elt_value_t,                                   \
00162                           semiring_elt_value_t,                                 \
00163                           rat::exp<monoid_elt_value_t, semiring_elt_value_t>,   \
00164                           typename monoid_t::letter_t,                          \
00165                           NoTag,                                                \
00166                           typename geometry_t::coords_t>                        \
00167                           > automaton_t;                                        \
00168     typedef typename automaton_t::hstate_t hstate_t;                            \
00169     typedef typename automaton_t::htransition_t htransition_t;                  \
00170   }
00171 
00172   // traits to construct an automaton type from a rational expression type,
00173   // with a given structural type.
00174   // (the automaton type must be able to hold the value returned by
00175   // standard_of)
00176   // FIXME: there is no rat exp concept, so we put the code here. (maybe it
00177   // should be put here anyway)
00178   template <typename Struct, typename Ratexp>
00179   struct standard_of_traits
00180   {
00181     typedef undefined_type automaton_t;
00182   };
00183 
00184 # define VCSN_MAKE_STANDARD_OF_TRAITS(Type)                             \
00185   template <typename W,                                                 \
00186             typename M,                                                 \
00187             typename Tm,                                                \
00188             typename Tw>                                                \
00189   struct standard_of_traits<algebra::Series<W, M>, rat::exp<Tm, Tw> >   \
00190   {                                                                     \
00191     typedef typename algebra::Series<W, M>              series_set_t;   \
00192     typedef typename algebra::polynom<Tm, Tw>                           \
00193         series_set_elt_value_t;                                         \
00194     typedef typename M::letter_t                        letter_t;       \
00195     typedef typename Type<labels_are_series, Tm, Tw,                    \
00196                           series_set_elt_value_t, letter_t,             \
00197                           NoTag, std::pair<double, double> >            \
00198         automaton_impl_t;                                               \
00199     typedef Element<Automata<series_set_t>, automaton_impl_t>           \
00200         automaton_t;                                                    \
00201   }
00202 
00203   // Traits to construct misc projections from a structural type and
00204   // an implementation.
00205   template <typename S, typename T>
00206   struct projection_traits
00207   {
00209     typedef undefined_type first_projection_t;
00210 
00212     typedef undefined_type second_projection_t;
00213   };
00214 
00215   // Traits to mute an existing graph implementation into a projection
00216   // implementation with TT.
00217   // FIXME: rename to mute_graph_impl_projection_traits
00218   template <typename T, typename TT>
00219   struct mute_graph_impl_traits
00220   {
00222     typedef undefined_type first_projection_t;
00223 
00225     typedef undefined_type second_projection_t;
00226   };
00227 
00228 # define VCSN_MAKE_MUTE_GRAPH_IMPL_TRAITS(Type)                                 \
00229   template <typename Kind,                                                      \
00230             typename WordValue,                                                 \
00231             typename WeightValue,                                               \
00232             typename SeriesValue,                                               \
00233             typename Letter,                                                    \
00234             typename Tag,                                                       \
00235             typename GeometryCoords,                                            \
00236             typename TT>                                                        \
00237   struct mute_graph_impl_traits<Type<Kind,                                      \
00238                                      WordValue,                                 \
00239                                      WeightValue,                               \
00240                                      SeriesValue,                               \
00241                                      Letter,                                    \
00242                                      Tag,                                       \
00243                                      GeometryCoords>, TT>                       \
00244   {                                                                             \
00245     typedef Type<Kind, WordValue, WeightValue, SeriesValue,                     \
00246                  Letter, Tag, GeometryCoords> graph_t;                          \
00247     typedef typename algebra::letter_traits<Letter>::                           \
00248                         first_projection_t first_letter_t;                      \
00249     typedef typename algebra::letter_traits<Letter>::                           \
00250                         second_projection_t second_letter_t;                    \
00251     typedef typename TT::first_projection_t::value_t                            \
00252                         first_monoid_elt_value_t;                               \
00253     typedef typename TT::second_projection_t::value_t                           \
00254                         second_monoid_elt_value_t;                              \
00255     typedef typename algebra::mute_series_impl<SeriesValue, WeightValue,        \
00256                                                first_monoid_elt_value_t>::ret   \
00257                                                first_series_impl_t;             \
00258     typedef typename algebra::mute_series_impl<SeriesValue, WeightValue,        \
00259                                                second_monoid_elt_value_t>::ret  \
00260                                                second_series_impl_t;            \
00261     typedef Type<Kind, first_monoid_elt_value_t,                                \
00262                  WeightValue, first_series_impl_t,                              \
00263                  first_letter_t, Tag, GeometryCoords> first_projection_t;       \
00264     typedef Type<Kind, second_monoid_elt_value_t,                               \
00265                  WeightValue, second_series_impl_t,                             \
00266                  second_letter_t, Tag, GeometryCoords> second_projection_t;     \
00267   }
00268 
00269   // Traits to mute an existing graph implementation into another
00270   // graph implementation with a different monoid type.
00271   template <typename T, typename L>
00272   struct mute_graph_impl_monoid_traits
00273   {
00275     typedef undefined_type ret;
00276   };
00277 
00278 # define VCSN_MAKE_MUTE_GRAPH_IMPL_MONOID_TRAITS(Type)                          \
00279   template <typename Kind,                                                      \
00280             typename WordValue,                                                 \
00281             typename WeightValue,                                               \
00282             typename SeriesValue,                                               \
00283             typename Letter,                                                    \
00284             typename Tag,                                                       \
00285             typename GeometryCoords,                                            \
00286             typename M>                                                         \
00287   struct mute_graph_impl_monoid_traits<Type<Kind,                               \
00288                                             WordValue,                          \
00289                                             WeightValue,                        \
00290                                             SeriesValue,                        \
00291                                             Letter,                             \
00292                                             Tag,                                \
00293                                             GeometryCoords>, M>                 \
00294   {                                                                             \
00295     typedef Type<Kind, WordValue, WeightValue, SeriesValue,                     \
00296                  Letter, Tag, GeometryCoords> graph_t;                          \
00297     typedef typename M::value_t monoid_elt_value_t;                             \
00298     typedef typename M::set_t::alphabet_t::letter_t letter_t;                   \
00299     typedef typename algebra::mute_series_impl<SeriesValue, WeightValue,        \
00300                                                monoid_elt_value_t>::ret         \
00301                                                series_impl_t;                   \
00302     typedef Type<Kind, monoid_elt_value_t,                                      \
00303                  WeightValue, series_impl_t,                                    \
00304                  letter_t, Tag, GeometryCoords> ret;                            \
00305   }
00306 
00307   /*-----------------------------------.
00308   | virtual_types<AutomataBase<Self> > |
00309   `-----------------------------------*/
00310 
00311   template <class S>
00312   struct virtual_types<AutomataBase<S> >
00313     : virtual_types<Structure<S> >
00314   { };
00315 
00316   /*------------------------------------.
00317   | dynamic_traits<AutomataBase<Self> > |
00318   `------------------------------------*/
00319   template <class S>
00320   struct dynamic_traits<AutomataBase<S> >
00321     : dynamic_traits<Structure<S> >
00322   { };
00323 
00324   /*-----------------------------------.
00325   | MetaElement<AutomataBase<Self>, T> |
00326   `-----------------------------------*/
00328 
00341   // FIXME: Use some of the TYPEDEF_IMPORT macros.
00342   template <typename Self, typename T>
00343   struct MetaElement<AutomataBase<Self>, T>
00344     : MetaElement<Structure<Self>, T>
00345   {
00347       typedef MetaElement<AutomataBase<Self>, T>        self_t;
00348 
00350       typedef typename AutomataBase<Self>::series_set_t series_set_t;
00351 
00353       typedef typename automaton_traits<T>::series_set_elt_value_t
00354       series_set_elt_value_t;
00355 
00357       typedef Element<series_set_t, series_set_elt_value_t> series_set_elt_t;
00358 
00360       typedef typename series_set_t::monoid_t           monoid_t;
00361 
00363       typedef typename series_set_elt_t::monoid_elt_t   monoid_elt_t;
00364 
00366       typedef typename monoid_elt_t::value_t            monoid_elt_value_t;
00367 
00369       typedef typename monoid_t::letter_t               letter_t;
00370 
00372       typedef typename series_set_t::semiring_t         semiring_t;
00373 
00375       typedef typename series_set_elt_t::semiring_elt_t semiring_elt_t;
00376 
00378       typedef typename series_set_elt_t::semiring_elt_value_t
00379       semiring_elt_value_t;
00380 
00382       typedef typename automaton_traits<T>::tag_t               tag_t;
00383 
00385       typedef typename automaton_traits<T>::label_t     label_t;
00386 
00388       typedef typename automaton_traits<T>::states_t    states_t;
00389 
00391       typedef typename automaton_traits<T>::state_iterator state_iterator;
00392 
00394       typedef typename automaton_traits<T>::transitions_t transitions_t;
00395 
00397       typedef typename automaton_traits<T>::transition_iterator transition_iterator;
00398 
00400       typedef typename automaton_traits<T>::initial_support_t initial_support_t;
00401 
00403       typedef typename automaton_traits<T>::initial_iterator initial_iterator;
00404 
00406       typedef typename automaton_traits<T>::final_support_t final_support_t;
00407 
00409       typedef typename automaton_traits<T>::final_iterator final_iterator;
00410 
00412       typedef typename automaton_traits<T>::geometry_t  geometry_t;
00413 
00415       typedef typename automaton_traits<T>::geometry_t::coords_t geometry_coords_t;
00416 
00418       typedef typename automaton_traits<T>::hstate_t hstate_t;
00419       typedef typename automaton_traits<T>::htransition_t htransition_t;
00420 
00422       typedef typename automaton_traits<T>::delta_state_iterator delta_state_iterator;
00423       typedef typename automaton_traits<T>::delta_transition_iterator delta_transition_iterator;
00424       typedef typename automaton_traits<T>::rdelta_state_iterator rdelta_state_iterator;
00425       typedef typename automaton_traits<T>::rdelta_transition_iterator rdelta_transition_iterator;
00426 
00428       const series_set_t& series() const;
00429 
00431       tag_t& tag();
00432 
00434       const tag_t& tag() const;
00435 
00437       geometry_t& geometry();
00438 
00440       const geometry_t& geometry() const;
00441 
00443       bool exists() const;
00444 
00446       states_t states() const;
00447 
00449       transitions_t transitions() const;
00450 
00452       initial_support_t initial() const;
00453 
00455       final_support_t final() const;
00456 
00459       bool is_initial(const hstate_t& state) const;
00460       bool is_initial(unsigned state) const;
00461 
00463       bool is_final(const hstate_t& state) const;
00464       bool is_final(unsigned state) const;
00465 
00467       void set_initial(const hstate_t& state);
00468       void set_initial(unsigned state);
00469 
00471       void set_initial(const hstate_t& state, const series_set_elt_t& m);
00472       void set_initial(unsigned state, const series_set_elt_t& m);
00473 
00475       void set_final(const hstate_t& state);
00476       void set_final(unsigned state);
00477 
00479       void set_final(const hstate_t& state, const series_set_elt_t& m);
00480       void set_final(unsigned state, const series_set_elt_t& m);
00481 
00483       void unset_initial(const hstate_t& state);
00484       void unset_initial(unsigned state);
00485 
00487       void unset_final(const hstate_t& state);
00488       void unset_final(unsigned state);
00489 
00491       void clear_initial();
00492 
00494       void clear_final();
00495 
00497       Element<series_set_t, series_set_elt_value_t>
00498       get_initial(const hstate_t& state) const;
00499       Element<series_set_t, series_set_elt_value_t>
00500       get_initial(unsigned state) const;
00501 
00503       Element<series_set_t, series_set_elt_value_t>
00504       get_final(const hstate_t& state) const;
00505       Element<series_set_t, series_set_elt_value_t>
00506       get_final(unsigned state) const;
00507 
00509       hstate_t add_state();
00510 
00512       hstate_t get_state(unsigned state) const;
00513 
00516       hstate_t choose_state() const;
00517 
00519       htransition_t add_transition(const hstate_t& src, const hstate_t& dst,
00520                                    const label_t& label);
00521       htransition_t add_transition(unsigned src, unsigned dst,
00522                                    const label_t& label);
00523 
00526       htransition_t add_weighted_transition(const hstate_t& src, const hstate_t& dst,
00527                                             const semiring_elt_t& w,
00528                                             const monoid_elt_value_t& m);
00529       htransition_t add_weighted_transition(unsigned src, unsigned dst,
00530                                             const semiring_elt_t& w,
00531                                             const monoid_elt_value_t& m);
00532 
00534 
00537       htransition_t add_series_transition(const hstate_t& src, const hstate_t& dst,
00538                                           const series_set_elt_t& e);
00539       htransition_t add_series_transition(unsigned src, unsigned dst,
00540                                           const series_set_elt_t& e);
00541 
00543       htransition_t add_spontaneous(const hstate_t& src, const hstate_t& dst,
00544                                     const semiring_elt_t& w);
00545 
00546       htransition_t add_spontaneous(const hstate_t& src, const hstate_t& dst);
00547 
00548       htransition_t add_spontaneous(unsigned src, unsigned dst,
00549                                     const semiring_elt_t& w);
00550 
00551       htransition_t add_spontaneous(unsigned src, unsigned dst);
00552 
00554       htransition_t add_letter_transition(const hstate_t& src, const hstate_t& dst,
00555                                           const letter_t& l);
00556       htransition_t add_letter_transition(unsigned src, unsigned dst,
00557                                           const letter_t& l);
00558 
00561       htransition_t add_letter_transition(const hstate_t& src, const hstate_t& dst,
00562                                           const std::string& l);
00563       htransition_t add_letter_transition(unsigned src, unsigned dst,
00564                                           const std::string& l);
00565 
00567       void update(const htransition_t& e, const label_t& l);
00568 
00570       void del_state(const hstate_t& state);
00571       void del_state(unsigned state);
00572 
00574       void del_transition(const htransition_t& e);
00575 
00577       bool has_state(const hstate_t& state) const;
00578       bool has_state(unsigned state) const;
00579 
00581       bool has_transition(const htransition_t& e) const;
00582 
00584       hstate_t src_of(const htransition_t& e) const;
00585 
00587       hstate_t dst_of(const htransition_t& e) const;
00588 
00590       typename automaton_traits<T>::label_t label_of(const htransition_t& e) const;
00591 
00593       series_set_elt_t series_of(const htransition_t& e) const;
00594 
00596       series_set_elt_value_t series_value_of(const htransition_t& e) const;
00597 
00599       bool is_spontaneous(const htransition_t& e) const;
00600 
00602       monoid_elt_t word_of(const htransition_t& e) const;
00603 
00605       semiring_elt_t weight_of(const htransition_t& e) const;
00606 
00608       monoid_elt_value_t word_value_of(const htransition_t& e) const;
00609 
00611 
00614       letter_t letter_of(const htransition_t& e) const;
00615 
00616       /*---------.
00617       | Deltas.  |
00618       `---------*/
00619 
00622       template <typename OutputIterator, typename Kind>
00623       void delta(OutputIterator res,
00624                  const hstate_t& src,
00625                  delta_kind::kind<Kind> k) const;
00626       template <typename OutputIterator, typename Kind>
00627       void delta(OutputIterator res,
00628                  unsigned src,
00629                  delta_kind::kind<Kind> k) const;
00630 
00631 
00632 
00635       template <typename OutputIterator, typename L, typename Kind>
00636       void delta(OutputIterator res,
00637                  const hstate_t& src,
00638                  const L& query,
00639                  delta_kind::kind<Kind> k) const;
00640       template <typename OutputIterator, typename L, typename Kind>
00641       void delta(OutputIterator res,
00642                  unsigned src,
00643                  const L& query,
00644                  delta_kind::kind<Kind> k) const;
00645 
00648       template <typename OutputIterator, typename L, typename Kind>
00649       void letter_delta(OutputIterator res,
00650                         const hstate_t& src,
00651                         const L& letter,
00652                         delta_kind::kind<Kind> k) const;
00653       template <typename OutputIterator, typename L, typename Kind>
00654       void letter_delta(OutputIterator res,
00655                         unsigned src,
00656                         const L& letter,
00657                         delta_kind::kind<Kind> k) const;
00658 
00661       template <typename OutputIterator, typename Kind>
00662       void spontaneous_delta(OutputIterator res,
00663                              const hstate_t& src,
00664                              delta_kind::kind<Kind> k) const;
00665       template <typename OutputIterator, typename Kind>
00666       void spontaneous_delta(OutputIterator res,
00667                              unsigned src,
00668                              delta_kind::kind<Kind> k) const;
00669 
00670       /*----------.
00671       | Deltacs.  |
00672       `----------*/
00673 
00676       template <typename Container, typename Kind>
00677       void deltac(Container& res, const hstate_t& src, delta_kind::kind<Kind> k) const;
00678       template <typename Container, typename Kind>
00679       void deltac(Container& res, unsigned src, delta_kind::kind<Kind> k) const;
00680 
00684       template <typename Container, typename L, typename Kind>
00685       void deltac(Container& res,
00686                   const hstate_t& src,
00687                   const L& query,
00688                   delta_kind::kind<Kind> k) const;
00689       template <typename Container, typename L, typename Kind>
00690       void deltac(Container& res,
00691                   unsigned src,
00692                   const L& query,
00693                   delta_kind::kind<Kind> k) const;
00694 
00697       template <typename Container, typename L, typename Kind>
00698       void letter_deltac(Container& res,
00699                          const hstate_t& src,
00700                          const L& letter,
00701                          delta_kind::kind<Kind> k) const;
00702       template <typename Container, typename L, typename Kind>
00703       void letter_deltac(Container& res,
00704                          unsigned src,
00705                          const L& letter,
00706                          delta_kind::kind<Kind> k) const;
00707 
00710       template <typename Container, typename Kind>
00711       void spontaneous_deltac(Container& res,
00712                               const hstate_t& src,
00713                               delta_kind::kind<Kind> k) const;
00714       template <typename Container, typename Kind>
00715       void spontaneous_deltac(Container& res,
00716                               unsigned src,
00717                               delta_kind::kind<Kind> k) const;
00718 
00719 
00720       /*----------.
00721       | Deltafs.  |
00722       `----------*/
00723 
00727       template <typename Functor, typename Kind>
00728       void deltaf(Functor& fun, const hstate_t& src, delta_kind::kind<Kind> k) const;
00729       template <typename Functor, typename Kind>
00730       void deltaf(Functor& fun, unsigned src, delta_kind::kind<Kind> k) const;
00731 
00735       template <typename Functor, typename L, typename Kind>
00736       void deltaf(Functor& fun,
00737                   const hstate_t& src,
00738                   const L& query,
00739                   delta_kind::kind<Kind> k) const;
00740       template <typename Functor, typename L, typename Kind>
00741       void deltaf(Functor& fun,
00742                   unsigned src,
00743                   const L& query,
00744                   delta_kind::kind<Kind> k) const;
00745 
00750       template <typename Functor, typename L, typename Kind>
00751       void letter_deltaf(Functor& fun,
00752                          const hstate_t& src,
00753                          const L& letter,
00754                          delta_kind::kind<Kind> k) const;
00755       template <typename Functor, typename L, typename Kind>
00756       void letter_deltaf(Functor& fun,
00757                          unsigned src,
00758                          const L& letter,
00759                          delta_kind::kind<Kind> k) const;
00760 
00765       template <typename Functor, typename Kind>
00766       void spontaneous_deltaf(Functor& fun,
00767                               const hstate_t& src,
00768                               delta_kind::kind<Kind> k) const;
00769       template <typename Functor, typename Kind>
00770       void spontaneous_deltaf(Functor& fun,
00771                               unsigned src,
00772                               delta_kind::kind<Kind> k) const;
00773 
00774 
00775       /*-----------------.
00776       | Reverse deltas.  |
00777       `-----------------*/
00778 
00781       template <typename OutputIterator, typename Kind>
00782       void rdelta(OutputIterator res,
00783                   const hstate_t& src,
00784                   delta_kind::kind<Kind> k) const;
00785       template <typename OutputIterator, typename Kind>
00786       void rdelta(OutputIterator res,
00787                   unsigned src,
00788                   delta_kind::kind<Kind> k) const;
00789 
00792       template <typename OutputIterator, typename L, typename Kind>
00793       void rdelta(OutputIterator res,
00794                   const hstate_t& src,
00795                   const L& query,
00796                   delta_kind::kind<Kind> k) const;
00797       template <typename OutputIterator, typename L, typename Kind>
00798       void rdelta(OutputIterator res,
00799                   unsigned src,
00800                   const L& query,
00801                   delta_kind::kind<Kind> k) const;
00802 
00805       template <typename OutputIterator, typename L, typename Kind>
00806       void letter_rdelta(OutputIterator res,
00807                          const hstate_t& src,
00808                          const L& letter,
00809                          delta_kind::kind<Kind> k) const;
00810       template <typename OutputIterator, typename L, typename Kind>
00811       void letter_rdelta(OutputIterator res,
00812                          unsigned src,
00813                          const L& letter,
00814                          delta_kind::kind<Kind> k) const;
00815 
00818       template <typename OutputIterator, typename Kind>
00819       void spontaneous_rdelta(OutputIterator res,
00820                               const hstate_t& src,
00821                               delta_kind::kind<Kind> k) const;
00822       template <typename OutputIterator, typename Kind>
00823       void spontaneous_rdelta(OutputIterator res,
00824                               unsigned src,
00825                               delta_kind::kind<Kind> k) const;
00826 
00827       /*------------------.
00828       | Reverse deltacs.  |
00829       `------------------*/
00830 
00833       template <typename Container, typename Kind>
00834       void rdeltac(Container& res, const hstate_t& src, delta_kind::kind<Kind> k) const;
00835       template <typename Container, typename Kind>
00836       void rdeltac(Container& res, unsigned src, delta_kind::kind<Kind> k) const;
00837 
00841       template <typename Container, typename L, typename Kind>
00842       void rdeltac(Container& res,
00843                    const hstate_t& src,
00844                    const L& query,
00845                    delta_kind::kind<Kind> k) const;
00846       template <typename Container, typename L, typename Kind>
00847       void rdeltac(Container& res,
00848                   unsigned src,
00849                   const L& query,
00850                   delta_kind::kind<Kind> k) const;
00851 
00854       template <typename Container, typename L, typename Kind>
00855       void letter_rdeltac(Container& res,
00856                           const hstate_t& src,
00857                           const L& letter,
00858                           delta_kind::kind<Kind> k) const;
00859       template <typename Container, typename L, typename Kind>
00860       void letter_rdeltac(Container& res,
00861                           unsigned src,
00862                           const L& letter,
00863                           delta_kind::kind<Kind> k) const;
00864 
00867       template <typename Container, typename Kind>
00868       void spontaneous_rdeltac(Container& res,
00869                                const hstate_t& src,
00870                                delta_kind::kind<Kind> k) const;
00871       template <typename Container, typename Kind>
00872       void spontaneous_rdeltac(Container& res,
00873                                unsigned src,
00874                                delta_kind::kind<Kind> k) const;
00875 
00876 
00877       /*------------------.
00878       | Reverse deltafs.  |
00879       `------------------*/
00880 
00883       template <typename Functor, typename Kind>
00884       void rdeltaf(Functor& fun, const hstate_t& src, delta_kind::kind<Kind> k) const;
00885       template <typename Functor, typename Kind>
00886       void rdeltaf(Functor& fun, unsigned src, delta_kind::kind<Kind> k) const;
00887 
00890       template <typename Functor, typename L, typename Kind>
00891       void rdeltaf(Functor& fun,
00892                    const hstate_t& src,
00893                    const L& query,
00894                    delta_kind::kind<Kind> k) const;
00895       template <typename Functor, typename L, typename Kind>
00896       void rdeltaf(Functor& fun,
00897                    unsigned src,
00898                    const L& query,
00899                    delta_kind::kind<Kind> k) const;
00900 
00903       template <typename Functor, typename L, typename Kind>
00904       void letter_rdeltaf(Functor& fun,
00905                           const hstate_t& src,
00906                           const L& letter,
00907                           delta_kind::kind<Kind> k) const;
00908       template <typename Functor, typename L, typename Kind>
00909       void letter_rdeltaf(Functor& fun,
00910                           unsigned src,
00911                           const L& letter,
00912                           delta_kind::kind<Kind> k) const;
00913 
00916       template <typename Functor, typename Kind>
00917       void spontaneous_rdeltaf(Functor& fun,
00918                                const hstate_t& src,
00919                                delta_kind::kind<Kind> k) const;
00920       template <typename Functor, typename Kind>
00921       void spontaneous_rdeltaf(Functor& fun,
00922                                unsigned src,
00923                                delta_kind::kind<Kind> k) const;
00924     protected:
00925       MetaElement();
00926       MetaElement(const MetaElement& other);
00927   };
00928 
00931 
00932   template <typename S, typename St, typename T>
00933   St& op_rout(const AutomataBase<S>& s, St& st, const T& r);
00934 
00935   template <typename Auto_>
00936   typename generalized_traits<Auto_>::automaton_t
00937   generalized(const Auto_& from);
00938 } // vcsn
00939 
00940 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00941 #  include <vaucanson/automata/concept/automata_base.hxx>
00942 # endif // VCSN_USE_INTERFACE_ONLY
00943 
00944 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HH

Generated on Thu Oct 9 20:22:33 2008 for Vaucanson by  doxygen 1.5.1