transpose_view.hh

00001 // transpose_view.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 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_IMPLEMENTATION_TRANSPOSE_VIEW_HH
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH
00019 
00020 # include <vaucanson/automata/implementation/automaton_view.hh>
00021 # include <vaucanson/design_pattern/predecls.hh>
00022 
00023 namespace vcsn {
00024 
00035   template <class T>
00036   struct TransposeView : public IdentityView<T>
00037   {
00038       TransposeView();
00039       TransposeView(const T&);
00040       TransposeView(T&);
00041       TransposeView(const TransposeView&);
00042   };
00043 
00045 
00046   template <class T>
00047   struct transpose_traits
00048   {
00049       typedef undefined_type type;
00050   };
00051 
00052   template <class S, class T>
00053   struct transpose_traits<Element<S, T> >
00054   {
00055       typedef Element<S, TransposeView<T> > type;
00056   };
00065   template <class S, class T>
00066   Element<S, TransposeView<T> >
00067   transpose_view(Element<S, T>&);
00068 
00069   template <class S, class T>
00070   const Element<S, TransposeView<T> >
00071   transpose_view(const Element<S, T>&);
00074 
00075   template <typename T>
00076   struct automaton_traits<TransposeView<T> >
00077   {
00078       typedef typename automaton_traits<T>::label_t     label_t;
00079       typedef typename automaton_traits<T>::series_set_elt_value_t
00080       series_set_elt_value_t;
00081       typedef typename automaton_traits<T>::word_value_t        word_value_t;
00082       typedef typename automaton_traits<T>::semiring_elt_value_t
00083       semiring_elt_value_t;
00084       typedef typename automaton_traits<T>::letter_t    letter_t;
00085       typedef typename automaton_traits<T>::tag_t               tag_t;
00086       typedef typename automaton_traits<T>::states_t    states_t;
00087       typedef typename automaton_traits<T>::state_data_t        state_data_t;
00088       typedef typename automaton_traits<T>::state_iterator
00089       state_iterator;
00090       typedef typename automaton_traits<T>::transitions_t       transitions_t;
00091       typedef typename automaton_traits<T>::transition_data_t   transition_data_t;
00092       typedef typename automaton_traits<T>::transition_iterator transition_iterator;
00093       typedef typename automaton_traits<T>::initial_t   initial_t;
00094       typedef typename automaton_traits<T>::initial_iterator
00095       initial_iterator;
00096       typedef typename automaton_traits<T>::initial_support_t
00097       initial_support_t;
00098       typedef typename automaton_traits<T>::final_t     final_t;
00099       typedef typename automaton_traits<T>::final_iterator
00100       final_iterator;
00101       typedef typename automaton_traits<T>::final_support_t
00102       final_support_t;
00103       typedef typename automaton_traits<T>::geometry_t  geometry_t;
00104   };
00105 
00106 #define AutoType(Type)                          \
00107   typename Element<S, TransposeView<T> >::Type
00108 
00110 
00111   template <class S, class T>
00112   typename automaton_traits<TransposeView<T> >::initial_support_t
00113   op_initial(const AutomataBase<S>&, const TransposeView<T>&);
00114 
00115   template <class S, class T>
00116   typename automaton_traits<TransposeView<T> >::final_support_t
00117   op_final(const AutomataBase<S>&, const TransposeView<T>&);
00118 
00119   template <class S, class T>
00120   void
00121   op_set_initial(const AutomataBase<S>&, TransposeView<T>&,
00122                  hstate_t state,
00123                  const AutoType(series_set_elt_t)& s);
00124 
00125   template <class S, class T>
00126   AutoType(series_set_elt_t)
00127   op_get_initial(const AutomataBase<S>&,
00128                  const TransposeView<T>&,
00129                  hstate_t);
00130 
00131   template <class S, class T>
00132   void
00133   op_set_final(const AutomataBase<S>&, TransposeView<T>&,
00134                hstate_t state,
00135                const typename Element<S, T>::series_set_elt_t& s);
00136 
00137   template <class S, class T>
00138   typename Element<S, T>::series_set_elt_t
00139   op_get_final(const AutomataBase<S>&,
00140                const TransposeView<T>&,
00141                hstate_t state);
00142 
00143   template <class S, class T>
00144   void
00145   op_clear_initial(const AutomataBase<S>&, TransposeView<T>&);
00146 
00147   template <class S, class T>
00148   void
00149   op_clear_final(const AutomataBase<S>&, TransposeView<T>&);
00150 
00151   template <class S, class T>
00152   hstate_t
00153   op_src_of(const AutomataBase<S>&, const TransposeView<T>&,
00154             htransition_t);
00155 
00156   template <class S, class T>
00157   hstate_t
00158   op_dst_of(const AutomataBase<S>&, const TransposeView<T>&,
00159             htransition_t);
00160 
00163   // output_return_type = OutputIterator
00164   // output_type        = htransition_t
00165   // direction          = output
00166 
00168   template <class S, class T,
00169             typename OutputIterator>
00170   void op_delta(const AutomataBase<S>&, const TransposeView<T>&,
00171                 OutputIterator res,
00172                 hstate_t from,
00173                 delta_kind::transitions k);
00174 
00181   template <class S, class T,
00182             typename OutputIterator, typename L>
00183   void op_delta(const AutomataBase<S>&, const TransposeView<T>&,
00184                 OutputIterator res,
00185                 hstate_t from,
00186                 const L& query,
00187                 delta_kind::transitions k);
00188 
00195   template <class S, class T,
00196             typename OutputIterator, typename L>
00197   void op_letter_delta(const AutomataBase<S>&, const TransposeView<T>&,
00198                        OutputIterator res,
00199                        hstate_t from,
00200                        const L& letter,
00201                        delta_kind::transitions k);
00202 
00204   template <class S, class T,
00205             typename OutputIterator>
00206   void op_spontaneous_delta(const AutomataBase<S>&, const TransposeView<T>&,
00207                             OutputIterator res,
00208                             hstate_t from,
00209                             delta_kind::transitions k);
00210 
00211   // output_return_type = Container
00212   // output_type        = htransition_t
00213   // direction          = output
00214 
00216   template <class S, class T,
00217             typename Container>
00218   void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00219                  Container& res, hstate_t from, delta_kind::transitions k);
00220 
00227   template <class S, class T,
00228             typename Container, typename L>
00229   void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00230                  Container& res,
00231                  hstate_t from,
00232                  const L& query,
00233                  delta_kind::transitions k);
00234 
00241   template <class S, class T,
00242             typename Container, typename L>
00243   void op_letter_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00244                         Container& res,
00245                         hstate_t from,
00246                         const L& letter,
00247                         delta_kind::transitions k);
00248 
00250   template <class S, class T, class Container>
00251   void op_spontaneous_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00252                              Container& res,
00253                              hstate_t from,
00254                              delta_kind::transitions k);
00255 
00256   // output_return_type = OutputIterator
00257   // output_type        = hstate_t
00258   // direction          = output
00259 
00265   template<class S, class T, typename OutputIterator>
00266   void op_delta(const AutomataBase<S>&, const TransposeView<T>&,
00267                 OutputIterator res,
00268                 hstate_t from,
00269                 delta_kind::states k);
00270 
00277   template<class S, class T, typename OutputIterator, typename L>
00278   void op_delta(const AutomataBase<S>&, const TransposeView<T>&,
00279                 OutputIterator res,
00280                 hstate_t from,
00281                 const L& query,
00282                 delta_kind::states k);
00283 
00290   template<class S, class T, typename OutputIterator, typename L>
00291   void op_letter_delta(const AutomataBase<S>&, const TransposeView<T>&,
00292                        OutputIterator res,
00293                        hstate_t from,
00294                        const L& letter,
00295                        delta_kind::states k);
00296 
00298   template<class S, class T, typename OutputIterator>
00299   void op_spontaneous_delta(const AutomataBase<S>&, const TransposeView<T>&,
00300                             OutputIterator res,
00301                             hstate_t from,
00302                             delta_kind::states k);
00303 
00304   // output_return_type = Container
00305   // output_type        = hstate_t
00306   // direction          = output
00307 
00314   template<class S, class T, typename Container>
00315   void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00316                  Container& res, hstate_t from, delta_kind::states k);
00317 
00324   template<class S, class T, typename Container, typename L>
00325   void op_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00326                  Container& res,
00327                  hstate_t from,
00328                  const L& query,
00329                  delta_kind::states k);
00330 
00337   template<class S, class T, typename Container, typename L>
00338   void op_letter_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00339                         Container& res,
00340                         hstate_t from,
00341                         const L& letter,
00342                         delta_kind::states k);
00343 
00345   template<class S, class T, typename Container>
00346   void op_spontaneous_deltac(const AutomataBase<S>&, const TransposeView<T>&,
00347                              Container& res,
00348                              hstate_t from,
00349                              delta_kind::states k);
00350 
00351   // output_return_type = OutputIterator
00352   // output_type        = htransition_t
00353   // direction          = input
00354 
00360   template<class S, class T, typename OutputIterator>
00361   void op_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00362                  OutputIterator res,
00363                  hstate_t from,
00364                  delta_kind::transitions k);
00365 
00372   template<class S, class T, typename OutputIterator, typename L>
00373   void op_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00374                  OutputIterator res,
00375                  hstate_t from,
00376                  const L& query,
00377                  delta_kind::transitions k);
00378 
00385   template<class S, class T, typename OutputIterator, typename L>
00386   void op_letter_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00387                         OutputIterator res,
00388                         hstate_t from,
00389                         const L& letter,
00390                         delta_kind::transitions k);
00391 
00393   template<class S, class T, typename OutputIterator>
00394   void op_spontaneous_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00395                              OutputIterator res,
00396                              hstate_t from,
00397                              delta_kind::transitions k);
00398 
00399   // output_return_type = Container
00400   // output_type        = htransition_t
00401   // direction          = input
00402 
00408   template<class S, class T, typename Container>
00409   void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00410                   Container& res, hstate_t from, delta_kind::transitions k);
00411 
00418   template<class S, class T, typename Container, typename L>
00419   void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00420                   Container& res,
00421                   hstate_t from,
00422                   const L& query,
00423                   delta_kind::transitions k);
00424 
00431   template<class S, class T, typename Container, typename L>
00432   void op_letter_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00433                          Container& res,
00434                          hstate_t from,
00435                          const L& letter,
00436                          delta_kind::transitions k);
00437 
00439   template<class S, class T, typename Container>
00440   void op_spontaneous_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00441                               Container& res,
00442                               hstate_t from,
00443                               delta_kind::transitions k);
00444 
00445   // output_return_type = OutputIterator
00446   // output_type        = hstate_t
00447   // direction          = input
00448 
00450   template<class S, class T, typename OutputIterator>
00451   void op_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00452                  OutputIterator res,
00453                  hstate_t from,
00454                  delta_kind::states k);
00455 
00462   template<class S, class T, typename OutputIterator, typename L>
00463   void op_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00464                  OutputIterator res,
00465                  hstate_t from,
00466                  const L& query,
00467                  delta_kind::states k);
00468 
00475   template<class S, class T, typename OutputIterator, typename L>
00476   void op_letter_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00477                         OutputIterator res,
00478                         hstate_t from,
00479                         const L& letter,
00480                         delta_kind::states k);
00481 
00483   template<class S, class T, typename OutputIterator>
00484   void op_spontaneous_rdelta(const AutomataBase<S>&, const TransposeView<T>&,
00485                              OutputIterator res,
00486                              hstate_t from,
00487                              delta_kind::states k);
00488 
00489   // output_return_type = Container
00490   // output_type        = hstate_t
00491   // direction          = input
00492 
00499   template<class S, class T, typename Container>
00500   void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00501                   Container& res, hstate_t from, delta_kind::states k);
00502 
00509   template<class S, class T, typename Container, typename L>
00510   void op_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00511                   Container& res,
00512                   hstate_t from,
00513                   const L& query,
00514                   delta_kind::states k);
00515 
00522   template<class S, class T, typename Container, typename L>
00523   void op_letter_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00524                          Container& res,
00525                          hstate_t from,
00526                          const L& letter,
00527                          delta_kind::states k);
00528 
00530   template<class S, class T, typename Container>
00531   void op_spontaneous_rdeltac(const AutomataBase<S>&, const TransposeView<T>&,
00532                               Container& res,
00533                               hstate_t from,
00534                               delta_kind::states k);
00535 
00536 } // vcsn
00537 
00538 # undef AutoType
00539 
00540 
00541 #ifndef VCSN_USE_INTERFACE_ONLY
00542 # include <vaucanson/automata/implementation/transpose_view.hxx>
00543 #endif // VCSN_USE_INTERFACE_ONLY
00544 
00545 
00546 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_TRANSPOSE_VIEW_HH

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