22 template <Automaton Aut,
typename Tag>
32 template <Automaton Aut>
33 std::enable_if_t<std::is_same<weightset_t_of<Aut>,
b>::value,
41 template <Automaton Aut>
42 std::enable_if_t<!std::is_same<weightset_t_of<Aut>,
b>::value,
54 template <Automaton Aut>
55 std::enable_if_t<is_free_boolean<Aut>(), quotient_t<Aut>>
56 minimize(
const Aut& a,
const std::string& algo)
61 "minimization algorithm",
79 template <Automaton Aut>
80 std::enable_if_t<std::is_same<weightset_t_of<Aut>,
b>::value
81 && !labelset_t_of<Aut>::is_free(),
83 minimize(
const Aut& a,
const std::string& algo)
88 "minimization algorithm",
102 template <Automaton Aut>
103 std::enable_if_t<!std::is_same<weightset_t_of<Aut>,
b>::value,
107 static const auto map
110 "minimization algorithm",
120 template <Automaton Aut,
typename Tag = auto_tag>
136 #if defined __GNUC__ && ! defined __clang__
137 # pragma GCC diagnostic push
138 # pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
140 template <Automaton Aut,
typename Tag>
150 #if defined __GNUC__ && ! defined __clang__
151 # pragma GCC diagnostic pop
155 template <Automaton Aut,
typename String>
161 "minimization algorithm",
163 {
"auto", minimize_tag_<Aut, auto_tag>},
164 {
"brzozowski", minimize_tag_<Aut, brzozowski_tag>},
165 {
"hopcroft", minimize_tag_<Aut, hopcroft_tag>},
166 {
"moore", minimize_tag_<Aut, moore_tag>},
167 {
"signature", minimize_tag_<Aut, signature_tag>},
168 {
"weighted", minimize_tag_<Aut, weighted_tag>},
171 return map[algo](aut->as<Aut>());
185 template <Automaton Aut,
typename Tag>
193 template <Automaton Aut,
typename String>
199 "cominimization algorithm",
201 {
"auto", cominimize_tag_<Aut, auto_tag>},
202 {
"brzozowski", cominimize_tag_<Aut, brzozowski_tag>},
203 {
"hopcroft", cominimize_tag_<Aut, hopcroft_tag>},
204 {
"moore", cominimize_tag_<Aut, moore_tag>},
205 {
"signature", cominimize_tag_<Aut, signature_tag>},
206 {
"weighted", cominimize_tag_<Aut, weighted_tag>},
209 return map[algo](aut->as<Aut>());
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
ATTRIBUTE_NORETURN std::enable_if_t<!is_free_boolean< Aut >), Aut > minimize(const Aut &, brzozowski_tag)
Handling of errors for dyn::minimize.
partition_automaton_t< Aut > quotient_t
The return type when calling quotient on Aut.
auto quotient(const Aut &a, typename detail::quotienter< Aut >::class_to_set_t &cs) -> quotient_t< Aut >
automaton cominimize_tag_(const Aut &aut)
Aut transpose(const transpose_automaton< Aut > &aut)
Request for Moore implementation of minimize (B and free).
A mapping from strings to Values.
Tag to request the most appropriate version of an algorithm.
Request for Hopcroft implementation of minimize (B and free).
std::shared_ptr< detail::automaton_base > automaton
auto cominimize(const Aut &a, Tag tag={}) -> decltype(transpose(minimize(transpose(a), tag)))
Cominimization.
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.
Request for Moore implementation of minimize (B).
automaton minimize_tag_(const Aut &aut)
automaton transpose(automaton &aut)
Bridge.
Request for the weighted version of an algorithm.
automaton cominimize(const automaton &aut, const std::string &algo)
Bridge.
weightset_mixin< detail::b_impl > b