gaussian_smooth
Functiongaussian_smooth(
func: Callable[[float], float],
smoothness: float = 0.5,
samples: int = 256,
t_range: tuple[float, float] = (0.0, 1.0)
) -> Callable[[float], float]
Gaussian-smooth a scalar function.
Samples the function, applies Gaussian convolution, returns a callable that interpolates the smoothed values.
Parameters
-
func - Target function to smooth.
-
smoothness - 0.0 = no smoothing (original), 1.0 = heavy smoothing. Controls Gaussian kernel width relative to t_range.
-
samples - Number of sample points (higher = more accurate).
-
t_range - Domain to sample over.