Skip to main content

DelayEmbedding

Struct DelayEmbedding 

Source
pub struct DelayEmbedding<const W: usize> {
    pub tau: usize,
    /* private fields */
}
Expand description

Delay-coordinate embedding estimator.

Maintains a circular buffer of W residual norms and computes the 2D delay embedding [(x(t), x(t−τ))] across the window.

§Type Parameters

  • W: Embedding window size (≥ 4, ≤ 64 recommended).

Fields§

§tau: usize

Delay lag τ.

Implementations§

Source§

impl<const W: usize> DelayEmbedding<W>

Source

pub const fn new(tau: usize) -> Self

Create a new estimator with delay lag τ.

Source

pub fn push(&mut self, norm: f32)

Absorb one residual norm sample.

Source

pub fn len(&self) -> usize

Number of valid samples in the buffer.

Source

pub fn is_ready(&self) -> bool

Whether the buffer has enough samples for analysis.

Source

pub fn reset(&mut self)

Reset the buffer.

Source

pub fn analyse(&self, r1: f32, r2: f32) -> Option<AttractorResult>

Compute attractor analysis over the current window.

Returns None if the buffer contains fewer than tau + 4 valid samples.

Trait Implementations§

Source§

impl<const W: usize> Default for DelayEmbedding<W>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<const W: usize> Freeze for DelayEmbedding<W>

§

impl<const W: usize> RefUnwindSafe for DelayEmbedding<W>

§

impl<const W: usize> Send for DelayEmbedding<W>

§

impl<const W: usize> Sync for DelayEmbedding<W>

§

impl<const W: usize> Unpin for DelayEmbedding<W>

§

impl<const W: usize> UnsafeUnpin for DelayEmbedding<W>

§

impl<const W: usize> UnwindSafe for DelayEmbedding<W>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.