pub struct AlgoConfig {
pub jump_static_penalty: f64,
pub jump_offset_penalty: f64,
pub block_sizes: Vec<usize>,
pub block_step_factor: usize,
pub base_block_shift: usize,
pub shift_per_block_size: usize,
}Expand description
Configuration for the fuzzy-match block-permutation optimizer.
Fields§
§jump_static_penalty: f64Fixed penalty added for every out-of-order adjacency between blocks, regardless of how far apart the blocks originally were.
jump_offset_penalty: f64Per-unit penalty proportional to the index distance of an out-of-order
adjacency. The total jump cost for one gap is
jump_static_penalty + distance * jump_offset_penalty.
block_sizes: Vec<usize>Set of block sizes to try, from coarse to fine. Larger blocks capture structural moves; smaller blocks refine detail. Processed in descending order internally.
block_step_factor: usizeDivisor that controls candidate step size for each block level:
step_size = block_size.div_ceil(block_step_factor).
Higher values yield a denser (slower, more thorough) search.
base_block_shift: usizeMinimum shift window radius (in positions) around a block’s current location. Limits how far a single move can relocate a block.
shift_per_block_size: usizeThe shift window grows linearly with block size:
max_shift = base_block_shift + block_size * shift_per_block_size.
Larger blocks may need to travel farther to find their correct position.
Trait Implementations§
Source§impl Clone for AlgoConfig
impl Clone for AlgoConfig
Source§fn clone(&self) -> AlgoConfig
fn clone(&self) -> AlgoConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlgoConfig
impl Debug for AlgoConfig
Auto Trait Implementations§
impl Freeze for AlgoConfig
impl RefUnwindSafe for AlgoConfig
impl Send for AlgoConfig
impl Sync for AlgoConfig
impl Unpin for AlgoConfig
impl UnsafeUnpin for AlgoConfig
impl UnwindSafe for AlgoConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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