17 #ifndef AWALI_ALGOS_COMPLEMENT_HH
18 # define AWALI_ALGOS_COMPLEMENT_HH
28 namespace awali {
namespace sttc {
43 template <
typename Aut>
48 "requires free labelset");
50 "requires Boolean weights");
55 "complement: requires a deterministic automaton");
57 "complement: requires a complete automaton");
60 for (
auto s: aut->states())
61 if (!aut->is_final(s))
77 template <
typename Aut>
80 -> decltype(
copy(aut))
82 auto res =
copy(aut, keep_history);
The Boolean semring.
Definition: b.hh:38
static constexpr TOP< void > value
Definition: priority.hh:93
auto complement(const Aut &aut, bool keep_history=true) -> decltype(copy(aut))
Complementation of a deterministic complete automaton.
Definition: complement.hh:79
Aut complement_here(Aut &aut)
Complementation of a deterministic complete automaton.
Definition: complement.hh:45
bool is_deterministic(const Aut &aut)
tests whether the automaton is deterministic
Definition: determinize.hh:210
bool is_complete(const Aut &aut)
Whether aut is complete.
Definition: is_complete.hh:28
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
AutOut copy(const AutIn &input, Pred keep_state, bool keep_history=true, bool transpose=false)
A copy of input keeping only its states that are accepted by keep_state.
Definition: copy.hh:189
void require(bool b, Args &&... args)
If b is not verified, raise an error with args as message.
Definition: raise.hh:55
typename internal::weightset_t_of_impl< internal::base_t< ValueSet > >::type weightset_t_of
Helper to retrieve the type of the weightset of a value set.
Definition: traits.hh:86
Main namespace of Awali.
Definition: ato.hh:22