00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_SERIES_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_SERIES_HH
00019 
00020 #include <vaucanson/algebra/concept/series_base.hh>
00021 #include <vaucanson/design_pattern/slots.hh>
00022 
00023 
00024 namespace vcsn {
00025 
00026   namespace algebra {
00027 
00028     
00029 
00030 
00031 
00032     struct semiring_slot_tag {};
00033     struct monoid_slot_tag {};
00034 
00036     template<typename Semiring, typename Monoid>
00037     struct Series
00038       : SeriesBase<Series<Semiring, Monoid> >,
00039         private SetSlot<Semiring, semiring_slot_tag>,
00040         private SetSlot<Monoid, monoid_slot_tag>
00041     {
00042       Series(const Semiring& w, const Monoid& m);
00043       Series(const Series& other);
00044 
00045       const Semiring&   semiring() const;
00046 
00047       const Monoid&     monoid() const;
00048 
00049     };
00050 
00051     template<typename W, typename M>
00052     bool operator==(const Series<W, M>&,
00053                     const Series<W, M>&);
00054 
00055 
00056     template <class W, class M, class NewW, class NewM>
00057     struct mute_series_traits<Series<W, M>, NewW, NewM >
00058     {
00059       typedef Series<NewW, NewM> ret;
00060     };
00061 
00062     template <class W, class M, class NewW, class NewM>
00063     typename mute_series_traits<Series<W, M>, NewW, NewM >::ret
00064     mute_series(const Series<W, M>& s, const NewW& w, const NewM& m);
00065 
00066   } 
00067 
00068   
00069 
00070 
00071 
00073   template <class W, class M, class T>
00074   struct MetaElement<algebra::Series<W, M>, T> :
00075     public MetaElement<algebra::SeriesBase<algebra::Series<W, M> >, T>
00076   { };
00077 
00078   
00079 
00080 
00081 
00083   template<typename W, typename M>
00084   struct dynamic_traits<algebra::Series<W, M> >
00085     : dynamic_traits<algebra::SeriesBase<algebra::Series<W, M> > >
00086   {
00087     static const bool ret =
00088       dynamic_traits<W>::ret || dynamic_traits<M>::ret;
00089 
00090   };
00091 
00092   
00093 
00094 
00095 
00097   template<typename W, typename M>
00098   struct virtual_types<algebra::Series<W, M> >
00099     : virtual_types<algebra::SeriesBase<algebra::Series<W, M> > >
00100   {
00101     typedef algebra::mul_kind semigroup_kind;
00102 
00103     typedef W semiring_t;
00104     typedef M monoid_t;
00105   };
00106 
00107 } 
00108 
00109 
00110 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00111 # include <vaucanson/algebra/implementation/series/series.hxx>
00112 #endif // VCSN_USE_INTERFACE_ONLY
00113 
00114 
00115 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_SERIES_HH