Awali
Another Weighted Automata library
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
awali::sttc::internal::mutable_automaton_impl< Context > Class Template Reference

#include <mutable_automaton.hh>

Data Structures

struct  stored_state_t
 Data stored for each state. More...
 

Public Types

using automaton_nocv_t = mutable_automaton< context_t >
 The (shared pointer) type to use it we have to create an automaton of the same (underlying) type. More...
 
using context_t = Context
 
using free_store_t = std::vector< state_t >
 A list of unused indexes in the states/transitions tables. More...
 
using history_t = std::shared_ptr< history_base >
 History. More...
 
using kind_t = typename context_t::kind_t
 
using label_t = typename labelset_t::value_t
 Transition label. More...
 
using labelset_ptr = typename context_t::labelset_ptr
 
using labelset_t = labelset_t_of< context_t >
 
using names_t = std::shared_ptr< string_history >
 
using st_store_t = std::vector< stored_state_t >
 All the automaton's states. More...
 
using states_output_t = indice_filter< st_store_t >
 
using stored_transition_t = transition_tuple< state_t, label_t, weight_t >
 Data stored per transition. More...
 
using tr_cont_t = std::vector< transition_t >
 All the incoming/outgoing transition handles of a state. More...
 
using tr_store_t = std::vector< stored_transition_t >
 All the automaton's transitions. More...
 
using transitions_output_t = indice_filter< tr_store_t >
 
using transitions_s_output_t = cont_filter< tr_cont_t >
 
using weight_t = typename weightset_t::value_t
 Transition weight. More...
 
using weightset_ptr = typename context_t::weightset_ptr
 
using weightset_t = weightset_t_of< context_t >
 

Public Member Functions

 mutable_automaton_impl ()=delete
 
 mutable_automaton_impl (const context_t &ctx)
 
 mutable_automaton_impl (const mutable_automaton_impl &)=delete
 
 mutable_automaton_impl (mutable_automaton_impl &&that)
 
weight_t add_final (state_t s, weight_t w)
 
weight_t add_initial (state_t s, weight_t w)
 
state_t add_state ()
 
weight_t add_transition (state_t src, state_t dst, label_t l)
 Same as above, with weight one. More...
 
weight_t add_transition (state_t src, state_t dst, label_t l, weight_t w)
 Add a transition between two states. More...
 
template<typename A >
weight_t add_transition_copy (state_t src, state_t dst, const A &aut, transition_t t, bool transpose=false)
 Add a transition between two states, copying the label from the given transition. More...
 
weight_t add_weight (transition_t t, weight_t w)
 
const tr_cont_tall_in (state_t s) const
 Indexes of all transitions arriving to state s. More...
 
const tr_cont_tall_out (state_t s) const
 Indexes of all transitions leaving state s. More...
 
tr_cont_tall_out_ (state_t s)
 
states_output_t all_states () const
 All states including pre()/post(). More...
 
transitions_output_t all_transitions () const
 All the transition indexes between all states (including pre and post). More...
 
const context_tcontext () const
 
void del_state (state_t s)
 
void del_transition (state_t s, state_t d)
 Remove all the transitions between s and d. More...
 
transition_t del_transition (state_t src, state_t dst, label_t l)
 Remove the transition (src, l, dst). More...
 
void del_transition (transition_t t)
 
state_t dst_of (transition_t t) const
 
transitions_s_output_t final_transitions () const
 Indexes of transitions from visible final states. More...
 
const std::string & get_desc () const
 
ATTRIBUTE_PURE weight_t get_final_weight (state_t s) const
 
ATTRIBUTE_PURE weight_t get_initial_weight (state_t s) const
 
const std::string & get_name () const
 
state_t get_state_by_name (const std::string &name) const
 
std::string get_state_name (state_t s) const
 
transition_t get_transition (state_t src, state_t dst, label_t l) const
 
bool has_explicit_name (state_t s) const
 
bool has_history (state_t s) const
 
bool has_name (state_t s) const
 
bool has_state (state_t s) const
 
