27 template <Automaton Aut>
28 fresh_automaton_t_of<Aut>
33 const auto& ws = *aut->weightset();
35 res->set_weight(t, ws.abs(
res->weight_of(t)));
41 template <Automaton Aut>
50 catch (
const std::runtime_error&)
57 template <Automaton Aut, bool has_one = context_t_of<Aut>::has_one()>
84 return is_valid_<weightset_t::star_status()>(aut);
88 template <star_status_t Status>
90 std::enable_if_t<Status == star_status_t::TOPS, bool>
98 template <star_status_t Status>
100 std::enable_if_t<Status == star_status_t::ABSVAL, bool>
108 template <star_status_t Status>
110 std::enable_if_t<Status == star_status_t::STARRABLE, bool>
116 template <star_status_t Status>
118 std::enable_if_t<Status == star_status_t::NON_STARRABLE, bool>
125 template <Automaton Aut>
138 template <Automaton Aut>
149 template <Automaton Aut>
152 const auto& a = aut->
as<Aut>();
std::remove_cv_t< Aut > automaton_t
automaton strip(const automaton &aut)
Bridge.
static std::enable_if_t< Status==star_status_t::TOPS, bool > is_valid_(const automaton_t &aut)
auto transitions(const Aut &aut) -> decltype(all_transitions(aut, is_special_t< Aut >
All the transition indexes between visible states.
This class contains the core of the proper algorithm.
static std::enable_if_t< Status==star_status_t::ABSVAL, bool > is_valid_(const automaton_t &aut)
auto copy(const AutIn &input, KeepState keep_state, KeepTrans keep_trans) -> decltype(keep_state(input->null_state()), keep_trans(input->null_transition()), make_fresh_automaton< AutIn, AutOut >(input))
A copy of input keeping only its states that are accepted by keep_state, and transitions accepted by ...
static std::enable_if_t< Status==star_status_t::NON_STARRABLE, bool > is_valid_(const automaton_t &aut)
ATTRIBUTE_CONST std::enable_if_t< context_t_of< Aut >::has_one(), bool > is_eps_acyclic(const Aut &aut)
Detect epsilon-circuits.
static std::enable_if_t< Status==star_status_t::STARRABLE, bool > is_valid_(const automaton_t &)
std::remove_cv_t< Aut > automaton_t
weightset_t_of< automaton_t > weightset_t
bool is_valid(const Aut &aut)
static constexpr bool is_valid(const automaton_t &)
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
static bool is_valid(const automaton_t &aut)
Whether an automaton is valid.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
auto & as()
Extract wrapped typed automaton.
bool is_properable(Aut &&aut)
Whether proper_here(aut) succeeds.
fresh_automaton_t_of< Aut > absval(const Aut &aut)
Copy of aut, with absolute values.
bool is_valid(const automaton &aut)
Bridge.