From 13e282705df90829ac39b75efde47e84e35cc1b1 Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Sun, 23 Oct 2022 13:38:28 +0200 Subject: enhanced pre-layout -> layout algorithm --- srchr/src/config.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'srchr/src/config.rs') diff --git a/srchr/src/config.rs b/srchr/src/config.rs index 9ed98d3..8a7faae 100644 --- a/srchr/src/config.rs +++ b/srchr/src/config.rs @@ -31,7 +31,7 @@ pub fn index_usage_fitness(index_perc: f32) -> f32 { } } -pub const MAX_PINKY_USAGE_PERCENT: f32 = 0.092; +pub const MAX_PINKY_USAGE_PERCENT: f32 = 0.095; pub fn pinky_col_penalty(lesser_perc: f32, greater_perc: f32) -> f32 { if greater_perc > MAX_PINKY_USAGE_PERCENT { if lesser_perc > MAX_PINKY_USAGE_PERCENT { @@ -45,7 +45,12 @@ pub fn pinky_col_penalty(lesser_perc: f32, greater_perc: f32) -> f32 { } // Pre-layout to layout -pub const MINIMISE_LSB_INSTEAD_OF_OPTIMISING_BALANCE: bool = true; +#[allow(dead_code)] +pub enum Algorithm { + MinimiseLSBThenBalance, + GreedyBalance, +} +pub const PRELAYOUT_TO_LAYOUT_ALGORITHM: Algorithm = Algorithm::MinimiseLSBThenBalance; // ----------------------------------------------------------------------------- // Do not change the following, the code makes assumptions about these -- cgit v1.3.1