Vcsn
2.2
Be Rational
|
Compute a state profile for state-elimination based on the Delgado-Morais heuristic. More...
#include <to-expression.hh>
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_ |
Compute a state profile for state-elimination based on the Delgado-Morais heuristic.
Definition at line 98 of file to-expression.hh.
using vcsn::detail::delgado_profiler< Aut >::automaton_t = Aut |
Definition at line 100 of file to-expression.hh.
using vcsn::detail::delgado_profiler< Aut >::state_t = state_t_of<automaton_t> |
Definition at line 101 of file to-expression.hh.
using vcsn::detail::delgado_profiler< Aut >::transition_t = transition_t_of<automaton_t> |
Definition at line 102 of file to-expression.hh.
|
inline |
Build a generator of Delgado-Morais state profiles.
aut | the input automaton |
count_labels | whether we use the width of the expressions, instead of the length. |
Definition at line 109 of file to-expression.hh.
|
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_.
|
inline |
Definition at line 138 of file to-expression.hh.
References vcsn::detail::delgado_profiler< Aut >::update().
|
inline |
The "weight" of a transition.
That is to say, the size of its expression.
Definition at line 148 of file to-expression.hh.
References vcsn::detail::delgado_profiler< Aut >::aut_, vcsn::detail::delgado_profiler< Aut >::count_labels_, and vcsn::detail::delgado_profiler< Aut >::transition_cache_.
Referenced by vcsn::detail::delgado_profiler< Aut >::update().
|
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().
automaton_t vcsn::detail::delgado_profiler< Aut >::aut_ |
Definition at line 210 of file to-expression.hh.
Referenced by vcsn::detail::delgado_profiler< Aut >::size_of_transition(), and vcsn::detail::delgado_profiler< Aut >::update().
bool vcsn::detail::delgado_profiler< Aut >::count_labels_ |
Definition at line 211 of file to-expression.hh.
Referenced by vcsn::detail::delgado_profiler< Aut >::size_of_transition().
std::vector<size_t> vcsn::detail::delgado_profiler< Aut >::transition_cache_ |
Definition at line 212 of file to-expression.hh.
Referenced by vcsn::detail::delgado_profiler< Aut >::invalidate_cache(), and vcsn::detail::delgado_profiler< Aut >::size_of_transition().