pub struct IncrementalGraphProcessor { /* private fields */ }
Expand description
Incremental graph update operations for streaming graph processing Supports efficient add/remove of vertices and edges with minimal recomputation
Implementations§
Source§impl IncrementalGraphProcessor
impl IncrementalGraphProcessor
Sourcepub fn new(graph: ArrowGraph) -> Result<Self>
pub fn new(graph: ArrowGraph) -> Result<Self>
Create a new incremental processor from an existing graph
Sourcepub fn set_batch_size(&mut self, size: usize)
pub fn set_batch_size(&mut self, size: usize)
Set the batch size for operations
Sourcepub fn add_vertex(&mut self, vertex_id: String) -> Result<()>
pub fn add_vertex(&mut self, vertex_id: String) -> Result<()>
Add a vertex to the graph (batched)
Sourcepub fn remove_vertex(&mut self, vertex_id: String) -> Result<()>
pub fn remove_vertex(&mut self, vertex_id: String) -> Result<()>
Remove a vertex from the graph (batched)
Sourcepub fn add_edge(
&mut self,
source: String,
target: String,
weight: f64,
) -> Result<()>
pub fn add_edge( &mut self, source: String, target: String, weight: f64, ) -> Result<()>
Add an edge to the graph (batched)
Sourcepub fn remove_edge(&mut self, source: String, target: String) -> Result<()>
pub fn remove_edge(&mut self, source: String, target: String) -> Result<()>
Remove an edge from the graph (batched)
Sourcepub fn apply_updates(
&mut self,
operations: Vec<UpdateOperation>,
) -> Result<UpdateResult>
pub fn apply_updates( &mut self, operations: Vec<UpdateOperation>, ) -> Result<UpdateResult>
Apply a batch of update operations
Sourcepub fn flush_all_operations(&mut self) -> Result<UpdateResult>
pub fn flush_all_operations(&mut self) -> Result<UpdateResult>
Flush all pending operations and rebuild the graph
Sourcepub fn graph(&self) -> &ArrowGraph
pub fn graph(&self) -> &ArrowGraph
Get the current graph
Sourcepub fn pending_operations_count(&self) -> usize
pub fn pending_operations_count(&self) -> usize
Get the number of pending operations
Sourcepub fn has_pending_operations(&self) -> bool
pub fn has_pending_operations(&self) -> bool
Check if there are pending operations
Sourcepub fn statistics(&self) -> IncrementalStats
pub fn statistics(&self) -> IncrementalStats
Get statistics about the current state
Trait Implementations§
Source§impl Clone for IncrementalGraphProcessor
impl Clone for IncrementalGraphProcessor
Source§fn clone(&self) -> IncrementalGraphProcessor
fn clone(&self) -> IncrementalGraphProcessor
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 moreAuto Trait Implementations§
impl Freeze for IncrementalGraphProcessor
impl !RefUnwindSafe for IncrementalGraphProcessor
impl Send for IncrementalGraphProcessor
impl Sync for IncrementalGraphProcessor
impl Unpin for IncrementalGraphProcessor
impl !UnwindSafe for IncrementalGraphProcessor
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