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>
47 throw std::runtime_error(
"No epsilon transition");
50 template<
typename Aut>
58 throw std::runtime_error(
"No epsilon transition");
61 template<
typename Labelset>
63 typename Labelset::value_t
65 throw std::runtime_error(
"No epsilon in labelset");
68 template<
typename Labelset>
75 template<
typename Aut>
81 throw std::runtime_error(
"No epsilon transition");
92 template<
typename Aut>
100 return a->new_transition(src, dst, a->context().labelset()->one(),w);
103 template<
typename Aut>
111 return a->set_transition(src, dst, a->context().labelset()->one(),w);
114 template<
typename Aut>
122 return a->add_transition(src, dst, a->context().labelset()->one(),w);
125 template<
typename Aut>
131 a->del_transition(src, dst, a->context().labelset()->one());
134 template<
typename Labelset>
136 typename Labelset::value_t
141 template<
typename Labelset>
145 return Labelset::is_one(l);
164 template <
typename Aut>
184 template <
typename Aut>
205 template <
typename Aut>
223 template <
typename Aut>
245 template <
typename Aut>
264 template <
typename Aut>
284 template <
typename Aut>
305 template <
typename Labelset>
307 typename Labelset::value_t
319 template <
typename Labelset>
constant< type_t::one, Label, Weight > one
Definition: fwd.hh:116
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
bool is_epsilon(const typename Labelset::value_t &l)
Helper to test if a label is epsilon.
Definition: add_epsilon_trans.hh:322
Labelset::value_t get_epsilon()
Helper to get the value of epsilon.
Definition: add_epsilon_trans.hh:308
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:187
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:167
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:208
void del_epsilon_trans(Aut a, state_t src, state_t dst)
Helper to delete an epsilon transition.
Definition: add_epsilon_trans.hh:226
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:106
static bool is_epsilon(const typename Labelset::value_t &l)
Definition: add_epsilon_trans.hh:144
static void del_epsilon_trans(Aut a, state_t src, state_t dst)
Definition: add_epsilon_trans.hh:128
static Labelset::value_t get_epsilon()
Definition: add_epsilon_trans.hh:137
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:117
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:95
Definition: add_epsilon_trans.hh:26
static Labelset::value_t get_epsilon()
Definition: add_epsilon_trans.hh:64
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:31
static bool is_epsilon(const typename Labelset::value_t &l)
Definition: add_epsilon_trans.hh:71
static void del_epsilon_trans(Aut a, state_t src, state_t dst)
Definition: add_epsilon_trans.hh:78
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:42
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:53