Skip to main content

EGraph

Struct EGraph 

Source
pub struct EGraph<F, C, S = DefaultHashBuilder> { /* private fields */ }

Implementations§

Source§

impl<F, C> EGraph<F, C>

Source

pub fn new() -> Self

Source§

impl<F, C, S: Clone> EGraph<F, C, S>

Source

pub fn with_hasher(h: S) -> Self

Trait Implementations§

Source§

impl<F, C, S: Clone> Clone for EGraph<F, C, S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<F: Debug, C, S> Debug for EGraph<F, C, S>

Source§

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

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

impl<F, C> Default for EGraph<F, C>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<F: Eq + Hash, C, S: Clone + BuildHasher> EGraphCore for EGraph<F, C, S>

Source§

type Class = C

Source§

type FuncSymbol = F

Source§

fn add(&mut self, node: ENode<F, C>) -> Result<ClassId<C>, NoNode>

Source§

impl<F: Eq + Hash, C, S: Clone + BuildHasher> EGraphRead for EGraph<F, C, S>

Source§

type Hasher = S

Source§

fn find(&self, class: ClassId<C>) -> Result<ClassId<C>, NoNode>

Source§

fn canonicalize(&self, node: &mut ENode<F, C>) -> Result<bool, NoNode>

Returns true if the node was modified
Source§

fn is_canonical(&self, node: &ENode<F, C>) -> Result<bool, NoNode>

Source§

fn class_nodes(&self) -> ClassNodes<'_, Self, S>

Source§

fn dot<M: Formatter<F>>(&self, f: M) -> Graph<'static>

Source§

impl<F: Eq + Hash, C, S: Clone + BuildHasher> EGraphUpgradeTrace for EGraph<F, C, S>

Source§

type WriteRef<'a, T: EGraphTrace<F, C>> = EGraphMut<'a, F, C, T, S> where Self: 'a

Source§

fn write_trace<T: EGraphTrace<F, C>>( &mut self, tracer: T, ) -> Self::WriteRef<'_, T>

Source§

impl<F: Eq + Hash, C, S: BuildHasher> From<EGraph<F, C, S>> for EGraphParts<F, C>

Source§

fn from(eg: EGraph<F, C, S>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F, C, S> Freeze for EGraph<F, C, S>
where UnionFind<C>: Freeze, UnionFind<ENode<F, C>>: Freeze, HashMap<ClassId<C>, EClassData<F, C, S>, S>: Freeze, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: Freeze, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: Freeze,

§

impl<F, C, S> RefUnwindSafe for EGraph<F, C, S>
where UnionFind<C>: RefUnwindSafe, UnionFind<ENode<F, C>>: RefUnwindSafe, HashMap<ClassId<C>, EClassData<F, C, S>, S>: RefUnwindSafe, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: RefUnwindSafe, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: RefUnwindSafe,

§

impl<F, C, S> Send for EGraph<F, C, S>
where UnionFind<C>: Send, UnionFind<ENode<F, C>>: Send, HashMap<ClassId<C>, EClassData<F, C, S>, S>: Send, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: Send, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: Send,

§

impl<F, C, S> Sync for EGraph<F, C, S>
where UnionFind<C>: Sync, UnionFind<ENode<F, C>>: Sync, HashMap<ClassId<C>, EClassData<F, C, S>, S>: Sync, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: Sync, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: Sync,

§

impl<F, C, S> Unpin for EGraph<F, C, S>
where UnionFind<C>: Unpin, UnionFind<ENode<F, C>>: Unpin, HashMap<ClassId<C>, EClassData<F, C, S>, S>: Unpin, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: Unpin, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: Unpin,

§

impl<F, C, S> UnsafeUnpin for EGraph<F, C, S>
where UnionFind<C>: UnsafeUnpin, UnionFind<ENode<F, C>>: UnsafeUnpin, HashMap<ClassId<C>, EClassData<F, C, S>, S>: UnsafeUnpin, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: UnsafeUnpin, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: UnsafeUnpin,

§

impl<F, C, S> UnwindSafe for EGraph<F, C, S>
where UnionFind<C>: UnwindSafe, UnionFind<ENode<F, C>>: UnwindSafe, HashMap<ClassId<C>, EClassData<F, C, S>, S>: UnwindSafe, HashMap<ClassId<ENode<F, C>>, NodeData<F, C>, S>: UnwindSafe, HashMap<ENode<F, C>, ClassId<ENode<F, C>>, S>: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<G> EGraphUpgrade for G

Source§

fn write(&mut self) -> Self::WriteRef<'_, ()>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.