pub struct KOptConfig {
pub k: usize,
pub min_segment_len: usize,
pub limited_patterns: bool,
}Expand description
Configuration for k-opt move generation.
Fields§
§k: usizeThe k value (2-5).
min_segment_len: usizeMinimum segment length between cuts (default: 1).
limited_patterns: boolWhether to use only a subset of reconnection patterns.
Implementations§
Source§impl KOptConfig
impl KOptConfig
Sourcepub fn with_min_segment_len(self, len: usize) -> Self
pub fn with_min_segment_len(self, len: usize) -> Self
Sets minimum segment length between cuts.
Sourcepub fn with_limited_patterns(self, limited: bool) -> Self
pub fn with_limited_patterns(self, limited: bool) -> Self
Enables limited pattern mode (faster but less thorough).
Trait Implementations§
Source§impl Clone for KOptConfig
impl Clone for KOptConfig
Source§fn clone(&self) -> KOptConfig
fn clone(&self) -> KOptConfig
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 KOptConfig
impl RefUnwindSafe for KOptConfig
impl Send for KOptConfig
impl Sync for KOptConfig
impl Unpin for KOptConfig
impl UnwindSafe for KOptConfig
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