[][src]Struct autodiff::forward_autodiff::F

pub struct F {
    pub x: f64,
    pub dx: f64,
}

Fields

x: f64dx: f64

Methods

impl F[src]

pub fn cst<T: ToPrimitive>(x: T) -> F[src]

Create a new constant. Use this also to convert from a variable to a constant. This constructor panics if x cannot be converted to f64.

pub fn var<T: ToPrimitive>(x: T) -> F[src]

Create a new variable. Use this also to convert from a constant to a variable. This constructor panics if x cannot be converted to f64.

pub fn full_eq(&self, rhs: &F) -> bool[src]

Compare two Fs in full, including the derivative part.

pub fn value(&self) -> f64[src]

Get the value of this variable.

pub fn deriv(&self) -> f64[src]

Get the current derivative of this variable. This will be zero if this F is a constant.

Trait Implementations

impl Into<f64> for F[src]

Panic-less conversion into f64 type.

impl Into<f32> for F[src]

Panic-less conversion into f32 type.

impl Clone for F[src]

impl Copy for F[src]

impl Default for F[src]

impl PartialEq<F> for F[src]

impl PartialOrd<F> for F[src]

impl Debug for F[src]

impl Div<F> for F[src]

type Output = F

The resulting type after applying the / operator.

impl Div<f64> for F[src]

type Output = F

The resulting type after applying the / operator.

impl Div<F> for f64[src]

type Output = F

The resulting type after applying the / operator.

impl Div<f32> for F[src]

type Output = F

The resulting type after applying the / operator.

impl Div<F> for f32[src]

type Output = F

The resulting type after applying the / operator.

impl Rem<F> for F[src]

type Output = F

The resulting type after applying the % operator.

impl Rem<f64> for F[src]

type Output = F

The resulting type after applying the % operator.

impl Rem<F> for f64[src]

type Output = F

The resulting type after applying the % operator.

impl Sub<F> for F[src]

type Output = F

The resulting type after applying the - operator.

impl Sub<f64> for F[src]

type Output = F

The resulting type after applying the - operator.

impl Sub<F> for f64[src]

type Output = F

The resulting type after applying the - operator.

impl Sub<f32> for F[src]

type Output = F

The resulting type after applying the - operator.

impl Sub<F> for f32[src]

type Output = F

The resulting type after applying the - operator.

impl Add<F> for F[src]

type Output = F

The resulting type after applying the + operator.

impl Add<f64> for F[src]

type Output = F

The resulting type after applying the + operator.

impl Add<F> for f64[src]

type Output = F

The resulting type after applying the + operator.

impl Add<f32> for F[src]

type Output = F

The resulting type after applying the + operator.

impl Add<F> for f32[src]

type Output = F

The resulting type after applying the + operator.

impl Mul<F> for F[src]

type Output = F

The resulting type after applying the * operator.

impl Mul<F> for f64[src]

type Output = F

The resulting type after applying the * operator.

impl Mul<f64> for F[src]

type Output = F

The resulting type after applying the * operator.

impl Mul<F> for f32[src]

type Output = F

The resulting type after applying the * operator.

impl Mul<f32> for F[src]

type Output = F

The resulting type after applying the * operator.

impl Neg for F[src]

type Output = F

The resulting type after applying the - operator.

impl AddAssign<F> for F[src]

impl AddAssign<f64> for F[src]

impl AddAssign<f32> for F[src]

impl SubAssign<F> for F[src]

impl SubAssign<f64> for F[src]

impl SubAssign<f32> for F[src]

impl MulAssign<F> for F[src]

impl MulAssign<f64> for F[src]

impl MulAssign<f32> for F[src]

impl DivAssign<F> for F[src]

impl DivAssign<f64> for F[src]

impl DivAssign<f32> for F[src]

impl RemAssign<F> for F[src]

impl RemAssign<f64> for F[src]

impl RemAssign<f32> for F[src]

impl Sum<F> for F[src]

impl Sum<f64> for F[src]

impl ToPrimitive for F[src]

impl FromPrimitive for F[src]

impl NumCast for F[src]

impl Float for F[src]

impl FloatConst for F[src]

impl Num for F[src]

type FromStrRadixErr = ParseFloatError

impl Zero for F[src]

impl One for F[src]

Auto Trait Implementations

impl Send for F

impl Sync for F

impl Unpin for F

impl UnwindSafe for F

impl RefUnwindSafe for F

Blanket Implementations

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

impl<T> From<T> for T[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.

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

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

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

impl<T> Real for T where
    T: Float
[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, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> NumAssign for T where
    T: Num + NumAssignOps<T>, 
[src]