pub struct WienerProcess<R: Rng> { /* private fields */ }Expand description
Wiener process generator for SDE simulation.
Generates increments ΔW(t) ~ N(0, Δt) for standard Brownian motion.
Implementations§
Source§impl<R: Rng> WienerProcess<R>
impl<R: Rng> WienerProcess<R>
Sourcepub fn increment<S: Scalar>(&mut self, dt: S) -> WienerIncrement<S>
pub fn increment<S: Scalar>(&mut self, dt: S) -> WienerIncrement<S>
Generate a single increment ΔW ~ N(0, dt).
Sourcepub fn path<S: Scalar>(
&mut self,
t0: S,
tf: S,
dt: S,
) -> Vec<WienerIncrement<S>>
pub fn path<S: Scalar>( &mut self, t0: S, tf: S, dt: S, ) -> Vec<WienerIncrement<S>>
Generate multiple increments for a path from t0 to tf with step dt.
Generate correlated increments given a correlation matrix.
The correlation matrix L should be the Cholesky factor of the correlation matrix: Corr = L * L^T.
Auto Trait Implementations§
impl<R> Freeze for WienerProcess<R>where
R: Freeze,
impl<R> RefUnwindSafe for WienerProcess<R>where
R: RefUnwindSafe,
impl<R> Send for WienerProcess<R>where
R: Send,
impl<R> Sync for WienerProcess<R>where
R: Sync,
impl<R> Unpin for WienerProcess<R>where
R: Unpin,
impl<R> UnsafeUnpin for WienerProcess<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for WienerProcess<R>where
R: UnwindSafe,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more