pub struct FiniteDiffGradient<O: Objective<f64>> {
pub obj: O,
pub h: f64,
}Expand description
Central-difference adapter around any Objective<f64>.
Use only when no native gradient is available.
Fields§
§obj: OObjective evaluated by the central-difference stencil.
h: f64Symmetric perturbation step.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<O> Forget for FiniteDiffGradient<O>
impl<O> Freeze for FiniteDiffGradient<O>where
O: Freeze,
impl<O> RefUnwindSafe for FiniteDiffGradient<O>where
O: RefUnwindSafe,
impl<O> Send for FiniteDiffGradient<O>
impl<O> Sync for FiniteDiffGradient<O>
impl<O> Unpin for FiniteDiffGradient<O>where
O: Unpin,
impl<O> UnsafeUnpin for FiniteDiffGradient<O>where
O: UnsafeUnpin,
impl<O> UnwindSafe for FiniteDiffGradient<O>where
O: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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