pub fn unify_var_var<S: UnifyCtx<V>>(&mut self,
    ctx: &mut S, a_id: impl Into<K>, b_id: impl Into<K>
  ) -> Result<(), S::Error> {
    let a_id = a_id.into();
    let b_id = b_id.into();

    let root_a = self.uninlined_get_root_key(a_id);
    let root_b = self.uninlined_get_root_key(b_id);

    if root_a == root_b {
      return Ok(());
    }

    let combined = ctx.unify_values(&self.value(root_a).value, &self.value(root_b).value)?;

    self.unify_roots(root_a, root_b, combined);
    Ok(())
  }
/// Unions together two variables, merging their values. If
/// merging the values fails, the error is propagated and this
/// method has no effect.
Unions together two variables, merging their values. If
merging the values fails, the error is propagated and this
method has no effect.
Unions together two variables merging their values . If merging the values fails the error is propagated and this method has no effect .
pub fn unify_var_var<S: UnifyCtx<V>>(&mut self,
    ctx: &mut S, a_id: impl Into<K>, b_id: impl Into<K>
  ) -> Result<(), S::Error> {
    let a_id = a_id.into();
    let b_id = b_id.into();
    let root_a = self.uninlined_get_root_key(a_id);
    let root_b = self.uninlined_get_root_key(b_id);
    if root_a == root_b {
      return Ok(());
    }
    let combined = ctx.unify_values(&self.value(root_a).value, &self.value(root_b).value)?;
    self.unify_roots(root_a, root_b, combined);
    Ok(())
  }
pub fn unify_var_var < S : UnifyCtx < V > > ( & mut self , ctx : & mut S , a_id : impl Into < K > , b_id : impl Into < K > ) -> Result < ( ) , S :: Error > { let a_id = a_id . into ( ) ; let b_id = b_id . into ( ) ; let root_a = self . uninlined_get_root_key ( a_id ) ; let root_b = self . uninlined_get_root_key ( b_id ) ; if root_a == root_b { return Ok ( ( ) ) ; } let combined = ctx . unify_values ( & self . value ( root_a ) . value , & self . value ( root_b ) . value ) ? ; self . unify_roots ( root_a , root_b , combined ) ; Ok ( ( ) ) }
Unions together two variables, merging their values.
Unions together two variables merging their values .
&mut self
ctx
&mut S
a_id
impl Into<K>
b_id
impl Into<K>
&mut self
ctx
&mut S
a_id
impl Into<K>
b_id
impl Into<K>