00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_AUTOMATA_IMPLEMENTATION_GENERALIZED_HH
00018 # define VCSN_AUTOMATA_IMPLEMENTATION_GENERALIZED_HH
00019 
00020 # include <map>
00021 # include <vaucanson/automata/concept/automata.hh>
00022 # include <vaucanson/automata/concept/tags.hh>
00023 # include <vaucanson/automata/concept/copy.hh>
00024 # include <vaucanson/algebra/concept/series_base.hh>
00025 # include <vaucanson/algebra/implementation/series/generalized.hh>
00026 # include <vaucanson/algebra/implementation/series/rat/exp.hh>
00027 # include <vaucanson/algebra/implementation/series/krat.hh>
00028 # include <vaucanson/misc/usual_macros.hh>
00029 # ifdef VCSN_GRAPH_IMPL
00030 #
00031 #  include GRAPH_IMPL_HEADER
00032 #
00033 # else
00034 #
00035 #  include <vaucanson/config/pconf.hh>
00036 #  include GRAPH_DEFAULT_IMPL_HEADER
00037 #
00038 #  define VCSN_GRAPH_IMPL VCSN_DEFAULT_GRAPH_IMPL
00039 #  define UNDEF_VCSN_GRAPH_IMPL
00040 #
00041 # endif
00042 
00043 
00044 namespace vcsn {
00045 
00046   
00047 
00048 
00049   template <class Auto_>
00050   struct generalized_traits
00051   {
00052     
00053     typedef typename Auto_::series_set_t                series_set_t;
00054     typedef typename series_set_t::monoid_t             monoid_t;
00055     typedef typename Auto_::series_set_elt_t            series_set_elt_t;
00056     typedef typename series_set_elt_t::monoid_elt_t     monoid_elt_t;
00057     typedef typename monoid_elt_t::value_t              monoid_elt_value_t;
00058     typedef typename series_set_elt_t::semiring_elt_t   semiring_elt_t;
00059     typedef typename semiring_elt_t::value_t            semiring_elt_value_t;
00060     typedef typename Auto_::value_t::geometry_t         geometry_t;
00061 
00062     typedef vcsn::Element
00063     <vcsn::Automata<series_set_t>,
00064      VCSN_GRAPH_IMPL::Graph<labels_are_series,
00065            monoid_elt_value_t,
00066            semiring_elt_value_t,
00067            rat::exp<monoid_elt_value_t, semiring_elt_value_t>,
00068            typename monoid_t::letter_t,
00069            NoTag,
00070            typename geometry_t::coords_t>
00071     > automaton_t;
00072 
00073     typedef typename automaton_t::hstate_t              hstate_t;
00074     typedef typename automaton_t::htransition_t         htransition_t;
00075   };
00076 
00077 
00078   template <class Auto_>
00079   typename generalized_traits<Auto_>::automaton_t
00080   generalized(const Auto_& from);
00081 
00082 } 
00083 
00084 
00085 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00086 # include <vaucanson/automata/implementation/generalized.hxx>
00087 #endif // VCSN_USE_INTERFACE_ONLY
00088 
00089 #ifdef UNDEF_VCSN_GRAPH_IMPL
00090 # undef VCSN_GRAPH_IMPL
00091 # undef UNDEF_VCSN_GRAPH_IMPL
00092 #endif
00093 
00094 
00095 #endif // ! VCSN_AUTOMATA_IMPLEMENTATION_GENERALIZED_HH