ConstantAdjoint

Struct ConstantAdjoint 

Source
pub struct ConstantAdjoint<N, T> {
    pub node: N,
    pub target: T,
}
Expand description

Source node for the adjoint of constants.

Fields§

§node: N

The original source Node.

§target: T

The Identifier associated with the adjoint target.

Trait Implementations§

Source§

impl<N: Clone, T: Clone> Clone for ConstantAdjoint<N, T>

Source§

fn clone(&self) -> ConstantAdjoint<N, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<N, T, A> Contains<A> for ConstantAdjoint<N, T>
where N: Contains<A>, T: Identifier + PartialEq<A>, A: Identifier,

Source§

fn contains(&self, ident: A) -> bool

Returns true if the identifier is present in the expression.
Source§

impl<N: Debug, T: Debug> Debug for ConstantAdjoint<N, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<N, T> Display for ConstantAdjoint<N, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<N, T, C, F, SN, CN, ST, CT, SA, CA> Function<C> for ConstantAdjoint<N, T>
where F: Scalar, SN: Concat<ST, Shape = SA>, ST: Shape, SA: Shape, CN: Class<SN>, CT: Class<ST>, CA: Class<SA>, Prec: Precedence<CN, CT, Class = CA>, N: Function<C>, N::Value: Buffer<Field = F, Shape = SN, Class = CN>, T: Identifier, C: Read<T>, C::Buffer: Buffer<Field = F, Shape = ST, Class = CT>, <CA as Class<SA>>::Buffer<F>: Buffer<Shape = SA>,

Source§

type Error = BinaryError<<N as Function<C>>::Error, SourceError<T>, NoError>

The error type of the function.
Source§

type Value = <CA as Class<SA>>::Buffer<F>

The codomain of the function.
Source§

fn evaluate<CR: AsRef<C>>(&self, ctx: CR) -> Result<Self::Value, Self::Error>

Evaluate the function and return its Value. Read more
Source§

fn evaluate_spec<CR: AsRef<C>>( &self, ctx: CR, ) -> Result<Spec<Self::Value>, Self::Error>

Evaluate the function and return its lifted Value. Read more
Source§

fn evaluate_shape<CR: AsRef<C>>(&self, ctx: CR) -> Result<SA, Self::Error>

Evaluate the function and return the shape of the Value. Read more
Source§

impl<N: Node, T> Node for ConstantAdjoint<N, T>

Source§

fn add<N: Node>(self, other: N) -> Add<Self, N>
where Self: Sized,

Source§

fn sub<N: Node>(self, other: N) -> Sub<Self, N>
where Self: Sized,

Source§

fn mul<N: Node>(self, other: N) -> Mul<Self, N>
where Self: Sized,

Source§

fn div<N: Node>(self, other: N) -> Div<Self, N>
where Self: Sized,

Source§

fn dot<N: Node>(self, other: N) -> TensorDot<Self, N>
where Self: Sized,

Source§

fn abs(self) -> Abs<Self>
where Self: Sized,

Source§

fn neg(self) -> Negate<Self>
where Self: Sized,

Source§

fn pow<P>(self, power: P) -> Power<Self, P>
where Self: Sized,

Source§

fn ln(self) -> Ln<Self>
where Self: Sized,

Source§

fn squared(self) -> Square<Self>
where Self: Sized,

Source§

fn sum(self) -> Sum<Self>
where Self: Sized,

Source§

fn sigmoid(self) -> Sigmoid<Self>
where Self: Sized,

Source§

impl<N: PartialEq, T: PartialEq> PartialEq for ConstantAdjoint<N, T>

Source§

fn eq(&self, other: &ConstantAdjoint<N, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<N: Node, T> ToExpr for ConstantAdjoint<N, T>

Source§

fn to_expr(&self) -> Expr

Convert the node to an expression string. Read more
Source§

impl<N: Copy, T: Copy> Copy for ConstantAdjoint<N, T>

Source§

impl<N: Eq, T: Eq> Eq for ConstantAdjoint<N, T>

Source§

impl<N, T> StructuralPartialEq for ConstantAdjoint<N, T>

Auto Trait Implementations§

§

impl<N, T> Freeze for ConstantAdjoint<N, T>
where N: Freeze, T: Freeze,

§

impl<N, T> RefUnwindSafe for ConstantAdjoint<N, T>

§

impl<N, T> Send for ConstantAdjoint<N, T>
where N: Send, T: Send,

§

impl<N, T> Sync for ConstantAdjoint<N, T>
where N: Sync, T: Sync,

§

impl<N, T> Unpin for ConstantAdjoint<N, T>
where N: Unpin, T: Unpin,

§

impl<N, T> UnwindSafe for ConstantAdjoint<N, T>
where N: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.