Skip to content

Commit

Permalink
Added method to access union find without path compression from undo-log
Browse files Browse the repository at this point in the history
  • Loading branch information
dewert99 committed Mar 11, 2024
1 parent 2c1c95f commit e4a8f32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/raw/semi_persistent1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,9 @@ impl<L: Language, U: AsUnwrap<UndoLog>> RawEGraph<L, (), U> {
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)
}
}

0 comments on commit e4a8f32

Please sign in to comment.