pub enum Exp {
Val(f64),
Var(String),
Add(Box<Exp>, Box<Exp>),
Sub(Box<Exp>, Box<Exp>),
Mul(Box<Exp>, Box<Exp>),
Div(Box<Exp>, Box<Exp>),
Power(Box<Exp>, f64),
Neg(Box<Exp>),
Sin(Box<Exp>),
Cos(Box<Exp>),
Ln(Box<Exp>),
Exp(Box<Exp>),
}Variants§
Val(f64)
Var(String)
Add(Box<Exp>, Box<Exp>)
Sub(Box<Exp>, Box<Exp>)
Mul(Box<Exp>, Box<Exp>)
Div(Box<Exp>, Box<Exp>)
Power(Box<Exp>, f64)
Neg(Box<Exp>)
Sin(Box<Exp>)
Cos(Box<Exp>)
Ln(Box<Exp>)
Exp(Box<Exp>)
Implementations§
Source§impl Exp
impl Exp
pub fn var(name: impl Into<String>) -> Self
pub fn val(v: f64) -> Self
pub fn add(lhs: Exp, rhs: Exp) -> Self
pub fn sub(lhs: Exp, rhs: Exp) -> Self
pub fn mul(lhs: Exp, rhs: Exp) -> Self
pub fn div(lhs: Exp, rhs: Exp) -> Self
pub fn power(base: Exp, exp: f64) -> Self
pub fn neg(exp: Exp) -> Self
pub fn sin(exp: Exp) -> Self
pub fn cos(exp: Exp) -> Self
pub fn ln(exp: Exp) -> Self
pub fn exp(exp: Exp) -> Self
Trait Implementations§
impl StructuralPartialEq for Exp
Auto Trait Implementations§
impl Freeze for Exp
impl RefUnwindSafe for Exp
impl Send for Exp
impl Sync for Exp
impl Unpin for Exp
impl UnwindSafe for Exp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more