00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_TRANSPOSE_HXX
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_TRANSPOSE_HXX
00019
00020 # include <vaucanson/algebra/concept/series_base.hh>
00021 # include <vaucanson/algebra/implementation/series/krat_exp_pattern.hh>
00022
00023
00024 namespace vcsn {
00025
00026 namespace algebra {
00027
00028 template <class Series, class T, class Dispatch>
00029 struct KRatExpTranspose : algebra::KRatExpIdentity<
00030 KRatExpTranspose<Series, T, Dispatch>,
00031 Series,
00032 T,
00033 Dispatch
00034 >
00035 {
00036 typedef KRatExpTranspose<Series, T, Dispatch> self_t;
00037 typedef Element<Series, T> return_type;
00038 typedef typename Element<Series, T>::semiring_elt_t semiring_elt_t;
00039 typedef typename semiring_elt_t::value_t semiring_elt_value_t;
00040 typedef typename Element<Series, T>::monoid_elt_t monoid_elt_t;
00041 typedef typename monoid_elt_t::value_t monoid_elt_value_t;
00042 typedef typename monoid_elt_t::set_t monoid_t;
00043 typedef typename monoid_t::alphabet_t alphabet_t;
00044 typedef typename alphabet_t::letter_t letter_t;
00045 INHERIT_CONSTRUCTORS(self_t, T, semiring_elt_t, Dispatch);
00046
00047 KRatExpTranspose(const Element<Series, T>& exp) :
00048 KRatExpIdentity<KRatExpTranspose<Series, T, Dispatch>,
00049 Series,
00050 T,
00051 Dispatch
00052 >(exp)
00053 {}
00054
00055 MATCH__(Product, lhs, rhs)
00056 {
00057 return match(rhs) * match(lhs);
00058 }
00059 END
00060
00061 MATCH_(Constant, m)
00062 {
00063 monoid_elt_t melt (this->exp_.structure().monoid(), m);
00064 melt.mirror();
00065 return Element<Series, T> (this->exp_.structure(), melt);
00066 }
00067 END
00068
00069 };
00070
00071
00072 }
00073
00074 }
00075
00076 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_TRANSPOSE_HXX