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