Skip to content

Commit

Permalink
Always reset
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Oct 18, 2024
1 parent 07346be commit cccf9b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/poped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ Rcpp::NumericVector popedMultipleEndpointParam(Rcpp::NumericVector p,
Rcpp::IntegerVector modelSwitch,
int maxMT,
bool optTime=true) {
if (optTime && globalTimeIndexer.isInitialized()) {
globalTimeIndexer.reset();
}
globalTimeIndexer.initialize(modelSwitch, times, optTime);
Rcpp::NumericVector ret(p.size()-1+maxMT);
std::fill(ret.begin(), ret.end(), globalTimeIndexer.getMaxTime());
Expand Down

0 comments on commit cccf9b1

Please sign in to comment.