3 #include <unordered_set>
14 template <Automaton Aut>
18 using automaton_t = Aut;
20 "is_deterministic: requires free labelset");
23 auto seen = std::unordered_set<label_t>{};
25 if (!seen.insert(aut->label_of(t)).second)
31 template <Automaton Aut>
36 "num_deterministic_states: requires free labelset");
39 for (
auto s: aut->states())
45 template <Automaton Aut>
54 template <Automaton Aut>
59 "is_deterministic: requires free labelset");
64 for (
auto s: aut->states())
71 template <Automaton Aut>
83 template <Automaton Aut>
91 template <Automaton Aut>
size_t num_deterministic_states(const Aut &aut)
Number of non-deterministic states.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
bool is_codeterministic(const automaton &aut)
Bridge.
bool is_codeterministic(const Aut &aut)
Whether the transposed automaton is deterministic.
typename detail::label_t_of_impl< base_t< ValueSet >>::type label_t_of
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
auto initial_transitions(const Aut &aut) -> decltype(aut->all_out(aut->pre()))
Indexes of transitions to (visible) initial states.
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
size_t num_codeterministic_states(const Aut &aut)
Number of non-deterministic states of transposed automaton.
bool is_deterministic(const automaton &aut)
Bridge.
auto & as()
Extract wrapped typed automaton.
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.