Skip to content

Commit

Permalink
Fixed convergence check for equal likelihood values
Browse files Browse the repository at this point in the history
  • Loading branch information
hjbreg committed Jan 1, 2020
1 parent 6ae8854 commit c59c615
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snpsamplinge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ SNPSamplingE::compute_likelihood(bool first, bool validation)
bool stop = false;
int why = -1;
if (_iter > 2000) {
if (a > _prev_h &&
if (a >= _prev_h &&
_prev_h != 0 && fabs((a - _prev_h) / _prev_h) < _env.stop_threshold) {
stop = true;
why = 0;
Expand Down

0 comments on commit c59c615

Please sign in to comment.