Vcsn  2.1
Be Rational
vcsn::detail::mutable_automaton_impl< Context > Class Template Reference

#include <fwd.hh>

Collaboration diagram for vcsn::detail::mutable_automaton_impl< Context >:

Classes

struct  all_states_p
 Accept all the states. More...
 
struct  all_transitions_p
 
struct  dst_p
 
struct  has_state_p
 
struct  label_equal_p
 
struct  not_from_pre_p
 
struct  not_to_post_p
 
struct  not_with_pre_post_p
 
struct  stored_state_t
 Data stored for each state. More...
 
struct  valid_state_p
 

Public Types

using context_t = Context
 
template<typename Ctx = Context>
using fresh_automaton_t = mutable_automaton< Ctx >
 The (shared pointer) type to use if we have to create an automaton of the same (underlying) type. More...
 
using labelset_t = labelset_t_of< context_t >
 
using weightset_t = weightset_t_of< context_t >
 
using kind_t = typename context_t::kind_t
 
using labelset_ptr = typename context_t::labelset_ptr
 
using weightset_ptr = typename context_t::weightset_ptr
 
using state_t = unsigned
 Lightweight state handle (or index). More...
 
using transition_t = unsigned
 Lightweight transition handle (or index). More...
 
using label_t = typename labelset_t::value_t
 Transition label. More...
 
using weight_t = typename weightset_t::value_t
 Transition weight. More...
 
template<typename Pred >
using states_output_t = container_filter_range< boost::integer_range< state_t >, Pred >
 
template<typename Pred >
using transitions_output_t = container_filter_range< boost::integer_range< transition_t >, Pred >
 

Public Member Functions

 mutable_automaton_impl ()=delete
 
 mutable_automaton_impl (const mutable_automaton_impl &)=delete
 
 mutable_automaton_impl (const context_t &ctx)
 
 mutable_automaton_impl (mutable_automaton_impl &&that)
 
mutable_automaton_imploperator= (mutable_automaton_impl &&that)
 
std::ostream & print_set (std::ostream &o, format fmt={}) const
 
const context_tcontext () const
 
const weightset_ptrweightset () const
 
const labelset_ptrlabelset () const
 
label_t prepost_label () const
 Label for preinitial and postfinal transitions. More...
 
size_t num_all_states () const
 
size_t num_states () const
 
size_t num_initials () const
 
size_t num_finals () const
 
size_t num_transitions () const
 
bool has_state (state_t s) const
 Whether state s belongs to the automaton. More...
 
bool state_is_strict (state_t s) const
 Whether state s belongs to the automaton. More...
 
bool is_initial (state_t s) const
 Whether s is initial. More...
 
bool is_final (state_t s) const
 Whether s is final. More...
 
ATTRIBUTE_PURE weight_t get_initial_weight (state_t s) const
 Initial weight of s. More...
 
ATTRIBUTE_PURE weight_t get_final_weight (state_t s) const
 Final weight of s. More...
 
transition_t get_transition (state_t src, state_t dst, label_t l) const
 
bool has_transition (state_t src, state_t dst, label_t l) const
 
bool has_transition (transition_t t) const
 
state_t src_of (transition_t t) const
 
state_t dst_of (transition_t t) const
 
label_t label_of (transition_t t) const
 
weight_t weight_of (transition_t t) const
 
state_t new_state ()
 Create a new state and return its id. More...
 
std::ostream & print_state (state_t s, std::ostream &o) const
 
std::ostream & print_state_name (state_t s, std::ostream &o, format={}, bool=false) const
 
void del_state (state_t s)
 
void set_initial (state_t s, weight_t w)
 
void set_initial (state_t s)
 
transition_t add_initial (state_t s, weight_t w)
 
void unset_initial (state_t s)
 
void set_final (state_t s, weight_t w)
 
void set_final (state_t s)
 
transition_t add_final (state_t s, weight_t w)
 
void unset_final (state_t s)
 
void del_transition (transition_t t)
 
void del_transition (state_t src, state_t dst, label_t l)
 Remove the transition (src, l, dst). More...
 
