Template Function sequant::evaluate(Node const&, F const&, CacheManager&)

Function Documentation

template<Trace EvalTrace = Trace::Default, CacheCheck Cache = CacheCheck::Checked, meta::can_evaluate Node, typename F>
ResultPtr sequant::evaluate(Node const &node, 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.

  • Cache – If CacheCache::Checked (default) the cache will be checked before evaluating. It is used to detect the base case for recursion to prevent infinite recursion.

Parameters:
  • node – A node that can be evaluated using le as the leaf evaluator.

  • 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.