pub trait Interpolate {
type Output;
// Required methods
fn interpolate_linear(&self, index: f64) -> Self::Output;
fn interpolate_cubic(&self, index: f64) -> Self::Output;
fn interpolate_nearest(&self, index: f64) -> Self::Output;
}Expand description
Fractional-index reading with interpolation.
Required Associated Types§
Required Methods§
Sourcefn interpolate_linear(&self, index: f64) -> Self::Output
fn interpolate_linear(&self, index: f64) -> Self::Output
Linear interpolation at fractional index.
index in [0, len-1]; clamps to valid range.
Sourcefn interpolate_cubic(&self, index: f64) -> Self::Output
fn interpolate_cubic(&self, index: f64) -> Self::Output
Cubic Hermite interpolation at fractional index. Requires index in [1, len-2] for 4-point stencil; clamps.
Sourcefn interpolate_nearest(&self, index: f64) -> Self::Output
fn interpolate_nearest(&self, index: f64) -> Self::Output
Nearest-neighbor (round to nearest integer index).