19 template <
typename InExpSet,
20 typename OutExpSet = InExpSet>
21 typename OutExpSet::value_t
23 const typename InExpSet::value_t&
v);
29 template <
typename InExpSet,
typename OutExpSet = InExpSet>
31 :
public InExpSet::const_visitor
36 using super_t =
typename in_expressionset_t::const_visitor;
42 using node_t =
typename super_t::node_t;
43 using inner_t =
typename super_t::inner_t;
44 template <type_t Type>
46 template <type_t Type>
48 using leaf_t =
typename super_t::leaf_t;
74 template <exp::type_t Type>
79 =
typename out_expressionset_t::template unary_t<Type>;
80 res_ = std::make_shared<out_unary_t>(
recurse(v.sub()));
84 template <exp::type_t Type,
typename Fun>
89 =
typename out_expressionset_t::template variadic_t<Type>;
90 auto sub =
typename out_expressionset_t::values_t{};
91 for (
const auto& s: v)
93 res_ = std::make_shared<out_variadic_t>(sub);
138 template <
typename =
void>
147 std::get<I>(v.sub()));
151 template <
size_t... I>
167 detail::static_if<in_context_t::is_lat>
184 template <
typename InExpSet,
typename OutExpSet>
185 typename OutExpSet::value_t
187 const typename InExpSet::value_t&
v)
auto work_(const tuple_t &v)
Partial_Identity one tape.
VCSN_RAT_VISIT(transposition, v)
VCSN_RAT_VISIT(infiltrate, v)
void recurse_(const variadic_t< Type > &v, Fun &&fun)
Factor the handling of n-ary operations.
typename super_t::template unary_t< Type > unary_t
out_value_t operator()(const in_value_t &v)
Entry point: print v.
out_value_t recurse(const in_value_t &v)
Easy recursion.
VCSN_RAT_VISIT(ldivide, v)
Functor to partial_identity/convert a rational expression.
An inner node implementing a weight.
typename super_t::inner_t inner_t
typename in_expressionset_t::const_visitor super_t
OutExpSet::value_t partial_identity(const InExpSet &in_rs, const OutExpSet &out_rs, const typename InExpSet::value_t &v)
Partial identity of a rational expression.
InExpSet in_expressionset_t
out_value_t work_(const tuple_t &v, detail::index_sequence< I... >)
Partial_Identity all the tapes.
void recurse_(const unary_t< Type > &v)
Factor the handling of unary operations.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
typename super_t::template variadic_t< Type > variadic_t
out_value_t res_
Output value, under construction.
out_value_t operator()(const tuple_t &v)
Entry point.
VCSN_RAT_VISIT(compose, v)
VCSN_RAT_VISIT(complement, v)
VCSN_RAT_VISIT(shuffle, v)
typename in_expressionset_t::value_t in_value_t
context_t_of< in_expressionset_t > in_context_t
const out_expressionset_t & out_rs_
expressionset to build the output value.
VCSN_RAT_VISIT(conjunction, v)
typename super_t::tuple_t tuple_t
typename super_t::leaf_t leaf_t
partial_identity_impl(const in_expressionset_t &in_rs, const out_expressionset_t &out_rs)
typename out_expressionset_t::value_t out_expression_t
An inner node with multiple children.
const in_expressionset_t & in_rs_
expressionset to decode the input value.
OutExpSet out_expressionset_t
VCSN_RAT_VISIT(rweight, v)
VCSN_RAT_VISIT(lweight, v)
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename out_expressionset_t::value_t out_value_t
out_expression_t(out_expressionset_t::*)(const out_expression_t &, const out_expression_t &) const bin_t
void visit(const tuple_t &v, std::true_type) override
typename super_t::node_t node_t