pub struct ReachTable {
pub commits: Vec<u32>,
pub bitmaps: Vec<RoaringBitmap>,
}Expand description
The live reachability table: entry i is the closure of the commit at
ordinal commits[i].
Fields§
§commits: Vec<u32>§bitmaps: Vec<RoaringBitmap>Implementations§
Source§impl ReachTable
impl ReachTable
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn by_row(&self, graph: &OrdGraph) -> Vec<u32>
pub fn by_row(&self, graph: &OrdGraph) -> Vec<u32>
row → entry index (or NONE), over graph. Rebuilt at every fold
beside the graph; the table itself is not.
Sourcepub fn to_entries(
&self,
space: &OrdinalSpace<'_>,
remap: Option<&[u32]>,
) -> Option<Vec<ReachEntry>>
pub fn to_entries( &self, space: &OrdinalSpace<'_>, remap: Option<&[u32]>, ) -> Option<Vec<ReachEntry>>
The sealed spelling, with every ordinal mapped through remap (old →
sorted). None if a set bit maps to NONE — an entry naming an object
the target space lacks would be a silent over-claim.
Sourcepub fn remapped(&self, remap: &[u32]) -> Option<ReachTable>
pub fn remapped(&self, remap: &[u32]) -> Option<ReachTable>
Renumber every bit through remap (old ordinal → new ordinal); an entry
whose commit maps to NONE is dropped, a BIT that does is a refusal
(None: rebuild). One array index per bit.
Sourcepub fn pruned(&self, graph: &OrdGraph, max: usize) -> ReachTable
pub fn pruned(&self, graph: &OrdGraph, max: usize) -> ReachTable
Keep at most max entries: the current tips first, then an even sample
of the rest in table order.
Trait Implementations§
Source§impl Clone for ReachTable
impl Clone for ReachTable
Source§impl Debug for ReachTable
impl Debug for ReachTable
Source§impl Default for ReachTable
impl Default for ReachTable
Source§impl PartialEq for ReachTable
impl PartialEq for ReachTable
impl StructuralPartialEq for ReachTable
Auto Trait Implementations§
impl Freeze for ReachTable
impl RefUnwindSafe for ReachTable
impl Send for ReachTable
impl Sync for ReachTable
impl Unpin for ReachTable
impl UnsafeUnpin for ReachTable
impl UnwindSafe for ReachTable
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more