pub struct CrownDecomposition {
pub crown: Vec<usize>,
pub head: Vec<usize>,
pub reduced_adj: Vec<Vec<usize>>,
}Expand description
Crown decomposition for vertex cover kernelization. Returns (crown vertices, head vertices, reduced graph adjacency).
Fields§
§crown: Vec<usize>The crown C: an independent set with a perfect matching into H.
head: Vec<usize>The head H: neighbors of C that are matched to C.
reduced_adj: Vec<Vec<usize>>Reduced graph adjacency (V - H - C).
Implementations§
Source§impl CrownDecomposition
impl CrownDecomposition
Sourcepub fn compute(adj: &[Vec<usize>], _k: usize) -> Self
pub fn compute(adj: &[Vec<usize>], _k: usize) -> Self
Compute a crown decomposition for vertex cover on the given graph. Uses LP-based half-integrality: vertices with LP value 0 are in crown, vertices with LP value 1 are in head.
Trait Implementations§
Source§impl Clone for CrownDecomposition
impl Clone for CrownDecomposition
Source§fn clone(&self) -> CrownDecomposition
fn clone(&self) -> CrownDecomposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CrownDecomposition
impl RefUnwindSafe for CrownDecomposition
impl Send for CrownDecomposition
impl Sync for CrownDecomposition
impl Unpin for CrownDecomposition
impl UnsafeUnpin for CrownDecomposition
impl UnwindSafe for CrownDecomposition
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