1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Defines system of stochastic differential equations for numerical solvers.
//! The NumericalMethods use this trait to take a input system from the user and solve
//! Includes a stochastic differential equation. Event handling is provided via the separate `Event` trait.
use crate;
/// SDE Trait for Stochastic Differential Equations
///
/// SDE trait defines the stochastic differential equation dY = a(t,Y)dt + b(t,Y)dW for the solver.
/// The stochastic differential equation is used to solve systems with both deterministic and random components.
///
/// # Impl
/// * `drift` - Deterministic part a(t,Y) of the SDE in form drift(t, &y, &mut dydt).
/// * `diffusion` - Stochastic part b(t,Y) of the SDE in form diffusion(t, &y, &mut dydw).
/// * `noise` - Generates the random noise increments for the SDE.