|  | Vcsn
    2.4
    Be Rational | 
Format an automaton into Dot. More...
#include <dot.hh>
| Public Member Functions | |
| dot_impl (const automaton_t &aut, std::ostream &out, format fmt, bool mathjax) | |
| std::ostream & | operator() () | 
| Print the automaton on the stream.  More... | |
|  Public Member Functions inherited from vcsn::detail::printer< Aut > | |
| printer (const automaton_t &aut, std::ostream &out) | |
| Private Types | |
| using | super_t = printer< Aut > | 
| using | automaton_t = Aut | 
| using | state_t = state_t_of< automaton_t > | 
| using | polynomial_t = typename polynomialset_t::value_t | 
| using | transition_t = transition_t_of< automaton_t > | 
| using | weightset_t = weightset_t_of< automaton_t > | 
| using | weight_t = weight_t_of< automaton_t > | 
| Private Member Functions | |
| void | print_prologue_ () | 
| Start the dot graph.  More... | |
| void | print_epilogue_ () | 
| Finish the dot graph.  More... | |
| bool | print_ (const std::string &sep, const std::string &kind, const weight_t &w) | 
| Print a TikZ attribute.  More... | |
| void | print_state_ (state_t s) | 
| Pretty-print state s.  More... | |
| void | print_states_ () | 
| Print the states.  More... | |
| void | print_transitions_ (const state_t src, const state_t dst, const polynomial_t &entry) | 
| Print the transitions between state src and state dst.  More... | |
| void | print_transitions_ () | 
| Print all the transitions, sorted by src state, then dst state.  More... | |
| void | enable_ () | 
| Enable the escaping of backslashes.  More... | |
| void | disable_ () | 
| Disable the escaping of backslashes.  More... | |
| Private Attributes | |
| const char * | gray = "color = DimGray" | 
| detail::io::filtering_ostream | bos_ | 
| The output stream, with a backslashify filter.  More... | |
| format | format_ = {} | 
| Format for labels and weights.  More... | |
| bool | dot2tex_ = false | 
| Whether we need dot2tex formatting.  More... | |
| std::unordered_set< state_t_of< Aut > > | useful_ = useful_states(aut_, false) | 
| Useful states, without evaluating the lazy states.  More... | |
| Additional Inherited Members | |
|  Public Types inherited from vcsn::detail::printer< Aut > | |
| using | state_t = state_t_of< automaton_t > | 
|  Protected Types inherited from vcsn::detail::printer< Aut > | |
| using | automaton_t = Aut | 
| using | context_t = context_t_of< automaton_t > | 
| using | label_t = label_t_of< automaton_t > | 
| using | transition_t = transition_t_of< automaton_t > | 
| using | weightset_t = weightset_t_of< automaton_t > | 
| using | weight_t = weight_t_of< automaton_t > | 
| using | polynomialset_t = polynomialset< context_t > | 
| using | polynomial_t = typename polynomialset_t::value_t | 
| using | states_t = std::vector< state_t > | 
| A list of states.  More... | |
| using | is_transducer_t = std::integral_constant< bool, 2<=rank< labelset_t_of< automaton_t >>::value > | 
| Whether is a transducer (two-tape automaton) as opposed to an acceptor.  More... | |
|  Protected Member Functions inherited from vcsn::detail::printer< Aut > | |
| virtual std::string | label_ (const label_t &l) const | 
| Convert a label to its representation.  More... | |
| virtual void | print_transition_ (transition_t t) const | 
| Output the transition t.  More... | |
| void | print_state_ (const state_t s) | 
| Output transitions, sorted lexicographically on (Label, Dest).  More... | |
| void | print_transitions_ () | 
| Output transitions, sorted lexicographically.  More... | |
| void | list_states_ (const states_t &ss) | 
| List names of states in ss, preceded by ' '.  More... | |
| states_t | initials_ () | 
| The list of initial states, sorted.  More... | |
| states_t | finals_ () | 
| The list of final states, sorted.  More... | |
|  Protected Attributes inherited from vcsn::detail::printer< Aut > | |
| automaton_t | aut_ | 
| The automaton we have to output.  More... | |
| std::ostream & | os_ | 
| Output stream.  More... | |
| const labelset_t_of< automaton_t > & | ls_ = *aut_->labelset() | 
| Short-hand to the labelset.  More... | |
| const weightset_t & | ws_ = *aut_->weightset() | 
| Short-hand to the weightset.  More... | |
| const polynomialset_t | ps_ {aut_->context()} | 
| Short-hand to the polynomialset used to print the entries.  More... | |
| const is_transducer_t | is_transducer_ = {} | 
Format an automaton into Dot.
| Aut | an automaton type. | 
| 
 | private | 
Definition at line 40 of file printer.hh.
| 
 | private | 
Definition at line 59 of file printer.hh.
| 
 | private | 
Definition at line 50 of file printer.hh.
| 
 | private | 
| 
 | private | 
Definition at line 55 of file printer.hh.
| 
 | private | 
Definition at line 57 of file printer.hh.
| 
 | private | 
Definition at line 56 of file printer.hh.
| 
 | inline | 
Definition at line 53 of file dot.hh.
References vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::dot2tex_, and vcsn::format::latex.
| 
 | inlineprivate | 
