pub struct DynamicMinCut { /* private fields */ }Expand description
The main dynamic minimum cut structure
Implementations§
Source§impl DynamicMinCut
impl DynamicMinCut
Sourcepub fn new(config: MinCutConfig) -> Self
pub fn new(config: MinCutConfig) -> Self
Create a new dynamic minimum cut structure
Sourcepub fn from_graph(graph: DynamicGraph, config: MinCutConfig) -> Result<Self>
pub fn from_graph(graph: DynamicGraph, config: MinCutConfig) -> Result<Self>
Build from an existing graph
Sourcepub fn insert_edge(
&mut self,
u: VertexId,
v: VertexId,
weight: Weight,
) -> Result<f64>
pub fn insert_edge( &mut self, u: VertexId, v: VertexId, weight: Weight, ) -> Result<f64>
Insert an edge
Sourcepub fn min_cut_value(&self) -> f64
pub fn min_cut_value(&self) -> f64
Get the current minimum cut value (O(1))
Sourcepub fn min_cut(&self) -> MinCutResult
pub fn min_cut(&self) -> MinCutResult
Get detailed minimum cut result
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if graph is connected
Sourcepub fn stats(&self) -> AlgorithmStats
pub fn stats(&self) -> AlgorithmStats
Get algorithm statistics
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics
Sourcepub fn config(&self) -> &MinCutConfig
pub fn config(&self) -> &MinCutConfig
Get configuration
Sourcepub fn graph(&self) -> Arc<RwLock<DynamicGraph>>
pub fn graph(&self) -> Arc<RwLock<DynamicGraph>>
Get reference to underlying graph
Sourcepub fn num_vertices(&self) -> usize
pub fn num_vertices(&self) -> usize
Number of vertices
Auto Trait Implementations§
impl Freeze for DynamicMinCut
impl !RefUnwindSafe for DynamicMinCut
impl Send for DynamicMinCut
impl Sync for DynamicMinCut
impl Unpin for DynamicMinCut
impl !UnwindSafe for DynamicMinCut
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