pub struct RosslerSystem {
pub a: f64,
pub b: f64,
pub c: f64,
}Expand description
Parameters and state for the Rössler system.
The Rössler equations are:
dx/dt = −y − z
dy/dt = x + ay
dz/dt = b + z(x − c)Typical chaotic parameters: a = 0.2, b = 0.2, c = 5.7.
Fields§
§a: f64Parameter a (spiral rate).
b: f64Parameter b (z-coupling).
c: f64Parameter c (nonlinear threshold).
Implementations§
Source§impl RosslerSystem
impl RosslerSystem
Sourcepub fn new(a: f64, b: f64, c: f64) -> Self
pub fn new(a: f64, b: f64, c: f64) -> Self
Creates a new Rössler system with the given parameters.
Sourcepub fn deriv(&self, state: [f64; 3]) -> [f64; 3]
pub fn deriv(&self, state: [f64; 3]) -> [f64; 3]
Computes the time derivative [dx/dt, dy/dt, dz/dt].
Sourcepub fn integrate(
&self,
initial: [f64; 3],
dt: f64,
steps: usize,
) -> Vec<[f64; 3]>
pub fn integrate( &self, initial: [f64; 3], dt: f64, steps: usize, ) -> Vec<[f64; 3]>
Integrates using RK4 for steps steps of size dt.
Sourcepub fn approximate_period(&self) -> f64
pub fn approximate_period(&self) -> f64
Approximate period of the spiral for small-amplitude oscillations.
Trait Implementations§
Source§impl Clone for RosslerSystem
impl Clone for RosslerSystem
Source§fn clone(&self) -> RosslerSystem
fn clone(&self) -> RosslerSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RosslerSystem
impl RefUnwindSafe for RosslerSystem
impl Send for RosslerSystem
impl Sync for RosslerSystem
impl Unpin for RosslerSystem
impl UnsafeUnpin for RosslerSystem
impl UnwindSafe for RosslerSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.