pub struct Milstein<T: Real, Y: State<T>> {
pub h0: T,
pub h_min: T,
pub h_max: T,
pub max_steps: usize,
/* private fields */
}Expand description
Derivative-Free Milstein method for solving SDEs.
Provides strong order 1.0 convergence for commutative/diagonal noise, which is an improvement over the 0.5 strong order of Euler-Maruyama.
Fields§
§h0: T§h_min: T§h_max: T§max_steps: usizeImplementations§
Trait Implementations§
Source§impl<T: Real, Y: State<T>> StochasticNumericalMethod<T, Y> for Milstein<T, Y>
impl<T: Real, Y: State<T>> StochasticNumericalMethod<T, Y> for Milstein<T, Y>
Source§fn init<F>(
&mut self,
sde: &mut F,
t0: T,
tf: T,
y0: &Y,
) -> Result<Evals, Error<T, Y>>
fn init<F>( &mut self, sde: &mut F, t0: T, tf: T, y0: &Y, ) -> Result<Evals, Error<T, Y>>
Initialize the solver before integration Read more
Source§fn step<F>(&mut self, sde: &mut F) -> Result<Evals, Error<T, Y>>
fn step<F>(&mut self, sde: &mut F) -> Result<Evals, Error<T, Y>>
Advance the solution by one step Read more
Source§fn set_status(&mut self, status: Status<T, Y>)
fn set_status(&mut self, status: Status<T, Y>)
Set solver status
Auto Trait Implementations§
impl<T, Y> Freeze for Milstein<T, Y>
impl<T, Y> RefUnwindSafe for Milstein<T, Y>where
T: RefUnwindSafe,
Y: RefUnwindSafe,
impl<T, Y> Send for Milstein<T, Y>where
Y: Send,
impl<T, Y> Sync for Milstein<T, Y>where
Y: Sync,
impl<T, Y> Unpin for Milstein<T, Y>
impl<T, Y> UnsafeUnpin for Milstein<T, Y>where
T: UnsafeUnpin,
Y: UnsafeUnpin,
impl<T, Y> UnwindSafe for Milstein<T, Y>where
T: UnwindSafe,
Y: 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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.