Vcsn  2.2
Be Rational
vcsn::detail::delgado_profiler< Aut > Struct Template Reference

Compute a state profile for state-elimination based on the Delgado-Morais heuristic. More...

#include <to-expression.hh>

Collaboration diagram for vcsn::detail::delgado_profiler< Aut >:

Classes

struct  state_profile
 

Public Types

using automaton_t = Aut
 
using state_t = state_t_of< automaton_t >
 
using transition_t = transition_t_of< automaton_t >
 

Public Member Functions

 delgado_profiler (const automaton_t &aut, bool count_labels=false)
 Build a generator of Delgado-Morais state profiles. More...
 
state_profile make_state_profile (state_t state)
 
size_t size_of_transition (transition_t t)
 The "weight" of a transition. More...
 
void invalidate_cache (transition_t t)
 Updating transitions' size in the cache during the profiler's construction would be clearer but appear to be less efficient. More...
 
void update (state_profile &p)
 The "weight" of a state, as defined by Delgado-Morais. More...
 

Public Attributes

automaton_t aut_
 
bool count_labels_
 
std::vector< size_t > transition_cache_
 

Detailed Description

template<Automaton Aut>
struct vcsn::detail::delgado_profiler< Aut >

Compute a state profile for state-elimination based on the Delgado-Morais heuristic.

Definition at line 98 of file to-expression.hh.

Member Typedef Documentation

template<Automaton Aut>
using vcsn::detail::delgado_profiler< Aut >::automaton_t = Aut

Definition at line 100 of file to-expression.hh.

template<Automaton Aut>
using vcsn::detail::delgado_profiler< Aut >::state_t = state_t_of<automaton_t>

Definition at line 101 of file to-expression.hh.

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

Definition at line 102 of file to-expression.hh.

Constructor & Destructor Documentation

template<Automaton Aut>
vcsn::detail::delgado_profiler< Aut >::delgado_profiler ( const automaton_t aut,
bool  count_labels = false 
)
inline

Build a generator of Delgado-Morais state profiles.

Parameters
autthe input automaton
count_labelswhether we use the width of the expressions, instead of the length.

Definition at line 109 of file to-expression.hh.

Member Function Documentation

template<Automaton Aut>
void vcsn::detail::delgado_profiler< Aut >::invalidate_cache ( transition_t  t)
inline

Updating transitions' size in the cache during the profiler's construction would be clearer but appear to be less efficient.

Invalidate Update 0.29s 0.37s : a.expression(linear, delgado) # a = std([a-d]?{15})

Definition at line 166 of file to-expression.hh.

References vcsn::detail::delgado_profiler< Aut >::transition_cache_.

template<Automaton Aut>
state_profile vcsn::detail::delgado_profiler< Aut >::make_state_profile ( state_t  state)
inline

Definition at line 138 of file to-expression.hh.

References vcsn::detail::delgado_profiler< Aut >::update().

Here is the call graph for this function:

template<Automaton Aut>
size_t vcsn::detail::delgado_profiler< Aut >::size_of_transition ( transition_t  t)
inline
template<Automaton Aut>
void vcsn::detail::delgado_profiler< Aut >::update ( state_profile p)
inline

The "weight" of a state, as defined by Delgado-Morais.

We use the word "size" instead, since "weight" has already a strong meaning in Vcsn...

Definition at line 177 of file to-expression.hh.

References vcsn::detail::all_in(), vcsn::detail::all_out(), vcsn::detail::delgado_profiler< Aut >::aut_, vcsn::detail::delgado_profiler< Aut >::state_profile::size_, vcsn::detail::delgado_profiler< Aut >::size_of_transition(), and vcsn::detail::delgado_profiler< Aut >::state_profile::state_.

Referenced by vcsn::detail::delgado_profiler< Aut >::make_state_profile().

Here is the call graph for this function:

Member Data Documentation

template<Automaton Aut>
bool vcsn::detail::delgado_profiler< Aut >::count_labels_
template<Automaton Aut>
std::vector<size_t> vcsn::detail::delgado_profiler< Aut >::transition_cache_

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