Template Function sequant::evaluate(Nodes const&, auto const&, F const&, CacheManager&)¶
Defined in File eval.hpp
Function Documentation¶
-
template<Trace EvalTrace = Trace::Default, meta::can_evaluate_range Nodes, typename F>
ResultPtr sequant::evaluate(Nodes const &nodes, auto const &layout, F const &le, CacheManager &cache)¶ - Template Parameters:
EvalTrace – If Trace::On, trace is written to the logger’s stream. Default is to follow Trace::Default, which is itself equal to Trace::On or Trace::Off.
- Parameters:
nodes – A range of node that can be evaluated using
leas the leaf evaluator. The evaluation result of the elements ofnodeswill be summed up.layout – The layout of the final result. Only meaningful if the result has a layout (or supports permutation) eg. a tensor. The results of each element from
nodeswill be permuted to this layout before being summed.le – The leaf evaluator that satisfies
meta::leaf_node_evaluator<Node, F>.cache – The cache for common sub-expression elimination.
- Returns:
Evaluated result as ResultPtr.