pub enum Elementary {
Show 24 variants Sin(Arc<Elementary>), Cos(Arc<Elementary>), Tan(Arc<Elementary>), Sec(Arc<Elementary>), Csc(Arc<Elementary>), Cot(Arc<Elementary>), Asin(Arc<Elementary>), Acos(Arc<Elementary>), Atan(Arc<Elementary>), Sinh(Arc<Elementary>), Cosh(Arc<Elementary>), Tanh(Arc<Elementary>), Add(Arc<Elementary>, Arc<Elementary>), Sub(Arc<Elementary>, Arc<Elementary>), Mul(Arc<Elementary>, Arc<Elementary>), Div(Arc<Elementary>, Arc<Elementary>), Pow(Arc<Elementary>, Arc<Elementary>), Log(Arc<Elementary>, Arc<Elementary>), Factorial(Arc<Elementary>), Gamma(Arc<Elementary>), Polygamma(Arc<Elementary>, usize), Abs(Arc<Elementary>), Con(f64), X,
}

Variants§

Implementations§

source§

impl Elementary

source

pub fn call(self) -> Box<dyn Fn(f64) -> f64 + 'static>

source§

impl Elementary

source§

impl Elementary

source

pub fn expand_maclaurin(&self, order: u8) -> Result<SeriesExpansion, Error>

source

pub fn expand_taylor( &self, order: u8, centre: f64 ) -> Result<SeriesExpansion, Error>

source§

impl Elementary

source

pub fn classify(&self) -> Result<Category, Error>

source

pub fn is_constant(&self) -> bool

source

pub fn is_digit(&self) -> Result<bool, Error>

source

pub fn is_exponential(&self) -> Result<bool, Error>

source§

impl Elementary

source

pub fn simplify(&self) -> Result<Self, Error>

source

pub fn simplify_operations(&self) -> Result<Self, Error>

source

pub fn simplify_power(base: &Self, exp: &Self) -> Result<Self, Error>

source

pub fn divide(&self) -> Result<Self, Error>

source

pub fn factor(&self) -> Result<Vec<Self>, Error>

source

pub fn simplify_constant(&self) -> Result<Self, Error>

Trait Implementations§

source§

impl Add<&mut Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the + operator.
source§

fn add(self, rhs: &mut Self) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Elementary> for Arc<Elementary>

§

type Output = Elementary

The resulting type after applying the + operator.
source§

fn add(self, rhs: Elementary) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl Add<f64> for Elementary

§

type Output = Elementary

The resulting type after applying the + operator.
source§

fn add(self, rhs: f64) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<Elementary> for Elementary

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Clone for Elementary

source§

fn clone(&self) -> Elementary

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Elementary

source§

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

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

impl Div<&mut Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the / operator.
source§

fn div(self, rhs: &mut Self) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Elementary> for Arc<Elementary>

§

type Output = Elementary

The resulting type after applying the / operator.
source§

fn div(self, rhs: Elementary) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl Div<f64> for Elementary

§

type Output = Elementary

The resulting type after applying the / operator.
source§

fn div(self, rhs: f64) -> Self::Output

Performs the / operation. Read more
source§

impl DivAssign<Elementary> for Elementary

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<'a> From<&'a str> for Elementary

source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
source§

impl From<Elementary> for Function

source§

fn from(value: Elementary) -> Self

Converts to this type from the input type.
source§

impl Integrate for Elementary

See Integrate for usage and examples.

source§

fn evaluate_integral(&self, lower_bound: f64, upper_bound: f64) -> f64

Evaluating the integral gives a value of the integral with eight decimal places

source§

fn integrate(&self) -> Integral

Method will return an instance of Integral that can be taylored to specific usecases. Read more
source§

impl Mul<&mut Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &mut Self) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Elementary> for Arc<Elementary>

§

type Output = Elementary

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Elementary) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<f64> for Elementary

§

type Output = Elementary

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f64) -> Self::Output

Performs the * operation. Read more
source§

impl MulAssign<Elementary> for Elementary

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl PartialEq<Elementary> for Elementary

source§

fn eq(&self, other: &Elementary) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<Elementary> for Arc<Elementary>

§

type Output = Elementary

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Elementary) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Elementary> for Elementary

§

type Output = Elementary

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<f64> for Elementary

§

type Output = Elementary

The resulting type after applying the - operator.
source§

fn sub(self, rhs: f64) -> Self::Output

Performs the - operation. Read more
source§

impl Sum<Elementary> for Elementary

source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl StructuralPartialEq for Elementary

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.