Awali
Another Weighted Automata library
Public Types | Public Member Functions | Data Fields | Static Public Attributes
awali::sttc::tuple_history< Auts > Class Template Reference

An automaton whose states are tuples of states of automata. More...

#include <tuple_history.hh>

Inheritance diagram for awali::sttc::tuple_history< Auts >:
awali::sttc::history_base

Public Types

using automata_t = Auts
 The type of origin automata. More...
 
using indices_t = awali::internal::make_index_sequence< std::tuple_size< Auts >::value >
 The list of automaton indices as a static list. More...
 
template<size_t I>
using input_automaton_t = internal::base_t< typename std::tuple_element< I, automata_t >::type >
 The type of the Ith origin automaton, unqualified. More...
 
using origins_t = std::map< state_t, tuple_t >
 A map from result state to tuple of original states. More...
 
template<std::size_t... I>
using seq = awali::internal::index_sequence< I... >
 A static list of integers. More...
 
using tuple_t = typename std::cst_tuple< state_t, std::tuple_size< Auts >::value >::type
 Tuple of states of input automata. More...
 

Public Member Functions

 tuple_history (const automata_t &auts)
 
void add_state (state_t s, const tuple_t &set)
 
history_kind_t get_nature () const override
 The type of the resulting automaton. More...
 
state_t get_state (state_t) override
 
std::vector< state_tget_state_set (state_t s) override
 
template<size_t... I>
std::vector< state_tget_state_set (state_t s, seq< I... >)
 
bool has_history (state_t s) const override
 
const origins_torigins () const
 
std::ostream & print_state_name (state_t s, std::ostream &o, const std::string &fmt) const override
 
template<size_t... I>
std::ostream & print_state_name_ (state_t s, std::ostream &o, const std::string &fmt, seq< I... >) const
 
bool remove_history (state_t s) override
 
- Public Member Functions inherited from awali::sttc::history_base
virtual ~history_base ()
 
template<typename H >
H & as ()
 
template<typename H >
H & as () const
 
virtual bool has_history () const
 

Data Fields

automata_t auts_
 Origin automata, supplied at construction time. More...
 
origins_t origins_
 

Static Public Attributes

static constexpr indices_t indices {}
 

Detailed Description

template<typename Auts>
class awali::sttc::tuple_history< Auts >

An automaton whose states are tuples of states of automata.

Corresponds to the Cartesian product of states.

Template Parameters
Autthe automaton type
Autsthe origin automaton types

Member Typedef Documentation

◆ automata_t

template<typename Auts >
using awali::sttc::tuple_history< Auts >::automata_t = Auts

The type of origin automata.

◆ indices_t

template<typename Auts >
using awali::sttc::tuple_history< Auts >::indices_t = awali::internal::make_index_sequence<std::tuple_size<Auts>::value>

The list of automaton indices as a static list.

◆ input_automaton_t

template<typename Auts >
template<size_t I>
using awali::sttc::tuple_history< Auts >::input_automaton_t = internal::base_t<typename std::tuple_element<I, automata_t>::type>

The type of the Ith origin automaton, unqualified.

◆ origins_t

template<typename Auts >
using awali::sttc::tuple_history< Auts >::origins_t = std::map<state_t, tuple_t>

A map from result state to tuple of original states.

◆ seq

template<typename Auts >
template<std::size_t... I>
using awali::sttc::tuple_history< Auts >::seq = awali::internal::index_sequence<I...>

A static list of integers.

◆ tuple_t

template<typename Auts >
using awali::sttc::tuple_history< Auts >::tuple_t = typename std::cst_tuple<state_t, std::tuple_size<Auts>::value>::type

Tuple of states of input automata.

Constructor & Destructor Documentation

◆ tuple_history()

template<typename Auts >
awali::sttc::tuple_history< Auts >::tuple_history ( const automata_t auts)

Member Function Documentation

◆ add_state()

template<typename Auts >
void awali::sttc::tuple_history< Auts >::add_state ( state_t  s,
const tuple_t set 
)

◆ get_nature()

template<typename Auts >
history_kind_t awali::sttc::tuple_history< Auts >::get_nature ( ) const
overridevirtual

The type of the resulting automaton.

Implements awali::sttc::history_base.

◆ get_state()

template<typename Auts >
state_t awali::sttc::tuple_history< Auts >::get_state ( state_t  )
overridevirtual

◆ get_state_set() [1/2]

template<typename Auts >
std::vector<state_t> awali::sttc::tuple_history< Auts >::get_state_set ( state_t  s)
overridevirtual

◆ get_state_set() [2/2]

template<typename Auts >
template<size_t... I>
std::vector<state_t> awali::sttc::tuple_history< Auts >::get_state_set ( state_t  s,
seq< I... >   
)

◆ has_history()

template<typename Auts >
bool awali::sttc::tuple_history< Auts >::has_history ( state_t  s) const
overridevirtual

◆ origins()

template<typename Auts >
const origins_t& awali::sttc::tuple_history< Auts >::origins ( ) const

◆ print_state_name()

template<typename Auts >
std::ostream& awali::sttc::tuple_history< Auts >::print_state_name ( state_t  s,
std::ostream &  o,
const std::string &  fmt 
) const
overridevirtual

◆ print_state_name_()

template<typename Auts >
template<size_t... I>
std::ostream& awali::sttc::tuple_history< Auts >::print_state_name_ ( state_t  s,
std::ostream &  o,
const std::string &  fmt,
seq< I... >   
) const

◆ remove_history()

template<typename Auts >
bool awali::sttc::tuple_history< Auts >::remove_history ( state_t  s)
overridevirtual

Field Documentation

◆ auts_

template<typename Auts >
automata_t awali::sttc::tuple_history< Auts >::auts_

Origin automata, supplied at construction time.

◆ indices

template<typename Auts >
constexpr indices_t awali::sttc::tuple_history< Auts >::indices {}
staticconstexpr

◆ origins_

template<typename Auts >
origins_t awali::sttc::tuple_history< Auts >::origins_
mutable

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