(self, t, order=1)
| 284 | return inners |
| 285 | |
| 286 | def derivative(self, t, order=1): |
| 287 | fractional_part, index = self._interpret_t(t) |
| 288 | fractional_part = fractional_part.unsqueeze(-1) |
| 289 | if order == 1: |
| 290 | inner = 2 * self._c[..., index, :] + 3 * self._d[..., index, :] * fractional_part |
| 291 | deriv = self._b[..., index, :] + inner * fractional_part |
| 292 | elif order == 2: |
| 293 | deriv = 2 * self._c[..., index, :] + 6 * self._d[..., index, :] * fractional_part |
| 294 | else: |
| 295 | raise ValueError('Derivative is not implemented for orders greater than 2.') |
| 296 | return deriv |
| 297 | |
| 298 | |
| 299 | def cubic_spline_coeffs(t, x): |
nothing calls this directly
no outgoing calls
no test coverage detected