21 template <
typename Context,
typename Tape>
25 auto& c = ctx->
as<Context>();
26 return vcsn::detail::project<Tape::value>(c);
39 template <
size_t Tape,
typename Context>
57 template <
size_t Tape,
typename ValueSet>
59 const typename ValueSet::value_t&
v)
62 "project: invalid tape number");
63 return vs.template project<Tape>(
v);
72 template <
typename ExpansionSet,
typename Tape>
76 constexpr
auto tape = Tape::value;
77 auto& x = exp->
as<ExpansionSet>();
78 const auto& xs_in = x.valueset();
79 auto xs_out = xs_in.template project<tape>();
80 return {xs_out, vcsn::detail::project<tape>(xs_in, x.value())};
94 template <
typename ExpressionSet,
typename Tape>
98 constexpr
auto tape = Tape::value;
99 auto&
r = exp->as<ExpressionSet>();
100 const auto& rs_in =
r.valueset();
101 auto rs_out = vcsn::detail::project<tape>(rs_in);
102 return {rs_out, vcsn::detail::project<tape>(rs_in,
r.value())};
114 template <
size_t Tape,
typename Context, wet_kind_t Kind>
118 "project: invalid tape number");
119 auto ctx_out = vcsn::detail::project<Tape>(ps.context());
129 template <
typename PolynomialSet,
typename Tape>
133 constexpr
auto tape = Tape::value;
134 auto& p = poly->
as<PolynomialSet>();
135 const auto& ps_in = p.valueset();
136 auto ps_out = vcsn::detail::project<tape>(ps_in);
137 return {ps_out, vcsn::detail::project<tape>(ps_in, p.value())};
151 template <
typename Label,
typename Tape>
155 constexpr
auto tape = Tape::value;
156 const auto& l = lbl->
as<Label>();
157 const auto& ls = l.valueset();
158 return {ls.template set<tape>(), std::get<tape>(l.value())};
label project_label(const label &lbl, integral_constant)
Bridge (project).
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
auto project(const expressionset< Context > &rs)
Project an expressionset to one tape.
auto & as()
Downcast to the exact type.
value_impl< detail::label_tag > label
Template-less root for contexts.
value_impl< detail::polynomial_tag > polynomial
polynomial project_polynomial(const polynomial &poly, integral_constant)
Bridge (project).
A simple placeholder for integral constants.
value_impl< detail::expansion_tag > expansion
expansion project_expansion(const expansion &exp, integral_constant)
Bridge (project).
auto make_expressionset(const context< LabelSet, WeightSet > &ctx, rat::identities ids={}) -> expressionset< context< LabelSet, WeightSet >>
Shorthand to expressionset constructor.
automaton project(const automaton &aut, unsigned tape)
Keep a single tape from a multiple-tape automaton.
polynomialset< Context, Kind > make_polynomialset(const Context &context)
auto & as()
Extract wrapped typed value.
expression project_expression(const expression &exp, integral_constant)
Bridge (project).
context project_context(const context &ctx, integral_constant)
Bridge (project).
Provide a variadic mul on top of a binary mul(), and one().
value_impl< detail::expression_tag > expression