Vcsn
2.0
Be Rational
|
Hide some states of an automaton. More...
#include <filter.hh>
Public Types | |
using | automaton_t = Aut |
using | super_t = automaton_decorator< automaton_t > |
using | state_t = state_t_of< automaton_t > |
using | transition_t = transition_t_of< automaton_t > |
using | label_t = label_t_of< automaton_t > |
using | states_t = std::unordered_set< state_t > |
States set that we want to filter. More... | |
using | tr_cont_t = std::vector< transition_t > |
using | states_output_t = container_filter_range< boost::integer_range< state_t >> |
Public Types inherited from vcsn::detail::automaton_decorator< Aut > | |
using | automaton_t = Aut |
The type of automaton to wrap. More... | |
using | automaton_nocv_t = typename automaton_t::element_type::automaton_nocv_t |
The (shared pointer) type to use it we have to create an automaton of the same (underlying) type. More... | |
using | context_t = Context |
using | kind_t = typename context_t::kind_t |
using | labelset_t = typename context_t::labelset_t |
using | labelset_ptr = typename context_t::labelset_ptr |
using | label_t = typename labelset_t::value_t |
using | weightset_t = typename context_t::weightset_t |
using | weightset_ptr = typename context_t::weightset_ptr |
using | weight_t = typename weightset_t::value_t |
using | state_t = state_t_of< automaton_t > |
using | transition_t = transition_t_of< automaton_t > |
using | transitions_output_t = typename Aut::element_type::transitions_output_t |
Public Member Functions | |
filter_automaton_impl (const automaton_t &input, const states_t &ss) | |
std::string | vname (bool full=true) const |
Dynamic name. More... | |
bool | state_has_name (state_t s) const |
bool | has_state (state_t s) const |
std::ostream & | print_state_name (state_t s, std::ostream &o, const std::string &fmt="text", bool delimit=false) const |
size_t | num_states () |
size_t | num_all_states () |
template<typename Pred > | |
states_output_t | all_states (Pred pred) const |
states_output_t | all_states () const |
states_output_t | states () const |
template<typename Pred > | |
super_t::transitions_output_t | all_transitions (Pred pred) const |
super_t::transitions_output_t | all_transitions () const |
All the transition indexes between all states (including pre and post). More... | |
super_t::transitions_output_t | transitions () const |
All the transition indexes between visible states. More... | |
template<typename Pred > | |
container_filter_range< const tr_cont_t & > | all_out (state_t s, Pred pred) const |
container_filter_range< const tr_cont_t & > | all_out (state_t s) const |
container_filter_range< const tr_cont_t & > | out (state_t s) const |
container_filter_range< const tr_cont_t & > | out (state_t s, const label_t &l) const |
template<typename Pred > | |
container_filter_range< const tr_cont_t & > | all_in (state_t s, Pred pred) const |
container_filter_range< const tr_cont_t & > | all_in (state_t s) const |
container_filter_range< const tr_cont_t & > | in (state_t s) const |
container_filter_range< const tr_cont_t & > | in (state_t s, const label_t &l) const |
automaton_t::element_type::automaton_nocv_t | strip () const |
container_filter_range< const tr_cont_t & > | initial_transitions () const |
Indexes of transitions to visible initial states. More... | |
container_filter_range< const tr_cont_t & > | final_transitions () const |
Indexes of transitions from visible final states. More... | |
Public Member Functions inherited from vcsn::detail::automaton_decorator< Aut > | |
automaton_decorator (automaton_t aut) | |
automaton_decorator (const automaton_decorator &aut) | |
automaton_decorator (const context_t &ctx) | |
automaton_decorator (automaton_decorator &&aut) | |
automaton_decorator & | operator= (automaton_decorator &&that) |
automaton_t | strip () |
auto | all_in (Args &&...args) const -> decltype(aut_-> all_in(std::forward< Args >(args)...)) |
auto | all_out (Args &&...args) const -> decltype(aut_-> all_out(std::forward< Args >(args)...)) |
auto | all_states (Args &&...args) const -> decltype(aut_-> all_states(std::forward< Args >(args)...)) |
auto | all_transitions (Args &&...args) const -> decltype(aut_-> all_transitions(std::forward< Args >(args)...)) |
auto | context (Args &&...args) const -> decltype(aut_-> context(std::forward< Args >(args)...)) |
auto | dst_of (Args &&...args) const -> decltype(aut_-> dst_of(std::forward< Args >(args)...)) |
auto | final_transitions (Args &&...args) const -> decltype(aut_-> final _transitions(std |
auto | get_final_weight (Args &&...args) const -> decltype(aut_-> get_ final _weight(std |
auto | get_initial_weight (Args &&...args) const -> decltype(aut_-> get_initial_weight(std::forward< Args >(args)...)) |
auto | get_transition (Args &&...args) const -> decltype(aut_-> get_transition(std::forward< Args >(args)...)) |
auto | has_transition (Args &&...args) const -> decltype(aut_-> has_transition(std::forward< Args >(args)...)) |
auto | has_state (Args &&...args) const -> decltype(aut_-> has_state(std::forward< Args >(args)...)) |
auto | in (Args &&...args) const -> decltype(aut_-> in(std::forward< Args >(args)...)) |
auto | initial_transitions (Args &&...args) const -> decltype(aut_-> initial_transitions(std::forward< Args >(args)...)) |
auto | is_final (Args &&...args) const -> decltype(aut_-> is_ final(std |
auto | is_initial (Args &&...args) const -> decltype(aut_-> is_initial(std::forward< Args >(args)...)) |
auto | label_of (Args &&...args) const -> decltype(aut_-> label_of(std::forward< Args >(args)...)) |
auto | labelset (Args &&...args) const -> decltype(aut_-> labelset(std::forward< Args >(args)...)) |
auto | num_all_states (Args &&...args) const -> decltype(aut_-> num_all_states(std::forward< Args >(args)...)) |
auto | num_finals (Args &&...args) const -> decltype(aut_-> num_ final s(std |
auto | num_initials (Args &&...args) const -> decltype(aut_-> num_initials(std::forward< Args >(args)...)) |
auto | num_states (Args &&...args) const -> decltype(aut_-> num_states(std::forward< Args >(args)...)) |
auto | num_transitions (Args &&...args) const -> decltype(aut_-> num_transitions(std::forward< Args >(args)...)) |
auto | out (Args &&...args) const -> decltype(aut_-> out(std::forward< Args >(args)...)) |
auto | outin (Args &&...args) const -> decltype(aut_-> outin(std::forward< Args >(args)...)) |
auto | print_state (Args &&...args) const -> decltype(aut_-> print_state(std::forward< Args >(args)...)) |
auto | print_state_name (Args &&...args) const -> decltype(aut_-> print_state_name(std::forward< Args >(args)...)) |
auto | src_of (Args &&...args) const -> decltype(aut_-> src_of(std::forward< Args >(args)...)) |
auto | state_has_name (Args &&...args) const -> decltype(aut_-> state_has_name(std::forward< Args >(args)...)) |
auto | states (Args &&...args) const -> decltype(aut_-> states(std::forward< Args >(args)...)) |
auto | transitions (Args &&...args) const -> decltype(aut_-> transitions(std::forward< Args >(args)...)) |
auto | vname (Args &&...args) const -> decltype(aut_-> vname(std::forward< Args >(args)...)) |
auto | weight_of (Args &&...args) const -> decltype(aut_-> weight_of(std::forward< Args >(args)...)) |
auto | weightset (Args &&...args) const -> decltype(aut_-> weightset(std::forward< Args >(args)...)) |
auto | add_final (Args &&...args) -> decltype(aut_-> add_ final(std |
auto | add_initial (Args &&...args) -> decltype(aut_-> add_initial(std::forward< Args >(args)...)) |
auto | add_transition (Args &&...args) -> decltype(aut_-> add_transition(std::forward< Args >(args)...)) |
auto | add_transition_copy (Args &&...args) -> decltype(aut_-> add_transition_copy(std::forward< Args >(args)...)) |
auto | add_weight (Args &&...args) -> decltype(aut_-> add_weight(std::forward< Args >(args)...)) |
auto | del_state (Args &&...args) -> decltype(aut_-> del_state(std::forward< Args >(args)...)) |
auto | del_transition (Args &&...args) -> decltype(aut_-> del_transition(std::forward< Args >(args)...)) |
auto | lmul_weight (Args &&...args) -> decltype(aut_-> lmul_weight(std::forward< Args >(args)...)) |
auto | new_state (Args &&...args) -> decltype(aut_-> new_state(std::forward< Args >(args)...)) |
auto | new_transition (Args &&...args) -> decltype(aut_-> new_transition(std::forward< Args >(args)...)) |
auto | new_transition_copy (Args &&...args) -> decltype(aut_-> new_transition_copy(std::forward< Args >(args)...)) |
auto | rmul_weight (Args &&...args) -> decltype(aut_-> rmul_weight(std::forward< Args >(args)...)) |
auto | set_final (Args &&...args) -> decltype(aut_-> set_ final(std |
auto | set_initial (Args &&...args) -> decltype(aut_-> set_initial(std::forward< Args >(args)...)) |
auto | set_transition (Args &&...args) -> decltype(aut_-> set_transition(std::forward< Args >(args)...)) |
auto | set_weight (Args &&...args) -> decltype(aut_-> set_weight(std::forward< Args >(args)...)) |
auto | unset_final (Args &&...args) -> decltype(aut_-> unset_ final(std |
auto | unset_initial (Args &&...args) -> decltype(aut_-> unset_initial(std::forward< Args >(args)...)) |
Static Public Member Functions | |
static std::string | sname () |
Static name. More... | |
Static Public Member Functions inherited from vcsn::detail::automaton_decorator< Aut > | |
static constexpr auto | null_state (Args &&...args) -> decltype(automaton_t::element_type::null_state(std::forward< Args >(args)...)) |
static constexpr auto | null_transition (Args &&...args) -> decltype(automaton_t::element_type::null_transition(std::forward< Args >(args)...)) |
static constexpr auto | post (Args &&...args) -> decltype(automaton_t::element_type::post(std::forward< Args >(args)...)) |
static constexpr auto | pre (Args &&...args) -> decltype(automaton_t::element_type::pre(std::forward< Args >(args)...)) |
static constexpr auto | sname (Args &&...args) -> decltype(automaton_t::element_type::sname(std::forward< Args >(args)...)) |
Private Attributes | |
states_t | ss_ |
The states we keep. More... | |
Additional Inherited Members | |
Protected Attributes inherited from vcsn::detail::automaton_decorator< Aut > | |
automaton_t | aut_ |
The wrapped automaton, possibly const. More... | |
Hide some states of an automaton.
using vcsn::detail::filter_automaton_impl< Aut >::automaton_t = Aut |
using vcsn::detail::filter_automaton_impl< Aut >::label_t = label_t_of<automaton_t> |
using vcsn::detail::filter_automaton_impl< Aut >::state_t = state_t_of<automaton_t> |
using vcsn::detail::filter_automaton_impl< Aut >::states_output_t = container_filter_range<boost::integer_range<state_t>> |
using vcsn::detail::filter_automaton_impl< Aut >::states_t = std::unordered_set<state_t> |
using vcsn::detail::filter_automaton_impl< Aut >::super_t = automaton_decorator<automaton_t> |
using vcsn::detail::filter_automaton_impl< Aut >::tr_cont_t = std::vector<transition_t> |
using vcsn::detail::filter_automaton_impl< Aut >::transition_t = transition_t_of<automaton_t> |
|
inline |
Definition at line 44 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
Definition at line 186 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::has(), vcsn::detail::automaton_decorator< Aut >::src_of(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
Referenced by vcsn::detail::filter_automaton_impl< Aut >::all_in(), and vcsn::detail::filter_automaton_impl< Aut >::in().
|
inline |
Definition at line 196 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_in().
|
inline |
Definition at line 148 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::detail::automaton_decorator< Aut >::dst_of(), vcsn::has(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
Referenced by vcsn::detail::filter_automaton_impl< Aut >::all_out(), and vcsn::detail::filter_automaton_impl< Aut >::out().
|
inline |
Definition at line 158 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_out().
|
inline |
Definition at line 93 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::has(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
Definition at line 99 of file filter.hh.
Referenced by vcsn::detail::filter_automaton_impl< Aut >::num_all_states(), and vcsn::detail::filter_automaton_impl< Aut >::states().
|
inline |
Definition at line 117 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::detail::automaton_decorator< Aut >::dst_of(), vcsn::has(), vcsn::detail::automaton_decorator< Aut >::src_of(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
All the transition indexes between all states (including pre and post).
Definition at line 130 of file filter.hh.
Referenced by vcsn::detail::filter_automaton_impl< Aut >::transitions().
|
inline |
Indexes of transitions from visible final states.
Definition at line 236 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::in(), and vcsn::detail::automaton_decorator< Aut >::post().
|
inline |
Definition at line 69 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::has(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
Definition at line 202 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_in(), vcsn::detail::automaton_decorator< Aut >::post(), and vcsn::detail::automaton_decorator< Aut >::src_of().
Referenced by vcsn::detail::filter_automaton_impl< Aut >::final_transitions().
|
inline |
Definition at line 212 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_in(), and vcsn::detail::automaton_decorator< Aut >::aut_.
|
inline |
Indexes of transitions to visible initial states.
Definition at line 229 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::out(), and vcsn::detail::automaton_decorator< Aut >::pre().
|
inline |
Definition at line 87 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_states(), and vcsn::container_filter_range< C >::size().
|
inline |
Definition at line 82 of file filter.hh.
References vcsn::container_filter_range< C >::size(), and vcsn::detail::filter_automaton_impl< Aut >::states().
|
inline |
Definition at line 165 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_out(), vcsn::detail::automaton_decorator< Aut >::dst_of(), and vcsn::detail::automaton_decorator< Aut >::post().
Referenced by vcsn::detail::filter_automaton_impl< Aut >::initial_transitions().
|
inline |
Definition at line 175 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_out(), and vcsn::detail::automaton_decorator< Aut >::aut_.
|
inline |
Definition at line 74 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::has(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inlinestatic |
Static name.
Definition at line 52 of file filter.hh.
References vcsn::sname().
|
inline |
Definition at line 63 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::has(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
Definition at line 105 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_states(), vcsn::detail::automaton_decorator< Aut >::post(), and vcsn::detail::automaton_decorator< Aut >::pre().
Referenced by vcsn::detail::filter_automaton_impl< Aut >::num_states().
|
inline |
Definition at line 222 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_, vcsn::copy(), and vcsn::detail::filter_automaton_impl< Aut >::ss_.
|
inline |
All the transition indexes between visible states.
Definition at line 137 of file filter.hh.
References vcsn::detail::filter_automaton_impl< Aut >::all_transitions(), vcsn::detail::automaton_decorator< Aut >::dst_of(), vcsn::detail::automaton_decorator< Aut >::post(), vcsn::detail::automaton_decorator< Aut >::pre(), and vcsn::detail::automaton_decorator< Aut >::src_of().
|
inline |
Dynamic name.
Definition at line 58 of file filter.hh.
References vcsn::detail::automaton_decorator< Aut >::aut_.
|
private |
The states we keep.
Definition at line 247 of file filter.hh.
Referenced by vcsn::detail::filter_automaton_impl< Aut >::all_in(), vcsn::detail::filter_automaton_impl< Aut >::all_out(), vcsn::detail::filter_automaton_impl< Aut >::all_states(), vcsn::detail::filter_automaton_impl< Aut >::all_transitions(), vcsn::detail::filter_automaton_impl< Aut >::filter_automaton_impl(), vcsn::detail::filter_automaton_impl< Aut >::has_state(), vcsn::detail::filter_automaton_impl< Aut >::print_state_name(), vcsn::detail::filter_automaton_impl< Aut >::state_has_name(), and vcsn::detail::filter_automaton_impl< Aut >::strip().