pub struct DeltaEdgeSlab { /* private fields */ }Expand description
Delta slab for accumulating edge mutations between CSR rebuilds
Provides O(1) edge mutations by tracking additions and removals separately, merging them with the base CSR on read.
Implementations§
Source§impl DeltaEdgeSlab
impl DeltaEdgeSlab
Sourcepub fn remove_edge(&mut self, from: VertexId, to: VertexId)
pub fn remove_edge(&mut self, from: VertexId, to: VertexId)
Remove an edge from source to target
Sourcepub fn merged_view(&self, csr: &CsrEdges, v: VertexId) -> Vec<VertexId>
pub fn merged_view(&self, csr: &CsrEdges, v: VertexId) -> Vec<VertexId>
Get a merged view of edges for a vertex, combining CSR and delta
Sourcepub fn needs_rebuild(&self) -> bool
pub fn needs_rebuild(&self) -> bool
Check if the delta needs to be applied (rebuild threshold reached)
Sourcepub fn mark_dirty(&mut self)
pub fn mark_dirty(&mut self)
Mark that coordinates have changed and rebuild is needed
Sourcepub fn apply_to_csr(
&self,
base: &CsrEdges,
coords: &[PackedCoord],
vertex_ids: &[u32],
) -> CsrEdges
pub fn apply_to_csr( &self, base: &CsrEdges, coords: &[PackedCoord], vertex_ids: &[u32], ) -> CsrEdges
Apply delta to CSR, creating a new CSR structure
Trait Implementations§
Source§impl Debug for DeltaEdgeSlab
impl Debug for DeltaEdgeSlab
Auto Trait Implementations§
impl Freeze for DeltaEdgeSlab
impl RefUnwindSafe for DeltaEdgeSlab
impl Send for DeltaEdgeSlab
impl Sync for DeltaEdgeSlab
impl Unpin for DeltaEdgeSlab
impl UnwindSafe for DeltaEdgeSlab
Blanket Implementations§
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more