Trait calcu_rs::atom::SymbolicExpr

source ·
pub trait SymbolicExpr:
    Clone
    + PartialOrd
    + PartialEq
    + Into<Expr> {
    // Provided methods
    fn reduce(&self) -> Expr { ... }
    fn is_atom(&self) -> bool { ... }
    fn n_args(&self) -> usize { ... }
    fn args(&self) -> &[Expr] { ... }
    fn args_mut(&mut self) -> &mut [Expr] { ... }
    fn iter_args(&self) -> impl Iterator<Item = &Expr> { ... }
    fn map_args(self, map_fn: impl Fn(&mut Expr)) -> Self { ... }
}

Provided Methods§

source

fn reduce(&self) -> Expr

basic simplification that can be applied regardless of context

e.g 1 + 2 => 3

source

fn is_atom(&self) -> bool

source

fn n_args(&self) -> usize

source

fn args(&self) -> &[Expr]

source

fn args_mut(&mut self) -> &mut [Expr]

source

fn iter_args(&self) -> impl Iterator<Item = &Expr>

source

fn map_args(self, map_fn: impl Fn(&mut Expr)) -> Self

Object Safety§

This trait is not object safe.

Implementors§