17 #ifndef VCSN_ALGORITHMS_BRZOZOWSKI_HXX
18 # define VCSN_ALGORITHMS_BRZOZOWSKI_HXX
22 # include <vaucanson/algorithms/internal/build_pattern.hh>
23 # include <vaucanson/automata/concept/automata_base.hh>
28 # include <vaucanson/misc/usual_macros.hh>
32 using namespace algorithm_patterns;
46 template <
typename T_auto,
typename Exp>
48 BrzozowskiAlgo<T_auto, Exp>,
52 AUTOMATON_TYPES(T_auto);
53 AUTOMATON_FREEMONOID_TYPES(T_auto);
56 IncAutomataConstructor<BrzozowskiAlgo, T_auto, Exp>(series, exp)
60 void on_state(
const Exp& e)
62 alphabet_t alpha = this->
get()->series().monoid().alphabet();
63 if (constant_term(e).first
64 != e.structure().semiring().zero(
SELECT(semiring_elt_value_t)))
66 for (alphabet_iterator i = alpha.begin(); i != alpha.end(); ++i)
71 template<
typename T_auto,
typename Exp>
73 do_brzozowski(
const T_auto& out,
const Exp &kexp)
75 BrzozowskiAlgo<T_auto, Exp> brzozowski_algo(out.series(),
canonical(kexp));
76 brzozowski_algo.run();
77 return brzozowski_algo.get();
80 template<
typename A,
typename T,
typename Exp>
84 BENCH_TASK_SCOPED(
"brzozowski");
85 out = *do_brzozowski(out, kexp);
90 #endif // ! VCSN_ALGORITHMS_BRZOZOWSKI_HXX