aboutsummaryrefslogtreecommitdiff
path: root/srchr/src/config.rs
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2022-10-23 13:38:28 +0200
committertslil clingman <tslil@posteo.de>2022-10-23 13:38:28 +0200
commit13e282705df90829ac39b75efde47e84e35cc1b1 (patch)
treee88a0799573a035f6ee1e095c218b19c167872c9 /srchr/src/config.rs
parent6db23c417ea59dd9b9b928f022d40e20b80d2e67 (diff)
enhanced pre-layout -> layout algorithm
Diffstat (limited to 'srchr/src/config.rs')
-rw-r--r--srchr/src/config.rs9
1 files changed, 7 insertions, 2 deletions
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