src/prox_penalty/radon_squared.rs

changeset 87
7b5404283df0
parent 75
677a5fd1b014
equal deleted inserted replaced
86:1c74bb0439a8 87:7b5404283df0
98 if config.fitness_merging { 98 if config.fitness_merging {
99 if let Some(f) = fitness { 99 if let Some(f) = fitness {
100 return μ.merge_spikes_fitness(config.merging, f, |&v| v).1; 100 return μ.merge_spikes_fitness(config.merging, f, |&v| v).1;
101 } 101 }
102 } 102 }
103 μ.merge_spikes(config.merging, |μ_candidate| { 103 μ.merge_spikes(config.merging, |μ_candidate, is_scaling| {
104 // Important: μ_candidate's new points are afterwards, 104 if is_scaling {
105 // and do not conflict with μ_base. 105 // Scaling heuristic is pointless without fitness-based merging
106 // TODO: could simplify to requiring μ_base instead of μ_radon. 106 false
107 // but may complicate with sliding base's exgtra points that need to be 107 } else {
108 // after μ_candidate's extra points. 108 // Important: μ_candidate's new points are afterwards,
109 // TODO: doesn't seem to work, maybe need to merge μ_base as well? 109 // and do not conflict with μ_base.
110 // Although that doesn't seem to make sense. 110 // TODO: could simplify to requiring μ_base instead of μ_radon.
111 let μ_radon = μ_candidate.sub_matching(μ_base); 111 // but may complicate with sliding base's exgtra points that need to be
112 reg.verify_merge_candidate_radonsq(τv, μ_candidate, τ, ε, &config, &μ_radon) 112 // after μ_candidate's extra points.
113 //let n = μ_candidate.dist_matching(μ_base); 113 // TODO: doesn't seem to work, maybe need to merge μ_base as well?
114 //reg.find_tolerance_violation_slack(τv, τ, ε, false, config, n).is_none() 114 // Although that doesn't seem to make sense.
115 let μ_radon = μ_candidate.sub_matching(μ_base);
116 reg.verify_merge_candidate_radonsq(τv, μ_candidate, τ, ε, &config, &μ_radon)
117 //let n = μ_candidate.dist_matching(μ_base);
118 //reg.find_tolerance_violation_slack(τv, τ, ε, false, config, n).is_none()
119 }
115 }) 120 })
116 } 121 }
117 } 122 }
118 123
119 #[replace_float_literals(F::cast_from(literal))] 124 #[replace_float_literals(F::cast_from(literal))]

mercurial