15 template <
typename InExpSet,
size_t Tape>
17 :
public InExpSet::const_visitor
23 =
typename in_expressionset_t::template project_t<Tape>;
24 using super_t =
typename in_expressionset_t::const_visitor;
29 using node_t =
typename super_t::node_t;
30 using inner_t =
typename super_t::inner_t;
31 template <type_t Type>
33 template <type_t Type>
35 using leaf_t =
typename super_t::leaf_t;
58 template <exp::type_t Type>
63 =
typename out_expressionset_t::template unary_t<Type>;
64 res_ = std::make_shared<out_unary_t>(
project(v.sub()));
68 template <exp::type_t Type,
typename Fun>
75 for (
const auto& c: v.tail())
120 template <
bool = in_context_t::is_lat,
121 typename Dummy =
void>
127 return std::get<Tape>(v.sub());
132 template <
typename Dummy>
160 template <
size_t Tape,
typename InExpSet>
162 project(
const InExpSet& in_rs,
const typename InExpSet::value_t&
v)
typename out_expressionset_t::value_t out_expression_t
VCSN_RAT_VISIT(infiltrate, v)
VCSN_RAT_VISIT(ldivide, v)
#define BUILTIN_UNREACHABLE()
out_expression_t operator()(const in_expression_t &v)
Entry point: print v.
VCSN_RAT_VISIT(complement, v)
typename super_t::leaf_t leaf_t
typename in_expressionset_t::value_t in_expression_t
out_expressionset_t out_rs_
expressionset to build the output value.
Functor to project a rational expression.
VCSN_RAT_VISIT(rweight, v)
void project_(const unary_t< Type > &v)
Factor the handling of unary operations.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename super_t::tuple_t tuple_t
typename super_t::template unary_t< Type > unary_t
out_expression_t project(const in_expression_t &v)
Easy recursion.
An inner node implementing a weight.
VCSN_RAT_VISIT(lweight, v)
out_expression_t(out_expressionset_t::*)(const out_expression_t &, const out_expression_t &) const bin_t
out_expression_t operator()(const tuple_t &v)
Entry point.
typename super_t::inner_t inner_t
typename super_t::template variadic_t< Type > variadic_t
VCSN_RAT_VISIT(shuffle, v)
const in_expressionset_t & in_rs_
expressionset to decode the input value.
project_impl(const in_expressionset_t &in_rs)
InExpSet in_expressionset_t
VCSN_RAT_VISIT(transposition, v)
void project_(const variadic_t< Type > &v, Fun &&fun)
Factor the handling of n-ary operations.
auto project(const InExpSet &in_rs, const typename InExpSet::value_t &v) -> typename project_impl< InExpSet, Tape >::out_expression_t
Project a rational expression.
typename super_t::node_t node_t
VCSN_RAT_VISIT(conjunction, v)
out_expression_t res_
Output value, under construction.
typename in_expressionset_t::template project_t< Tape > out_expressionset_t
An inner node with multiple children.
context_t_of< in_expressionset_t > in_context_t
out_expression_t operator()(const tuple_t &)
typename in_expressionset_t::const_visitor super_t
void visit(const tuple_t &v, std::true_type) override