pub struct RootFormula { /* private fields */ }Expand description
Base primitive to use in other formulas.
Implementations§
Source§impl RootFormula
impl RootFormula
Trait Implementations§
Source§impl<T: Into<Self>> Add<T> for RootFormula
impl<T: Into<Self>> Add<T> for RootFormula
Source§impl Clone for RootFormula
impl Clone for RootFormula
Source§impl Debug for RootFormula
impl Debug for RootFormula
Source§impl Default for RootFormula
impl Default for RootFormula
Source§fn default() -> RootFormula
fn default() -> RootFormula
Returns the “default value” for a type. Read more
Source§impl<T: Into<Self>> Div<T> for RootFormula
impl<T: Into<Self>> Div<T> for RootFormula
Source§impl Evaluate for RootFormula
impl Evaluate for RootFormula
Source§fn eval(&self, args: &dyn GetVariable) -> Result<f64, EvaluationError>
fn eval(&self, args: &dyn GetVariable) -> Result<f64, EvaluationError>
Evaluates value of formula, args contains variables. Read more
Source§impl<T: Into<FormulaArgument>> From<T> for RootFormula
impl<T: Into<FormulaArgument>> From<T> for RootFormula
Source§impl FunctionLike for RootFormula
impl FunctionLike for RootFormula
Source§fn collapse_inner(&mut self) -> Result<(), MathError>
fn collapse_inner(&mut self) -> Result<(), MathError>
Simplifies function arguments. For example if one of the function arguments is “1 + 2”,
this method will simplify it to “3” Read more
Sets variables present in function to formulas stored in
args as shared function.
If function has some inner state and set as shared in different formulas, inner state will be shared.Source§fn set_all_variables_owned(&mut self, args: &dyn GetVariable)
fn set_all_variables_owned(&mut self, args: &dyn GetVariable)
Sets variables present in function to formulas stored in
args as owned function.
If function has some inner state and set as owned in different formulas, inner state will be different.Sets variable
name in function to function as shared function.
If function has some inner state and set as shared in different formulas, inner state will be shared.Source§fn set_variable_owned(&mut self, name: &Variable, function: &RootFormula)
fn set_variable_owned(&mut self, name: &Variable, function: &RootFormula)
Sets variable
name in function to function as owned function.
If function has some inner state and set as owned in different formulas, inner state will be different.Source§fn clone_into_box(&self) -> Box<dyn FunctionLike>
fn clone_into_box(&self) -> Box<dyn FunctionLike>
Creates clone of object stored in
Box as trait objectSource§impl IsConst for RootFormula
impl IsConst for RootFormula
Source§impl<T: Into<Self>> Mul<T> for RootFormula
impl<T: Into<Self>> Mul<T> for RootFormula
Auto Trait Implementations§
impl Freeze for RootFormula
impl !RefUnwindSafe for RootFormula
impl Send for RootFormula
impl Sync for RootFormula
impl Unpin for RootFormula
impl !UnwindSafe for RootFormula
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