pub struct SubpolynomialMinCut { /* private fields */ }Expand description
The main subpolynomial dynamic minimum cut structure
Implementations§
Source§impl SubpolynomialMinCut
impl SubpolynomialMinCut
Sourcepub fn new(config: SubpolyConfig) -> Self
pub fn new(config: SubpolyConfig) -> Self
Create new subpolynomial min-cut structure
Sourcepub fn for_size(expected_n: usize) -> Self
pub fn for_size(expected_n: usize) -> Self
Create with config optimized for expected graph size
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 build(&mut self)
pub fn build(&mut self)
Build the multi-level hierarchy
This creates O(log^{1/4} n) levels of expander decomposition, enabling subpolynomial update time.
Sourcepub fn min_cut_value(&self) -> f64
pub fn min_cut_value(&self) -> f64
Get the current minimum cut value
Sourcepub fn min_cut(&self) -> MinCutQueryResult
pub fn min_cut(&self) -> MinCutQueryResult
Get detailed minimum cut result
Sourcepub fn config(&self) -> &SubpolyConfig
pub fn config(&self) -> &SubpolyConfig
Get configuration
Sourcepub fn num_vertices(&self) -> usize
pub fn num_vertices(&self) -> usize
Get number of vertices
Sourcepub fn num_levels(&self) -> usize
pub fn num_levels(&self) -> usize
Get number of hierarchy levels
Sourcepub fn recourse_stats(&self) -> &RecourseStats
pub fn recourse_stats(&self) -> &RecourseStats
Get recourse statistics
Sourcepub fn hierarchy_stats(&self) -> HierarchyStatistics
pub fn hierarchy_stats(&self) -> HierarchyStatistics
Get hierarchy statistics
Sourcepub fn is_subpolynomial(&self) -> bool
pub fn is_subpolynomial(&self) -> bool
Check if updates are subpolynomial
Sourcepub fn certify_cuts(&mut self)
pub fn certify_cuts(&mut self)
Certify cuts using LocalKCut verification
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubpolynomialMinCut
impl RefUnwindSafe for SubpolynomialMinCut
impl Send for SubpolynomialMinCut
impl Sync for SubpolynomialMinCut
impl Unpin for SubpolynomialMinCut
impl UnwindSafe for SubpolynomialMinCut
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