7 #include <vcsn/dyn/fwd.hh>
21 template <Automaton Aut>
35 using super_t::super_t;
59 if (src ==
aut_->pre())
64 if (dst ==
aut_->post())
78 auto dsts = std::map<state_t, polynomial_t>{};
79 for (
auto src :
aut_->all_states())
80 if (!
aut_->is_lazy(src))
86 ps_.new_weight(dsts[
aut_->dst_of(t)],
87 aut_->label_of(t),
aut_->weight_of(t));
88 for (
const auto& p: dsts)
99 template <Automaton Aut>
101 daut(
const Aut& aut, std::ostream&
out = std::cout)
state_t_of< automaton_t > state_t
Print as a parsable type string.
transition_t_of< automaton_t > transition_t
An input/output format for valuesets.
std::ostream & os_
Output stream.
typename polynomialset_t::value_t polynomial_t
void print_transitions_(const state_t src, const state_t dst, const polynomial_t &entry)
Print the transitions between state src and state dst.
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
Factor common bits in automaton formatting.
const polynomialset_t ps_
Short-hand to the polynomialset used to print the entries.
automaton_t aut_
The automaton we have to output.
std::string to_string(direction d)
Conversion to string.
std::ostream & daut(const Aut &aut, std::ostream &out=std::cout)
Print an automaton in Daut format.
std::ostream & operator()()
Print the automaton on the stream.
void print_transitions_()
Print all the transitions, sorted by src state, then dst state.
Format an automaton into Daut.