Main problem is to find a good API. I was thinking of something like:
eval_cubic(grid, C, points, Val[k]) # would differentiate up to order k and group the results by total order
eval_cubic(grid, C, points, ((V[0], V[0]), (V[2], V[0]), (V[0], V[2]) ) # would return the zero order and second order with respoect to each dimension. This is a bit to verbose.
It would be nice to do instead Orders[(0,0), (2,0), (0,2)] but I suspect it is not possible unless one can treat the numbers as literals.
Main problem is to find a good API. I was thinking of something like:
eval_cubic(grid, C, points, Val[k])
# would differentiate up to order k and group the results by total ordereval_cubic(grid, C, points, ((V[0], V[0]), (V[2], V[0]), (V[0], V[2]) )
# would return the zero order and second order with respoect to each dimension. This is a bit to verbose.It would be nice to do instead
Orders[(0,0), (2,0), (0,2)]
but I suspect it is not possible unless one can treat the numbers as literals.