/// Checks whether two [`RecExpr`]s are equivalent.
/// Returns a list of id where both expression are represented.
/// In most cases, there will none or exactly one id.
///
/// [`RecExpr`]: struct.RecExpr.html
Checks whether two [`RecExpr`]s are equivalent.
Returns a list of id where both expression are represented.
In most cases, there will none or exactly one id.


Checks whether two [ ` RecExpr ` ] s are equivalent . Returns a list of id where both expression are represented . In most cases there will none or exactly one id .
pub fn equivs(&self, expr1: &RecExpr<L>, expr2: &RecExpr<L>) -> Vec<Id> {
        let matches1 = Pattern::from(expr1.as_ref()).search(self);
        trace!("Matches1: {:?}", matches1);
        let matches2 = Pattern::from(expr2.as_ref()).search(self);
        trace!("Matches2: {:?}", matches2);
        let mut equiv_eclasses = Vec::new();
        for m1 in &matches1 {
            for m2 in &matches2 {
                if self.find(m1.eclass) == self.find(m2.eclass) {
                    equiv_eclasses.push(m1.eclass)
                }
            }
        }
        equiv_eclasses
    }
pub fn equivs ( & self , expr1 : & RecExpr < L > , expr2 : & RecExpr < L > ) -> Vec < Id > { let matches1 = Pattern :: from ( expr1 . as_ref ( ) ) . search ( self ) ; trace ! ( " " matches1 ) ; let matches2 = Pattern :: from ( expr2 . as_ref ( ) ) . search ( self ) ; trace ! ( " " matches2 ) ; let mut equiv_eclasses = Vec :: new ( ) ; for m1 in & matches1 { for m2 in & matches2 { if self . find ( m1 . eclass ) == self . find ( m2 . eclass ) { equiv_eclasses . push ( m1 . eclass ) } } } equiv_eclasses }
Checks whether two [`RecExpr`]s are equivalent.
Checks whether two [ ` RecExpr ` ] s are equivalent .
&self
expr1
&RecExpr<L>
expr2
&RecExpr<L>