bool has_transition (state_t src, state_t dst, label_t l) const
 
bool has_transition (transition_t t) const
 
history_t history () const
 
transitions_s_output_t in (state_t s) const
 Indexes of visible transitions arriving to state s. More...
 
transitions_s_output_t in (state_t s, const label_t &l) const
 Indexes of visible transitions arriving to state s on label l. More...
 
transitions_s_output_t initial_transitions () const
 Indexes of transitions to visible initial states. More...
 
bool is_final (state_t s) const
 
bool is_initial (state_t s) const
 
label_t label_of (transition_t t) const
 
const labelset_ptrlabelset () const
 
weight_t lmul_weight (transition_t t, weight_t w)
 
state_t max_state () const
 
transition_t new_transition (state_t src, state_t dst, label_t l)
 Same as above, with weight one. More...
 
transition_t new_transition (state_t src, state_t dst, label_t l, weight_t w)
 Create a transition between two states. More...
 
template<typename A >
transition_t new_transition_copy (state_t src, state_t dst, const A &aut, transition_t t, bool transpose=false)
 Copy the label of a transition between two states, creating a new transition. More...
 
size_t num_all_states () const
 
size_t num_finals () const
 
size_t num_initials () const
 
size_t num_states () const
 
size_t num_transitions () const
 
mutable_automaton_imploperator= (mutable_automaton_impl &&that)
 
transitions_s_output_t out (state_t s) const
 Indexes of visible transitions leaving state s. More...
 
transitions_s_output_t out (state_t s, const label_t &l) const
 Indexes of all transitions leaving state s on label l. More...
 
transitions_s_output_t outin (state_t s, state_t d) const
 Indexes of visible transitions from state s to state d. More...
 
label_t prepost_label () const
 
std::ostream & print_state (state_t s, std::ostream &o) const
 
std::ostream & print_state_history (state_t s, std::ostream &o, const std::string &fmt="text") const
 
std::ostream & print_state_name (state_t s, std::ostream &o, const std::string &="text") const
 
weight_t rmul_weight (transition_t t, weight_t w)
 
void set_desc (const std::string &d)
 
void set_final (state_t s)
 
void set_final (state_t s, weight_t w)
 
void set_history (history_t h)
 
void set_initial (state_t s)
 
void set_initial (state_t s, weight_t w)
 
bool set_name (const std::string &n)
 
void set_state_name (state_t s, const std::string &n)
 
void set_state_names_from_history ()
 
transition_t set_transition (state_t src, state_t dst, label_t l)
 Same as above, with unit weight. More...
 
transition_t set_transition (state_t src, state_t dst, label_t l, weight_t w)
 Set a transition between two states. More...
 
template<typename A >
transition_t set_transition_copy (state_t src, state_t dst, const A &aut, transition_t t, bool transpose=false)
 
weight_t set_weight (transition_t t, weight_t w)
 
state_t src_of (transition_t t) const
 
states_output_t states () const
 All states excluding pre()/post(). More...
 
void strip_history ()
 
void strip_names ()
 
transitions_output_t transitions () const
 All the transition indexes between visible states. More...
 
void unset_final (state_t s)
 
void unset_initial (state_t s)
 
std::string vname (bool full=true) const
 
weight_t weight_of (transition_t t) const
 
const weightset_ptrweightset () const
 

Static Public Member Functions

static constexpr state_t null_state ()
 
static constexpr transition_t null_transition ()
 
static constexpr state_t post ()
 
static constexpr state_t pre ()
 
static std::string sname ()
 

Data Fields

context_t ctx_
 The algebraic type of this automaton. More...
 

Protected Member Functions

void del_transition_container (tr_cont_t &tc, bool from_succ)
 
void del_transition_from_dst (transition_t t)
 Remove t from the ingoing transition of the destination state. More...
 
void del_transition_from_src (transition_t t)
 Remove t from the outgoing transitions of the source state. More...
 

Data Structure Documentation

◆ awali::sttc::internal::mutable_automaton_impl::stored_state_t

