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 make_nullable_automaton(const Context &ctx)
unary< type_t::complement, Context > complement
weight_node< type_t::rweight, Context > rweight
unary< type_t::star, Context > star
Print as is. For instance, don't try to escape labels.
Print as a parsable type string.
void copy_into(const AutIn &in, AutOut &out, KeepState keep_state, KeepTrans keep_trans)
Copy selected states and transitions of an automaton.
weightset_t_of< context_t > weightset_t
auto complement(const value_t &, std::false_type) const -> value_t
Add a complement operator: e{c}.
variadic< type_t::infiltrate, Context > infiltrate
variadic< type_t::shuffle, Context > shuffle
auto complement(const value_t &e) const -> value_t
Add a complement operator: e{c}.
variadic< type_t::conjunction, Context > conjunction
labelset_t_of< context_t > labelset_t
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
typename context_t::kind_t kind_t
ValueSet::value_t compose(const ValueSet &vs, const typename ValueSet::value_t &lhs, const typename ValueSet::value_t &rhs)
Composition of values.
mutable_automaton< Context > make_mutable_automaton(const Context &ctx)
An input/output format for valuesets.
auto determinize(const Aut &a, Tag={}, bool_constant< Lazy >={})
auto complement(const value_t &e, std::true_type) const -> value_t
Add a complement operator: e{c}.
auto strip(const Aut &aut, int) -> decltype(aut->strip())
Provide a variadic mul on top of a binary mul(), and one().
auto rweight(const value_t &e, const weight_t &w) const -> value_t
Right-multiplication by a weight.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
auto conjunction(const value_t &l, const value_t &r) const -> value_t
Build an conjunction product: l & r.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
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
auto standard(const Aut &aut)
unsigned state_t
Lightweight state handle (or index).
context_t_of< automaton_t > context_t
typename labelset_t::value_t label_t
Transition label.
filter_automaton< Aut > accessible(const Aut &a)
Accessible part of an automaton.
auto zero() const -> value_t
automatonset(const context_t &c)
Print as rich UTF-8 text, escaped.
mutable_automaton< context_t > value_t
auto complete(const Aut &aut) -> decltype(::vcsn::copy(aut))
A complete copy of aut.
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 star(const value_t &e) const -> value_t
Add a star operator: e*.
Print as plain (ASCII) text, escaped.
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
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.
weight_node< type_t::lweight, Context > lweight
std::integral_constant< bool, B > bool_constant
auto tuple(const Auts &...as)
Build the (accessible part of the) tuple.
variadic< type_t::add, Context > add
auto transposition(const value_t &e) const -> value_t
Add a transposition operator.
auto rdivide(const Aut1 &a1, const Aut2 &a2)
Compute the right quotient.
bool is_empty(const Aut &a) ATTRIBUTE_PURE
Whether has no states.
static auto add(const value_t &l, const value_t &r) -> value_t
auto infiltrate(const value_t &l, const value_t &r) const -> value_t
Build an infiltration product: l &: r.
filter_automaton< Aut > coaccessible(const Aut &a)
Coaccessible part of an automaton.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
variadic< type_t::ldivide, Context > ldivide
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.
auto power(const value_t &e, unsigned n) const -> value_t
Add a power operator: e{n}.
Whether a ValueSet, or a context, is multitape.
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`.
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton.