17 #ifndef AWALI_CORE_TRANSPOSE_VIEW_HH
18 # define AWALI_CORE_TRANSPOSE_VIEW_HH
23 namespace awali {
namespace sttc {
27 template <
typename Aut>
34 using kind_t =
typename context_t::kind_t;
40 using label_t =
typename labelset_t::value_t;
42 using weight_t =
typename weightset_t::value_t;
68 return "transpose_view<" + context_t::sname() +
">";
73 return "transpose_view<" +
context().vname(
full) +
">";
92 return aut_->prepost_label();
121 return aut_->get_transition(dst, src, l);
127 return aut_->has_transition(dst, src, l);
141 return aut_->print_state(s, o);
146 const std::string& fmt =
"text")
const {
147 return aut_->print_state_name(s, o, fmt);
159 return aut_->get_name();
163 return aut_->get_desc();
167 return aut_->get_state_name(s);
171 const std::string& fmt =
"text")
const {
172 return aut_->print_state_history(s, o, fmt);
176 return aut_->has_history(s);
180 return aut_->has_explicit_name(s);
184 return aut_->get_state_by_name(name);
236 return aut_->in(s, l);
251 return aut_->out(s, l);
258 return aut_->outin(d,s);
263 template <
typename Aut>
264 std::shared_ptr<internal::transpose_view_impl<Aut>>
267 return std::make_shared<internal::transpose_view_impl<Aut>>(*aut);
Definition: transpose_view.hh:29
transitions_s_output_t in(state_t s) const
Indexes of visible transitions arriving to state s.
Definition: transpose_view.hh:241
weightset_t_of< context_t > weightset_t
Definition: transpose_view.hh:33
typename Aut::tr_store_t tr_store_t
Definition: transpose_view.hh:48
weight_t get_final_weight(state_t s) const
Definition: transpose_view.hh:114
state_t get_state_by_name(const std::string &name) const
Definition: transpose_view.hh:183
size_t num_all_states() const
Definition: transpose_view.hh:98
const tr_cont_t & all_in(state_t s) const
Indexes of all transitions arriving to state s.
Definition: transpose_view.hh:245
typename context_t::weightset_ptr weightset_ptr
Definition: transpose_view.hh:37
typename Aut::names_t names_t
Definition: transpose_view.hh:45
void set_desc(const std::string &d)
Definition: transpose_view.hh:154
size_t num_initials() const
Definition: transpose_view.hh:100
size_t num_transitions() const
Definition: transpose_view.hh:102
label_t prepost_label() const
Definition: transpose_view.hh:90
typename Aut::st_store_t st_store_t
Definition: transpose_view.hh:47
transpose_view_impl(transpose_view_impl &&that)=delete
bool is_initial(state_t s) const
Definition: transpose_view.hh:111
transitions_output_t transitions() const
All the transition indexes between visible states.
Definition: transpose_view.hh:203
typename weightset_t::value_t weight_t
Transition weight.
Definition: transpose_view.hh:42
bool has_transition(state_t src, state_t dst, label_t l) const
Definition: transpose_view.hh:125
typename context_t::kind_t kind_t
Definition: transpose_view.hh:34
bool has_state(state_t s) const
Definition: transpose_view.hh:107
weight_t weight_of(transition_t t) const
Definition: transpose_view.hh:135
std::string get_state_name(state_t s) const
Definition: transpose_view.hh:166
static std::string sname()
Definition: transpose_view.hh:66
bool has_transition(transition_t t) const
Definition: transpose_view.hh:130
size_t num_states() const
Definition: transpose_view.hh:99
labelset_t_of< context_t > labelset_t
Definition: transpose_view.hh:32
std::ostream & print_state_name(state_t s, std::ostream &o, const std::string &fmt="text") const
Definition: transpose_view.hh:145
static constexpr state_t pre()
Definition: transpose_view.hh:87
history_t history() const
Definition: transpose_view.hh:137
transitions_output_t all_transitions() const
All the transition indexes between all states (including pre and post).
Definition: transpose_view.hh:206
transitions_s_output_t outin(state_t s, state_t d) const
Indexes of visible transitions from state s to state d.
Definition: transpose_view.hh:256
transitions_s_output_t out(state_t s) const
Indexes of visible transitions leaving state s.
Definition: transpose_view.hh:226
size_t num_finals() const
Definition: transpose_view.hh:101
transition_t get_transition(state_t src, state_t dst, label_t l) const
Definition: transpose_view.hh:119
state_t src_of(transition_t t) const
Definition: transpose_view.hh:132
transpose_view_impl & operator=(transpose_view_impl &&that)=delete
std::ostream & print_state(state_t s, std::ostream &o) const
Definition: transpose_view.hh:140
states_output_t states() const
All states excluding pre()/post().
Definition: transpose_view.hh:194
std::string vname(bool full=true) const
Definition: transpose_view.hh:71
bool has_history(state_t s) const
Definition: transpose_view.hh:175
typename Aut::tr_cont_t tr_cont_t
Definition: transpose_view.hh:49
transitions_s_output_t final_transitions() const
Indexes of transitions from visible final states.
Definition: transpose_view.hh:219
std::ostream & print_state_history(state_t s, std::ostream &o, const std::string &fmt="text") const
Definition: transpose_view.hh:170
state_t max_state() const
Definition: transpose_view.hh:109
const tr_cont_t & all_out(state_t s) const
Indexes of all transitions leaving state s.
Definition: transpose_view.hh:230
const context_t & context() const
Definition: transpose_view.hh:76
bool has_explicit_name(state_t s) const
Definition: transpose_view.hh:179
void set_name(const std::string &n)
Definition: transpose_view.hh:150
transitions_s_output_t in(state_t s, const label_t &l) const
Indexes of visible transitions arriving to state s on label l.
Definition: transpose_view.hh:249
transpose_view_impl(const Aut &aut)
Definition: transpose_view.hh:53
transpose_view_impl()=delete
const std::string & get_name() const
Definition: transpose_view.hh:158
typename Aut::history_t history_t
History.
Definition: transpose_view.hh:44
const weightset_ptr & weightset() const
Definition: transpose_view.hh:77
cont_filter< tr_cont_t > transitions_s_output_t
Definition: transpose_view.hh:208
typename Aut::context_t context_t
Definition: transpose_view.hh:31
transpose_view_impl(const transpose_view_impl &)=delete
label_t label_of(transition_t t) const
Definition: transpose_view.hh:134
states_output_t all_states() const
All states including pre()/post().
Definition: transpose_view.hh:198
weight_t get_initial_weight(state_t s) const
Definition: transpose_view.hh:113
transitions_s_output_t out(state_t s, const label_t &l) const
Indexes of all transitions leaving state s on label l.
Definition: transpose_view.hh:234
bool is_final(state_t s) const
Definition: transpose_view.hh:112
state_t dst_of(transition_t t) const
Definition: transpose_view.hh:133
transitions_s_output_t initial_transitions() const
Indexes of transitions to visible initial states.
Definition: transpose_view.hh:212
const std::string & get_desc() const
Definition: transpose_view.hh:162
const labelset_ptr & labelset() const
Definition: transpose_view.hh:78
typename labelset_t::value_t label_t
Transition label.
Definition: transpose_view.hh:40
static constexpr state_t post()
Definition: transpose_view.hh:88
typename context_t::labelset_ptr labelset_ptr
Definition: transpose_view.hh:36
The semiring of Natural numbers.
Definition: n.hh:34
typename internal::labelset_t_of_impl< internal::base_t< ValueSet > >::type labelset_t_of
Helper to retrieve the type of the labelset of a value set.
Definition: traits.hh:76
std::shared_ptr< internal::transpose_view_impl< Aut > > transpose_view(std::shared_ptr< Aut > aut)
Definition: transpose_view.hh:265
typename internal::weightset_t_of_impl< internal::base_t< ValueSet > >::type weightset_t_of
Helper to retrieve the type of the weightset of a value set.
Definition: traits.hh:86
static const std::string full
Completely version of Awali as a std::string.
Definition: version.hh:42
Main namespace of Awali.
Definition: ato.hh:22
unsigned state_t
Definition: types.hh:21
unsigned transition_t
Definition: types.hh:22
Definition: cont_filter.hh:145
Definition: cont_filter.hh:69