pub struct ApproximateGraphProcessor { /* private fields */ }
Expand description
Approximate graph analytics processor Combines multiple approximate algorithms for scalable graph analysis
Implementations§
Source§impl ApproximateGraphProcessor
impl ApproximateGraphProcessor
Sourcepub fn new(config: ApproximateConfig) -> Self
pub fn new(config: ApproximateConfig) -> Self
Create new approximate graph processor
Sourcepub fn initialize(
&mut self,
processor: &IncrementalGraphProcessor,
) -> Result<()>
pub fn initialize( &mut self, processor: &IncrementalGraphProcessor, ) -> Result<()>
Initialize with graph data
Sourcepub fn update(
&mut self,
processor: &IncrementalGraphProcessor,
) -> Result<ApproximateMetrics>
pub fn update( &mut self, processor: &IncrementalGraphProcessor, ) -> Result<ApproximateMetrics>
Update with new graph changes
Sourcepub fn get_metrics(&self) -> ApproximateMetrics
pub fn get_metrics(&self) -> ApproximateMetrics
Get current approximate metrics
Sourcepub fn is_node_active(&self, node_id: &str) -> bool
pub fn is_node_active(&self, node_id: &str) -> bool
Check if a node is likely active
Sourcepub fn is_edge_recent(&self, source: &str, target: &str) -> bool
pub fn is_edge_recent(&self, source: &str, target: &str) -> bool
Check if an edge was recently added
Sourcepub fn estimate_node_degree(&self, node_id: &str) -> u32
pub fn estimate_node_degree(&self, node_id: &str) -> u32
Estimate node degree
Sourcepub fn estimate_edge_weight(&self, source: &str, target: &str) -> f64
pub fn estimate_edge_weight(&self, source: &str, target: &str) -> f64
Estimate edge weight
Sourcepub fn merge(&mut self, other: &ApproximateGraphProcessor) -> Result<()>
pub fn merge(&mut self, other: &ApproximateGraphProcessor) -> Result<()>
Merge with another approximate processor
Sourcepub fn add_triangle(&mut self, node_a: &str, node_b: &str, node_c: &str)
pub fn add_triangle(&mut self, node_a: &str, node_b: &str, node_c: &str)
Add triangle for approximate triangle counting
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApproximateGraphProcessor
impl RefUnwindSafe for ApproximateGraphProcessor
impl Send for ApproximateGraphProcessor
impl Sync for ApproximateGraphProcessor
impl Unpin for ApproximateGraphProcessor
impl UnwindSafe for ApproximateGraphProcessor
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