pub trait Dynamics {
type S: State;
// Required method
fn derivative(&self, s: &Self::S, t: Time) -> Self::S;
}Expand description
A first-order system: ds/dt = f(s, t).
The derivative has a different dimension from the state, which is a thing this
crate’s unit types cannot express through a trait — so State is in raw SI
numbers and the dimensions live in the domain’s own types on either side.
Required Associated Types§
Required Methods§
Sourcefn derivative(&self, s: &Self::S, t: Time) -> Self::S
fn derivative(&self, s: &Self::S, t: Time) -> Self::S
f(s, t). Must be a pure function: two calls with the same arguments have
to give the same answer, or none of the reproducibility above holds.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".