5 #include <vcsn/dyn/fwd.hh>
15 template <Automaton Aut>
22 && !aut->is_initial(s))
27 template <Automaton Aut>
42 template <Automaton Aut>
46 const auto& a = aut->
as<Aut>();
58 template <Automaton Aut>
67 template <Automaton Aut>
82 template <Automaton Aut>
86 const auto& a = aut->
as<Aut>();
97 template <Automaton Aut>
104 template <Automaton Aut>
119 template <Automaton Aut>
123 const auto& a = aut->
as<Aut>();
135 template <Automaton Aut>
139 const auto one = aut->labelset()->one();
141 auto ts = std::vector<transition_t_of<Aut>>{};
142 for (
auto s : aut->states())
145 for (
auto t :
out(aut, s))
146 if (!aut->labelset()->is_one(aut->label_of(t)))
149 aut->add_transition(s, aut->dst_of(t), one, aut->weight_of(t));
156 template <Automaton Aut>
172 template <Automaton Aut>
176 const auto& a = aut->
as<Aut>();
auto factor(const Aut &aut) -> decltype(::vcsn::copy(aut))
Aut transpose(const transpose_automaton< Aut > &aut)
automaton factor(const automaton &aut)
Bridge.
automaton subword(const automaton &aut)
Bridge.
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
auto make_nullable_automaton(const Context &ctx)
Aut & subword_here(Aut &aut)
Add spontaneous transitions for each non spontaneous transition, with same source, destination and weight.
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 ...
Aut & factor_here(Aut &aut)
Make each useful state both initial and final.
void copy_into(const AutIn &in, AutOut &out, KeepState keep_state, KeepTrans keep_trans)
Copy selected states and transitions of an automaton.
auto suffix(const Aut &aut) -> decltype(::vcsn::copy(aut))
auto prefix(const Aut &aut) -> decltype(::vcsn::copy(aut))
automaton prefix(const automaton &aut)
Bridge.
Aut & suffix_here(Aut &aut)
Make all accessible states initial.
auto & as()
Extract wrapped typed automaton.
auto subword(const Aut &aut) -> decltype(make_nullable_automaton(aut->context()))
Apply subword_here() to a copy of aut.
states_t< Aut > accessible_states(const Aut &aut, bool strict=true)
The set of accessible states, including pre(), and possibly post().
Aut & prefix_here(Aut &aut)
Make all coaccessible states final.
automaton suffix(const automaton &aut)
Bridge.