Vaucanson 1.4
aut_to_exp.hh
Go to the documentation of this file.
00001 // aut_to_exp.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, 2008, 2011 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_ALGORITHMS_AUT_TO_EXP_HH
00018 # define VCSN_ALGORITHMS_AUT_TO_EXP_HH
00019 
00032 // INTERFACE: Exp aut_to_exp(const GenAutomaton& a) { return vcsn::aut_to_exp(*a); }
00033 // INTERFACE: Exp aut_to_exp(const GenAutomaton& a, const vcsn::DMChooser& b) { return vcsn::aut_to_exp(*a, b); }
00034 // INTERFACE: Exp aut_to_exp(const GenAutomaton& a, const vcsn::HChooser& b) { return vcsn::aut_to_exp(*a, b); }
00035 // INTERFACE: Exp aut_to_exp(const GenAutomaton& a, const vcsn::DefaultChooser& b) { return vcsn::aut_to_exp(*a, b); }
00036 
00037 # include <vaucanson/design_pattern/design_pattern.hh>
00038 # include <vaucanson/automata/concept/automata_base.hh>
00039 
00040 namespace vcsn {
00041 
00059   template<typename A, typename AI>
00060   typename Element<A, AI>::series_set_elt_t
00061   aut_to_exp(const Element<A, AI>& a);
00062 
00080   template<typename A, typename AI, typename Chooser>
00081   typename Element<A, AI>::series_set_elt_t
00082   aut_to_exp(const Element<A, AI>& a, const Chooser& c);
00083 
00094   struct DefaultChooser
00095   {
00096       template <class Auto_>
00097       typename Auto_::hstate_t
00098       operator()(const Auto_& a) const;
00099   };
00100 
00106   struct RandomChooser
00107   {
00111       template <class Auto_>
00112       typename Auto_::hstate_t
00113       operator()(const Auto_& a) const;
00114   };
00115 
00116 
00117   struct HChooser
00118   {
00119       template <class Auto_>
00120       typename Auto_::hstate_t
00121       operator()(const Auto_& a) const;
00122   };
00123 
00130   struct DMChooser
00131   {
00135       template <class Auto_>
00136       typename Auto_::hstate_t
00137       operator()(const Auto_& a) const;
00138   };
00139 
00148   class ListChooser
00149   {
00150     typedef std::list<unsigned int> list_t;
00151   public :
00152     ListChooser(const list_t& l);
00153 
00154     template <class Auto_>
00155     typename Auto_::hstate_t operator() (const Auto_& a);
00156 
00157   private :
00158     list_t list_;
00159     list_t::const_iterator pos_;
00160   };
00161 
00162 } // vcsn
00163 
00164 # if !defined VCSN_USE_INTERFACE_ONLY && !defined VCSN_USE_LIB
00165 #  include <vaucanson/algorithms/aut_to_exp.hxx>
00166 # endif // VCSN_USE_INTERFACE_ONLY
00167 
00168 #endif // ! VCSN_ALGORITHMS_AUT_TO_EXP_HH