Skip to main content

History

Struct History 

Source
pub struct History<S: Scalar, H: Fn(S) -> Vec<S>> { /* private fields */ }
Expand description

History storage for DDE solver.

Stores computed solution steps and provides interpolation for accessing y(t - τ) at arbitrary past times.

Implementations§

Source§

impl<S: Scalar, H: Fn(S) -> Vec<S>> History<S, H>

Source

pub fn new(initial_history: H, t0: S, dim: usize) -> Self

Create a new history with initial function.

Source

pub fn add_step(&mut self, step: HistoryStep<S>)

Add a completed step to the history.

Source

pub fn evaluate(&self, t: S) -> Vec<S>

Get the state at time t using interpolation.

Source

pub fn evaluate_derivative(&self, t: S) -> Vec<S>

Get the derivative at time t using interpolation.

Source

pub fn current_time(&self) -> S

Get the current end time of the computed solution.

Source

pub fn n_steps(&self) -> usize

Number of stored steps.

Source

pub fn clear(&mut self)

Clear history (keep initial function).

Auto Trait Implementations§

§

impl<S, H> Freeze for History<S, H>
where H: Freeze, S: Freeze,

§

impl<S, H> RefUnwindSafe for History<S, H>

§

impl<S, H> Send for History<S, H>
where H: Send,

§

impl<S, H> Sync for History<S, H>
where H: Sync,

§

impl<S, H> Unpin for History<S, H>
where H: Unpin, S: Unpin,

§

impl<S, H> UnsafeUnpin for History<S, H>
where H: UnsafeUnpin, S: UnsafeUnpin,

§

impl<S, H> UnwindSafe for History<S, H>
where H: UnwindSafe, S: UnwindSafe,

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.