# HG changeset patch # User Tuomo Valkonen # Date 1737301749 -3600 # Node ID 72968cf300331bbb573038365d981f426bb3d029 # Parent 99ad55974e6201c1cd913dfe651a7fbf7848b2b1 LogarithmicCap verbosity option diff -r 99ad55974e62 -r 72968cf30033 Cargo.toml --- a/Cargo.toml Mon Dec 30 15:46:28 2024 -0500 +++ b/Cargo.toml Sun Jan 19 16:49:09 2025 +0100 @@ -21,7 +21,7 @@ itertools = "~0.13.0" numeric_literals = "~0.2.0" cpu-time = "~1.0.0" -serde_json = "~1.0.85" +serde_json = { version = "~1.0.85", features = ["std"] } rayon = "1.5.3" simba = "0.9.0" anyhow = "1.0.95" diff -r 99ad55974e62 -r 72968cf30033 src/iterate.rs --- a/src/iterate.rs Mon Dec 30 15:46:28 2024 -0500 +++ b/src/iterate.rs Sun Jan 19 16:49:09 2025 +0100 @@ -451,6 +451,11 @@ /// * every 10 iterations from there on until 100 iterations, /// * every 100 iteartinos frmo there on until 1000 iterations, etc. Logarithmic(usize), + /// Same as `Logarithmic`, but $\log_b(n)$ is replaced by $min\{c, \log_b(n)\}$ where $c$ + /// is the given `cap`. For example, with `base=10` and `cap=2`, the first ten iterations + /// will be output, then every tenth iteration, and after 100 iterations, every 100th iteration, + /// without further logarithmic progression. + LogarithmicCap{ base : usize, cap : u32 }, } impl Verbose { @@ -467,6 +472,10 @@ let every = base.pow((iter as float).log(base as float).floor() as u32); iter % every == 0 } + &Verbose::LogarithmicCap{base, cap} => { + let every = base.pow(((iter as float).log(base as float).floor() as u32).min(cap)); + iter % every == 0 + } } } }