Template Function sequant::detail::require_summable_roots

Function Documentation

template<meta::can_evaluate Node>
void sequant::detail::require_summable_roots(Node const &first, Node const &n, std::size_t i)

Throws unless root n (the i -th of its forest) can be summed with the forest’s first root: only results of one shape have a sum. Roots that are results in their own right (residuals of different ranks, a scalar next to a tensor) are not the summands of anything, and the backends would add them without complaint, or crash.