pub struct AlphaCache { /* private fields */ }Expand description
An alpha-equivalence cache for repeated comparisons.
Caches the result of alpha_equiv to avoid redundant traversals.
Implementations§
Source§impl AlphaCache
impl AlphaCache
Sourcepub fn query(&self, e1: &Expr, e2: &Expr) -> Option<bool>
pub fn query(&self, e1: &Expr, e2: &Expr) -> Option<bool>
Check the cache, returning cached result if available.
Sourcepub fn alpha_equiv_cached(&mut self, e1: &Expr, e2: &Expr) -> bool
pub fn alpha_equiv_cached(&mut self, e1: &Expr, e2: &Expr) -> bool
Check alpha equivalence, using and updating the cache.
Sourcepub fn num_non_equiv(&self) -> usize
pub fn num_non_equiv(&self) -> usize
Return the number of cached non-equivalences.
Trait Implementations§
Source§impl Clone for AlphaCache
impl Clone for AlphaCache
Source§fn clone(&self) -> AlphaCache
fn clone(&self) -> AlphaCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlphaCache
impl Debug for AlphaCache
Source§impl Default for AlphaCache
impl Default for AlphaCache
Source§fn default() -> AlphaCache
fn default() -> AlphaCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AlphaCache
impl RefUnwindSafe for AlphaCache
impl Send for AlphaCache
impl Sync for AlphaCache
impl Unpin for AlphaCache
impl UnsafeUnpin for AlphaCache
impl UnwindSafe for AlphaCache
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