Skip to content

Commit bdefbe5

Browse files
committed
RcppArmadillo 15 compatibility.
1 parent 678b4fb commit bdefbe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/KalmanFiltering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Rcpp::List SKF(arma::mat X, arma::mat A, arma::mat C, arma::mat Q,
8686
// Compute likelihood. Skip this part if S is not positive definite.
8787
if(retLL) {
8888
detS = det(S);
89-
if(detS > 0) loglik += log(detS) - conv_to<double>::from(et.t() * S * et) - dn;
89+
if(detS > 0) loglik += log(detS) - as_scalar(et.t() * S * et) - dn;
9090
}
9191

9292
} else { // If all missing: just prediction.
@@ -259,7 +259,7 @@ Rcpp::List SKFS(arma::mat X, arma::mat A, arma::mat C, arma::mat Q,
259259
// Compute likelihood. Skip this part if S is not positive definite.
260260
if(retLL) {
261261
detS = det(S);
262-
if(detS > 0) loglik += log(detS) - conv_to<double>::from(et.t() * S * et) - dn; // Standard Kalman Filter Likelihood
262+
if(detS > 0) loglik += log(detS) - as_scalar(et.t() * S * et) - dn; // Standard Kalman Filter Likelihood
263263
}
264264

265265
} else { // If all missing: just prediction.

0 commit comments

Comments
 (0)