Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenGar committed Feb 28, 2024
1 parent e087d24 commit 4d4c928
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jagua-rs/src/io/json_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct JsonItem {
pub shape: JsonShape,
/// The value of the item (for knapsack problems)
pub value: Option<u64>,
/// The quality required for the entire item
/// The quality required for the entire item, if not defined maximum quality is required
pub base_quality: Option<usize>,
}

Expand Down
2 changes: 1 addition & 1 deletion lbf/src/lbf_optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub fn sample_layout(
}
}
let progress_pct = i as f64 / n_ls_samples as f64;
ls_sampler.adjust_stddev(progress_pct);
ls_sampler.decay_stddev(progress_pct);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lbf/src/samplers/ls_sampler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl LSSampler {
/// f(0) = init;
/// f(1) = end;
/// f(x) = init * (end/init)^x;
pub fn adjust_stddev(&mut self, progress_pct: f64) {
pub fn decay_stddev(&mut self, progress_pct: f64) {
let calc_stddev = |(init, end): (f64, f64), pct: f64| init * (end / init).powf(pct);
self.set_stddev(
calc_stddev(self.stddev_transl_range, progress_pct),
Expand Down

0 comments on commit 4d4c928

Please sign in to comment.