mirror of
https://github.com/dnlbauer/WHAM.git
synced 2026-09-10 22:25:31 +00:00
better default values for tolerance and max iterations
This commit is contained in:
15
src/main.rs
15
src/main.rs
@@ -20,18 +20,9 @@ fn cli() -> Result<Config, Box<Error>> {
|
||||
let verbose: bool = matches.is_present("verbose");
|
||||
let temperature: f32 = matches.value_of("temperature").unwrap().parse()?;
|
||||
|
||||
let tolerance: f32;
|
||||
if matches.is_present("tolerance") {
|
||||
tolerance = matches.value_of("tolerance").unwrap().parse()?;
|
||||
} else {
|
||||
tolerance = std::f32::MIN_POSITIVE;
|
||||
}
|
||||
let max_iterations: usize;
|
||||
if matches.is_present("iterations") {
|
||||
max_iterations = matches.value_of("iterations").unwrap().parse()?;
|
||||
} else {
|
||||
max_iterations = std::usize::MAX;
|
||||
}
|
||||
let tolerance: f32 = matches.value_of("tolerance").unwrap_or("0.000001").parse()?;
|
||||
let max_iterations: usize = matches.value_of("iterations").unwrap_or("100000").parse()?;
|
||||
|
||||
Ok(wham::Config{metadata_file, hist_min, hist_max, num_bins,
|
||||
verbose, tolerance, max_iterations, temperature})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user