Vcsn  2.2
Be Rational
vcsn::detail::properer< Aut > Class Template Reference

Spontaneous transition elimination. More...

#include <proper.hh>

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

Public Member Functions

 properer (automaton_t aut, bool prune=true, const std::string &algo="auto")
 Remove the epsilon-transitions of the input. More...
 
aut_proper_t operator() () const
 Proper automata with proper context. More...
 
void here ()
 In-place spontaneous transition removal. More...
 

Private Types

using automaton_t = std::remove_cv_t< Aut >
 
using self_t = properer
 
using weightset_t = weightset_t_of< automaton_t >
 
using labelset_t = labelset_t_of< automaton_t >
 
using aut_proper_t = fresh_automaton_t_of< automaton_t, detail::proper_context< context_t_of< automaton_t >>>
 The result type. More...
 

Private Member Functions

aut_proper_t remover_ () const
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::ABSVAL, aut_proper_tproper_star_ () const
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::NON_STARRABLE, aut_proper_tproper_star_ () const
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::STARRABLE, aut_proper_tproper_star_ () const
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::TOPS, aut_proper_tproper_star_ () const
 
void remover_here_ ()
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::ABSVAL > proper_star_here_ ()
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::NON_STARRABLE > proper_star_here_ ()
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::STARRABLE > proper_star_here_ ()
 
template<star_status_t Status>
std::enable_if_t< Status==star_status_t::TOPS > proper_star_here_ ()
 

Private Attributes

automaton_t aut_
 
bool prune_
 
const std::string & algo_
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::properer< Aut >

Spontaneous transition elimination.

Template Parameters
Autthe automaton type on which to run.

Definition at line 29 of file proper.hh.

Member Typedef Documentation

The result type.

Definition at line 37 of file proper.hh.

template<Automaton Aut>
using vcsn::detail::properer< Aut >::automaton_t = std::remove_cv_t<Aut>
private

Definition at line 31 of file proper.hh.

template<Automaton Aut>
using vcsn::detail::properer< Aut >::labelset_t = labelset_t_of<automaton_t>
private

Definition at line 34 of file proper.hh.

template<Automaton Aut>
using vcsn::detail::properer< Aut >::self_t = properer
private

Definition at line 32 of file proper.hh.

template<Automaton Aut>
using vcsn::detail::properer< Aut >::weightset_t = weightset_t_of<automaton_t>
private

Definition at line 33 of file proper.hh.

Constructor & Destructor Documentation

template<Automaton Aut>
vcsn::detail::properer< Aut >::properer ( automaton_t  aut,
bool  prune = true,
const std::string &  algo = "auto" 
)
inline

Remove the epsilon-transitions of the input.

The behaviour of this method depends on the star_status of the weight_set:

– starrable : always valid, does not throw any exception – tops : the proper algo is directly launched on the input; if it returns false, an exception is launched – non_starrable / absval: is_valid is called before launching the algorithm.

Parameters
autThe automaton in which epsilon-transitions will be removed
pruneWhether to remove states that become inaccessible.
Exceptions
runtime_errorif the input is not valid

Definition at line 54 of file proper.hh.

Member Function Documentation

template<Automaton Aut>
void vcsn::detail::properer< Aut >::here ( )
inline

In-place spontaneous transition removal.

Definition at line 69 of file proper.hh.

template<Automaton Aut>
aut_proper_t vcsn::detail::properer< Aut >::operator() ( ) const
inline

Proper automata with proper context.

Definition at line 63 of file proper.hh.

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::ABSVAL, aut_proper_t> vcsn::detail::properer< Aut >::proper_star_ ( ) const
inlineprivate

Definition at line 113 of file proper.hh.

References vcsn::detail::properer< Aut >::aut_, vcsn::is_valid(), vcsn::detail::properer< Aut >::remover_(), and vcsn::require().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::NON_STARRABLE, aut_proper_t> vcsn::detail::properer< Aut >::proper_star_ ( ) const
inlineprivate

Definition at line 121 of file proper.hh.

References vcsn::detail::properer< Aut >::aut_, vcsn::is_valid(), vcsn::detail::properer< Aut >::remover_(), and vcsn::require().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::STARRABLE, aut_proper_t> vcsn::detail::properer< Aut >::proper_star_ ( ) const
inlineprivate

Definition at line 129 of file proper.hh.

References vcsn::detail::properer< Aut >::remover_().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::TOPS, aut_proper_t> vcsn::detail::properer< Aut >::proper_star_ ( ) const
inlineprivate

Definition at line 136 of file proper.hh.

References vcsn::detail::properer< Aut >::remover_().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::ABSVAL> vcsn::detail::properer< Aut >::proper_star_here_ ( )
inlineprivate

Definition at line 168 of file proper.hh.

References vcsn::detail::properer< Aut >::aut_, vcsn::is_valid(), vcsn::detail::properer< Aut >::remover_here_(), and vcsn::require().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::NON_STARRABLE> vcsn::detail::properer< Aut >::proper_star_here_ ( )
inlineprivate

Definition at line 176 of file proper.hh.

References vcsn::detail::properer< Aut >::aut_, vcsn::is_valid(), vcsn::detail::properer< Aut >::remover_here_(), and vcsn::require().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::STARRABLE> vcsn::detail::properer< Aut >::proper_star_here_ ( )
inlineprivate

Definition at line 184 of file proper.hh.

References vcsn::detail::properer< Aut >::remover_here_().

Here is the call graph for this function:

template<Automaton Aut>
template<star_status_t Status>
std::enable_if_t<Status == star_status_t::TOPS> vcsn::detail::properer< Aut >::proper_star_here_ ( )
inlineprivate

Definition at line 191 of file proper.hh.

References vcsn::detail::properer< Aut >::remover_here_().

Here is the call graph for this function:

template<Automaton Aut>
aut_proper_t vcsn::detail::properer< Aut >::remover_ ( ) const
inlineprivate

Definition at line 80 of file proper.hh.

References vcsn::detail::properer< Aut >::algo_, vcsn::copy(), vcsn::detail::map(), vcsn::detail::epsilon_remover_distance< Aut, has_one >::prune_, vcsn::detail::epsilon_remover< Aut, has_one >::prune_, and vcsn::detail::epsilon_remover_separate< Aut, has_one >::prune_.

Referenced by vcsn::detail::properer< Aut >::proper_star_().

Here is the call graph for this function:

template<Automaton Aut>
void vcsn::detail::properer< Aut >::remover_here_ ( )
inlineprivate

Definition at line 153 of file proper.hh.

References vcsn::detail::properer< Aut >::algo_, vcsn::detail::properer< Aut >::aut_, vcsn::detail::epsilon_remover< Aut, has_one >::in_situ_remover(), and vcsn::detail::properer< Aut >::prune_.

Referenced by vcsn::detail::properer< Aut >::proper_star_here_().

Here is the call graph for this function:

Member Data Documentation

template<Automaton Aut>
const std::string& vcsn::detail::properer< Aut >::algo_
private
template<Automaton Aut>
bool vcsn::detail::properer< Aut >::prune_
private

Definition at line 204 of file proper.hh.

Referenced by vcsn::detail::properer< Aut >::remover_here_().


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