pub enum MixedPartialMethod {
FiniteDifference,
ForwardFiniteDifference,
NestedAutodiff,
}Expand description
Methods for computing mixed partials.
This used to list ForwardOverReverse, ReverseOverForward and
PureForward alongside FiniteDifference — but all three delegated, in one
line each, to the finite-difference routine (finding F89). The variants below
are the ones that can genuinely differ behind this engine’s black-box
objective type; see crate::higher_order::hvp for why nested automatic
differentiation cannot.
Variants§
FiniteDifference
Central finite differences: O(h²) accurate, evaluates on both sides of
the base point. The default and the most accurate available method.
ForwardFiniteDifference
One-sided forward finite differences: O(h) accurate, never evaluates
below the base point in any differentiated coordinate. Use it when the
objective is undefined or discontinuous on that side.
NestedAutodiff
Nested automatic differentiation. Not available behind this engine’s
Fn(&Array1<T>) -> T objective — Self::is_available returns false
and HigherOrderEngine::mixed_partial returns a typed error naming the
alternative, instead of silently running a finite difference under an
autodiff name.
Implementations§
Source§impl MixedPartialMethod
impl MixedPartialMethod
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Whether this method can actually run behind the engine’s black-box objective type.
Trait Implementations§
Source§impl Clone for MixedPartialMethod
impl Clone for MixedPartialMethod
impl Copy for MixedPartialMethod
Source§impl Debug for MixedPartialMethod
impl Debug for MixedPartialMethod
impl Eq for MixedPartialMethod
Source§impl PartialEq for MixedPartialMethod
impl PartialEq for MixedPartialMethod
impl StructuralPartialEq for MixedPartialMethod
Auto Trait Implementations§
impl Freeze for MixedPartialMethod
impl RefUnwindSafe for MixedPartialMethod
impl Send for MixedPartialMethod
impl Sync for MixedPartialMethod
impl Unpin for MixedPartialMethod
impl UnsafeUnpin for MixedPartialMethod
impl UnwindSafe for MixedPartialMethod
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.