1 #ifndef VCSN_ALGOS_IS_VALID_HH
2 # define VCSN_ALGOS_IS_VALID_HH
5 # include <type_traits>
29 template <
typename Aut>
30 typename Aut::element_type::automaton_nocv_t
35 const auto& ws = *aut->weightset();
36 for (
auto t: res->transitions())
37 res->set_weight(t, ws.abs(res->weight_of(t)));
43 template <
typename Aut>
50 template <typename Aut, bool has_one = context_t_of<Aut>::has_one()>
77 return is_valid_<weightset_t::star_status()>(aut);
81 template <star_status_t Status>
92 template <star_status_t Status>
103 template <star_status_t Status>
112 template <star_status_t Status>
122 template <
typename Aut>
136 template <
typename Aut>
148 template <
typename Aut>
151 const auto& a = aut->as<Aut>();
161 #endif // !VCSN_ALGOS_IS_VALID_HH
automaton strip(const automaton &aut)
Bridge.
REGISTER_DECLARE(accessible,(const automaton &) -> automaton)
std::shared_ptr< detail::automaton_base > automaton
bool is_properable(Aut &&aut)
Whether proper_here(aut) succeeds.
static std::enable_if< Status==star_status_t::TOPS, bool >::type is_valid_(const automaton_t &aut)
typename std::remove_cv< Aut >::type automaton_t
static std::enable_if< Status==star_status_t::NON_STARRABLE, bool >::type is_valid_(const automaton_t &aut)
bool is_valid(const Aut &aut)
typename std::remove_cv< Aut >::type automaton_t
bool in_situ_remover(Aut &aut, bool prune=true)
Blindly eliminate epsilon transitions without checking for the validity of the automaton.
static std::enable_if< Status==star_status_t::ABSVAL, bool >::type is_valid_(const automaton_t &aut)
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
AutOut copy(const AutIn &input, Pred keep_state)
A copy of input keeping only its states that are accepted by keep_state.
static bool is_valid(const automaton_t &aut)
Whether an automaton is valid.
bool is_valid(const automaton &aut)
Bridge.
static constexpr bool is_valid(const automaton_t &)
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
ATTRIBUTE_CONST bool is_eps_acyclic(const Aut &aut)
Aut::element_type::automaton_nocv_t absval(const Aut &aut)
Copy of aut, with absolute values.
weightset_t_of< automaton_t > weightset_t
static std::enable_if< Status==star_status_t::STARRABLE, bool >::type is_valid_(const automaton_t &)