1 #ifndef VCSN_ALGOS_ARE_EQUIVALENT_HH
2 # define VCSN_ALGOS_ARE_EQUIVALENT_HH
24 template <
typename Aut1,
typename Aut2>
27 ->
typename std::enable_if<(labelset_t_of<Aut1>::is_free()
30 && std::is_same<weightset_t_of<Aut2>,
b>::value),
39 template <
typename Aut1,
typename Aut2>
42 -> decltype((a2->weightset()->sub(a2->weightset()->zero(),
43 a2->weightset()->one()),
46 const auto& ws2 = *a2->weightset();
60 template <
typename Aut1,
typename Aut2>
64 const auto& a1 = aut1->as<Aut1>();
65 const auto& a2 = aut2->as<Aut2>();
80 template <
typename Lhs,
typename Rhs>
81 typename Lhs::element_type::automaton_nocv_t
98 template <
typename Lhs,
typename Rhs>
102 const auto& l = lhs->as<Lhs>();
103 const auto&
r = rhs->as<Rhs>();
117 template <
typename RatExpSet>
119 typename RatExpSet::value_t
121 const typename RatExpSet::value_t& lhs,
122 const typename RatExpSet::value_t& rhs)
124 return rs.conjunction(lhs, rs.complement(rhs));
132 template <
typename RatExpSetLhs,
typename RatExpSetRhs>
136 const auto& l = lhs->as<RatExpSetLhs>();
137 const auto&
r = rhs->as<RatExpSetLhs>();
139 ::vcsn::difference<RatExpSetLhs>(l.ratexpset(),
150 #endif // !VCSN_ALGOS_ARE_EQUIVALENT_HH
ratexp make_ratexp(const RatExpSet &rs, const typename RatExpSet::value_t &ratexp)
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
auto are_equivalent(const Aut1 &a1, const Aut2 &a2) -> typename std::enable_if<(labelset_t_of< Aut1 >::is_free()&&std::is_same< weightset_t_of< Aut1 >, b >::value &&labelset_t_of< Aut2 >::is_free()&&std::is_same< weightset_t_of< Aut2 >, b >::value), bool >::type
Check equivalence between Boolean automata on a free labelset.
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::shared_ptr< detail::automaton_base > automaton
auto product(const Auts &...as) -> product_automaton< decltype(meet_automata(as...)), Auts...>
Build the (accessible part of the) product.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
bool is_useless(const Aut &a)
auto reduce(const Aut &input) -> decltype(copy(input))
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
std::shared_ptr< detail::ratexp_base > ratexp
bool is_complete(const Aut &aut)
Whether aut is complete.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
auto complete(const Aut &aut) -> decltype(::vcsn::copy(aut))
auto complement(const Aut &aut) -> decltype(copy(aut))
bool is_empty(const Aut &a) ATTRIBUTE_PURE
auto determinize(const Aut &a) -> determinized_automaton< Aut >
auto union_a(const A &lhs, const B &rhs) -> decltype(join_automata(lhs, rhs))
Union of two automata.
Provide a variadic mul on top of a binary mul(), and one().
auto strip(const Aut &aut) -> decltype(detail::strip(aut, 0))
Remove (all) the decorations from a decorated automaton.
Lhs::element_type::automaton_nocv_t difference(const Lhs &lhs, const Rhs &rhs)
An automaton that computes weights of lhs, but not by rhs.
automaton difference(const automaton &lhs, const automaton &rhs)
Bridge.
bool are_equivalent(const automaton &aut1, const automaton &aut2)
Bridge.
AutOut left_mult(const weight_t_of< AutOut > &w, const AutIn &aut)
ratexp difference_ratexp(const ratexp &lhs, const ratexp &rhs)
Bridge.