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>
151 #if defined __GNUC__ && ! defined __clang__
152 # pragma GCC diagnostic pop
156 template <Automaton Aut,
typename String>
162 "minimization algorithm",
164 {
"auto", minimize_tag_<Aut, auto_tag>},
165 {
"brzozowski", minimize_tag_<Aut, brzozowski_tag>},
166 {
"hopcroft", minimize_tag_<Aut, hopcroft_tag>},
167 {
"moore", minimize_tag_<Aut, moore_tag>},
168 {
"signature", minimize_tag_<Aut, signature_tag>},
169 {
"weighted", minimize_tag_<Aut, weighted_tag>},
172 return map[algo](aut->
as<Aut>());
187 template <Automaton Aut,
typename Tag>
194 template <Automaton Aut,
typename String>
200 "cominimization algorithm",
202 {
"auto", cominimize_tag_<Aut, auto_tag>},
203 {
"brzozowski", cominimize_tag_<Aut, brzozowski_tag>},
204 {
"hopcroft", cominimize_tag_<Aut, hopcroft_tag>},
205 {
"moore", cominimize_tag_<Aut, moore_tag>},
206 {
"signature", cominimize_tag_<Aut, signature_tag>},
207 {
"weighted", cominimize_tag_<Aut, weighted_tag>},
210 return map[algo](aut->
as<Aut>());
Request for Moore implementation of minimize (B and free).
automaton cominimize(const automaton &aut, const std::string &algo)
Bridge.
weightset_mixin< detail::b_impl > b
automaton cominimize_tag_(const Aut &aut)
Helper function to facilitate dispatch below.
auto quotient(const Aut &a, typename detail::quotienter< Aut >::class_to_set_t &cs) -> quotient_t< Aut >
Tag to request the most appropriate version of an algorithm.
auto cominimize(const Aut &a, Tag tag={}) -> decltype(transpose(minimize(transpose(a), tag)))
Cominimization.
ATTRIBUTE_NORETURN std::enable_if_t<!is_free_boolean< Aut >), Aut > minimize(const Aut &, brzozowski_tag)
Handling of errors for dyn::minimize.
automaton minimize_tag_(const Aut &aut)
Helper function to facilitate dispatch below.
partition_automaton_t< Aut > quotient_t
The return type when calling quotient on Aut.
automaton transpose(automaton &aut)
Bridge.
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.
Request for Moore implementation of minimize (B).
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 the weighted version of an algorithm.
A mapping from strings to Values.
auto & as()
Extract wrapped typed automaton.
Request for Hopcroft implementation of minimize (B and free).