22 wet_kind_t Kind = detail::wet_kind<labelset_t_of<Aut>,
23 weightset_t_of<Aut>>(),
35 template <
typename Ctx = context_t>
66 ns_.new_weight(pre, input_->pre(), ws_.one());
67 todo_.push(this->emplace(std::move(pre), this->pre()).first);
69 this->set_lazy(this->pre());
75 ns_.new_weight(post, input_->post(), ws_.one());
76 this->emplace(std::move(post), this->post());
82 return has(this->origins(), s);
88 return static_if<Kind == wet_kind_t::bitset>
89 ([] (
const auto&
self) {
return state_name_t(
self.state_size_); },
90 [] (
const auto&
self) {
return self.ns_.zero(); })
96 format fmt = {},
bool delimit =
false)
const
98 const auto& origs = this->origins();
99 auto i = origs.find(s);
100 if (i == std::end(origs))
101 this->print_state(s, o);
106 ns_.print(i->second, o, fmt,
", ");
118 auto i = this->find_key(n);
119 if (i == this->end_key())
121 res = this->new_state();
124 todo_.push(this->emplace(std::move(n), res).first);
141 using queue_t = std::queue<typename state_bimap_t::const_iterator>;
152 wet_kind_t Kind = wet_kind<labelset_t_of<Aut>,
153 weightset_t_of<Aut>>(),
159 wet_kind_t Kind = wet_kind<labelset_t_of<Aut>,
160 weightset_t_of<Aut>>(),
166 return make_shared_ptr<res_t>(aut);
label_t_of< automaton_t > label_t
Labels and weights.
fresh_automaton_t_of< Aut, Ctx > fresh_automaton_t
context_t_of< automaton_t > context_t
An automaton whose state names are polynomials of states.
state_t_of< automaton_t > state_t
State index.
Aggregate an automaton, and forward calls to it.
An input/output format for valuesets.
state_name_t zero() const
The empty polynomial of states.
std::ostream & print_state_name(state_t s, std::ostream &o, format fmt={}, bool delimit=false) const
Provide a variadic mul on top of a binary mul(), and one().
typename detail::label_t_of_impl< base_t< ValueSet >>::type label_t_of
typename Aut::element_type::template fresh_automaton_t< Context > fresh_automaton_t_of
Given an automaton type, the type of its copies.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
size_t states_size(const Aut &aut)
The largest state number, plus one.
std::shared_ptr< polystate_automaton_impl< Aut, Kind, Lazy >> polystate_automaton
A polystate automaton as a shared pointer.
auto context(Args &&...args) const -> decltype(aut_-> context(std::forward< Args >(args)...))
typename state_bimap_t::state_name_t state_name_t
A bidirectional map from state names to state numbers.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
polystate_automaton_impl(const automaton_t &a)
Build the determinizer.
bool state_has_name(state_t s) const
typename state_bimap_t::state_nameset_t state_nameset_t
The state name: set of (input) states.
automaton_t input_
Input automaton.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
state_t state_(state_name_t n)
The state for set of states n.
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
std::queue< typename state_bimap_t::const_iterator > queue_t
States waiting to be processed.
weightset_t_of< automaton_t > weightset_t
auto make_polystate_automaton(const Aut &aut)
labelset_t_of< automaton_t > labelset_t
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
wet_kind_t
Different implementations of wets.