Vaucanson 1.4
|
00001 // evaluation_rw.hxx: this file is part of the Vaucanson project. 00002 // 00003 // Vaucanson, a generic library for finite state machines. 00004 // 00005 // Copyright (C) 2009 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_EVALUATION_RW_HXX 00018 # define VCSN_ALGORITHMS_EVALUATION_RW_HXX 00019 00020 # include <vaucanson/algorithms/evaluation_rw.hh> 00021 00022 # include <vaucanson/algorithms/extension.hh> 00023 # include <vaucanson/algorithms/product.hh> 00024 # include <vaucanson/algorithms/trim.hh> 00025 # include <vaucanson/algorithms/image.hh> 00026 00027 namespace vcsn 00028 { 00029 template <typename SA, typename ST, typename SRET, 00030 typename Auto_t, typename Trans_t, typename Ret_t> 00031 void 00032 do_evaluation_rw(const AutomataBase<SA>&, 00033 const TransducerBase<ST>&, 00034 const AutomataBase<SRET>&, 00035 const Auto_t& a, 00036 const Trans_t& t, 00037 Ret_t& ret) 00038 { 00039 image(trim(product(t, extension(a, t))), ret); 00040 } 00041 00042 template<typename SA, typename TA, typename ST, 00043 typename TT, typename SRET, typename TRET> 00044 void 00045 evaluation_rw(const Element<SA, TA>& a, const Element<ST, TT>& t, 00046 Element<SRET, TRET>& ret) 00047 { 00048 do_evaluation_rw(a.structure(), t.structure(), ret.structure(), a, t, ret); 00049 } 00050 00051 } // ! vcsn 00052 00053 #endif // ! VCSN_ALGORITHMS_EVALUATION_RW_HXX