1 #ifndef VCSN_ALGOS_IS_COMPLETE_HH
2 # define VCSN_ALGOS_IS_COMPLETE_HH
14 template <
typename Aut>
18 "is_complete: requires free labelset");
20 if (aut->num_initials() == 0)
23 using label_set_t = std::set<typename labelset_t_of<Aut>::letter_t>;
25 const auto& letters = aut->labelset()->genset();
26 for (
auto state : aut->states())
28 label_set_t missing_letters = {std::begin(letters), std::end(letters)};
30 for (
auto tr : aut->all_out(state))
31 missing_letters.erase(aut->label_of(tr));
33 if (!missing_letters.empty())
61 #endif // !VCSN_ALGOS_IS_COMPLETE_HH
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::shared_ptr< detail::automaton_base > automaton
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
bool is_complete(const Aut &aut)
Whether aut is complete.
bool is_complete(const automaton &aut)
Bridge.