pub struct StreamingGraph { /* private fields */ }Expand description
A streaming graph that supports incremental edge additions and deletions.
Maintains an adjacency set representation that is updated incrementally. Tracks basic statistics like degree distribution, edge count, and node count.
Implementations§
Source§impl StreamingGraph
impl StreamingGraph
Sourcepub fn process_event(&mut self, event: &StreamEvent)
pub fn process_event(&mut self, event: &StreamEvent)
Process a stream event (insert or delete an edge).
Sourcepub fn insert_edge(&mut self, src: usize, dst: usize, weight: f64)
pub fn insert_edge(&mut self, src: usize, dst: usize, weight: f64)
Insert an edge into the graph.
Sourcepub fn delete_edge(&mut self, src: usize, dst: usize)
pub fn delete_edge(&mut self, src: usize, dst: usize)
Delete an edge from the graph.
Sourcepub fn events_processed(&self) -> u64
pub fn events_processed(&self) -> u64
Get the number of events processed.
Sourcepub fn degree_distribution(&self) -> DegreeDistribution
pub fn degree_distribution(&self) -> DegreeDistribution
Get the degree distribution as a histogram.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingGraph
impl RefUnwindSafe for StreamingGraph
impl Send for StreamingGraph
impl Sync for StreamingGraph
impl Unpin for StreamingGraph
impl UnsafeUnpin for StreamingGraph
impl UnwindSafe for StreamingGraph
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