struct awali::sttc::internal::mutable_automaton_impl::stored_state_t

template<typename Context>
struct awali::sttc::internal::mutable_automaton_impl< Context >::stored_state_t

Data stored for each state.

Data Fields
tr_cont_t pred
tr_cont_t succ

Member Typedef Documentation

◆ automaton_nocv_t

The (shared pointer) type to use it we have to create an automaton of the same (underlying) type.

◆ context_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::context_t = Context

◆ free_store_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::free_store_t = std::vector<state_t>

A list of unused indexes in the states/transitions tables.

◆ history_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::history_t = std::shared_ptr<history_base>

History.

◆ kind_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::kind_t = typename context_t::kind_t

◆ label_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::label_t = typename labelset_t::value_t

Transition label.

◆ labelset_ptr

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::labelset_ptr = typename context_t::labelset_ptr

◆ labelset_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::labelset_t = labelset_t_of<context_t>

◆ names_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::names_t = std::shared_ptr<string_history>

◆ st_store_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::st_store_t = std::vector<stored_state_t>

All the automaton's states.

◆ states_output_t

◆ stored_transition_t

Data stored per transition.

◆ tr_cont_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::tr_cont_t = std::vector<transition_t>

All the incoming/outgoing transition handles of a state.

◆ tr_store_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::tr_store_t = std::vector<stored_transition_t>

All the automaton's transitions.

◆ transitions_output_t

◆ transitions_s_output_t

◆ weight_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::weight_t = typename weightset_t::value_t

Transition weight.

◆ weightset_ptr

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::weightset_ptr = typename context_t::weightset_ptr

◆ weightset_t

template<typename Context >
using awali::sttc::internal::mutable_automaton_impl< Context >::weightset_t = weightset_t_of<context_t>

Constructor & Destructor Documentation

◆ mutable_automaton_impl() [1/4]

template<typename Context >
awali::sttc::internal::mutable_automaton_impl< Context >::mutable_automaton_impl ( )
delete

◆ mutable_automaton_impl() [2/4]

template<typename Context >
awali::sttc::internal::mutable_automaton_impl< Context >::mutable_automaton_impl ( const mutable_automaton_impl< Context > &  )
delete

◆ mutable_automaton_impl() [3/4]

template<typename Context >
awali::sttc::internal::mutable_automaton_impl< Context >::mutable_automaton_impl ( const context_t ctx)

◆ mutable_automaton_impl() [4/4]

template<typename Context >
awali::sttc::internal::mutable_automaton_impl< Context >::mutable_automaton_impl ( mutable_automaton_impl< Context > &&  that)

Member Function Documentation

◆ add_final()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_final ( state_t  s,
weight_t  w 
)

◆ add_initial()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_initial ( state_t  s,
weight_t  w 
)

◆ add_state()

template<typename Context >
state_t awali::sttc::internal::mutable_automaton_impl< Context >::add_state ( )

◆ add_transition() [1/2]

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_transition ( state_t  src,
state_t  dst,
label_t  l 
)

Same as above, with weight one.

◆ add_transition() [2/2]

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)

Add a transition between two states.

Merge with an existing one with same label.

Parameters
srcsource state
dstdestination state
llabel of the transition
wweight of the transition
Precondition
the label is not checked, for efficiency. Letters out of the alphabet will be accepted.

◆ add_transition_copy()

template<typename Context >
template<typename A >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_transition_copy ( state_t  src,
state_t  dst,
const A &  aut,
transition_t  t,
bool  transpose = false 
)

Add a transition between two states, copying the label from the given transition.

Merge with an existing one with same label.

Parameters
srcsource state
dstdestination state
autthe automaton whose transition will be copied.
ttransition of aut whose label and weight are to copy
transposewhether label and weight should be transposed
Precondition
the label is not checked, for efficiency. Letters out of the alphabet will be accepted.

◆ add_weight()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::add_weight ( transition_t  t,
weight_t  w 
)

◆ all_in()

