[−][src]Struct ornstein_uhlenbeck::OrnsteinUhlenbeckProcess
The Ornstein-Uhlenbeck process for sampling.
Implementations
impl<D: Dimension> OrnsteinUhlenbeckProcess<D>
[src]
pub fn new<Sh: ShapeBuilder<Dim = D>>(
shape: Sh,
mu: f64,
theta: f64,
max_sigma: f64,
min_sigma: f64,
decay_period: u64
) -> Self
[src]
shape: Sh,
mu: f64,
theta: f64,
max_sigma: f64,
min_sigma: f64,
decay_period: u64
) -> Self
Creates a new Ornstein-Uhlenbeck process. For the meaning of the parameters and default values look at OrnsteinUhlenbeckProcessBuilder.
use ornstein_uhlenbeck::OrnsteinUhlenbeckProcess; // Scalar output. let ou_process_scalar = OrnsteinUhlenbeckProcess::new(1, 0.0, 0.15, 0.3, 0.3, 100_000); // Vector with dimension 3 as output. let ou_process_vector = OrnsteinUhlenbeckProcess::new(3, 0.0, 0.15, 0.3, 0.3, 100_000); // Matrix with shape (2, 2) as output. let ou_process_matric = OrnsteinUhlenbeckProcess::new((2, 2), 0.0, 0.15, 0.3, 0.3, 100_000);
pub fn reset(&mut self)
[src]
Resets the process.
pub fn sample_at(&mut self, step: u64) -> &Array<f64, D>
[src]
Returns a sample at time-step
without counting up the steps (used for decay).
use ornstein_uhlenbeck::OrnsteinUhlenbeckProcess; let mut ou_process = OrnsteinUhlenbeckProcess::new(1, 0.0, 0.15, 0.3, 0.3, 100_000); for step in 0..100 { let _sample = ou_process.sample_at(step); // would be equivalent to ou.process.sample(); }
Trait Implementations
impl<D: Clone + Dimension> Clone for OrnsteinUhlenbeckProcess<D>
[src]
fn clone(&self) -> OrnsteinUhlenbeckProcess<D>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<D: Debug + Dimension> Debug for OrnsteinUhlenbeckProcess<D>
[src]
Auto Trait Implementations
impl<D> RefUnwindSafe for OrnsteinUhlenbeckProcess<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for OrnsteinUhlenbeckProcess<D>
impl<D> Sync for OrnsteinUhlenbeckProcess<D>
impl<D> Unpin for OrnsteinUhlenbeckProcess<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for OrnsteinUhlenbeckProcess<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,