void del_transition (state_t s, state_t d)
 Remove all the transitions between s and d. 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, typename A::element_type::transition_t t, bool transpose=false)
 Copy the label of a transition between two states, creating a new transition. More...
 
transition_t new_transition (state_t src, state_t dst, label_t l)
 Same as above, with weight one. More...
 
transition_t set_transition (state_t src, state_t dst, label_t l, weight_t w)
 Set a transition between two states. More...
 
transition_t set_transition (state_t src, state_t dst, label_t l)
 Same as above, with unit weight. More...
 
transition_t add_transition (state_t src, state_t dst, label_t l, weight_t w)
 Add a transition between two states. More...
 
transition_t add_transition (state_t src, state_t dst, label_t l)
 Same as above, with weight one. More...
 
template<typename A >
transition_t add_transition_copy (state_t src, state_t dst, const A &aut, typename A::element_type::transition_t t, bool transpose=false)
 Add a transition between two states, copying the label from the given transition. More...
 
std::string format_transition (transition_t t) const
 
transition_t set_weight (transition_t t, weight_t w)
 
weight_t add_weight (transition_t t, weight_t w)
 
weight_t lmul_weight (transition_t t, weight_t w)
 
weight_t rmul_weight (transition_t t, weight_t w)
 
auto all_states () const -> decltype(this->state_range(0U, states_.size()))
 All states including pre()/post(). More...
 
template<typename Pred >
auto all_states (Pred pred) const -> decltype(this->state_range(0U, states_.size(), pred))
 All states including pre()/post() that validate pred. More...
 
auto states () const -> decltype(this->state_range(post()+1, states_.size()))
 All states excluding pre()/post(). More...
 
template<typename Pred >
transitions_output_t< has_state_p< Pred > > all_transitions (Pred pred) const
 All the transition indexes between all states (including pre and post), that validate pred. More...
 
