pub struct HermiteInterpolator;Expand description
Hermite cubic interpolator for a single step.
Uses the values and derivatives at both endpoints to construct a cubic polynomial that matches y and y’ at t and t_next.
Implementations§
Source§impl HermiteInterpolator
impl HermiteInterpolator
Sourcepub fn interpolate<S: Scalar>(step: &HistoryStep<S>, t: S) -> Vec<S>
pub fn interpolate<S: Scalar>(step: &HistoryStep<S>, t: S) -> Vec<S>
Interpolate at time t within a step.
Uses cubic Hermite interpolation: p(θ) = (1-θ)²(1+2θ) y₀ + θ²(3-2θ) y₁ + h θ(1-θ)² f₀ - h θ²(1-θ) f₁
where θ = (t - t₀) / h.
Sourcepub fn interpolate_derivative<S: Scalar>(step: &HistoryStep<S>, t: S) -> Vec<S>
pub fn interpolate_derivative<S: Scalar>(step: &HistoryStep<S>, t: S) -> Vec<S>
Interpolate derivative at time t within a step.
Auto Trait Implementations§
impl Freeze for HermiteInterpolator
impl RefUnwindSafe for HermiteInterpolator
impl Send for HermiteInterpolator
impl Sync for HermiteInterpolator
impl Unpin for HermiteInterpolator
impl UnsafeUnpin for HermiteInterpolator
impl UnwindSafe for HermiteInterpolator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more