[][src]Struct quick_maths::autodiff::Var

pub struct Var { /* fields omitted */ }

A tracked variable which can be differentiated.

Implementations

impl Var[src]

pub fn new(v: ScalarFloat) -> Self[src]

Creates an instance of a variable

pub fn backwards(&self)[src]

Computes the relationship of all variables used to this variable.

pub fn grad_wrt(&self) -> ScalarFloat[src]

Returns the gradient of this variable w.r.t the variable that had backward most recently called on it.

Trait Implementations

impl Add<Var> for Var[src]

type Output = Var

The resulting type after applying the + operator.

impl Add<f32> for Var[src]

type Output = Var

The resulting type after applying the + operator.

impl Clone for Var[src]

impl Copy for Var[src]

impl Debug for Var[src]

impl Div<Var> for Var[src]

type Output = Var

The resulting type after applying the / operator.

impl Div<f32> for Var[src]

type Output = Var

The resulting type after applying the / operator.

impl Float for Var[src]

fn log(self, base: Self) -> Self[src]

Taking the log w.r.t. an arbitrary base is currently unsupported So it assumes that base is fixed.

fn powf(self, exp: Self) -> Self[src]

Treats exp as a constant

impl Mul<Var> for Var[src]

type Output = Var

The resulting type after applying the * operator.

impl Mul<f32> for Var[src]

type Output = Var

The resulting type after applying the * operator.

impl Neg for Var[src]

type Output = Self

The resulting type after applying the - operator.

impl Num for Var[src]

type FromStrRadixErr = ()

impl NumCast for Var[src]

impl One for Var[src]

impl PartialEq<Var> for Var[src]

impl PartialOrd<Var> for Var[src]

impl Rem<Var> for Var[src]

type Output = Var

The resulting type after applying the % operator.

impl Rem<f32> for Var[src]

type Output = Var

The resulting type after applying the % operator.

impl Sub<Var> for Var[src]

type Output = Var

The resulting type after applying the - operator.

impl Sub<f32> for Var[src]

type Output = Var

The resulting type after applying the - operator.

impl ToPrimitive for Var[src]

impl Zero for Var[src]

Auto Trait Implementations

impl RefUnwindSafe for Var

impl Send for Var

impl Sync for Var

impl Unpin for Var

impl UnwindSafe for Var

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Float for T where
    T: Float + Debug
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> Real for T where
    T: Float
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.