Template Function sequant::eval::evaluate_ordered_each

Function Documentation

template<Trace EvalTrace = Trace::Default, meta::can_evaluate_range Nodes, typename F, typename N, bool FHC, typename ScopeGuardFactory = ::sequant::make_no_scope_guard>
container::svector<ResultPtr> sequant::eval::evaluate_ordered_each(Nodes const &forest, BatchPolicy const &policy, F const &leaf_evaluator, CacheManager<N, FHC> &cache, std::function<std::size_t(Index const&)> const &target, std::initializer_list<std::wstring> mode_order = {}, ScopeGuardFactory make_scope_guard = {})

As evaluate_ordered, but the roots of forest are not summed: one result per root, each in its own canonical layout (evaluate_ordered_multiroot). The roots still make one schedule, so a value two of them share is built once.

Template Parameters:

Nodes – a forward range: it is counted, then walked.

Returns:

One ResultPtr per root of forest, in its order.