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 make_nullable_automaton(const Context &ctx)
auto subword(const Aut &aut) -> decltype(make_nullable_automaton(aut->context()))
Apply subword_here() to a copy of aut.
auto prefix(const Aut &aut) -> decltype(::vcsn::copy(aut))
void copy_into(const AutIn &in, AutOut &out, KeepState keep_state, KeepTrans keep_trans)
Copy selected states and transitions of an automaton.
automaton suffix(const automaton &aut)
Bridge.
Aut & factor_here(Aut &aut)
Make each useful state both initial and final.
auto factor(const Aut &aut) -> decltype(::vcsn::copy(aut))
automaton prefix(const automaton &aut)
Bridge.
automaton factor(const automaton &aut)
Bridge.
auto suffix(const Aut &aut) -> decltype(::vcsn::copy(aut))
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
Aut & subword_here(Aut &aut)
Add spontaneous transitions for each non spontaneous transition, with same source, destination and weight.
automaton subword(const automaton &aut)
Bridge.
Aut & prefix_here(Aut &aut)
Make all coaccessible states final.
states_t< Aut > accessible_states(const Aut &aut, bool strict=true)
The set of accessible states, including pre(), and possibly post().
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 ...
auto & as()
Extract wrapped typed automaton.
Aut & suffix_here(Aut &aut)
Make all accessible states initial.
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.