Back to Eqiora docs Skip to main content

RootFunctions

Trait RootFunctions 

pub trait RootFunctions {
    // Required methods
    fn count(&self) -> usize;
    fn evaluate(
        &self,
        time: f64,
        state: &[f64],
        output: &mut [f64],
    ) -> Result<(), Diagnostic>;
}
Description

Zero-crossing actions used only to propose candidate event instants.

A backend may localize the first sign change, but it does not decide event direction, simultaneous grouping, priority, or reset commit semantics.

Required Methods§

fn count(&self) -> usize

Number of scalar root functions.

fn evaluate( &self, time: f64, state: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>

Evaluate every root function at one state/time point.

§Errors

Returns a stable diagnostic when root evaluation fails.

Implementors§