pub struct EdgeStrength { /* private fields */ }Expand description
Edge strength calculator for sparsification sampling
Implementations§
Source§impl EdgeStrength
impl EdgeStrength
Sourcepub fn new(graph: Arc<DynamicGraph>) -> Self
pub fn new(graph: Arc<DynamicGraph>) -> Self
Create new strength calculator
Sourcepub fn compute(&mut self, u: VertexId, v: VertexId) -> f64
pub fn compute(&mut self, u: VertexId, v: VertexId) -> f64
Compute strength of edge (u, v) Strength = max-flow between u and v in graph without edge (u,v) For efficiency, approximate using connectivity
Sourcepub fn compute_all(&mut self) -> HashMap<EdgeId, f64>
pub fn compute_all(&mut self) -> HashMap<EdgeId, f64>
Compute all edge strengths
Sourcepub fn invalidate(&mut self, v: VertexId)
pub fn invalidate(&mut self, v: VertexId)
Invalidate cached strengths for edges incident to vertex
Auto Trait Implementations§
impl Freeze for EdgeStrength
impl !RefUnwindSafe for EdgeStrength
impl Send for EdgeStrength
impl Sync for EdgeStrength
impl Unpin for EdgeStrength
impl !UnwindSafe for EdgeStrength
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