5 #include <unordered_map>
6 #include <unordered_set>
10 #include <boost/lexical_cast.hpp>
11 #include <boost/heap/fibonacci_heap.hpp>
15 #include <vcsn/algos/fwd.hh>
35 template <
typename Aut>
61 const std::string& algo =
"auto")
69 return proper_star<weightset_t::star_status()>();
81 else if (
algo_ ==
"separate")
86 else if (
algo_ ==
"distance")
92 raise(
"proper: invalid algorithm: ",
algo_);
95 template <star_status_t Status>
103 catch (
const std::runtime_error&)
105 raise(
"proper: invalid automaton");
109 template <star_status_t Status>
117 template <star_status_t Status>
124 template <star_status_t Status>
137 template <
typename Aut>
140 const std::string& algo =
"auto")
163 template <
typename Aut>
166 bool prune =
true,
const std::string& algo =
"auto")
186 template <
typename Aut,
typename Dir,
typename Bool,
typename String>
188 const std::string& algo)
190 const auto& a = aut->as<Aut>();
automaton proper(const automaton &aut, direction dir, bool prune, const std::string &algo)
Bridge.
properer(const automaton_t &aut, bool prune=true, const std::string &algo="auto")
Remove the epsilon-transitions of the input.
weightset_mixin< detail::r_impl > r
weightset_t_of< automaton_t > weightset_t
vcsn::enable_if_t< Status==star_status_t::NON_STARRABLE, aut_proper_t > proper_star()
labelset_t_of< automaton_t > labelset_t
typename std::remove_cv< Aut >::type automaton_t
std::string type(const automaton &a)
The implementation type of a.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
typename std::enable_if< Cond, T >::type enable_if_t
vcsn::enable_if_t< Status==star_status_t::ABSVAL, aut_proper_t > proper_star()
vcsn::enable_if_t< Status==star_status_t::STARRABLE, aut_proper_t > proper_star()
vcsn::enable_if_t< Status==star_status_t::TOPS, aut_proper_t > proper_star()
This class contains the core of the proper algorithm.
Aut transpose(const transpose_automaton< Aut > &aut)
typename Aut::element_type::template fresh_automaton_t< Context > fresh_automaton_t_of
aut_proper_t operator()()
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
AutOut copy(const AutIn &input, KeepState keep_state, KeepTrans keep_trans)
A copy of input keeping only its states that are accepted by keep_state.
std::shared_ptr< detail::automaton_base > automaton
auto proper(const Aut &aut, direction dir=direction::backward, bool prune=true, const std::string &algo="auto") -> fresh_automaton_t_of< Aut, detail::proper_context< context_t_of< Aut >>>
Eliminate spontaneous transitions.
fresh_automaton_t_of< automaton_t, detail::proper_context< context_t_of< automaton_t >>> aut_proper_t
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
void require(bool b, Args &&...args)
If b is not verified, raise an error with args as message.
bool is_valid(const Aut &aut)
const std::string & algo_
This class contains the core of the proper algorithm.
auto make_properer(Aut aut, bool prune=true, const std::string &algo="auto")
#define BUILTIN_UNREACHABLE()
This class contains the core of the proper algorithm.