Vcsn
2.2
Be Rational
|
This is used by some epsilon removal algorithms. More...
#include <epsilon-profile.hh>
Public Types | |
using | state_t = State |
Public Member Functions | |
epsilon_profile (state_t s, size_t insp, size_t in, size_t outsp, size_t out) | |
Generate a state profile. More... | |
void | update (size_t insp, size_t in, size_t outsp, size_t out) |
bool | operator< (const epsilon_profile &r) const |
Whether l < r for the max-heap. More... | |
Public Attributes | |
state_t | state |
From the heap's top, recover state to eliminate. More... | |
size_t | in_sp |
Number of incoming spontaneous transitions. More... | |
size_t | in_nsp |
Number of incoming non-spontaneous transitions. More... | |
size_t | out_sp |
Number of outgoing spontaneous transitions. More... | |
size_t | out_nsp |
Number of outgoing non-spontaneous transitions. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const epsilon_profile &p) |
This is used by some epsilon removal algorithms.
The structure contains the data needed to compare the elimination order between states. Code profiling shows that we spend too much time iterating on outgoing and inconing transitions of states to compute the order of elimination. This structure caches what needs to be compared, and provides the comparison operator.
Definition at line 18 of file epsilon-profile.hh.
using vcsn::detail::epsilon_profile< State >::state_t = State |
Definition at line 20 of file epsilon-profile.hh.
|
inline |
Generate a state profile.
s | state handle |
insp | number of incoming spontaneous transitions to s |
in | number of incoming transitions to a |
outsp | number of outgoing spontaneous transitions from s |
out | number of outgoing transitions from s |
Definition at line 40 of file epsilon-profile.hh.
|
inline |
Whether l < r for the max-heap.
Compare priorities: return true if r should be treated before l. Must be strict.
Definition at line 61 of file epsilon-profile.hh.
References vcsn::detail::epsilon_profile< State >::in_sp, vcsn::detail::epsilon_profile< State >::out_nsp, vcsn::detail::epsilon_profile< State >::out_sp, and vcsn::detail::epsilon_profile< State >::state.
|
inline |
Definition at line 48 of file epsilon-profile.hh.
|
friend |
Definition at line 74 of file epsilon-profile.hh.
size_t vcsn::detail::epsilon_profile< State >::in_nsp |
Number of incoming non-spontaneous transitions.
Definition at line 27 of file epsilon-profile.hh.
size_t vcsn::detail::epsilon_profile< State >::in_sp |
Number of incoming spontaneous transitions.
Definition at line 25 of file epsilon-profile.hh.
Referenced by vcsn::detail::epsilon_profile< State >::operator<().
size_t vcsn::detail::epsilon_profile< State >::out_nsp |
Number of outgoing non-spontaneous transitions.
Definition at line 31 of file epsilon-profile.hh.
Referenced by vcsn::detail::epsilon_profile< State >::operator<().
size_t vcsn::detail::epsilon_profile< State >::out_sp |
Number of outgoing spontaneous transitions.
Definition at line 29 of file epsilon-profile.hh.
Referenced by vcsn::detail::epsilon_profile< State >::operator<().
state_t vcsn::detail::epsilon_profile< State >::state |
From the heap's top, recover state to eliminate.
Definition at line 23 of file epsilon-profile.hh.
Referenced by vcsn::detail::epsilon_profile< State >::operator<().