Vcsn  2.2
Be Rational
vcsn::detail::epsilon_profile< State > Struct Template Reference

This is used by some epsilon removal algorithms. More...

#include <epsilon-profile.hh>

Collaboration diagram for vcsn::detail::epsilon_profile< State >:

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)
 

Detailed Description

template<typename State>
struct vcsn::detail::epsilon_profile< State >

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.

Member Typedef Documentation

template<typename State >
using vcsn::detail::epsilon_profile< State >::state_t = State

Definition at line 20 of file epsilon-profile.hh.

Constructor & Destructor Documentation

template<typename State >
vcsn::detail::epsilon_profile< State >::epsilon_profile ( state_t  s,
size_t  insp,
size_t  in,
size_t  outsp,
size_t  out 
)
inline

Generate a state profile.

Parameters
sstate handle
inspnumber of incoming spontaneous transitions to s
innumber of incoming transitions to a
outspnumber of outgoing spontaneous transitions from s
outnumber of outgoing transitions from s

Definition at line 40 of file epsilon-profile.hh.

Member Function Documentation

template<typename State >
bool vcsn::detail::epsilon_profile< State >::operator< ( const epsilon_profile< State > &  r) const
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.

template<typename State >
void vcsn::detail::epsilon_profile< State >::update ( size_t  insp,
size_t  in,
size_t  outsp,
size_t  out 
)
inline

Definition at line 48 of file epsilon-profile.hh.

Friends And Related Function Documentation

template<typename State >
std::ostream& operator<< ( std::ostream &  o,
const epsilon_profile< State > &  p 
)
friend

Definition at line 74 of file epsilon-profile.hh.

Member Data Documentation

template<typename State >
size_t vcsn::detail::epsilon_profile< State >::in_nsp

Number of incoming non-spontaneous transitions.

Definition at line 27 of file epsilon-profile.hh.

template<typename State >
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<().

template<typename State >
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<().

template<typename State >
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<().

template<typename State >
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<().


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