Awali
Another Weighted Automata library
Public Types | Public Member Functions | Data Fields
awali::sttc::internal::tikzer< Aut > Class Template Reference

Format automaton to TikZ format. More...

#include <tikz.hh>

Inheritance diagram for awali::sttc::internal::tikzer< Aut >:
awali::sttc::internal::outputter< Aut >

Public Types

using automaton_t = Aut
 
using super_type = outputter< Aut >
 
using weight_t = weight_t_of< automaton_t >
 

Public Member Functions

void format (const std::string &kind, const weight_t &w)
 Format a TikZ attribute. More...
 
std::string format_entry_ (state_t src, state_t dst, const std::string &fmt="text")
 The labels and weights of transitions from src to dst. More...
 
void operator() ()
 
- Public Member Functions inherited from awali::sttc::internal::outputter< Aut >
 outputter (const automaton_t &aut, std::ostream &out)
 
virtual ~outputter ()=default
 

Data Fields

const automaton_taut_
 The automaton we have to output. More...
 
std::ostream & os_
 Output stream. More...
 
const weightset_tws_
 Short-hand to the weightset. More...
 

Additional Inherited Members

- Protected Types inherited from awali::sttc::internal::outputter< Aut >
using automaton_t = Aut
 
using context_t = context_t_of< automaton_t >
 
using label_t = label_t_of< automaton_t >
 
using states_t = std::vector< state_t >
 A list of states. More...
 
using weight_t = weight_t_of< automaton_t >
 
using weightset_t = weightset_t_of< automaton_t >
 
- Protected Member Functions inherited from awali::sttc::internal::outputter< Aut >
states_t finals_ ()
 The list of final states, sorted. More...
 
std::string format_entry_ (state_t src, state_t dst, const std::string &fmt="text")
 The labels and weights of transitions from src to dst. More...
 
states_t initials_ ()
 The list of initial states, sorted. More...
 
virtual std::string label_ (const label_t &l)
 Convert a label to its representation. More...
 
void list_states_ (const states_t &ss)
 List names of states in ss, preceded by ' '. More...
 
void output_state_ (const state_t s)
 Output transitions, sorted lexicographically on (Label, Dest). More...
 
virtual void output_transition_ (transition_t t)
 Output the transition t. More...
 
void output_transitions_ ()
 Output transitions, sorted lexicographically. More...
 
- Protected Attributes inherited from awali::sttc::internal::outputter< Aut >
const automaton_taut_
 The automaton we have to output. More...
 
const labelset_t_of< automaton_t > & ls_ = *aut_->labelset()
 Short-hand to the labelset. More...
 
std::ostream & os_
 Output stream. More...
 
const polynomialset< context_t_of< automaton_t > > ps_ {aut_->context()}
 Short-hand to the polynomialset used to print the entries. More...
 
const weightset_tws_ = *aut_->weightset()
 Short-hand to the weightset. More...
 

Detailed Description

template<typename Aut>
class awali::sttc::internal::tikzer< Aut >

Format automaton to TikZ format.

Template Parameters
Autan automaton type, not a pointer type.

Member Typedef Documentation

◆ automaton_t

template<typename Aut >
using awali::sttc::internal::outputter< Aut >::automaton_t = Aut

◆ super_type

template<typename Aut >
using awali::sttc::internal::tikzer< Aut >::super_type = outputter<Aut>

◆ weight_t

template<typename Aut >
using awali::sttc::internal::outputter< Aut >::weight_t = weight_t_of<automaton_t>

Member Function Documentation

◆ format()

template<typename Aut >
void awali::sttc::internal::tikzer< Aut >::format ( const std::string &  kind,
const weight_t w 
)

Format a TikZ attribute.

Parameters
kindthe attribute name (e.g., "initial").
wthe associated weight (e.g., initial weight).

◆ format_entry_()

template<typename Aut >
std::string awali::sttc::internal::outputter< Aut >::format_entry_

The labels and weights of transitions from src to dst.

The main advantage of using polynomials instead of directly iterating over aut_->outin(src, dst) is to get a result which is sorted (hence more deterministic).

◆ operator()()

template<typename Aut >
void awali::sttc::internal::tikzer< Aut >::operator() ( )

Field Documentation

◆ aut_

template<typename Aut >
const automaton_t& awali::sttc::internal::outputter< Aut >::aut_

The automaton we have to output.

◆ os_

template<typename Aut >
std::ostream& awali::sttc::internal::outputter< Aut >::os_

Output stream.

◆ ws_

template<typename Aut >
const weightset_t& awali::sttc::internal::outputter< Aut >::ws_

Short-hand to the weightset.


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