Vcsn  2.4
Be Rational
vcsn::detail::fado_impl< Aut > Class Template Reference

Format an automaton into FAdo. More...

#include <grail.hh>

Inheritance diagram for vcsn::detail::fado_impl< Aut >:
Collaboration diagram for vcsn::detail::fado_impl< Aut >:

Public Member Functions

void operator() ()
 Actually output aut_ on os_. 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 transition_t = transition_t_of< automaton_t >
 

Private Member Functions

template<typename LS >
void print_label_ (const LS &ls, const typename LS::value_t &l) const
 
template<typename Label >
void print_label_ (const Label &l, std::false_type) const
 Acceptor. More...
 
template<typename Label >
void print_label_ (const Label &l, std::true_type) const
 Two-tape automaton. More...
 
void print_transition_ (const transition_t t) const override
 Output the transition t. More...
 
template<Automaton A>
std::enable_if_t< labelset_t_of< A >::is_free(), bool > is_deterministic_ (const A &a)
 
template<Automaton A>
std::enable_if_t<!labelset_t_of< A >::is_free(), bool > is_deterministic_ (const A &)
 

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...
 
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_tws_ = *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_ = {}
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::fado_impl< Aut >

Format an automaton into FAdo.

Template Parameters
Autan automaton type.

Definition at line 21 of file grail.hh.

Member Typedef Documentation

template<Automaton Aut>
using vcsn::detail::fado_impl< Aut >::super_t = printer<Aut>
private

Definition at line 29 of file grail.hh.

template<Automaton Aut>
using vcsn::detail::printer< Aut >::transition_t = transition_t_of<automaton_t>
private

Definition at line 55 of file printer.hh.

Member Function Documentation

template<Automaton Aut>
template<Automaton A>
std::enable_if_t<labelset_t_of<A>::is_free(), bool> vcsn::detail::fado_impl< Aut >::is_deterministic_ ( const A &  a)
inlineprivate

Definition at line 96 of file grail.hh.

References vcsn::is_deterministic().

Referenced by vcsn::detail::fado_impl< Aut >::operator()().

Here is the call graph for this function:

template<Automaton Aut>
template<Automaton A>
std::enable_if_t<!labelset_t_of<A>::is_free(), bool> vcsn::detail::fado_impl< Aut >::is_deterministic_ ( const A &  )
inlineprivate

Definition at line 103 of file grail.hh.

template<Automaton Aut>
void vcsn::detail::fado_impl< Aut >::operator() ( )
inline

Actually output aut_ on os_.

Definition at line 46 of file grail.hh.

References vcsn::detail::printer< Aut >::aut_, vcsn::detail::printer< Aut >::finals_(), vcsn::detail::printer< Aut >::initials_(), vcsn::detail::fado_impl< Aut >::is_deterministic_(), vcsn::detail::printer< Aut >::is_transducer_, vcsn::detail::printer< Aut >::list_states_(), vcsn::detail::printer< Aut >::os_, and vcsn::detail::printer< Aut >::print_transitions_().

Here is the call graph for this function:

template<Automaton Aut>
template<typename LS >
void vcsn::detail::fado_impl< Aut >::print_label_ ( const LS &  ls,
const typename LS::value_t &  l 
) const
inlineprivate
template<Automaton Aut>
template<typename Label >
void vcsn::detail::fado_impl< Aut >::print_label_ ( const Label &  l,
std::false_type   
) const
inlineprivate

Acceptor.

Definition at line 71 of file grail.hh.

References vcsn::detail::printer< Aut >::ls_, and vcsn::detail::fado_impl< Aut >::print_label_().

Here is the call graph for this function:

template<Automaton Aut>
template<typename Label >
void vcsn::detail::fado_impl< Aut >::print_label_ ( const Label &  l,
std::true_type   
) const
inlineprivate

Two-tape automaton.

Definition at line 78 of file grail.hh.

References vcsn::detail::printer< Aut >::ls_, vcsn::detail::printer< Aut >::os_, and vcsn::detail::fado_impl< Aut >::print_label_().

Here is the call graph for this function:

template<Automaton Aut>
void vcsn::detail::fado_impl< Aut >::print_transition_ ( const transition_t  t) const
inlineoverrideprivatevirtual

Output the transition t.

Do not insert eol. "Src Label Dst".

Reimplemented from vcsn::detail::printer< Aut >.

Definition at line 85 of file grail.hh.

References vcsn::detail::printer< Aut >::aut_, vcsn::detail::printer< Aut >::is_transducer_, vcsn::detail::printer< Aut >::os_, and vcsn::detail::fado_impl< Aut >::print_label_().

Here is the call graph for this function:


The documentation for this class was generated from the following file: