diff --git a/src/raw/semi_persistent1.rs b/src/raw/semi_persistent1.rs index e71b3dde..f00f3078 100644 --- a/src/raw/semi_persistent1.rs +++ b/src/raw/semi_persistent1.rs @@ -220,4 +220,9 @@ impl> RawEGraph { pub fn pop1(&mut self, info: PushInfo) { self.raw_pop1(info, |_, _, _| ()) } + + /// Return the direct parent from the union find without path compression + pub fn find_direct_parent(&self, id: Id) -> Id { + self.undo_log.as_unwrap().undo_find.parent(id) + } }