Skip to main content

DynamicalSystem

Trait DynamicalSystem 

Source
pub trait DynamicalSystem {
    // Required methods
    fn dimension(&self) -> usize;
    fn derivatives(&self, t: f64, state: &[f64], out: &mut [f64]);
    fn initial_state(&self) -> Vec<f64>;
    fn time_span(&self) -> (f64, f64);
}
Expand description

Trait for systems of ordinary differential equations.

Required Methods§

Source

fn dimension(&self) -> usize

Number of state variables.

Source

fn derivatives(&self, t: f64, state: &[f64], out: &mut [f64])

Computes derivatives at time t and state, writing into out.

Source

fn initial_state(&self) -> Vec<f64>

Returns the initial state vector.

Source

fn time_span(&self) -> (f64, f64)

Returns the integration time span (t0, tf).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§