17 #ifndef AWALI_MISC_ADD_EPSILON_TRANS_HH
18 #define AWALI_MISC_ADD_EPSILON_TRANS_HH
25 template<
bool HAS_ONE>
28 template<
typename Aut>
36 throw std::runtime_error(
"No epsilon transition");
39 template<
typename Aut>
46 throw std::runtime_error(
"No epsilon transition");
49 template<
typename Aut>
57 throw std::runtime_error(
"No epsilon transition");
60 template<
typename Labelset>
62 typename Labelset::value_t
64 throw std::runtime_error(
"No epsilon in labelset");
67 template<
typename Labelset>
74 template<
typename Aut>
79 throw std::runtime_error(
"No epsilon transition");
90 template<
typename Aut>
98 return a->new_transition(src, dst, a->context().labelset()->one(),w);
101 template<
typename Aut>
109 return a->set_transition(src, dst, a->context().labelset()->one(),w);
112 template<
typename Aut>
120 return a->add_transition(src, dst, a->context().labelset()->one(),w);
123 template<
typename Aut>
129 a->del_transition(src, dst, a->context().labelset()->one());
132 template<
typename Labelset>
134 typename Labelset::value_t
139 template<
typename Labelset>
143 return Labelset::is_one(l);
162 template <
typename Aut>
182 template <
typename Aut>
203 template <
typename Aut>
221 template <
typename Aut>
243 template <
typename Aut>
262 template <
typename Aut>
282 template <
typename Aut>
303 template <
typename Labelset>
305 typename Labelset::value_t
307 return internal::if_has_one<Labelset::has_one()>::template get_epsilon<Labelset>();
317 template <
typename Labelset>
constant< type_t::one, Label, Weight > one
Definition: fwd.hh:116
ctx::lan_char::value_t get_epsilon()
Helper to get the value of epsilon.
Definition: automaton.hh:74
typename internal::weight_t_of_impl< internal::base_t< ValueSet > >::type weight_t_of
Helper to retrieve the type of the weights of a value set.
Definition: traits.hh:81
transition_t set_epsilon_trans(Aut a, state_t src, state_t dst, weight_t_of< Aut > w)
Helper to set an epsilon transition.
Definition: add_epsilon_trans.hh:185
bool is_epsilon(ctx::lan_char::value_t v)
Definition: automaton.hh:78
transition_t new_epsilon_trans(Aut a, state_t src, state_t dst, weight_t_of< Aut > w)
Helper to create a new epsilon transition.
Definition: add_epsilon_trans.hh:165
weight_t_of< Aut > add_epsilon_trans(Aut a, state_t src, state_t dst, weight_t_of< Aut > w)
Helper to add an epsilon transition.
Definition: add_epsilon_trans.hh:206
void del_epsilon_trans(Aut a, state_t src, state_t dst)
Helper to delete an epsilon transition.
Definition: add_epsilon_trans.hh:224
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21
unsigned transition_t
Definition: types.hh:22
static auto set_epsilon_trans(Aut a, state_t src, state_t dst, ::awali::sttc::weight_t_of< Aut > w) -> transition_t
Definition: add_epsilon_trans.hh:104
static bool is_epsilon(const typename Labelset::value_t &l)
Definition: add_epsilon_trans.hh:142
static void del_epsilon_trans(Aut a, state_t src, state_t dst)
Definition: add_epsilon_trans.hh:126
static Labelset::value_t get_epsilon()
Definition: add_epsilon_trans.hh:135
static auto add_epsilon_trans(Aut a, state_t src, state_t dst, ::awali::sttc::weight_t_of< Aut > w) -> ::awali::sttc::weight_t_of< Aut >
Definition: add_epsilon_trans.hh:115
static auto new_epsilon_trans(Aut a, state_t src, state_t dst, ::awali::sttc::weight_t_of< Aut > w) -> transition_t
Definition: add_epsilon_trans.hh:93
Definition: add_epsilon_trans.hh:26
static Labelset::value_t get_epsilon()
Definition: add_epsilon_trans.hh:63
static auto new_epsilon_trans(Aut, state_t, state_t, ::awali::sttc::weight_t_of< Aut >) -> transition_t
Definition: add_epsilon_trans.hh:31
static void del_epsilon_trans(Aut, state_t, state_t)
Definition: add_epsilon_trans.hh:77
static auto set_epsilon_trans(Aut, state_t, state_t, ::awali::sttc::weight_t_of< Aut >) -> transition_t
Definition: add_epsilon_trans.hh:42
static auto add_epsilon_trans(Aut, state_t, state_t, ::awali::sttc::weight_t_of< Aut >) -> ::awali::sttc::weight_t_of< Aut >
Definition: add_epsilon_trans.hh:52
static bool is_epsilon(const typename Labelset::value_t &)
Definition: add_epsilon_trans.hh:70