Skip to content

Commit

Permalink
Different fix that doesn't change random numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Apr 7, 2024
1 parent d08eee8 commit e7698f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rxode2_df.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ extern "C" SEXP rxode2_df(int doDose0, int doTBS) {
if (updateErr){
for (j=0; j < errNcol; j++){
// The error pointer is updated if needed
par_ptr[svar[j]] = errs[errNrow*j+min2(kk, errNrow-1)];
par_ptr[svar[j]] = errs[errNrow*j+kk];
}
if ((doDose && evid!= 9) || (evid0 == 0 && isObs(evid)) || (evid0 == 1 && evid==0)){
// Only increment if this is an observation or of this a
// simulation that requests dosing information too.
kk++;
kk=min2(kk+1, errNrow-1);
}
}
if (nlhs){
Expand Down

0 comments on commit e7698f0

Please sign in to comment.