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>
139 template <Automaton Aut>
151 template <Automaton Aut>
154 const auto& a = aut->as<Aut>();
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
This class contains the core of the proper algorithm.
fresh_automaton_t_of< Aut > absval(const Aut &aut)
Copy of aut, with absolute values.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
static std::enable_if_t< Status==star_status_t::STARRABLE, bool > is_valid_(const automaton_t &)
bool is_valid(const automaton &aut)
Bridge.
weightset_t_of< automaton_t > weightset_t
static constexpr bool is_valid(const automaton_t &)
automaton strip(const automaton &aut)
Bridge.
ATTRIBUTE_CONST bool is_eps_acyclic(const Aut &aut)
std::remove_cv_t< Aut > automaton_t
std::shared_ptr< detail::automaton_base > automaton
auto transitions(const Aut &aut) -> decltype(all_transitions(aut, is_special_t< Aut >
All the transition indexes between visible states.
bool is_properable(Aut &&aut)
Whether proper_here(aut) succeeds.
bool is_valid(const Aut &aut)
std::remove_cv_t< Aut > automaton_t
static std::enable_if_t< Status==star_status_t::NON_STARRABLE, bool > is_valid_(const automaton_t &aut)
static std::enable_if_t< Status==star_status_t::ABSVAL, bool > is_valid_(const automaton_t &aut)
static std::enable_if_t< Status==star_status_t::TOPS, bool > is_valid_(const automaton_t &aut)
static bool is_valid(const automaton_t &aut)
Whether an automaton is valid.
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 ...