automata_base.hxx

00001 // automata_base.hxx: 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 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_BASE_HXX
00018 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HXX
00019 
00020 # include <vaucanson/automata/concept/automata_base.hh>
00021 # include <vaucanson/automata/concept/automata_ops.hh>
00022 
00023 namespace vcsn {
00024 
00025   template <typename Self>
00026   AutomataBase<Self>::AutomataBase()
00027   {}
00028 
00029   template <typename Self>
00030   AutomataBase<Self>::AutomataBase(const AutomataBase& other) :
00031     Structure<Self>(other)
00032   {}
00033 
00034   template <typename Self>
00035   const typename AutomataBase<Self>::series_set_t&
00036   AutomataBase<Self>::series() const
00037   {
00038     return this->self().series();
00039   }
00040 
00041 
00043   template <typename Self, typename T>
00044   MetaElement<AutomataBase<Self>, T>::MetaElement()
00045   {}
00046 
00048   template <typename Self, typename T>
00049   MetaElement<AutomataBase<Self>, T>::MetaElement(const MetaElement& a):
00050     MetaElement<Structure<Self>, T>::MetaElement(a)
00051   {}
00052 
00054   template <typename Self, typename T>
00055   typename MetaElement<AutomataBase<Self>, T>::tag_t&
00056   MetaElement<AutomataBase<Self>, T>::tag()
00057   {
00058     return op_tag(this->structure(), this->value());
00059   }
00060 
00062   template <typename Self, typename T>
00063   const typename MetaElement<AutomataBase<Self>, T>::tag_t&
00064   MetaElement<AutomataBase<Self>, T>:: tag() const
00065   {
00066     return op_tag(this->structure(), this->value());
00067   }
00068 
00070   template <typename Self, typename T>
00071   typename MetaElement<AutomataBase<Self>, T>::geometry_t&
00072   MetaElement<AutomataBase<Self>, T>::geometry()
00073   {
00074     return op_geometry(this->structure(), this->value());
00075   }
00076 
00078   template <typename Self, typename T>
00079   const typename MetaElement<AutomataBase<Self>, T>::geometry_t&
00080   MetaElement<AutomataBase<Self>, T>::geometry() const
00081   {
00082     return op_geometry(this->structure(), this->value());
00083   }
00084 
00086   template <typename Self, typename T>
00087   bool
00088   MetaElement<AutomataBase<Self>, T>::exists() const
00089   {
00090     return op_exists(this->structure(), this->value());
00091   }
00092 
00094   template <typename Self, typename T>
00095   typename automaton_traits<T>::states_t
00096   MetaElement<AutomataBase<Self>, T>::states() const
00097   {
00098     return op_states(this->structure(), this->value());
00099   }
00100 
00102   template <typename Self, typename T>
00103   typename automaton_traits<T>::transitions_t
00104   MetaElement<AutomataBase<Self>, T>::transitions() const
00105   {
00106     return op_transitions(this->structure(), this->value());
00107   }
00108 
00110   template <typename Self, typename T>
00111   const typename MetaElement<AutomataBase<Self>, T>::series_set_t&
00112   MetaElement<AutomataBase<Self>, T>::series() const
00113   {
00114     return this->structure().series();
00115   }
00116 
00118   template <typename Self, typename T>
00119   typename automaton_traits<T>::initial_support_t
00120   MetaElement<AutomataBase<Self>, T>::initial() const
00121   {
00122     return op_initial(this->structure(), this->value());
00123   }
00124 
00126   template <typename Self, typename T>
00127   typename automaton_traits<T>::final_support_t
00128 
00129   MetaElement<AutomataBase<Self>, T>::final() const
00130   {
00131     return op_final(this->structure(), this->value());
00132   }
00133 
00136   template <typename Self, typename T>
00137   bool
00138   MetaElement<AutomataBase<Self>, T>::is_initial(hstate_t state) const
00139   {
00140     return (op_get_initial(this->structure(), this->value(), state) !=
00141             this->structure().series().zero(SELECT(series_set_elt_value_t)));
00142   }
00143 
00145   template <typename Self, typename T>
00146   bool
00147   MetaElement<AutomataBase<Self>, T>::is_final(hstate_t state) const
00148   {
00149     return
00150       op_get_final(this->structure(), this->value(), state) !=
00151       algebra::zero_as<series_set_elt_value_t>::
00152       of(this->structure().series());
00153   }
00154 
00156   template <typename Self, typename T>
00157   void
00158   MetaElement<AutomataBase<Self>, T>::set_initial(hstate_t state)
00159   {
00160     op_set_initial(this->structure(),
00161                    this->value(),
00162                    state,
00163                    this->structure().series().
00164                    identity(SELECT(series_set_elt_value_t)));
00165   }
00166 
00168   template <typename Self, typename T>
00169   void
00170   MetaElement<AutomataBase<Self>, T>::
00171   set_initial(hstate_t state, const series_set_elt_t& s)
00172   {
00173     op_set_initial(this->structure(), this->value(), state, s);
00174   }
00175 
00177   template <typename Self, typename T>
00178   void
00179   MetaElement<AutomataBase<Self>, T>::set_final(hstate_t state)
00180   {
00181     op_set_final(this->structure(),
00182                  this->value(),
00183                  state,
00184                  this->structure().series().
00185                  identity(SELECT(series_set_elt_value_t)));
00186   }
00187 
00189   template <typename Self, typename T>
00190   void
00191   MetaElement<AutomataBase<Self>, T>::
00192   set_final(hstate_t state, const series_set_elt_t& s)
00193   {
00194     op_set_final(this->structure(), this->value(), state, s);
00195   }
00196 
00198   template <typename Self, typename T>
00199   void
00200   MetaElement<AutomataBase<Self>, T>::unset_initial(hstate_t state)
00201   {
00202     op_set_initial(this->structure(),
00203                    this->value(),
00204                    state,
00205                    algebra::zero_as<series_set_elt_value_t>::
00206 		   of(this->structure().series()));
00207   }
00208 
00210   template <typename Self, typename T>
00211   void
00212   MetaElement<AutomataBase<Self>, T>::unset_final(hstate_t state)
00213   {
00214     op_set_final(this->structure(),
00215                  this->value(),
00216                  state,
00217                  algebra::zero_as<series_set_elt_value_t>::
00218 		 of(this->structure().series()));
00219   }
00220 
00222   template <typename Self, typename T>
00223   void
00224   MetaElement<AutomataBase<Self>, T>::clear_initial()
00225   {
00226     return op_clear_initial(this->structure(), this->value());
00227   }
00228 
00230   template <typename Self, typename T>
00231   void
00232   MetaElement<AutomataBase<Self>, T>::clear_final()
00233   {
00234     return op_clear_final(this->structure(), this->value());
00235   }
00236 
00238   template <typename Self, typename T>
00239   typename MetaElement<AutomataBase<Self>, T>::series_set_elt_t
00240   MetaElement<AutomataBase<Self>, T>::get_initial(hstate_t state) const
00241   {
00242     return op_get_initial(this->structure(), this->value(), state);
00243   }
00244 
00246   template <typename Self, typename T>
00247   typename MetaElement<AutomataBase<Self>, T>::series_set_elt_t
00248   MetaElement<AutomataBase<Self>, T>::get_final(hstate_t what) const
00249   {
00250     return op_get_final(this->structure(), this->value(), what);
00251   }
00252 
00254   template <typename Self, typename T>
00255   hstate_t
00256   MetaElement<AutomataBase<Self>, T>::add_state()
00257   {
00258     return op_add_state(this->structure(), this->value());
00259   }
00260 
00263   template <typename Self, typename T>
00264   hstate_t
00265   MetaElement<AutomataBase<Self>, T>::choose_state() const
00266   {
00267     return op_choose_state(this->structure(), this->value());
00268   }
00269 
00271   template <typename Self, typename T>
00272   htransition_t
00273   MetaElement<AutomataBase<Self>, T>::add_transition(hstate_t from,
00274                                                      hstate_t to,
00275                                                      const label_t& label)
00276   {
00277     return op_add_transition(this->structure(), this->value(),
00278                              from, to, label);
00279   }
00280 
00282   template <typename Self, typename T>
00283   htransition_t
00284   MetaElement<AutomataBase<Self>, T>::
00285   add_weighted_transition(hstate_t from,
00286                           hstate_t to,
00287                           const semiring_elt_t& w,
00288                           const monoid_elt_value_t& m)
00289   {
00290     return op_add_weighted_transition(this->structure(), this->value(),
00291                                       from, to, w, m);
00292   }
00293 
00297   template <typename Self, typename T>
00298   htransition_t
00299   MetaElement<AutomataBase<Self>, T>::add_series_transition(hstate_t from,
00300                                                             hstate_t to,
00301                                                             const series_set_elt_t& e)
00302   {
00303     return op_add_series_transition(this->structure(), this->value(), from, to, e);
00304   }
00305 
00307   template <typename Self, typename T>
00308   htransition_t
00309   MetaElement<AutomataBase<Self>, T>::add_spontaneous(hstate_t from,
00310                                                       hstate_t to)
00311   {
00312     semiring_elt_t w(this->structure().series().semiring());
00313     w = algebra::identity_as<semiring_elt_value_t>
00314       ::of(this->structure().series().semiring());
00315     return op_add_spontaneous(this->structure(), this->value(), from, to, w);
00316   }
00317 
00318   template <typename Self, typename T>
00319   htransition_t
00320   MetaElement<AutomataBase<Self>, T>
00321   ::add_spontaneous(hstate_t from,
00322                     hstate_t to,
00323                     const semiring_elt_t& w)
00324   {
00325     return op_add_spontaneous(this->structure(), this->value(), from, to, w);
00326   }
00327 
00329   template <typename Self, typename T>
00330   htransition_t
00331   MetaElement<AutomataBase<Self>, T>::add_letter_transition(hstate_t from,
00332                                                             hstate_t to,
00333                                                             const letter_t& l)
00334   {
00335     return op_add_letter_transition(this->structure(), this->value(), from, to, l);
00336   }
00337 
00339   template <typename Self, typename T>
00340   void
00341   MetaElement<AutomataBase<Self>, T>::update(htransition_t e, const label_t& l)
00342   {
00343     op_update(this->structure(), this->value(), e, l);
00344   }
00345 
00347   template <typename Self, typename T>
00348   void
00349   MetaElement<AutomataBase<Self>, T>::del_state(hstate_t s)
00350   {
00351     return op_del_state(this->structure(), this->value(), s);
00352   }
00353 
00355   template <typename Self, typename T>
00356   void
00357   MetaElement<AutomataBase<Self>, T>::del_transition(htransition_t e)
00358   {
00359     return op_del_transition(this->structure(), this->value(), e);
00360   }
00361 
00363   template <typename Self, typename T>
00364   bool
00365   MetaElement<AutomataBase<Self>, T>::has_state(hstate_t s) const
00366   {
00367     return op_has_state(this->structure(), this->value(), s);
00368   }
00369 
00371   template <typename Self, typename T>
00372   bool
00373   MetaElement<AutomataBase<Self>, T>::has_transition(htransition_t e) const
00374   {
00375     return op_has_transition(this->structure(), this->value(), e);
00376   }
00377 
00379   template <typename Self, typename T>
00380   hstate_t
00381   MetaElement<AutomataBase<Self>, T>::src_of(htransition_t e) const
00382   {
00383     return op_src_of(this->structure(), this->value(), e);
00384   }
00385 
00387   template <typename Self, typename T>
00388   hstate_t
00389   MetaElement<AutomataBase<Self>, T>::dst_of(htransition_t e) const
00390   {
00391     return op_dst_of(this->structure(), this->value(), e);
00392   }
00393 
00395   template <typename Self, typename T>
00396   typename automaton_traits<T>::label_t
00397   MetaElement<AutomataBase<Self>, T>::label_of(htransition_t e) const
00398   {
00399     return op_label_of(this->structure(), this->value(), e);
00400   }
00401 
00403   template <typename Self, typename T>
00404   typename MetaElement<AutomataBase<Self>, T>::series_set_elt_t
00405   MetaElement<AutomataBase<Self>, T>::series_of(htransition_t e) const
00406   {
00407     return op_series_of(this->structure(), this->value(), e);
00408   }
00409 
00411   template <typename Self, typename T>
00412   typename MetaElement<AutomataBase<Self>, T>::series_set_elt_value_t
00413   MetaElement<AutomataBase<Self>, T>::series_value_of(htransition_t e) const
00414   {
00415     return op_series_value_of(this->structure(), this->value(), e);
00416   }
00417 
00419   template <typename Self, typename T>
00420   bool
00421   MetaElement<AutomataBase<Self>, T>::is_spontaneous(htransition_t e) const
00422   {
00423     return op_is_spontaneous(this->structure(), this->value(), e);
00424   }
00425 
00427   template <typename Self, typename T>
00428   typename MetaElement<AutomataBase<Self>, T>::monoid_elt_t
00429   MetaElement<AutomataBase<Self>, T>::word_of(htransition_t e) const
00430   {
00431     return op_word_of(this->structure(), this->value(), e);
00432   }
00433 
00435   template <typename Self, typename T>
00436   typename MetaElement<AutomataBase<Self>, T>::semiring_elt_t
00437   MetaElement<AutomataBase<Self>, T>::weight_of(htransition_t e) const
00438   {
00439     return op_weight_of(this->structure(), this->value(), e);
00440   }
00441 
00443   template <typename Self, typename T>
00444   typename MetaElement<AutomataBase<Self>, T>::monoid_elt_value_t
00445   MetaElement<AutomataBase<Self>, T>::word_value_of(htransition_t e) const
00446   {
00447     return op_word_value_of(this->structure(), this->value(), e);
00448   }
00449 
00453   template <typename Self, typename T>
00454   typename MetaElement<AutomataBase<Self>, T>::letter_t
00455   MetaElement<AutomataBase<Self>, T>::letter_of(htransition_t e) const
00456   {
00457     return op_letter_of(this->structure(), this->value(), e);
00458   }
00459 
00460   // output_return_type = OutputIterator
00461   // output_type        = htransition_t
00462   // direction    = output
00463 
00465   template <typename Self, typename T>
00466   template <typename OutputIterator>
00467   void
00468   MetaElement<AutomataBase<Self>, T>::delta(OutputIterator res,
00469                                             hstate_t from,
00470                                             delta_kind::transitions k) const
00471   {
00472     op_delta(this->structure(), this->value(), res, from, k);
00473   }
00474 
00477   template <typename Self, typename T>
00478   template <typename OutputIterator, typename L>
00479   void
00480   MetaElement<AutomataBase<Self>, T>::delta(OutputIterator res,
00481                                             hstate_t from,
00482                                             const L& query,
00483                                             delta_kind::transitions k) const
00484   {
00485     op_delta(this->structure(), this->value(), res, from, query, k);
00486   }
00487 
00490   template <typename Self, typename T>
00491   template <typename OutputIterator, typename L>
00492   void
00493   MetaElement<AutomataBase<Self>, T>::letter_delta(OutputIterator res,
00494                                                    hstate_t from,
00495                                                    const L& letter,
00496                                                    delta_kind::transitions k) const
00497   {
00498     op_letter_delta(this->structure(), this->value(), res, from, letter, k);
00499   }
00500 
00502   template <typename Self, typename T>
00503   template <typename OutputIterator>
00504   void
00505   MetaElement<AutomataBase<Self>, T>
00506   ::spontaneous_delta(OutputIterator res,
00507                       hstate_t from,
00508                       delta_kind::transitions k) const
00509   {
00510     return op_spontaneous_delta(this->structure(), this->value(), res, from, k);
00511   }
00512 
00513   // output_return_type = Container
00514   // output_type        = htransition_t
00515   // direction    = output
00516 
00519   template <typename Self, typename T>
00520   template <typename Container>
00521   void
00522   MetaElement<AutomataBase<Self>, T>::deltac(Container& res, hstate_t from,
00523                                              delta_kind::transitions k) const
00524   {
00525     op_deltac(this->structure(), this->value(), res, from, k);
00526   }
00527 
00530   template <typename Self, typename T>
00531   template <typename Container, typename L>
00532   void
00533   MetaElement<AutomataBase<Self>, T>::deltac(Container& res,
00534                                              hstate_t from,
00535                                              const L& query,
00536                                              delta_kind::transitions k) const
00537   {
00538     op_deltac(this->structure(), this->value(), res, from, query, k);
00539   }
00540 
00543   template <typename Self, typename T>
00544   template <typename Container, typename L>
00545   void
00546   MetaElement<AutomataBase<Self>, T>::letter_deltac(Container& res,
00547                                                     hstate_t from,
00548                                                     const L& letter,
00549                                                     delta_kind::transitions k) const
00550   {
00551     op_letter_deltac(this->structure(), this->value(), res, from, letter, k);
00552   }
00553 
00555   template <typename Self, typename T>
00556   template <typename Container>
00557   void
00558   MetaElement<AutomataBase<Self>, T>
00559   ::spontaneous_deltac(Container& res,
00560                        hstate_t from,
00561                        delta_kind::transitions k) const
00562   {
00563     op_spontaneous_deltac(this->structure(), this->value(), res, from, k);
00564   }
00565 
00566   // output_return_type = OutputIterator
00567   // output_type        = htransition_t
00568   // direction    = output
00569 
00571   template <typename Self, typename T>
00572   template <typename OutputIterator>
00573   void
00574   MetaElement<AutomataBase<Self>, T>::delta(OutputIterator res,
00575                                             hstate_t from,
00576                                             delta_kind::states k) const
00577   {
00578     op_delta(this->structure(), this->value(), res, from, k);
00579   }
00580 
00583   template <typename Self, typename T>
00584   template <typename OutputIterator, typename L>
00585   void
00586   MetaElement<AutomataBase<Self>, T>::delta(OutputIterator res,
00587                                             hstate_t from,
00588                                             const L& query,
00589                                             delta_kind::states k) const
00590   {
00591     op_delta(this->structure(), this->value(), res, from, query, k);
00592   }
00593 
00596   template <typename Self, typename T>
00597   template <typename OutputIterator, typename L>
00598   void
00599   MetaElement<AutomataBase<Self>, T>::letter_delta(OutputIterator res,
00600                                                    hstate_t from,
00601                                                    const L& letter,
00602                                                    delta_kind::states k) const
00603   {
00604     op_letter_delta(this->structure(), this->value(), res, from, letter, k);
00605   }
00606 
00608   template <typename Self, typename T>
00609   template <typename OutputIterator>
00610   void
00611   MetaElement<AutomataBase<Self>, T>
00612   ::spontaneous_delta(OutputIterator res,
00613                       hstate_t from,
00614                       delta_kind::states k) const
00615   {
00616     return op_spontaneous_delta(this->structure(), this->value(), res, from, k);
00617   }
00618 
00619   // output_return_type = Container
00620   // output_type        = htransition_t
00621   // direction    = output
00622 
00625   template <typename Self, typename T>
00626   template <typename Container>
00627   void
00628   MetaElement<AutomataBase<Self>, T>::deltac(Container& res, hstate_t from,
00629                                              delta_kind::states k) const
00630   {
00631     op_deltac(this->structure(), this->value(), res, from, k);
00632   }
00633 
00636   template <typename Self, typename T>
00637   template <typename Container, typename L>
00638   void
00639   MetaElement<AutomataBase<Self>, T>::deltac(Container& res,
00640                                              hstate_t from,
00641                                              const L& query,
00642                                              delta_kind::states k) const
00643   {
00644     op_deltac(this->structure(), this->value(), res, from, query, k);
00645   }
00646 
00649   template <typename Self, typename T>
00650   template <typename Container, typename L>
00651   void
00652   MetaElement<AutomataBase<Self>, T>::letter_deltac(Container& res,
00653                                                     hstate_t from,
00654                                                     const L& letter,
00655                                                     delta_kind::states k) const
00656   {
00657     op_letter_deltac(this->structure(), this->value(), res, from, letter, k);
00658   }
00659 
00661   template <typename Self, typename T>
00662   template <typename Container>
00663   void
00664   MetaElement<AutomataBase<Self>, T>
00665   ::spontaneous_deltac(Container& res,
00666                        hstate_t from,
00667                        delta_kind::states k) const
00668   {
00669     op_spontaneous_deltac(this->structure(), this->value(), res, from, k);
00670   }
00671 
00672 
00673   // output_return_type = OutputIterator
00674   // output_type        = htransition_t
00675   // direction    = input
00676 
00678   template <typename Self, typename T>
00679   template <typename OutputIterator>
00680   void
00681   MetaElement<AutomataBase<Self>, T>::rdelta(OutputIterator res,
00682                                              hstate_t from,
00683                                              delta_kind::transitions k) const
00684   {
00685     op_rdelta(this->structure(), this->value(), res, from, k);
00686   }
00687 
00690   template <typename Self, typename T>
00691   template <typename OutputIterator, typename L>
00692   void
00693   MetaElement<AutomataBase<Self>, T>::rdelta(OutputIterator res,
00694                                              hstate_t from,
00695                                              const L& query,
00696                                              delta_kind::transitions k) const
00697   {
00698     op_rdelta(this->structure(), this->value(), res, from, query, k);
00699   }
00700 
00703   template <typename Self, typename T>
00704   template <typename OutputIterator, typename L>
00705   void
00706   MetaElement<AutomataBase<Self>, T>::letter_rdelta(OutputIterator res,
00707                                                     hstate_t from,
00708                                                     const L& letter,
00709                                                     delta_kind::transitions k) const
00710   {
00711     op_letter_rdelta(this->structure(), this->value(), res, from, letter, k);
00712   }
00713 
00715   template <typename Self, typename T>
00716   template <typename OutputIterator>
00717   void
00718   MetaElement<AutomataBase<Self>, T>
00719   ::spontaneous_rdelta(OutputIterator res,
00720                        hstate_t from,
00721                        delta_kind::transitions k) const
00722   {
00723     return op_spontaneous_rdelta(this->structure(), this->value(), res, from, k);
00724   }
00725 
00726   // output_return_type = Container
00727   // output_type        = htransition_t
00728   // direction          = input
00729 
00732   template <typename Self, typename T>
00733   template <typename Container>
00734   void
00735   MetaElement<AutomataBase<Self>, T>::rdeltac(Container& res, hstate_t from,
00736                                               delta_kind::transitions k) const
00737   {
00738     op_rdeltac(this->structure(), this->value(), res, from, k);
00739   }
00740 
00743   template <typename Self, typename T>
00744   template <typename Container, typename L>
00745   void
00746   MetaElement<AutomataBase<Self>, T>::rdeltac(Container& res,
00747                                               hstate_t from,
00748                                               const L& query,
00749                                               delta_kind::transitions k) const
00750   {
00751     op_rdeltac(this->structure(), this->value(), res, from, query, k);
00752   }
00753 
00756   template <typename Self, typename T>
00757   template <typename Container, typename L>
00758   void
00759   MetaElement<AutomataBase<Self>, T>::letter_rdeltac(Container& res,
00760                                                      hstate_t from,
00761                                                      const L& letter,
00762                                                      delta_kind::transitions k) const
00763   {
00764     op_letter_rdeltac(this->structure(), this->value(), res, from, letter, k);
00765   }
00766 
00768   template <typename Self, typename T>
00769   template <typename Container>
00770   void
00771   MetaElement<AutomataBase<Self>, T>
00772   ::spontaneous_rdeltac(Container& res,
00773                         hstate_t from,
00774                         delta_kind::transitions k) const
00775   {
00776     op_spontaneous_rdeltac(this->structure(), this->value(), res, from, k);
00777   }
00778 
00779   // output_return_type = OutputIterator
00780   // output_type        = htransition_t
00781   // direction    = output
00782 
00784   template <typename Self, typename T>
00785   template <typename OutputIterator>
00786   void
00787   MetaElement<AutomataBase<Self>, T>::rdelta(OutputIterator res,
00788                                              hstate_t from,
00789                                              delta_kind::states k) const
00790   {
00791     op_rdelta(this->structure(), this->value(), res, from, k);
00792   }
00793 
00796   template <typename Self, typename T>
00797   template <typename OutputIterator, typename L>
00798   void
00799   MetaElement<AutomataBase<Self>, T>::rdelta(OutputIterator res,
00800                                              hstate_t from,
00801                                              const L& query,
00802                                              delta_kind::states k) const
00803   {
00804     op_rdelta(this->structure(), this->value(), res, from, query, k);
00805   }
00806 
00809   template <typename Self, typename T>
00810   template <typename OutputIterator, typename L>
00811   void
00812   MetaElement<AutomataBase<Self>, T>::letter_rdelta(OutputIterator res,
00813                                                     hstate_t from,
00814                                                     const L& letter,
00815                                                     delta_kind::states k) const
00816   {
00817     op_letter_rdelta(this->structure(), this->value(), res, from, letter, k);
00818   }
00819 
00821   template <typename Self, typename T>
00822   template <typename OutputIterator>
00823   void
00824   MetaElement<AutomataBase<Self>, T>
00825   ::spontaneous_rdelta(OutputIterator res,
00826                        hstate_t from,
00827                        delta_kind::states k) const
00828   {
00829     return op_spontaneous_rdelta(this->structure(), this->value(), res, from, k);
00830   }
00831 
00832   // output_return_type = Container
00833   // output_type        = htransition_t
00834   // direction    = output
00835 
00838   template <typename Self, typename T>
00839   template <typename Container>
00840   void
00841   MetaElement<AutomataBase<Self>, T>::rdeltac(Container& res, hstate_t from,
00842                                               delta_kind::states k) const
00843   {
00844     op_rdeltac(this->structure(), this->value(), res, from, k);
00845   }
00846 
00849   template <typename Self, typename T>
00850   template <typename Container, typename L>
00851   void
00852   MetaElement<AutomataBase<Self>, T>::rdeltac(Container& res,
00853                                               hstate_t from,
00854                                               const L& query,
00855                                               delta_kind::states k) const
00856   {
00857     op_rdeltac(this->structure(), this->value(), res, from, query, k);
00858   }
00859 
00862   template <typename Self, typename T>
00863   template <typename Container, typename L>
00864   void
00865   MetaElement<AutomataBase<Self>, T>::letter_rdeltac(Container& res,
00866                                                      hstate_t from,
00867                                                      const L& letter,
00868                                                      delta_kind::states k) const
00869   {
00870     op_letter_rdeltac(this->structure(), this->value(), res, from, letter, k);
00871   }
00872 
00874   template <typename Self, typename T>
00875   template <typename Container>
00876   void
00877   MetaElement<AutomataBase<Self>, T>
00878   ::spontaneous_rdeltac(Container& res,
00879                         hstate_t from,
00880                         delta_kind::states k) const
00881   {
00882     op_spontaneous_rdeltac(this->structure(), this->value(), res, from, k);
00883   }
00884 
00885 
00886   template<typename S, typename St, typename T>
00887   St& op_rout(const AutomataBase<S>& s, St& st, const T& v)
00888   {
00889     Element<S, T> r(s.self(), v);
00890     st << "{ "
00891        << r.states().size() << " states, "
00892        << r.transitions().size() << " transitions, "
00893        << "#I = " << r.initial().size() << ", "
00894        << "#T = " << r.final().size()
00895        << " }";
00896     return st;
00897   }
00898 
00899 
00900 } // vcsn
00901 
00902 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_BASE_HXX

Generated on Fri Jul 28 12:18:29 2006 for Vaucanson by  doxygen 1.4.6