18 template <
typename Context,
typename Tag>
27 using kind_t =
typename context_t::kind_t;
34 using label_t =
typename labelset_t::value_t;
36 using weight_t =
typename weightset_t::value_t;
56 o <<
"\\mathsf{Aut}[";
57 ctx_.print_set(o, fmt);
62 ctx_.print_set(o, fmt);
68 ctx_.print_set(o, fmt);
72 assert(!
"automatonset::print_set: invalid format: rat");
81 auto s =
res->new_state();
89 auto s =
res->new_state();
98 auto s0 =
res->new_state();
100 auto s1 =
res->new_state();
101 res->new_transition(s0, s1, l);
117 template <
typename Ctx = context_t>
119 -> std::enable_if_t<are_composable<Ctx, Ctx>{},
value_t>
127 namespace v = ::vcsn;
146 template <
typename... Value>
161 namespace v = ::vcsn;
177 namespace v = ::vcsn;
199 namespace v = ::vcsn;
219 raise(
"inductive: cannot complement on multitape: ",
ctx_);
auto complete(const Aut &aut) -> decltype(::vcsn::copy(aut))
variadic< type_t::add, Context > add
Aut transpose(const transpose_automaton< Aut > &aut)
variadic< type_t::ldivide, Context > ldivide
weightset_t_of< context_t > weightset_t
auto complement(const value_t &, std::false_type) const -> value_t
Add a complement operator: e{c}.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
auto complement(const value_t &e) const -> value_t
Add a complement operator: e{c}.
auto multiply(const Aut1 &lhs, const Aut2 &rhs, Tag tag={}) -> decltype(lhs->null_state(), rhs->null_state(), detail::make_join_automaton(tag, lhs, rhs))
Concatenate two automata, general case.
auto proper(const Aut &aut, direction dir=direction::backward, bool prune=true, const std::string &algo="auto") -> fresh_automaton_t_of< Aut, detail::proper_context< context_t_of< Aut >>>
Eliminate spontaneous transitions.
std::shared_ptr< detail::mutable_automaton_impl< Context >> mutable_automaton
labelset_t_of< context_t > labelset_t
bool is_empty(const Aut &a) ATTRIBUTE_PURE
Whether has no states.
typename context_t::kind_t kind_t
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
variadic< type_t::infiltrate, Context > infiltrate
auto complement(const value_t &e, std::true_type) const -> value_t
Add a complement operator: e{c}.
filter_automaton< Aut > accessible(const Aut &a)
Accessible part of an automaton.
Print as a parsable type string.
auto rweight(const value_t &e, const weight_t &w) const -> value_t
Right-multiplication by a weight.
variadic< type_t::shuffle, Context > shuffle
auto make_nullable_automaton(const Context &ctx)
auto conjunction(const value_t &l, const value_t &r) const -> value_t
Build an conjunction product: l & r.
auto print_set(std::ostream &o, format fmt={}) const -> std::ostream &
Format the description of this automatonset.
auto tuple(Value &&...v) const -> value_t
Build a tuple: e | f | ....
static auto mul(const value_t &l, const value_t &r) -> value_t
unsigned state_t
Lightweight state handle (or index).
auto tuple(const Auts &...as)
Build the (accessible part of the) tuple.
unary< type_t::star, Context > star
weight_node< type_t::rweight, Context > rweight
context_t_of< automaton_t > context_t
typename labelset_t::value_t label_t
Transition label.
auto zero() const -> value_t
automatonset(const context_t &c)
mutable_automaton< context_t > value_t
unsigned transition_t
Lightweight transition handle (or index).
auto atom(const label_t &l) const -> value_t
auto shuffle(const value_t &l, const value_t &r) const -> value_t
Build a shuffle product: l : r.
auto standard(const Aut &aut)
auto star(const value_t &e) const -> value_t
Add a star operator: e*.
Whether a ValueSet, or a context, is multitape.
auto compose(const value_t &l, const value_t &r) const -> std::enable_if_t< are_composable< Ctx, Ctx >
Build a composition: l @ r.
auto one() const -> value_t
An input/output format for valuesets.
void copy_into(const AutIn &in, AutOut &out, KeepState keep_state, KeepTrans keep_trans)
Copy selected states and transitions of an automaton.
auto rdivide(const Aut1 &a1, const Aut2 &a2)
Compute the right quotient.
auto determinize(const Aut &a, Tag={}, bool_constant< Lazy >={})
auto transposition(const value_t &e) const -> value_t
Add a transposition operator.
Print as is. For instance, don't try to escape labels.
auto strip(const Aut &aut, int) -> decltype(aut->strip())
variadic< type_t::conjunction, Context > conjunction
static auto add(const value_t &l, const value_t &r) -> value_t
Print as rich UTF-8 text, escaped.
auto infiltrate(const value_t &l, const value_t &r) const -> value_t
Build an infiltration product: l &: r.
ValueSet::value_t compose(const ValueSet &vs, const typename ValueSet::value_t &lhs, const typename ValueSet::value_t &rhs)
Composition of values.
unary< type_t::complement, Context > complement
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
weight_node< type_t::lweight, Context > lweight
filter_automaton< Aut > coaccessible(const Aut &a)
Coaccessible part of an automaton.
std::integral_constant< bool, B > bool_constant
Provide a variadic mul on top of a binary mul(), and one().
auto lweight(const weight_t &w, const value_t &e) const -> value_t
Left-multiplication by a weight.
typename weightset_t::value_t weight_t
Transition weight.
Print as plain (ASCII) text, escaped.
auto power(const value_t &e, unsigned n) const -> value_t
Add a power operator: e{n}.
auto rdivide(const value_t &l, const value_t &r) const -> value_t
Build a right division: l {/} r.
auto ldivide(const value_t &l, const value_t &r) const -> value_t
r`.
mutable_automaton< Context > make_mutable_automaton(const Context &ctx)