Skip to content

Commit e4a8f32

Browse files
committed
Added method to access union find without path compression from undo-log
1 parent 2c1c95f commit e4a8f32

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/raw/semi_persistent1.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,9 @@ impl<L: Language, U: AsUnwrap<UndoLog>> RawEGraph<L, (), U> {
220220
pub fn pop1(&mut self, info: PushInfo) {
221221
self.raw_pop1(info, |_, _, _| ())
222222
}
223+
224+
/// Return the direct parent from the union find without path compression
225+
pub fn find_direct_parent(&self, id: Id) -> Id {
226+
self.undo_log.as_unwrap().undo_find.parent(id)
227+
}
223228
}

0 commit comments

Comments
 (0)