pub struct Variable<'a> { /* private fields */ }Implementations§
Source§impl Variable<'_>
impl Variable<'_>
pub fn ln(self) -> Self
pub fn log(self, base: f64) -> Self
pub fn powf(self, power: f64) -> Self
pub fn powi(self, power: i32) -> Self
pub fn exp(self) -> Self
pub fn sqrt(self) -> Self
pub fn cbrt(self) -> Self
pub fn recip(self) -> Self
pub fn exp2(self) -> Self
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn hypot(self, other: Self) -> Self
pub fn abs(self) -> Self
Source§impl Variable<'_>
impl Variable<'_>
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn sinh(self) -> Self
pub fn cosh(self) -> Self
pub fn tanh(self) -> Self
pub fn asin(self) -> Self
pub fn acos(self) -> Self
pub fn atan(self) -> Self
pub fn asinh(self) -> Self
pub fn acosh(self) -> Self
pub fn atanh(self) -> Self
Source§impl Variable<'_>
impl Variable<'_>
pub const fn value(&self) -> f64
pub fn compute_gradients(&self) -> Gradients
pub fn apply_unary_function( self, f: fn(_: f64) -> f64, df: fn(_: f64) -> f64, ) -> Self
pub fn apply_scalar_function<T: Copy>( self, f: fn(_: f64, _: T) -> f64, df: fn(_: f64, _: T) -> f64, scalar: T, ) -> Self
pub fn apply_binary_function( self, other: Self, f: fn(_: f64, _: T) -> f64, dfdx: fn(_: f64, _: f64) -> (f64, f64), ) -> Self
Trait Implementations§
Source§impl AddAssign<f64> for Variable<'_>
impl AddAssign<f64> for Variable<'_>
Source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
Performs the
+= operation. Read moreSource§impl AddAssign for Variable<'_>
impl AddAssign for Variable<'_>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<f64> for Variable<'_>
impl DivAssign<f64> for Variable<'_>
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl DivAssign for Variable<'_>
impl DivAssign for Variable<'_>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<f64> for Variable<'_>
impl MulAssign<f64> for Variable<'_>
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl MulAssign for Variable<'_>
impl MulAssign for Variable<'_>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl ScalarLike for Variable<'_>
impl ScalarLike for Variable<'_>
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn sinh(self) -> Self
fn cosh(self) -> Self
fn tanh(self) -> Self
fn ln(self) -> Self
fn log(self, param: f64) -> Self
fn log2(self) -> Self
fn log10(self) -> Self
fn exp(self) -> Self
fn exp2(self) -> Self
fn powi(self, param: i32) -> Self
fn powf(self, param: f64) -> Self
fn sqrt(self) -> Self
fn cbrt(self) -> Self
fn recip(self) -> Self
fn abs(self) -> Self
fn asin(self) -> Self
fn acos(self) -> Self
fn atan(self) -> Self
fn asinh(self) -> Self
fn acosh(self) -> Self
fn atanh(self) -> Self
fn hypot(self, param: Self) -> Self
Source§impl SubAssign<f64> for Variable<'_>
impl SubAssign<f64> for Variable<'_>
Source§fn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
Performs the
-= operation. Read moreSource§impl SubAssign for Variable<'_>
impl SubAssign for Variable<'_>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl<'a> Copy for Variable<'a>
Auto Trait Implementations§
impl<'a> Freeze for Variable<'a>
impl<'a> !RefUnwindSafe for Variable<'a>
impl<'a> !Send for Variable<'a>
impl<'a> !Sync for Variable<'a>
impl<'a> Unpin for Variable<'a>
impl<'a> !UnwindSafe for Variable<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more