# HG changeset patch # User Tuomo Valkonen # Date 1785852900 18000 # Node ID 7b5404283df0d273e58d8bc19e8b6b7ba18fad19 # Parent 1c74bb0439a846c4ba45aa4e958ff13e5673ff23 Scaling heuristic updates diff -r 1c74bb0439a8 -r 7b5404283df0 Cargo.lock --- a/Cargo.lock Mon Aug 03 19:28:07 2026 -0500 +++ b/Cargo.lock Tue Aug 04 09:15:00 2026 -0500 @@ -33,7 +33,7 @@ [[package]] name = "alg_tools" -version = "0.5.3-dev" +version = "0.5.4" dependencies = [ "anyhow", "colored", @@ -647,7 +647,7 @@ [[package]] name = "measures" -version = "0.2.1" +version = "0.3.0" dependencies = [ "alg_tools", "nalgebra", diff -r 1c74bb0439a8 -r 7b5404283df0 Cargo.toml --- a/Cargo.toml Mon Aug 03 19:28:07 2026 -0500 +++ b/Cargo.toml Tue Aug 04 09:15:00 2026 -0500 @@ -28,7 +28,7 @@ features = ["nightly"] [dependencies.measures] -version = "~0.2.0" +version = "~0.3.0" path = "../measures" [dependencies] diff -r 1c74bb0439a8 -r 7b5404283df0 src/prox_penalty/radon_squared.rs --- a/src/prox_penalty/radon_squared.rs Mon Aug 03 19:28:07 2026 -0500 +++ b/src/prox_penalty/radon_squared.rs Tue Aug 04 09:15:00 2026 -0500 @@ -100,18 +100,23 @@ return μ.merge_spikes_fitness(config.merging, f, |&v| v).1; } } - μ.merge_spikes(config.merging, |μ_candidate| { - // Important: μ_candidate's new points are afterwards, - // and do not conflict with μ_base. - // TODO: could simplify to requiring μ_base instead of μ_radon. - // but may complicate with sliding base's exgtra points that need to be - // after μ_candidate's extra points. - // TODO: doesn't seem to work, maybe need to merge μ_base as well? - // Although that doesn't seem to make sense. - let μ_radon = μ_candidate.sub_matching(μ_base); - reg.verify_merge_candidate_radonsq(τv, μ_candidate, τ, ε, &config, &μ_radon) - //let n = μ_candidate.dist_matching(μ_base); - //reg.find_tolerance_violation_slack(τv, τ, ε, false, config, n).is_none() + μ.merge_spikes(config.merging, |μ_candidate, is_scaling| { + if is_scaling { + // Scaling heuristic is pointless without fitness-based merging + false + } else { + // Important: μ_candidate's new points are afterwards, + // and do not conflict with μ_base. + // TODO: could simplify to requiring μ_base instead of μ_radon. + // but may complicate with sliding base's exgtra points that need to be + // after μ_candidate's extra points. + // TODO: doesn't seem to work, maybe need to merge μ_base as well? + // Although that doesn't seem to make sense. + let μ_radon = μ_candidate.sub_matching(μ_base); + reg.verify_merge_candidate_radonsq(τv, μ_candidate, τ, ε, &config, &μ_radon) + //let n = μ_candidate.dist_matching(μ_base); + //reg.find_tolerance_violation_slack(τv, τ, ε, false, config, n).is_none() + } }) } } diff -r 1c74bb0439a8 -r 7b5404283df0 src/prox_penalty/wave.rs --- a/src/prox_penalty/wave.rs Mon Aug 03 19:28:07 2026 -0500 +++ b/src/prox_penalty/wave.rs Tue Aug 04 09:15:00 2026 -0500 @@ -206,9 +206,14 @@ return μ.merge_spikes_fitness(config.merging, f, |&v| v).1; } } - μ.merge_spikes(config.merging, |μ_candidate| { - let mut d = &*τv + self.preapply(μ_candidate.sub_matching(μ_base)); - reg.verify_merge_candidate(&mut d, μ_candidate, τ, ε, config) + μ.merge_spikes(config.merging, |μ_candidate, is_scaling| { + if is_scaling { + // Scaling heuristic is pointless without fitness-based merging + false + } else { + let mut d = &*τv + self.preapply(μ_candidate.sub_matching(μ_base)); + reg.verify_merge_candidate(&mut d, μ_candidate, τ, ε, config) + } }) } }