14 template <
typename InExpSet,
typename OutExpSet,
size_t Tape>
16 :
public InExpSet::const_visitor
21 using super_t =
typename in_expressionset_t::const_visitor;
27 template <type_t Type>
29 template <type_t Type>
40 in_rs.template project<Tape>()}
59 template <exp::type_t Type,
typename Fun>
61 rec_(
const unary_t<Type>&
v, Fun&& fun)
68 template <exp::type_t Type,
typename Fun>
70 rec_(
const variadic_t<Type>&
v, Fun&& fun)
75 for (
const auto& c: v.tail())
120 template <
typename =
void>
126 return std::get<Tape>(v.sub());
133 detail::static_if<in_context_t::is_lat>
152 template <
size_t Tape,
typename InExpSet,
typename OutExpSet>
154 project(
const InExpSet& in_rs,
const OutExpSet& out_rs,
155 const typename InExpSet::value_t&
v)
156 ->
typename OutExpSet::value_t
166 template <
size_t Tape,
typename InExpSet>
168 project(
const InExpSet& in_rs,
const typename InExpSet::value_t&
v)
169 ->
typename InExpSet::template project_t<Tape>::value_t
171 return project<Tape>(in_rs, in_rs.template project<Tape>(),
v);
VCSN_RAT_VISIT(rweight, v)
out_expression_t rec_(const in_expression_t &v)
Easy recursion.
VCSN_RAT_VISIT(transposition, v)
void visit(const tuple_t &v, std::true_type) override
typename super_t::template unary_t< Type > unary_t
An inner node implementing a weight.
typename in_expressionset_t::const_visitor super_t
auto project(const InExpSet &in_rs, const OutExpSet &out_rs, const typename InExpSet::value_t &v) -> typename OutExpSet::value_t
Project a rational expression.
out_expression_t res_
Output value, under construction.
context_t_of< in_expressionset_t > in_context_t
VCSN_RAT_VISIT(ldivide, v)
void rec_(const variadic_t< Type > &v, Fun &&fun)
Factor the handling of n-ary operations.
typename out_expressionset_t::value_t out_expression_t
typename super_t::tuple_t tuple_t
const in_expressionset_t & in_rs_
expressionset to decode the input value.
typename super_t::template variadic_t< Type > variadic_t
out_expressionset_t ors_t
out_expression_t operator()(const tuple_t &v)
Entry point.
InExpSet in_expressionset_t
VCSN_RAT_VISIT(conjunction, v)
OutExpSet out_expressionset_t
VCSN_RAT_VISIT(lweight, v)
out_expression_t(ors_t::*)(const out_expression_t &, const out_expression_t &) const bin_t
Functor to project a rational expression.
VCSN_RAT_VISIT(shuffle, v)
typename in_expressionset_t::value_t in_expression_t
An inner node with multiple children.
VCSN_RAT_VISIT(infiltrate, v)
project_impl(const in_expressionset_t &in_rs, const out_expressionset_t &out_rs)
VCSN_RAT_VISIT(compose, v)
out_expression_t operator()(const in_expression_t &v)
Entry point: print v.
project_impl(const in_expressionset_t &in_rs)
out_expressionset_t out_rs_
expressionset to build the output value.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
void rec_(const unary_t< Type > &v, Fun &&fun)
Factor the handling of unary operations.
VCSN_RAT_VISIT(complement, v)