6#include <amdis/operations/Arithmetic.hpp>
7#include <amdis/operations/Composer.hpp>
9namespace AMDiS {
namespace Operation {
13 template <
int J,
class F,
class... Gs>
14 auto partial(Composer<F,Gs...>
const& c, index_t<J> _j)
16 auto index_seq = std::make_index_sequence<
sizeof...(Gs)>{};
19 auto term_i = [&](
auto const _i)
21 auto di_f = std::apply([&](
auto const&... gs) {
22 return compose(partial(c.f_, _i), gs...);
25 auto const& g_i = std::get<_i>(c.gs_);
26 return compose(Multiplies{}, di_f, partial(g_i, _j));
30 return std::apply([&](
auto const... _i)
32 return compose(Plus{}, term_i(_i)...);