17 #ifndef AWALI_ALGOS_IS_DETERMINISTIC_HXX
18 # define AWALI_ALGOS_IS_DETERMINISTIC_HXX
21 # include <unordered_set>
30 template <
typename Aut>
34 using automaton_t = Aut;
36 "requires free labelset");
38 std::unordered_set<label_t> seen;
39 for (
auto t : aut->out(s))
40 if (!seen.insert(aut->label_of(t)).second)
46 template <
typename Aut>
50 using automaton_t = Aut;
52 "requires free labelset");
54 std::unordered_set<label_t> seen;
55 for (
auto t : aut->out(s)) {
56 if (!aut->weightset()->is_one(aut->weight_of(t)))
58 if (!seen.insert(aut->label_of(t)).second)
70 "requires free labelset");
73 for (
auto s: aut->states())
any_t label_t
Type for (transition) labels; it is an alias to any_t since its precise type depends on the weightset...
Definition: typedefs.hh:48
bool is_deterministic(const Aut &aut, state_t s)
Whether state s is deterministic in aut.
Definition: is_deterministic.hxx:48
bool is_sequential(const Aut &aut, state_t s)
Whether state s is sequential in aut.
Definition: is_deterministic.hxx:32
size_t num_deterministic_states(const Aut &aut)
Number of non-deterministic states.
Definition: is_deterministic.hxx:67
typename internal::label_t_of_impl< internal::base_t< ValueSet > >::type label_t_of
Helper to retrieve the type of the labels of a value set.
Definition: traits.hh:71
typename internal::labelset_t_of_impl< internal::base_t< ValueSet > >::type labelset_t_of
Helper to retrieve the type of the labelset of a value set.
Definition: traits.hh:76
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21