17 #ifndef VCSN_ALGORITHMS_TRIM_HXX
18 # define VCSN_ALGORITHMS_TRIM_HXX
22 # include <vaucanson/automata/concept/automata_base.hh>
37 template <
typename A,
typename AI>
38 std::set<typename Element<A, AI>::hstate_t>
39 do_useful_states(
const AutomataBase<A>&,
40 const Element<A, AI>& a)
42 BENCH_TASK_SCOPED(
"useful_states");
43 typedef typename Element<A, AI>::hstate_t hstate_t;
47 std::set<hstate_t> result;
48 std::insert_iterator<std::set<hstate_t> > i(result, result.begin());
50 set_intersection(start.begin(), start.end(),
final.begin(),
final.end(), i);
54 template<
typename A,
typename AI>
55 std::set<typename Element<A, AI>::hstate_t>
58 return do_useful_states(a.
structure(), a);
61 template<
typename A,
typename AI>
68 template<
typename A,
typename AI>
77 #endif // ! VCSN_ALGORITHMS_TRIM_HXX