template<typename Context >
const tr_cont_t& awali::sttc::internal::mutable_automaton_impl< Context >::all_in ( state_t  s) const

Indexes of all transitions arriving to state s.

Invalidated by del_transition() and del_state().

◆ all_out()

template<typename Context >
const tr_cont_t& awali::sttc::internal::mutable_automaton_impl< Context >::all_out ( state_t  s) const

Indexes of all transitions leaving state s.

Invalidated by del_transition() and del_state().

◆ all_out_()

template<typename Context >
tr_cont_t& awali::sttc::internal::mutable_automaton_impl< Context >::all_out_ ( state_t  s)

◆ all_states()

template<typename Context >
states_output_t awali::sttc::internal::mutable_automaton_impl< Context >::all_states ( ) const

All states including pre()/post().

Guaranteed in increasing order.

◆ all_transitions()

template<typename Context >
transitions_output_t awali::sttc::internal::mutable_automaton_impl< Context >::all_transitions ( ) const

All the transition indexes between all states (including pre and post).

◆ context()

template<typename Context >
const context_t& awali::sttc::internal::mutable_automaton_impl< Context >::context ( ) const

◆ del_state()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_state ( state_t  s)

◆ del_transition() [1/3]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_transition ( state_t  s,
state_t  d 
)

Remove all the transitions between s and d.

◆ del_transition() [2/3]

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::del_transition ( state_t  src,
state_t  dst,
label_t  l 
)

Remove the transition (src, l, dst).

◆ del_transition() [3/3]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_transition ( transition_t  t)

◆ del_transition_container()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_transition_container ( tr_cont_t tc,
bool  from_succ 
)
protected

◆ del_transition_from_dst()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_transition_from_dst ( transition_t  t)
protected

Remove t from the ingoing transition of the destination state.

◆ del_transition_from_src()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::del_transition_from_src ( transition_t  t)
protected

Remove t from the outgoing transitions of the source state.

◆ dst_of()

template<typename Context >
state_t awali::sttc::internal::mutable_automaton_impl< Context >::dst_of ( transition_t  t) const

◆ final_transitions()

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::final_transitions ( ) const

Indexes of transitions from visible final states.

◆ get_desc()

template<typename Context >
const std::string& awali::sttc::internal::mutable_automaton_impl< Context >::get_desc ( ) const

◆ get_final_weight()

template<typename Context >
ATTRIBUTE_PURE weight_t awali::sttc::internal::mutable_automaton_impl< Context >::get_final_weight ( state_t  s) const

◆ get_initial_weight()

template<typename Context >
ATTRIBUTE_PURE weight_t awali::sttc::internal::mutable_automaton_impl< Context >::get_initial_weight ( state_t  s) const

◆ get_name()

template<typename Context >
const std::string& awali::sttc::internal::mutable_automaton_impl< Context >::get_name ( ) const

◆ get_state_by_name()

template<typename Context >
state_t awali::sttc::internal::mutable_automaton_impl< Context >::get_state_by_name ( const std::string &  name) const

◆ get_state_name()

template<typename Context >
std::string awali::sttc::internal::mutable_automaton_impl< Context >::get_state_name ( state_t  s) const

◆ get_transition()

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::get_transition ( state_t  src,
state_t  dst,
label_t  l 
) const

◆ has_explicit_name()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_explicit_name ( state_t  s) const

◆ has_history()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_history ( state_t  s) const

◆ has_name()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_name ( state_t  s) const

◆ has_state()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_state ( state_t  s) const

◆ has_transition() [1/2]

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_transition ( state_t  src,
state_t  dst,
label_t  l 
) const

◆ has_transition() [2/2]

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::has_transition ( transition_t  t) const

◆ history()

template<typename Context >
history_t awali::sttc::internal::mutable_automaton_impl< Context >::history ( ) const

◆ in() [1/2]

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::in ( state_t  s) const

Indexes of visible transitions arriving to state s.

Invalidated by del_transition() and del_state().

