Skip to content

Commit f7e0b0c

Browse files
committed
export surd utility
1 parent ec3688a commit f7e0b0c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

R/RcppExports.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ RcppDiscSURD <- function(mat, max_order = 3L, threads = 1L, base = 2.0, normaliz
6969
.Call(`_infoxtr_RcppDiscSURD`, mat, max_order, threads, base, normalize)
7070
}
7171

72-
RcppContSURD <- function(mat, max_order = 3L, k, alg, threads = 1L, base = 2.0, normalize = TRUE) {
72+
RcppContSURD <- function(mat, max_order = 3L, k = 3L, alg = 0L, threads = 1L, base = 2.0, normalize = TRUE) {
7373
.Call(`_infoxtr_RcppContSURD`, mat, max_order, k, alg, threads, base, normalize)
7474
}
7575

src/InfotheoExps.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,13 @@ Rcpp::List RcppContSURD(SEXP mat,
607607
static_cast<size_t>(std::abs(threads)),
608608
base, normalize);
609609

610-
const size_t k = res.size();
610+
const size_t n_vals = res.size();
611611

612-
Rcpp::NumericVector values(k);
613-
Rcpp::CharacterVector types(k);
614-
Rcpp::CharacterVector names(k);
612+
Rcpp::NumericVector values(n_vals);
613+
Rcpp::CharacterVector types(n_vals);
614+
Rcpp::CharacterVector names(n_vals);
615615

616-
for (size_t i = 0; i < k; ++i)
616+
for (size_t i = 0; i < n_vals; ++i)
617617
{
618618
values[i] = res.values[i];
619619

0 commit comments

Comments
 (0)