auto all_transitions () const -> decltype(this->all_transitions(all_transitions_p
 All the transition indexes between all states (including pre and post). More...
 
auto transitions () const -> decltype(this->all_transitions(not_with_pre_post_p
 All the transition indexes between visible states. More...
 
container_range< const tr_cont_t & > all_out (state_t s) const
 Indexes of all transitions leaving state s. More...
 
template<typename Pred >
container_filter_range< const tr_cont_t &, Pred > all_out (state_t s, Pred pred) const
 Indexes of transitions leaving state s that validate the predicate. More...
 
auto out (state_t s) const -> decltype(this->all_out(s, not_to_post_p
 Indexes of visible transitions leaving state s. More...
 
auto out (state_t s, label_t l) const -> decltype(this->all_out(s, label_equal_p
 Indexes of all transitions leaving state s on label l. More...
 
container_range< const tr_cont_t & > all_in (state_t s) const
 Indexes of all transitions arriving to state s. More...
 
template<typename Pred >
container_filter_range< const tr_cont_t &, Pred > all_in (state_t s, Pred pred) const
 Indexes of transitions entering state s that validate the predicate. More...
 
auto in (state_t s) const -> decltype(this->all_in(s, not_from_pre_p
 Indexes of visible transitions arriving to state s. More...
 
auto in (state_t s, label_t l) const -> decltype(this->all_in(s, label_equal_p
 Indexes of visible transitions arriving to state s on label l. More...
 
auto outin (state_t s, state_t d) const -> decltype(this->all_out(s, dst_p
 Indexes of visible transitions from state s to state d. More...
 
auto initial_transitions () const -> decltype(this->all_out(pre()))
 Indexes of transitions to visible initial states. More...
 
auto final_transitions () const -> decltype(this->all_in(post()))
 Indexes of transitions from visible final states. More...
 

Static Public Member Functions

static symbol sname ()
 
static constexpr state_t pre ()
 
static constexpr state_t post ()
 
static constexpr state_t null_state ()
 Invalid state. More...
 
static constexpr transition_t null_transition ()
 Invalid transition. More...
 
static constexpr bool state_has_name (state_t)
 

Protected Types

using stored_transition_t = transition_tuple< state_t, label_t, weight_t >
 Data stored per transition. More...
 
using tr_store_t = std::vector< stored_transition_t >
 All the automaton's transitions. More...
 
using tr_cont_t = std::vector< transition_t >
 All the incoming/outgoing transition handles of a state. More...
 
using st_store_t = std::vector< stored_state_t >
 All the automaton's states. More...
 
using free_store_t = std::vector< unsigned >
 A list of unused indexes in the states/transitions tables. More...
 

Protected Member Functions

void del_transition_from_src (transition_t t)
 Remove t from the outgoing transitions of the source state. More...
 
void del_transition_from_dst (transition_t t)
 Remove t from the ingoing transition of the destination state. More...
 
void del_transition_container (tr_cont_t &tc, bool from_succ)
 
template<typename Pred >
states_output_t< valid_state_p< Pred > > state_range (state_t b, state_t e, Pred pred) const
 The range of state numbers in [b . More...
 
auto state_range (state_t b, state_t e) const -> decltype(this->state_range(b, e, all_states_p
 The range of state numbers in [b .. e]. More...
 

Protected Attributes

context_t ctx_
 The algebraic type of this automaton. More...
 
st_store_t states_
 
free_store_t states_fs_
 Free indexes in states_. More...
 
tr_store_t transitions_
 
free_store_t transitions_fs_
 Free indexes in transitions_. More...
 
label_t prepost_label_
 Label for initial and final transitions. More...
 

Detailed Description

template<typename Context>
class vcsn::detail::mutable_automaton_impl< Context >

Definition at line 20 of file fwd.hh.

Member Typedef Documentation

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::context_t = Context

Definition at line 28 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::free_store_t = std::vector<unsigned>
protected

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

Definition at line 74 of file mutable-automaton.hh.

template<typename Context >
template<typename Ctx = Context>
using vcsn::detail::mutable_automaton_impl< Context >::fresh_automaton_t = mutable_automaton<Ctx>

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

Definition at line 32 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::kind_t = typename context_t::kind_t

Definition at line 35 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::label_t = typename labelset_t::value_t

Transition label.

Definition at line 45 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::labelset_ptr = typename context_t::labelset_ptr

Definition at line 37 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::labelset_t = labelset_t_of<context_t>

Definition at line 33 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::st_store_t = std::vector<stored_state_t>
protected

All the automaton's states.

Definition at line 71 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::state_t = unsigned

Lightweight state handle (or index).

Definition at line 41 of file mutable-automaton.hh.

template<typename Context >
template<typename Pred >
using vcsn::detail::mutable_automaton_impl< Context >::states_output_t = container_filter_range<boost::integer_range<state_t>, Pred>

Definition at line 737 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::stored_transition_t = transition_tuple<state_t, label_t, weight_t>
protected

Data stored per transition.

Definition at line 54 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::tr_cont_t = std::vector<transition_t>
protected

All the incoming/outgoing transition handles of a state.

Definition at line 59 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::tr_store_t = std::vector<stored_transition_t>
protected

All the automaton's transitions.

Definition at line 57 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::transition_t = unsigned

Lightweight transition handle (or index).

Definition at line 43 of file mutable-automaton.hh.

template<typename Context >
template<typename Pred >
using vcsn::detail::mutable_automaton_impl< Context >::transitions_output_t = container_filter_range<boost::integer_range<transition_t>, Pred>

Definition at line 813 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::weight_t = typename weightset_t::value_t

Transition weight.

Definition at line 47 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::weightset_ptr = typename context_t::weightset_ptr

Definition at line 38 of file mutable-automaton.hh.

template<typename Context >
using vcsn::detail::mutable_automaton_impl< Context >::weightset_t = weightset_t_of<context_t>

Definition at line 34 of file mutable-automaton.hh.

Constructor & Destructor Documentation

template<typename Context >
vcsn::detail::mutable_automaton_impl< Context >::mutable_automaton_impl ( )
delete
template<typename Context >
vcsn::detail::mutable_automaton_impl< Context >::mutable_automaton_impl ( const mutable_automaton_impl< Context > &  )
delete
template<typename Context >
vcsn::detail::mutable_automaton_impl< Context >::mutable_automaton_impl ( const context_t ctx)
inline

Definition at line 88 of file mutable-automaton.hh.

template<typename Context >
vcsn::detail::mutable_automaton_impl< Context >::mutable_automaton_impl ( mutable_automaton_impl< Context > &&  that)
inline

Definition at line 94 of file mutable-automaton.hh.

Member Function Documentation

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::add_final ( state_t  s,
weight_t  w 
)
inline

Definition at line 453 of file mutable-automaton.hh.

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::add_initial ( state_t  s,
weight_t  w 
)
inline

Definition at line 429 of file mutable-automaton.hh.

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::add_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)
inline

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.

Definition at line 635 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::get_transition(), vcsn::detail::mutable_automaton_impl< Context >::new_transition(), vcsn::detail::mutable_automaton_impl< Context >::null_transition(), vcsn::detail::mutable_automaton_impl< Context >::set_weight(), vcsn::detail::mutable_automaton_impl< Context >::weight_of(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Referenced by vcsn::detail::mutable_automaton_impl< Context >::add_transition(), and vcsn::detail::mutable_automaton_impl< Context >::add_transition_copy().

Here is the call graph for this function:

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::add_transition ( state_t  src,
state_t  dst,
label_t  l 
)
inline

Same as above, with weight one.

Definition at line 650 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::add_transition(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
template<typename A >
transition_t vcsn::detail::mutable_automaton_impl< Context >::add_transition_copy ( state_t  src,
state_t  dst,
const A &  aut,
typename A::element_type::transition_t  t,
bool  transpose = false 
)
inline

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

Definition at line 665 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::add_transition(), vcsn::conv(), vcsn::detail::mutable_automaton_impl< Context >::labelset(), vcsn::transpose(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
weight_t vcsn::detail::mutable_automaton_impl< Context >::add_weight ( transition_t  t,
weight_t  w 
)
inline

Definition at line 713 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::set_weight(), vcsn::detail::mutable_automaton_impl< Context >::weight_of(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
container_range<const tr_cont_t&> vcsn::detail::mutable_automaton_impl< Context >::all_in ( state_t  s) const
inline

Indexes of all transitions arriving to state s.

Invalidated by del_transition() and del_state().

Definition at line 945 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::has_state().

Referenced by vcsn::detail::mutable_automaton_impl< Context >::final_transitions().

Here is the call graph for this function:

template<typename Context >
template<typename Pred >
container_filter_range<const tr_cont_t&, Pred> vcsn::detail::mutable_automaton_impl< Context >::all_in ( state_t  s,
Pred  pred 
) const
inline

Indexes of transitions entering state s that validate the predicate.

Invalidated by del_transition() and del_state().

Definition at line 957 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::has_state().

Here is the call graph for this function:

template<typename Context >
container_range<const tr_cont_t&> vcsn::detail::mutable_automaton_impl< Context >::all_out ( state_t  s) const
inline

Indexes of all transitions leaving state s.

Invalidated by del_transition() and del_state().

Definition at line 895 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::has_state().

Referenced by vcsn::detail::mutable_automaton_impl< Context >::initial_transitions().

Here is the call graph for this function:

template<typename Context >
template<typename Pred >
container_filter_range<const tr_cont_t&, Pred> vcsn::detail::mutable_automaton_impl< Context >::all_out ( state_t  s,
Pred  pred 
) const
inline

Indexes of transitions leaving state s that validate the predicate.

Invalidated by del_transition() and del_state().

Definition at line 907 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::has_state().

Here is the call graph for this function:

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::all_states ( ) const -> decltype(this->state_range(0U, states_.size()))
inline

All states including pre()/post().

Guaranteed in increasing order.

Definition at line 788 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::state_range().

Here is the call graph for this function:

template<typename Context >
template<typename Pred >
auto vcsn::detail::mutable_automaton_impl< Context >::all_states ( Pred  pred) const -> decltype(this->state_range(0U, states_.size(), pred))
inline

All states including pre()/post() that validate pred.

Guaranteed in increasing order.

Definition at line 797 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::state_range().

Here is the call graph for this function:

template<typename Context >
template<typename Pred >
transitions_output_t<has_state_p<Pred> > vcsn::detail::mutable_automaton_impl< Context >::all_transitions ( Pred  pred) const
inline

All the transition indexes between all states (including pre and post), that validate pred.

Definition at line 832 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::all_transitions ( ) const -> decltype(this->all_transitions(all_transitions_p
inline

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

Definition at line 848 of file mutable-automaton.hh.

template<typename Context >
const context_t& vcsn::detail::mutable_automaton_impl< Context >::context ( ) const
inline

Definition at line 133 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_state ( state_t  s)
inline

Definition at line 405 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_transition ( state_t  src,
state_t  dst,
label_t  l 
)
inline

Remove the transition (src, l, dst).

Definition at line 483 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_transition ( state_t  s,
state_t  d 
)
inline

Remove all the transitions between s and d.

Definition at line 492 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_transition_container ( tr_cont_t tc,
bool  from_succ 
)
inlineprotected

Definition at line 342 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_transition_from_dst ( transition_t  t)
inlineprotected

Remove t from the ingoing transition of the destination state.

Definition at line 331 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::del_transition_from_src ( transition_t  t)
inlineprotected

Remove t from the outgoing transitions of the source state.

Definition at line 319 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::final_transitions ( ) const -> decltype(this->all_in(post()))
inline

Indexes of transitions from visible final states.

Also include the weird case of transitions between pre and post. This is used when calling eliminate_state repeatedly.

Definition at line 1012 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::all_in(), and vcsn::detail::mutable_automaton_impl< Context >::post().

Here is the call graph for this function:

template<typename Context >
std::string vcsn::detail::mutable_automaton_impl< Context >::format_transition ( transition_t  t) const
inline
template<typename Context >
ATTRIBUTE_PURE weight_t vcsn::detail::mutable_automaton_impl< Context >::get_final_weight ( state_t  s) const
inline

Final weight of s.

Definition at line 232 of file mutable-automaton.hh.

template<typename Context >
ATTRIBUTE_PURE weight_t vcsn::detail::mutable_automaton_impl< Context >::get_initial_weight ( state_t  s) const
inline

Initial weight of s.

Definition at line 220 of file mutable-automaton.hh.

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::get_transition ( state_t  src,
state_t  dst,
label_t  l 
) const
inline
template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::has_state ( state_t  s) const
inline

Whether state s belongs to the automaton.

Definition at line 181 of file mutable-automaton.hh.

Referenced by vcsn::detail::mutable_automaton_impl< Context >::all_in(), and vcsn::detail::mutable_automaton_impl< Context >::all_out().

template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::has_transition ( state_t  src,
state_t  dst,
label_t  l 
) const
inline

Definition at line 282 of file mutable-automaton.hh.

template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::has_transition ( transition_t  t) const
inline

Definition at line 288 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::in ( state_t  s) const -> decltype(this->all_in(s, not_from_pre_p
inline

Indexes of visible transitions arriving to state s.

Invalidated by del_transition() and del_state().

Definition at line 965 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::in ( state_t  s,
label_t  l 
) const -> decltype(this->all_in(s, label_equal_p
inline

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

Invalidated by del_transition() and del_state().

Definition at line 973 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::initial_transitions ( ) const -> decltype(this->all_out(pre()))
inline

Indexes of transitions to visible initial states.

Also include the weird case of transitions between pre and post. This is used when calling eliminate_state repeatedly.

Definition at line 1002 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::all_out(), and vcsn::detail::mutable_automaton_impl< Context >::pre().

Here is the call graph for this function:

template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::is_final ( state_t  s) const
inline

Whether s is final.

Definition at line 212 of file mutable-automaton.hh.

template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::is_initial ( state_t  s) const
inline

Whether s is initial.

Definition at line 205 of file mutable-automaton.hh.

template<typename Context >
weight_t vcsn::detail::mutable_automaton_impl< Context >::lmul_weight ( transition_t  t,
weight_t  w 
)
inline

Definition at line 719 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::set_weight(), vcsn::detail::mutable_automaton_impl< Context >::weight_of(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
state_t vcsn::detail::mutable_automaton_impl< Context >::new_state ( )
inline

Create a new state and return its id.

Definition at line 359 of file mutable-automaton.hh.

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::new_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)
inline

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).

Definition at line 512 of file mutable-automaton.hh.

Referenced by vcsn::detail::mutable_automaton_impl< Context >::add_transition().

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::new_transition ( state_t  src,
state_t  dst,
label_t  l 
)
inline

Same as above, with weight one.

Definition at line 574 of file mutable-automaton.hh.

template<typename Context >
template<typename A >
transition_t vcsn::detail::mutable_automaton_impl< Context >::new_transition_copy ( state_t  src,
state_t  dst,
const A &  aut,
typename A::element_type::transition_t  t,
bool  transpose = false 
)
inline

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
! has_transition(src, dst, label_of(l)).

Definition at line 556 of file mutable-automaton.hh.

template<typename Context >
static constexpr state_t vcsn::detail::mutable_automaton_impl< Context >::null_state ( )
inlinestatic
template<typename Context >
size_t vcsn::detail::mutable_automaton_impl< Context >::num_all_states ( ) const
inline

Definition at line 164 of file mutable-automaton.hh.

template<typename Context >
size_t vcsn::detail::mutable_automaton_impl< Context >::num_finals ( ) const
inline

Definition at line 167 of file mutable-automaton.hh.

template<typename Context >
size_t vcsn::detail::mutable_automaton_impl< Context >::num_initials ( ) const
inline

Definition at line 166 of file mutable-automaton.hh.

template<typename Context >
size_t vcsn::detail::mutable_automaton_impl< Context >::num_states ( ) const
inline

Definition at line 165 of file mutable-automaton.hh.

template<typename Context >
size_t vcsn::detail::mutable_automaton_impl< Context >::num_transitions ( ) const
inline

Definition at line 168 of file mutable-automaton.hh.

template<typename Context >
mutable_automaton_impl& vcsn::detail::mutable_automaton_impl< Context >::operator= ( mutable_automaton_impl< Context > &&  that)
inline

Definition at line 101 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::out ( state_t  s) const -> decltype(this->all_out(s, not_to_post_p
inline

Indexes of visible transitions leaving state s.

Invalidated by del_transition() and del_state().

Definition at line 915 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::out ( state_t  s,
label_t  l 
) const -> decltype(this->all_out(s, label_equal_p
inline

Indexes of all transitions leaving state s on label l.

Invalidated by del_transition() and del_state().

Definition at line 936 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::outin ( state_t  s,
state_t  d 
) const -> decltype(this->all_out(s, dst_p
inline

Indexes of visible transitions from state s to state d.

Invalidated by del_transition() and del_state().

Definition at line 992 of file mutable-automaton.hh.

template<typename Context >
label_t vcsn::detail::mutable_automaton_impl< Context >::prepost_label ( ) const
inline

Label for preinitial and postfinal transitions.

Definition at line 154 of file mutable-automaton.hh.

template<typename Context >
std::ostream& vcsn::detail::mutable_automaton_impl< Context >::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 126 of file mutable-automaton.hh.

template<typename Context >
std::ostream& vcsn::detail::mutable_automaton_impl< Context >::print_state ( state_t  s,
std::ostream &  o 
) const
inline

Definition at line 379 of file mutable-automaton.hh.

template<typename Context >
std::ostream& vcsn::detail::mutable_automaton_impl< Context >::print_state_name ( state_t  s,
std::ostream &  o,
format  = {},
bool  = false 
) const
inline

Definition at line 391 of file mutable-automaton.hh.

template<typename Context >
weight_t vcsn::detail::mutable_automaton_impl< Context >::rmul_weight ( transition_t  t,
weight_t  w 
)
inline

Definition at line 725 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::set_weight(), vcsn::detail::mutable_automaton_impl< Context >::weight_of(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::set_final ( state_t  s,
weight_t  w 
)
inline

Definition at line 441 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::set_final ( state_t  s)
inline

Definition at line 447 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::set_initial ( state_t  s,
weight_t  w 
)
inline

Definition at line 417 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::set_initial ( state_t  s)
inline

Definition at line 423 of file mutable-automaton.hh.

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::set_transition ( state_t  src,
state_t  dst,
label_t  l,
weight_t  w 
)
inline

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.

Definition at line 590 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::del_transition(), and vcsn::detail::mutable_automaton_impl< Context >::null_transition().

Referenced by vcsn::detail::mutable_automaton_impl< Context >::set_transition().

Here is the call graph for this function:

template<typename Context >
transition_t vcsn::detail::mutable_automaton_impl< Context >::set_transition ( state_t  src,
state_t  dst,
label_t  l 
)
inline

Same as above, with unit weight.

Definition at line 619 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::set_transition(), and vcsn::detail::mutable_automaton_impl< Context >::weightset().

Here is the call graph for this function:

template<typename Context >
static symbol vcsn::detail::mutable_automaton_impl< Context >::sname ( )
inlinestatic

Definition at line 120 of file mutable-automaton.hh.

References vcsn::sname().

Here is the call graph for this function:

template<typename Context >
static constexpr bool vcsn::detail::mutable_automaton_impl< Context >::state_has_name ( state_t  )
inlinestatic

Definition at line 399 of file mutable-automaton.hh.

template<typename Context >
bool vcsn::detail::mutable_automaton_impl< Context >::state_is_strict ( state_t  s) const
inline

Whether state s belongs to the automaton.

Definition at line 197 of file mutable-automaton.hh.

template<typename Context >
template<typename Pred >
states_output_t<valid_state_p<Pred> > vcsn::detail::mutable_automaton_impl< Context >::state_range ( state_t  b,
state_t  e,
Pred  pred 
) const
inlineprotected

The range of state numbers in [b .

. e] that validate the predicate pred.

Definition at line 760 of file mutable-automaton.hh.

Referenced by vcsn::detail::mutable_automaton_impl< Context >::all_states(), and vcsn::detail::mutable_automaton_impl< Context >::states().

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::state_range ( state_t  b,
state_t  e 
) const -> decltype(this->state_range(b, e, all_states_p
inlineprotected

The range of state numbers in [b .. e].

Definition at line 779 of file mutable-automaton.hh.

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::states ( ) const -> decltype(this->state_range(post() + 1, states_.size()))
inline

All states excluding pre()/post().

Guaranteed in increasing order.

Definition at line 805 of file mutable-automaton.hh.

References vcsn::detail::mutable_automaton_impl< Context >::post(), and vcsn::detail::mutable_automaton_impl< Context >::state_range().

Here is the call graph for this function:

template<typename Context >
auto vcsn::detail::mutable_automaton_impl< Context >::transitions ( ) const -> decltype(this->all_transitions(not_with_pre_post_p
inline

All the transition indexes between visible states.

Definition at line 886 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::unset_final ( state_t  s)
inline

Definition at line 459 of file mutable-automaton.hh.

template<typename Context >
void vcsn::detail::mutable_automaton_impl< Context >::unset_initial ( state_t  s)
inline

Definition at line 435 of file mutable-automaton.hh.

Member Data Documentation

template<typename Context >
context_t vcsn::detail::mutable_automaton_impl< Context >::ctx_
protected

The algebraic type of this automaton.

Definition at line 51 of file mutable-automaton.hh.

template<typename Context >
label_t vcsn::detail::mutable_automaton_impl< Context >::prepost_label_
protected

Label for initial and final transitions.

Definition at line 83 of file mutable-automaton.hh.

template<typename Context >
st_store_t vcsn::detail::mutable_automaton_impl< Context >::states_
protected
template<typename Context >
free_store_t vcsn::detail::mutable_automaton_impl< Context >::states_fs_
protected

Free indexes in states_.

Definition at line 78 of file mutable-automaton.hh.

template<typename Context >
tr_store_t vcsn::detail::mutable_automaton_impl< Context >::transitions_
protected

Definition at line 79 of file mutable-automaton.hh.

template<typename Context >
free_store_t vcsn::detail::mutable_automaton_impl< Context >::transitions_fs_
protected

Free indexes in transitions_.

Definition at line 81 of file mutable-automaton.hh.


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