Disable the escaping of backslashes.
Definition at line 370 of file dot.hh.
References vcsn::detail::dot_impl< Aut >::bos_.
Referenced by vcsn::detail::dot_impl< Aut >::print_prologue_(), vcsn::detail::dot_impl< Aut >::print_state_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | inlineprivate | 
Enable the escaping of backslashes.
Definition at line 363 of file dot.hh.
References vcsn::detail::dot_impl< Aut >::bos_.
Referenced by vcsn::detail::dot_impl< Aut >::print_prologue_(), vcsn::detail::dot_impl< Aut >::print_state_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | inline | 
Print the automaton on the stream.
Definition at line 73 of file dot.hh.
References vcsn::detail::printer< Aut >::os_, vcsn::detail::dot_impl< Aut >::print_epilogue_(), vcsn::detail::dot_impl< Aut >::print_prologue_(), vcsn::detail::dot_impl< Aut >::print_states_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | inlineprivate | 
Print a TikZ attribute.
| sep | the separator to print before (if we print something). | 
| kind | the attribute name (e.g., "initial"). | 
| w | the associated weight (e.g., initial weight). | 
Definition at line 127 of file dot.hh.
References vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::format_, and vcsn::detail::printer< Aut >::ws_.
Referenced by vcsn::detail::dot_impl< Aut >::print_state_().
| 
 | inlineprivate | 
Finish the dot graph.
Definition at line 117 of file dot.hh.
References vcsn::detail::dot_impl< Aut >::bos_.
Referenced by vcsn::detail::dot_impl< Aut >::operator()().
| 
 | inlineprivate | 
Start the dot graph.
Definition at line 84 of file dot.hh.
References vcsn::detail::printer< Aut >::aut_, vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::disable_(), vcsn::detail::dot_impl< Aut >::dot2tex_, vcsn::detail::dot_impl< Aut >::enable_(), and vcsn::format::sname.
Referenced by vcsn::detail::dot_impl< Aut >::operator()().
| 
 | inlineprivate | 
Pretty-print state s.
Definition at line 146 of file dot.hh.
References vcsn::detail::printer< Aut >::aut_, vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::disable_(), vcsn::detail::dot_impl< Aut >::dot2tex_, vcsn::detail::dot_impl< Aut >::enable_(), vcsn::detail::dot_impl< Aut >::format_, vcsn::detail::dot_impl< Aut >::gray, vcsn::has(), vcsn::format::latex, vcsn::detail::dot_impl< Aut >::print_(), vcsn::format::text, and vcsn::detail::dot_impl< Aut >::useful_.
Referenced by vcsn::detail::dot_impl< Aut >::print_states_().
| 
 | inlineprivate | 
Print the states.
Definition at line 240 of file dot.hh.
References vcsn::detail::printer< Aut >::aut_, vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::dot2tex_, vcsn::detail::final_transitions(), vcsn::detail::printer< Aut >::finals_(), vcsn::detail::initial_transitions(), vcsn::detail::printer< Aut >::initials_(), and vcsn::detail::dot_impl< Aut >::print_state_().
Referenced by vcsn::detail::dot_impl< Aut >::operator()().
| 
 | inlineprivate | 
Print the transitions between state src and state dst.
Definition at line 299 of file dot.hh.
References vcsn::detail::printer< Aut >::aut_, vcsn::detail::dot_impl< Aut >::bos_, vcsn::detail::dot_impl< Aut >::disable_(), vcsn::detail::dot_impl< Aut >::enable_(), vcsn::detail::dot_impl< Aut >::format_, vcsn::detail::dot_impl< Aut >::gray, vcsn::has(), vcsn::detail::printer< Aut >::ps_, vcsn::to_string(), and vcsn::detail::dot_impl< Aut >::useful_.
| 
 | inlineprivate | 
Print all the transitions, sorted by src state, then dst state.
Definition at line 342 of file dot.hh.
References vcsn::detail::all_out(), vcsn::detail::printer< Aut >::aut_, vcsn::detail::dot_impl< Aut >::dot2tex_, and vcsn::detail::printer< Aut >::ps_.
Referenced by vcsn::detail::dot_impl< Aut >::operator()().
| 
 | private | 
The output stream, with a backslashify filter.
Definition at line 377 of file dot.hh.
Referenced by vcsn::detail::dot_impl< Aut >::disable_(), vcsn::detail::dot_impl< Aut >::dot_impl(), vcsn::detail::dot_impl< Aut >::enable_(), vcsn::detail::dot_impl< Aut >::print_(), vcsn::detail::dot_impl< Aut >::print_epilogue_(), vcsn::detail::dot_impl< Aut >::print_prologue_(), vcsn::detail::dot_impl< Aut >::print_state_(), vcsn::detail::dot_impl< Aut >::print_states_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | private | 
Whether we need dot2tex formatting.
Definition at line 381 of file dot.hh.
Referenced by vcsn::detail::dot_impl< Aut >::dot_impl(), vcsn::detail::dot_impl< Aut >::print_prologue_(), vcsn::detail::dot_impl< Aut >::print_state_(), vcsn::detail::dot_impl< Aut >::print_states_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | private | 
Format for labels and weights.
Definition at line 379 of file dot.hh.
Referenced by vcsn::detail::dot_impl< Aut >::print_(), vcsn::detail::dot_impl< Aut >::print_state_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | private | 
Definition at line 50 of file dot.hh.
Referenced by vcsn::detail::dot_impl< Aut >::print_state_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().
| 
 | private | 
Useful states, without evaluating the lazy states.
Definition at line 383 of file dot.hh.
Referenced by vcsn::detail::dot_impl< Aut >::print_state_(), and vcsn::detail::dot_impl< Aut >::print_transitions_().