![]() |
Vcsn
2.1
Be Rational
|
Eliminate states in an automaton whose labelset is oneset. More...
#include <to-expression.hh>
Public Types | |
using | profiler_t = Profiler |
using | profile_t = typename profiler_t::state_profile |
using | automaton_t = typename std::remove_cv< Aut >::type |
using | state_t = state_t_of< automaton_t > |
Public Member Functions | |
state_eliminator (automaton_t &aut, profiler_t &profiler) | |
void | operator() (state_t s) |
Eliminate state s. More... | |
void | operator() () |
Eliminate all the states, in the order specified by next_state. More... | |
Private Types | |
using | heap_t = boost::heap::fibonacci_heap< profile_t > |
Max-heap to decide the order of state-elimination. More... | |
Private Member Functions | |
void | update_heap_ () |
void | show_heap_ () const |
Show the heap, for debugging. More... | |
template<typename Kind = typename context_t_of<automaton_t>::kind_t> | |
auto | eliminate_state_ (state_t s) -> enable_if_t< std::is_same< Kind, labels_are_one >::value, void > |
Eliminate state s in the case of labels are one. More... | |
template<typename Kind > | |
auto | eliminate_state_impl_ (state_t s) -> enable_if_t< std::is_same< Kind, labels_are_expressions >::value, void > |
Eliminate state s in the case of labels are expressions. More... | |
Private Attributes | |
automaton_t | aut_ |
The automaton we work on. More... | |
profiler_t & | profiler_ |
The profiler we work with. Corresponding to a specific heuristic. More... | |
heap_t | todo_ |
std::vector< typename heap_t::handle_type > | handles_ |
Map: state -> heap-handle. More... | |
std::unordered_set< state_t > | neighbors_ |
Eliminate states in an automaton whose labelset is oneset.
Definition at line 212 of file to-expression.hh.
using vcsn::detail::state_eliminator< Aut, Profiler >::automaton_t = typename std::remove_cv<Aut>::type |
Definition at line 216 of file to-expression.hh.
|
private |
Max-heap to decide the order of state-elimination.
Definition at line 391 of file to-expression.hh.
using vcsn::detail::state_eliminator< Aut, Profiler >::profile_t = typename profiler_t::state_profile |
Definition at line 215 of file to-expression.hh.
using vcsn::detail::state_eliminator< Aut, Profiler >::profiler_t = Profiler |
Definition at line 214 of file to-expression.hh.
using vcsn::detail::state_eliminator< Aut, Profiler >::state_t = state_t_of<automaton_t> |
Definition at line 217 of file to-expression.hh.
|
inline |
|
inlineprivate |
Eliminate state s in the case of labels are one.
Definition at line 293 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::aut_, vcsn::detail::make_vector(), vcsn::detail::state_eliminator< Aut, Profiler >::neighbors_, vcsn::detail::state_eliminator< Aut, Profiler >::profiler_, and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::operator()().
|
inlineprivate |
Eliminate state s in the case of labels are expressions.
Definition at line 345 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::aut_, vcsn::detail::make_vector(), vcsn::detail::state_eliminator< Aut, Profiler >::neighbors_, vcsn::detail::state_eliminator< Aut, Profiler >::profiler_, and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
|
inline |
Eliminate state s.
Definition at line 229 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::aut_, vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_(), vcsn::require(), and vcsn::detail::state_eliminator< Aut, Profiler >::todo_.
|
inline |
Eliminate all the states, in the order specified by next_state.
Definition at line 244 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_(), and vcsn::detail::state_eliminator< Aut, Profiler >::todo_.
|
inlineprivate |
Show the heap, for debugging.
Definition at line 280 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::todo_.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
|
inlineprivate |
Definition at line 259 of file to-expression.hh.
References vcsn::detail::state_eliminator< Aut, Profiler >::aut_, vcsn::detail::state_eliminator< Aut, Profiler >::handles_, vcsn::detail::state_eliminator< Aut, Profiler >::neighbors_, vcsn::detail::state_eliminator< Aut, Profiler >::profiler_, vcsn::detail::state_eliminator< Aut, Profiler >::show_heap_(), and vcsn::detail::state_eliminator< Aut, Profiler >::todo_.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_(), and vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_impl_().
|
private |
The automaton we work on.
Definition at line 386 of file to-expression.hh.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_(), vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_impl_(), vcsn::detail::state_eliminator< Aut, Profiler >::operator()(), vcsn::detail::state_eliminator< Aut, Profiler >::state_eliminator(), and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
|
private |
Map: state -> heap-handle.
Definition at line 394 of file to-expression.hh.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::state_eliminator(), and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
|
private |
|
private |
The profiler we work with. Corresponding to a specific heuristic.
Definition at line 388 of file to-expression.hh.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_(), vcsn::detail::state_eliminator< Aut, Profiler >::eliminate_state_impl_(), vcsn::detail::state_eliminator< Aut, Profiler >::state_eliminator(), and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().
|
private |
Definition at line 392 of file to-expression.hh.
Referenced by vcsn::detail::state_eliminator< Aut, Profiler >::operator()(), vcsn::detail::state_eliminator< Aut, Profiler >::show_heap_(), vcsn::detail::state_eliminator< Aut, Profiler >::state_eliminator(), and vcsn::detail::state_eliminator< Aut, Profiler >::update_heap_().