Don't blow up when asked to sample from an empty range of values.
parent
266258b79c
commit
cff9918811
|
@ -89,7 +89,9 @@ static bool cdf_sample_var(pip_cset *set, pip_var *var, pip_sampler_state *state
|
|||
return false;
|
||||
}
|
||||
|
||||
//elog(NOTICE, "Solving CDF with bounds: %lf, %lf", (double)bounds[0], (double)bounds[1]);
|
||||
elog(NOTICE, "Solving CDF with bounds: %lf, %lf", (double)bounds[0], (double)bounds[1]);
|
||||
|
||||
if(bounds[0] >= bounds[1]) return false;
|
||||
|
||||
for(; state->curr_sample < state->samples->sample_cnt; state->curr_sample++){
|
||||
do {
|
||||
|
|
Loading…
Reference in New Issue