17 template <
typename Aut>
27 template <
typename Aut>
28 using path_t_of = std::vector<transition_t_of<Aut>>;
40 template <Automaton Aut>
44 return aut->all_states().back() + 1;
50 template <Automaton Aut>
53 return (aut->all_transitions().empty()
55 : aut->all_transitions().back() + 1);
66 template <Automaton Aut>
69 return aut->all_out(s);
76 template <Automaton Aut,
typename Pred>
85 template <Automaton Aut>
91 return aut->dst_of(t) != aut->post();
98 template <Automaton Aut>
104 return aut->labelset()->equal(aut->label_of(t), l);
115 template <Automaton Aut>
118 return aut->all_in(s);
125 template <Automaton Aut,
typename Pred>
134 template <Automaton Aut>
140 return aut->src_of(t) != aut->pre();
147 template <Automaton Aut>
153 return aut->labelset()->equal(aut->label_of(t), l);
166 template <Automaton Aut>
168 -> decltype(aut->all_out(aut->pre()))
170 return aut->all_out(aut->pre());
177 template <Automaton Aut>
179 -> decltype(aut->all_in(aut->post()))
181 return aut->all_in(aut->post());
188 template <Automaton Aut>
194 return aut->dst_of(t) == d;
199 template <Automaton Aut>
205 aut->del_transition(t);
213 template <Automaton Aut>
216 return aut->all_transitions();
221 template <Automaton Aut,
typename Pred>
228 template <Automaton Aut>
231 return aut->src_of(t) != aut->pre() && aut->dst_of(t) != aut->post();
236 template <Automaton Aut>
247 template <Automaton Aut>
auto all_transitions(const Aut &aut)
All the transition indexes between all states (including pre and post).
auto initial_transitions(const Aut &aut) -> decltype(aut->all_out(aut->pre()))
Indexes of transitions to (visible) initial states.
container_filter_range< Cont, Pred > make_container_filter_range(const Cont &cont, Pred pred)
typename detail::transition_t_of_impl< base_t< ValueSet > >::type transition_t_of
typename detail::state_t_of_impl< base_t< ValueSet > >::type state_t_of
size_t states_size(const Aut &aut)
The largest state number, plus one.
bool operator()(transition_t_of< Aut > t)
std::vector< typename Cont::value_type > make_vector(const Cont &cont)
The content of cont as a vector.
bool is_special(const Aut &aut, transition_t_of< Aut > t)
Whether this transition is from pre or to post.
auto final_transitions(const Aut &aut) -> decltype(aut->all_in(aut->post()))
Indexes of transitions from (visible) final states.
std::vector< transition_t_of< Aut > > path_t_of
A list of transitions representing a path.
auto all_in(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions entering state s.
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
auto outin(const Aut &aut, state_t_of< Aut > s, state_t_of< Aut > d)
Indexes of visible transitions from state s to state d.
auto in(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions arriving to state s.
Needed for GCC 5 and 6 that refuse deduced return type for transitions() when using a lambda...
typename detail::label_t_of_impl< base_t< ValueSet > >::type label_t_of
std::vector< transition_t_of< Aut > > predecessors_t_of
A state-indexed vector of predecessor transitions from the path path.
size_t transitions_size(const Aut &aut)
The largest transition number, plus one.
auto transitions(const Aut &aut) -> decltype(all_transitions(aut, is_special_t< Aut >
All the transition indexes between visible states.
void del_transition(const Aut &aut, state_t_of< Aut > s, state_t_of< Aut > d)
Remove all the transitions between s and d.
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.