Skip to main content

discover_ode

Function discover_ode 

Source
pub fn discover_ode(
    series: &[f64],
    dt: f64,
    cfg: &Config,
) -> Result<ParetoFront>
Expand description

Discover the right-hand side f of an autonomous scalar ODE dx/dt = f(x) from a uniformly-sampled trajectory series with timestep dt.

Derivatives at interior samples are estimated with the central difference (x[i+1] − x[i−1]) / (2·dt); the resulting (x, dx/dt) pairs are handed to Discoverer::fit. The returned Pareto front is over candidate f.

§Errors

Returns PhopError::ShapeMismatch if the series is too short (fewer than 3 samples) or dt is non-positive, or propagates any discovery error.