Template Function sequant::visit_leaf_expr

Function Documentation

template<typename TensorFn, typename VariableFn>
void sequant::visit_leaf_expr(const Expr &expr, TensorFn &&tensor_fn, VariableFn &&variable_fn)

Invokes tensor_fn or variable_fn for the tensor or variable that the given leaf expression represents. Powers are represented by their base. Does nothing for any other expression.