22 template <Automaton AutIn, Automaton AutOut>
41 using map_t = std::vector<out_state_t>;
51 auto in_ls =
in_aut_->labelset();
56 for (
auto st :
in_aut_->states())
59 for (
auto st :
in_aut_->all_states())
62 auto letters = in_ls->letters_of_padded(
in_aut_->label_of(tr),
64 auto it = letters.begin();
65 if (it != letters.end())
68 auto dst = std::next(it) != letters.end()
74 for (++it; it != letters.end(); ++it)
76 dst = std::next(it) == letters.end()
79 out_aut_->new_transition(src, dst, *it, out_ws->one());
100 template <Automaton Aut>
104 template <Automaton Aut>
105 std::enable_if_t<!is_letterized_t<labelset_t_of<Aut>>{},
112 return lt.letterize();
116 template <Automaton Aut>
117 std::enable_if_t<is_letterized_t<labelset_t_of<Aut>>{},
133 template <Automaton Aut>
146 template <Automaton Aut>
160 template <Automaton Aut>
161 std::enable_if_t<!is_letterized_t<labelset_t_of<Aut>>{},
bool>
164 auto ls = aut->labelset();
167 auto it = ls->letters_of_padded(aut->label_of(t),
171 if (it.begin() != it.end() && ++(it.begin()) != it.end())
177 template <Automaton Aut>
178 std::enable_if_t<is_letterized_t<labelset_t_of<Aut>>{},
bool>
189 template <Automaton Aut>
201 template <Automaton Aut>
218 template <Automaton Aut>
231 template <Automaton Aut>
247 template <Automaton Aut>
259 template <Automaton Aut>
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
std::vector< out_state_t > map_t
state_t_of< out_automaton_t > out_state_t
Container::value_type back(const Container &container)
The last member of this Container.
auto realtime(const Aut &aut) -> decltype(proper(::vcsn::letterize(aut)))
Split the word transitions in the input automaton into letter ones, and remove the spontaneous transi...
context_t_of< in_automaton_t > in_ctx_t
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
labelset_t_of< in_automaton_t > in_labelset_t
std::shared_ptr< detail::mutable_automaton_impl< Context >> mutable_automaton
auto letterize(const Aut &aut) -> decltype(detail::letterize(aut))
Split the word transitions in the input automaton into letter ones.
A traits to compute the letterized context.
From an automaton, the corresponding automaton with a non-word labelset.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
labelset_t_of< out_automaton_t > out_labelset_t
bool is_realtime(const automaton &aut)
Bridge.
bool is_realtime(const Aut &aut)
Check if the automaton is realtime, i.e.
typename out_labelset_t::value_t out_label_t
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
constant< type_t::one, Context > one
transition_t_of< in_automaton_t > in_transition_t
letterizer(const in_automaton_t &in_aut, const out_labelset_t &ls)
typename in_labelset_t::value_t in_label_t
context_t_of< out_automaton_t > out_ctx_t
transition_t_of< out_automaton_t > out_transition_t
state_t_of< in_automaton_t > in_state_t
std::shared_ptr< detail::automaton_base > automaton
typename detail::transition_t_of_impl< base_t< ValueSet >>::type transition_t_of
auto transitions(const Aut &aut) -> decltype(all_transitions(aut, is_special_t< Aut >
All the transition indexes between visible states.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
mutable_automaton< Context > make_mutable_automaton(const Context &ctx)
out_automaton_t letterize()
std::enable_if_t<!is_letterized_t< labelset_t_of< Aut > >{}, bool > is_letterized(const Aut &aut)
auto proper(const Aut &aut, direction dir=direction::backward, bool prune=true, const std::string &algo="auto") -> fresh_automaton_t_of< Aut, detail::proper_context< context_t_of< Aut >>>
Eliminate spontaneous transitions.
letterized_t< LabelSet > make_letterized(const LabelSet &ls)
std::enable_if_t<!is_letterized_t< labelset_t_of< Aut > >{}, mutable_automaton< letterized_context< context_t_of< Aut > > > > letterize(const Aut &aut)
Letterize an automaton whose type is not letterized already.
bool is_letterized(const automaton &aut)
Bridge.