From 50bfa13163a2ddd8793dc020c0fbb04b219224cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:46:14 +0000 Subject: [PATCH 1/2] Initial plan From 81b2df85610b6f7639d98503cf416eb0367e9553 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:57:26 +0000 Subject: [PATCH 2/2] Replace deprecated arma::is_finite with std::isfinite Co-authored-by: gvegayon <893619+gvegayon@users.noreply.github.com> --- src/infection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/infection.cpp b/src/infection.cpp index 545b67d..255665a 100644 --- a/src/infection.cpp +++ b/src/infection.cpp @@ -1,5 +1,6 @@ // [[Rcpp::depends(RcppArmadillo)]] #include +#include using namespace Rcpp; // [[Rcpp::export]] @@ -55,7 +56,7 @@ NumericVector infection_cpp( Rcpp::checkUserInterrupt(); // If NA (aka nan in Armadillo), then NA. - if (!arma::is_finite(times(i))) { + if (!std::isfinite(times(i))) { infect.at(i) = NA_REAL; continue; } @@ -159,7 +160,7 @@ NumericVector susceptibility_cpp( Rcpp::checkUserInterrupt(); // If NA (aka nan in Armadillo), then NA. - if (!arma::is_finite(times(i))) { + if (!std::isfinite(times(i))) { suscep.at(i) = NA_REAL; continue; }