pub struct Addition<Scalar>(pub Scalar);Expand description
Function adding a constant to the model output
Tuple Fields§
§0: ScalarTrait Implementations§
impl<Scalar: Copy> Copy for Addition<Scalar>
Source§impl<Scalar: Clone + Add<Scalar, Output = Scalar> + One> DifferentiableFunction<Scalar> for Addition<Scalar>
impl<Scalar: Clone + Add<Scalar, Output = Scalar> + One> DifferentiableFunction<Scalar> for Addition<Scalar>
Source§type ValueParams = UInt<UTerm, B1>
type ValueParams = UInt<UTerm, B1>
Type representing number of precomputed function parameters. Read more
Source§type DerivativeParams = UTerm
type DerivativeParams = UTerm
Type representing number of precomputed function derivative parameters. Read more
Source§fn into_params(
self,
) -> (impl Into<GenericArray<Scalar, Self::ValueParams>>, impl Into<GenericArray<Scalar, Self::DerivativeParams>>)
fn into_params( self, ) -> (impl Into<GenericArray<Scalar, Self::ValueParams>>, impl Into<GenericArray<Scalar, Self::DerivativeParams>>)
Computes and outputs function and it’s derivative pre-computed parameters. Read more
Source§fn value(params: &GenericArray<Scalar, Self::ValueParams>, x: &Scalar) -> Scalar
fn value(params: &GenericArray<Scalar, Self::ValueParams>, x: &Scalar) -> Scalar
Computes value of the function, using params previously produced by
into_params. Note that it’s an associated function, so you are not intended to manually pass any sort of state here. Read moreSource§fn derivative(
params: &GenericArray<Scalar, Self::DerivativeParams>,
_: &Scalar,
) -> Scalar
fn derivative( params: &GenericArray<Scalar, Self::DerivativeParams>, _: &Scalar, ) -> Scalar
Computes derivative of the function, using params previously produced by
into_params. Note that it’s an associated function, so you are not intended to manually pass any sort of state here. Read moreimpl<Scalar: Eq> Eq for Addition<Scalar>
Source§impl<Scalar: Ord> Ord for Addition<Scalar>
impl<Scalar: Ord> Ord for Addition<Scalar>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<Scalar: PartialOrd> PartialOrd for Addition<Scalar>
impl<Scalar: PartialOrd> PartialOrd for Addition<Scalar>
impl<Scalar: PartialEq> StructuralPartialEq for Addition<Scalar>
Auto Trait Implementations§
impl<Scalar> Freeze for Addition<Scalar>where
Scalar: Freeze,
impl<Scalar> RefUnwindSafe for Addition<Scalar>where
Scalar: RefUnwindSafe,
impl<Scalar> Send for Addition<Scalar>where
Scalar: Send,
impl<Scalar> Sync for Addition<Scalar>where
Scalar: Sync,
impl<Scalar> Unpin for Addition<Scalar>where
Scalar: Unpin,
impl<Scalar> UnsafeUnpin for Addition<Scalar>where
Scalar: UnsafeUnpin,
impl<Scalar> UnwindSafe for Addition<Scalar>where
Scalar: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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.