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>
87 return vcsn::detail::static_if<labelset_t_of<Aut>::is_free()>
90 [](
const auto&) ->
bool 91 {
raise(
"is_deterministic: requires free labelset"); })
96 template <Automaton Aut>
100 return vcsn::detail::static_if<labelset_t_of<Aut>::is_free()>
103 [](
const auto&) ->
bool 104 {
raise(
"is_codeterministic: requires free labelset"); })
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.
auto initial_transitions(const Aut &aut) -> decltype(aut->all_out(aut->pre()))
Indexes of transitions to (visible) initial states.
bool is_deterministic(const automaton &aut)
Bridge.
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
bool is_codeterministic(const Aut &aut)
Whether the transposed automaton is deterministic.
size_t num_codeterministic_states(const Aut &aut)
Number of non-deterministic states of transposed automaton.
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
size_t num_deterministic_states(const Aut &aut)
Number of non-deterministic states.
typename detail::labelset_t_of_impl< base_t< ValueSet > >::type labelset_t_of
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.
typename detail::label_t_of_impl< base_t< ValueSet > >::type label_t_of