pub struct VertexCoverFPT {
pub k: usize,
}Expand description
Vertex cover FPT algorithm combining LP-based kernelization and bounded search tree.
Fields§
§k: usizeThe parameter k (size of desired vertex cover).
Implementations§
Source§impl VertexCoverFPT
impl VertexCoverFPT
Sourcepub fn lp_kernel(
&self,
adj: &[Vec<usize>],
) -> (Vec<Vec<usize>>, Vec<usize>, usize)
pub fn lp_kernel( &self, adj: &[Vec<usize>], ) -> (Vec<Vec<usize>>, Vec<usize>, usize)
Apply LP-based 2k kernelization: remove vertices with LP value 1 (high degree), then return the remaining graph with reduced k.
Sourcepub fn solve(&self, adj: &[Vec<usize>]) -> Option<Vec<usize>>
pub fn solve(&self, adj: &[Vec<usize>]) -> Option<Vec<usize>>
Solve vertex cover: apply LP kernel then bounded search tree. Returns Some(cover) if a size-k cover exists, None otherwise.
Sourcepub fn running_time(&self) -> String
pub fn running_time(&self) -> String
Returns the running time bound for the FPT algorithm.
Trait Implementations§
Source§impl Clone for VertexCoverFPT
impl Clone for VertexCoverFPT
Source§fn clone(&self) -> VertexCoverFPT
fn clone(&self) -> VertexCoverFPT
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 VertexCoverFPT
impl RefUnwindSafe for VertexCoverFPT
impl Send for VertexCoverFPT
impl Sync for VertexCoverFPT
impl Unpin for VertexCoverFPT
impl UnsafeUnpin for VertexCoverFPT
impl UnwindSafe for VertexCoverFPT
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