pub struct Derivatives<T> { /* private fields */ }
Expand description

Computed derivatives of a computational graph for some output Record variable.

This can be indexed by any Record used in the computational graph to get the derivative with respect to that input.

Indexing using Records not involved in the computational graph, or involved in a different one will return nonsense or index out of bounds and panic. In the future this may be changed to always panic.

Implementations

Quries the derivative at the provided record as input.

If you construct a Derivatives object for some output y, and call .at(&x) on it for some input x, this returns dy/dx.

Trait Implementations

Any derivatives of a Cloneable type implements clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts the Derivatives struct into a Vec of derivatives that can be indexed with usizes. The indexes correspond to the index field on Records.

Quries the derivative at the provided record as input.

If you construct a Derivatives object for some output y, and call .at(&x) on it for some input x, this returns dy/dx.

The returned type after indexing.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.