xnn.ffnn.models.amoeba_ewald.bspline_with_derivatives#

xnn.ffnn.models.amoeba_ewald.bspline_with_derivatives(t, order)[source]#

Cardinal B-spline weights M_p(t + j) and their first and second derivatives with respect to the scaled coordinate, for j from 0 to p - 1.

M_p'(x) = M_{p-1}(x) - M_{p-1}(x - 1) and M_p''(x) = M_{p-2}(x) - 2 M_{p-2}(x - 1) + M_{p-2}(x - 2).

Parameters:
  • t (Tensor) – Fractional offsets in [0, 1), shape (...).

  • order (int) – Spline order p >= 4.

Returns:

(w, dw, d2w), each (..., p).

Return type:

tuple of Tensor