Struct Vari

Source
pub struct Vari {
    pub a: Operand,
    pub b: Operand,
    /* private fields */
}

Fields§

§a: Operand§b: Operand

Implementations§

Source§

impl Vari

Source

pub fn new( v: Real, oa: Operand, ob: Operand, op: Box<dyn Fn(&Vari)>, mem: Rc<RefCell<ChainStack>>, ) -> Vari

Source

pub fn val(&self) -> Real

Source

pub fn adj(&self) -> Real

Source

pub fn set_adj(&mut self, v: Real)

Source

pub fn init_dependent(&mut self)

Source

pub fn set_zero_adjoint(&mut self)

Source

pub fn chain(&self)

Source

pub fn mem(&self) -> Rc<RefCell<ChainStack>>

Trait Implementations§

Source§

impl Debug for Vari

Source§

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

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

impl<'a> From<Rc<*mut Vari>> for &'a Vari

Source§

fn from(a: Rc<*mut Vari>) -> &'a Vari

Converts to this type from the input type.
Source§

impl<'a> From<Rc<*mut Vari>> for &'a mut Vari

Source§

fn from(a: Rc<*mut Vari>) -> &'a mut Vari

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Vari

§

impl !RefUnwindSafe for Vari

§

impl !Send for Vari

§

impl !Sync for Vari

§

impl Unpin for Vari

§

impl !UnwindSafe for Vari

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> 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, 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.