1 #ifndef VCSN_ALGOS_IS_DETERMINISTIC_HH
2 # define VCSN_ALGOS_IS_DETERMINISTIC_HH
5 # include <unordered_set>
15 template <
typename Aut>
19 using automaton_t = Aut;
21 "is_deterministic: requires free labelset");
24 std::unordered_set<label_t> seen;
25 for (
auto t : aut->all_out(s))
26 if (!seen.insert(aut->label_of(t)).second)
37 "num_deterministic_states: requires free labelset");
40 for (
auto s: aut->states())
60 "is_deterministic: requires free labelset");
62 if (1 < aut->initial_transitions().size())
65 for (
auto s: aut->states())
84 template <
typename Aut>
94 template <
typename Aut>
108 #endif // !VCSN_ALGOS_IS_DETERMINISTIC_HH
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::shared_ptr< detail::automaton_base > automaton
bool is_codeterministic(const automaton &aut)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
size_t num_codeterministic_states(const Aut &aut)
Number of non-deterministic states of transpositive automaton.
bool is_codeterministic(const Aut &aut)
Whether the transpositive automaton is deterministic.
typename detail::label_t_of_impl< base_t< ValueSet >>::type label_t_of
size_t num_deterministic_states(const Aut &aut)
Number of non-deterministic states.
Aut transpose(const transpose_automaton< Aut > &aut)
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
bool is_deterministic(const automaton &aut)
Bridge.