pub struct AnalyticGradient<F>{
pub grad_fn: F,
pub dim: usize,
}Expand description
Closure-based analytic gradient (the common case for user Rust code
that has a hand-derived or AD-produced x |-> ∇f(x)).
Fields§
§grad_fn: FUser-supplied analytic gradient callback.
dim: usizeNumber of input dimensions accepted by grad_fn.
Implementations§
Trait Implementations§
Source§impl<F> Gradient<f64> for AnalyticGradient<F>
impl<F> Gradient<f64> for AnalyticGradient<F>
Auto Trait Implementations§
impl<F> Forget for AnalyticGradient<F>
impl<F> Freeze for AnalyticGradient<F>where
F: Freeze,
impl<F> RefUnwindSafe for AnalyticGradient<F>where
F: RefUnwindSafe,
impl<F> Send for AnalyticGradient<F>
impl<F> Sync for AnalyticGradient<F>
impl<F> Unpin for AnalyticGradient<F>where
F: Unpin,
impl<F> UnsafeUnpin for AnalyticGradient<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for AnalyticGradient<F>where
F: 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