Template Function sequant::to_expr(meta::eval_node auto const&, LeafMap&&)

Function Documentation

template<typename LeafMap>
ExprPtr sequant::to_expr(meta::eval_node auto const &node, LeafMap &&leaf_map)

Converts an EvalExpr to ExprPtr, passing the expression of every terminal through leaf_map.

An inlined equation below node (see EvalExpr::is_equation_boundary) is a terminal: it contributes its head, not its rhs; node itself, boundary or not, is always expanded.

Parameters:

leaf_map – Callable mapping the (shared) expression of a terminal to the expression that shall represent it in the result. It must not mutate its argument as that is shared with node.