pub struct StreamingConnectedComponents { /* private fields */ }
Expand description
Streaming Connected Components algorithm that updates incrementally
Implementations§
Source§impl StreamingConnectedComponents
impl StreamingConnectedComponents
pub fn new() -> Self
Sourcepub fn component_of(&self, node_id: &str) -> Option<&String>
pub fn component_of(&self, node_id: &str) -> Option<&String>
Get the component ID for a node
Sourcepub fn component_size(&self, node_id: &str) -> Option<usize>
pub fn component_size(&self, node_id: &str) -> Option<usize>
Get the size of the component containing a node
Sourcepub fn all_components(&self) -> Vec<(String, usize)>
pub fn all_components(&self) -> Vec<(String, usize)>
Get all components and their sizes
Sourcepub fn component_count(&self) -> usize
pub fn component_count(&self) -> usize
Get number of components
Trait Implementations§
Source§impl Clone for StreamingConnectedComponents
impl Clone for StreamingConnectedComponents
Source§fn clone(&self) -> StreamingConnectedComponents
fn clone(&self) -> StreamingConnectedComponents
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StreamingConnectedComponents
impl Debug for StreamingConnectedComponents
Source§impl StreamingAlgorithm<HashMap<String, String>> for StreamingConnectedComponents
impl StreamingAlgorithm<HashMap<String, String>> for StreamingConnectedComponents
Source§fn initialize(&mut self, processor: &IncrementalGraphProcessor) -> Result<()>
fn initialize(&mut self, processor: &IncrementalGraphProcessor) -> Result<()>
Initialize the algorithm with the current graph state
Source§fn update(
&mut self,
processor: &IncrementalGraphProcessor,
changes: &UpdateResult,
) -> Result<()>
fn update( &mut self, processor: &IncrementalGraphProcessor, changes: &UpdateResult, ) -> Result<()>
Update the algorithm state based on graph changes
Source§fn get_result(&self) -> &HashMap<String, String>
fn get_result(&self) -> &HashMap<String, String>
Get the current result/state of the algorithm
Source§fn recompute(&mut self, processor: &IncrementalGraphProcessor) -> Result<()>
fn recompute(&mut self, processor: &IncrementalGraphProcessor) -> Result<()>
Force a full recomputation (fallback when incremental update is not sufficient)
Source§fn needs_recomputation(&self, changes: &UpdateResult) -> bool
fn needs_recomputation(&self, changes: &UpdateResult) -> bool
Check if the algorithm needs full recomputation
Auto Trait Implementations§
impl Freeze for StreamingConnectedComponents
impl RefUnwindSafe for StreamingConnectedComponents
impl Send for StreamingConnectedComponents
impl Sync for StreamingConnectedComponents
impl Unpin for StreamingConnectedComponents
impl UnwindSafe for StreamingConnectedComponents
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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