◆ in() [2/2]

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::in ( state_t  s,
const label_t l 
) const

Indexes of visible transitions arriving to state s on label l.

Invalidated by del_transition() and del_state().

◆ initial_transitions()

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::initial_transitions ( ) const

Indexes of transitions to visible initial states.

◆ is_final()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::is_final ( state_t  s) const

◆ is_initial()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::is_initial ( state_t  s) const

◆ label_of()

template<typename Context >
label_t awali::sttc::internal::mutable_automaton_impl< Context >::label_of ( transition_t  t) const

◆ labelset()

template<typename Context >
const labelset_ptr& awali::sttc::internal::mutable_automaton_impl< Context >::labelset ( ) const

◆ lmul_weight()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::lmul_weight ( transition_t  t,
weight_t  w 
)

◆ max_state()

template<typename Context >
state_t awali::sttc::internal::mutable_automaton_impl< Context >::max_state ( ) const

◆ new_transition() [1/2]

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::new_transition ( state_t  src,
state_t  dst,
label_t  l 
)

Same as above, with weight one.

◆ new_transition() [2/2]

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::new_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)

Create a transition between two states.

There must not exist a previous transition with same (src, dst, l).

Parameters
srcsource state
dstdestination state
llabel of the transition
wweight of the transition
Precondition
the label is not checked, for efficiency.
! has_transition(src, dst, l).

◆ new_transition_copy()

template<typename Context >
template<typename A >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::new_transition_copy ( state_t  src,
state_t  dst,
const A &  aut,
transition_t  t,
bool  transpose = false 
)

Copy the label of a transition between two states, creating a new transition.

There must not exist a previous transition with same (src, dst, label_of(l)).

Parameters
srcsource state
dstdestination state
autthe automaton whose transition will be copied.
ttransition of aut whose label and weight are to copy
transposewhether label and weight should be transposed
Precondition
the label is not checked, for efficiency.
! has_transition(src, dst, label_of(l)).

◆ null_state()

template<typename Context >
static constexpr state_t awali::sttc::internal::mutable_automaton_impl< Context >::null_state ( )
staticconstexpr

◆ null_transition()

template<typename Context >
static constexpr transition_t awali::sttc::internal::mutable_automaton_impl< Context >::null_transition ( )
staticconstexpr

◆ num_all_states()

template<typename Context >
size_t awali::sttc::internal::mutable_automaton_impl< Context >::num_all_states ( ) const

◆ num_finals()

template<typename Context >
size_t awali::sttc::internal::mutable_automaton_impl< Context >::num_finals ( ) const

◆ num_initials()

template<typename Context >
size_t awali::sttc::internal::mutable_automaton_impl< Context >::num_initials ( ) const

◆ num_states()

template<typename Context >
size_t awali::sttc::internal::mutable_automaton_impl< Context >::num_states ( ) const

◆ num_transitions()

template<typename Context >
size_t awali::sttc::internal::mutable_automaton_impl< Context >::num_transitions ( ) const

◆ operator=()

template<typename Context >
mutable_automaton_impl& awali::sttc::internal::mutable_automaton_impl< Context >::operator= ( mutable_automaton_impl< Context > &&  that)

◆ out() [1/2]

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::out ( state_t  s) const

Indexes of visible transitions leaving state s.

Invalidated by del_transition() and del_state().

◆ out() [2/2]

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::out ( state_t  s,
const label_t l 
) const

Indexes of all transitions leaving state s on label l.

Invalidated by del_transition() and del_state().

◆ outin()

template<typename Context >
transitions_s_output_t awali::sttc::internal::mutable_automaton_impl< Context >::outin ( state_t  s,
state_t  d 
) const

Indexes of visible transitions from state s to state d.

Invalidated by del_transition() and del_state().

◆ post()

template<typename Context >
static constexpr state_t awali::sttc::internal::mutable_automaton_impl< Context >::post ( )
staticconstexpr

◆ pre()

template<typename Context >
static constexpr state_t awali::sttc::internal::mutable_automaton_impl< Context >::pre ( )
staticconstexpr

