17 #ifndef VCSN_ALGORITHMS_FINITE_SUPPORT_CONVERSION_HXX
18 # define VCSN_ALGORITHMS_FINITE_SUPPORT_CONVERSION_HXX
20 # include <vaucanson/misc/usual_macros.hh>
22 # include <vaucanson/algebra/concept/monoid_base.hh>
29 template<
typename S,
typename T,
typename Ss,
typename Ts>
33 BENCH_TASK_SCOPED(
"finite_support_convert");
34 precondition(org.is_finite_app());
43 dst = algebra::zero_as<T>::of(dst.
structure());
45 const support_t& org_supp = org.supp();
46 for (
typename support_t::const_iterator i = org_supp.begin();
50 const sme_t &sm = sme_t(org.
structure().monoid(), *i);
52 const me_t &m = me_t(dst.
structure().monoid(), sm);
53 const se_t &w = se_t(dst.
structure().semiring(), org.get(sm));
58 postcondition(dst.is_finite_app());
63 #endif // ! VCSN_ALGORITHMS_FINITE_SUPPORT_CONVERSION_HXX