Vcsn  2.8
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

◆ aut_proper_t

The result type.

Definition at line 37 of file proper.hh.

◆ automaton_t

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

Definition at line 31 of file proper.hh.

◆ labelset_t

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

Definition at line 34 of file proper.hh.

◆ self_t

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

Definition at line 32 of file proper.hh.

◆ weightset_t

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

◆ properer()

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
algothe algorithm to use.
Exceptions
runtime_errorif the input is not valid

Definition at line 55 of file proper.hh.

Member Function Documentation

◆ here()

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

In-place spontaneous transition removal.

Definition at line 70 of file proper.hh.

◆ operator()()

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

Proper automata with proper context.

Definition at line 64 of file proper.hh.

◆ proper_star_() [1/4]

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 114 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:

◆ proper_star_() [2/4]

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 122 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:

◆ proper_star_() [3/4]

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 130 of file proper.hh.

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

Here is the call graph for this function:

◆ proper_star_() [4/4]

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 137 of file proper.hh.

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

Here is the call graph for this function:

◆ proper_star_here_() [1/4]

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 169 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:

◆ proper_star_here_() [2/4]

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 177 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:

◆ proper_star_here_() [3/4]

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 185 of file proper.hh.

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

Here is the call graph for this function:

◆ proper_star_here_() [4/4]

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 192 of file proper.hh.

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

Here is the call graph for this function:

◆ remover_()

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

Definition at line 81 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:

◆ remover_here_()

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

Definition at line 154 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

◆ algo_

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

◆ aut_

◆ prune_

template<Automaton Aut>
bool vcsn::detail::properer< Aut >::prune_
private

Definition at line 205 of file proper.hh.

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


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