◆ prepost_label()

template<typename Context >
label_t awali::sttc::internal::mutable_automaton_impl< Context >::prepost_label ( ) const

◆ print_state()

template<typename Context >
std::ostream& awali::sttc::internal::mutable_automaton_impl< Context >::print_state ( state_t  s,
std::ostream &  o 
) const

◆ print_state_history()

template<typename Context >
std::ostream& awali::sttc::internal::mutable_automaton_impl< Context >::print_state_history ( state_t  s,
std::ostream &  o,
const std::string &  fmt = "text" 
) const

◆ print_state_name()

template<typename Context >
std::ostream& awali::sttc::internal::mutable_automaton_impl< Context >::print_state_name ( state_t  s,
std::ostream &  o,
const std::string &  = "text" 
) const

◆ rmul_weight()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::rmul_weight ( transition_t  t,
weight_t  w 
)

◆ set_desc()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_desc ( const std::string &  d)

◆ set_final() [1/2]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_final ( state_t  s)

◆ set_final() [2/2]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_final ( state_t  s,
weight_t  w 
)

◆ set_history()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_history ( history_t  h)

◆ set_initial() [1/2]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_initial ( state_t  s)

◆ set_initial() [2/2]

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_initial ( state_t  s,
weight_t  w 
)

◆ set_name()

template<typename Context >
bool awali::sttc::internal::mutable_automaton_impl< Context >::set_name ( const std::string &  n)

◆ set_state_name()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_state_name ( state_t  s,
const std::string &  n 
)

◆ set_state_names_from_history()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::set_state_names_from_history ( )

◆ set_transition() [1/2]

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::set_transition ( state_t  src,
state_t  dst,
label_t  l 
)

Same as above, with unit weight.

◆ set_transition() [2/2]

template<typename Context >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::set_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)

Set a transition between two states.

Override any possible existing transition with same states and label.

Parameters
srcsource state
dstdestination state
llabel of the transition
wweight of the transition
Precondition
the label is not checked, for efficiency. Letters out of the alphabet will be accepted.

◆ set_transition_copy()

template<typename Context >
template<typename A >
transition_t awali::sttc::internal::mutable_automaton_impl< Context >::set_transition_copy ( state_t  src,
state_t  dst,
const A &  aut,
transition_t  t,
bool  transpose = false 
)

◆ set_weight()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::set_weight ( transition_t  t,
weight_t  w 
)

◆ sname()

template<typename Context >
static std::string awali::sttc::internal::mutable_automaton_impl< Context >::sname ( )
static

◆ src_of()

template<typename Context >
state_t awali::sttc::internal::mutable_automaton_impl< Context >::src_of ( transition_t  t) const

◆ states()

template<typename Context >
states_output_t awali::sttc::internal::mutable_automaton_impl< Context >::states ( ) const

All states excluding pre()/post().

Guaranteed in increasing order.

◆ strip_history()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::strip_history ( )

◆ strip_names()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::strip_names ( )

◆ transitions()

template<typename Context >
transitions_output_t awali::sttc::internal::mutable_automaton_impl< Context >::transitions ( ) const

All the transition indexes between visible states.

◆ unset_final()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::unset_final ( state_t  s)

◆ unset_initial()

template<typename Context >
void awali::sttc::internal::mutable_automaton_impl< Context >::unset_initial ( state_t  s)

◆ vname()

template<typename Context >
std::string awali::sttc::internal::mutable_automaton_impl< Context >::vname ( bool  full = true) const

◆ weight_of()

template<typename Context >
weight_t awali::sttc::internal::mutable_automaton_impl< Context >::weight_of ( transition_t  t) const

◆ weightset()

template<typename Context >
const weightset_ptr& awali::sttc::internal::mutable_automaton_impl< Context >::weightset ( ) const

Field Documentation

◆ ctx_

template<typename Context >
context_t awali::sttc::internal::mutable_automaton_impl< Context >::ctx_

The algebraic type of this automaton.


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