pub struct IdentityGraph;Expand description
Holds the rewrite rules. For v0.1 the rules are encoded directly in
IdentityGraph::simplify; the type exists so the API can grow into a real
rule database later.
Implementations§
Source§impl IdentityGraph
impl IdentityGraph
Sourcepub fn standard() -> Self
pub fn standard() -> Self
The standard set of algebraic, trigonometric, and exponential identities.
Sourcepub fn simplify(&self, expr: SymbolicExpr) -> SymbolicExpr
pub fn simplify(&self, expr: SymbolicExpr) -> SymbolicExpr
Simplify an expression to a fixed point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdentityGraph
impl RefUnwindSafe for IdentityGraph
impl Send for IdentityGraph
impl Sync for IdentityGraph
impl Unpin for IdentityGraph
impl UnsafeUnpin for IdentityGraph
impl UnwindSafe for IdentityGraph
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> 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