26 template <Automaton Aut>
35 using set_t =
typename decltype(ps)::value_t;
36 using partition_t = std::set<set_t>;
44 for (
auto s: a->all_states())
48 auto p = partition_t{f,
q};
49 auto w = partition_t{f};
51 const auto& ls = *a->labelset();
53 generators.emplace_back(ls.special());
57 auto sub_w = std::move(*begin(w));
59 for (
const auto l: generators)
65 auto p2 = partition_t(p);
70 if (!xny.empty() && !x_y.empty())
80 w.insert(xny.size() <= x_y.size() ? xny : x_y);
82 p.insert(std::move(xny));
83 p.insert(std::move(x_y));
88 auto res = std::vector<std::vector<state_t>>{};
92 auto res = std::vector<state_t>();
105 template <Automaton Aut>
110 raise(
"minimize: invalid algorithm" 111 " (non-Boolean or non-free labelset):",
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
typename detail::state_t_of_impl< base_t< ValueSet > >::type state_t_of
size_t states_size(const Aut &aut)
The largest state number, plus one.
auto quotient(const Aut &a, typename detail::quotienter< Aut >::class_to_set_t &cs) -> quotient_t< Aut >
std::vector< typename Cont::value_type > make_vector(const Cont &cont)
The content of cont as a vector.
polynomialset< Context, Kind > make_polynomialset(const Context &context)
Ctx make_context(const std::string &name)
Build a context from its name.
auto transform(const Container &c, Fun &&fun)
Map a unary function on a container of values, and return the vector the results. ...
Provide a variadic mul on top of a binary mul(), and one().
auto in(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions arriving to state s.
Request the bitset implementation (bool weights).
Request for Hopcroft implementation of minimize (B and free).
partition_automaton_t< Aut > quotient_t
The return type when calling quotient on Aut.
auto minimize(const Aut &a, brzozowski_tag) -> std::enable_if_t< is_free_boolean< Aut >(), determinized_automaton< codeterminized_automaton< Aut >, wet_kind_t::bitset >>
Brzozowski-based minimization.
auto label_of(const welement< Label, Weight > &m) -> decltype(m.label())
The label of a welement.