xnn.common.models.pme.bspline_weights#
- xnn.common.models.pme.bspline_weights(t, order)[source]#
Cardinal B-spline weights
M_p(t + j)forjfrom0top - 1.For a scaled coordinate
uwith fractional partt = u - floor(u)the charge lands on the grid pointsfloor(u) - jwith these weights (paper eq 4.1). Built by the recursionM_n(x) = x / (n - 1) M_{n-1}(x) + (n - x) / (n - 1) M_{n-1}(x - 1)fromM_2.- Parameters:
t (Tensor) – Fractional offsets in
[0, 1), any shape(...).order (int) – The spline order
p >= 2.
- Returns:
Weights
(..., order)summing to one along the last axis.- Return type:
Tensor