Open bangerth opened 2 years ago
-max() might be zero probability, but it's still better than -infinity(). Accept samples if that happens. See
-max()
-infinity()
const bool trial_sample_has_zero_probability = ((trial_log_likelihood == -std::numeric_limits<double>::max()) || (trial_log_likelihood == -std::numeric_limits<double>::infinity())); const bool current_sample_has_zero_probability = ((current_log_likelihood == -std::numeric_limits<double>::max()) || (current_log_likelihood == -std::numeric_limits<double>::infinity())); bool repeated_sample; if (!(trial_sample_has_zero_probability && !current_sample_has_zero_probability)
@dklong-csu -- FYI
Also correspondingly update the documentation. This has to happen in all of the sampling algorithms we have.
-max()
might be zero probability, but it's still better than-infinity()
. Accept samples if that happens. See@dklong-csu -- FYI