Skip to content

Commit

Permalink
Fix LTO issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zzawadz committed Apr 25, 2023
1 parent e194b6b commit 68d25b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: FSelectorRcpp
Type: Package
Title: 'Rcpp' Implementation of 'FSelector' Entropy-Based Feature Selection Algorithms with a Sparse Matrix Support
Version: 0.3.10
Version: 0.3.11
Authors@R: c(
person("Zygmunt", "Zawadzki", role = c("aut", "cre"), email = "[email protected]"),
person("Marcin", "Kosinski", role = c("aut"), email = "[email protected]"),
Expand Down
12 changes: 7 additions & 5 deletions R/information_gain.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ information_gain <- function(formula, data, x, y,
}

if (!missing(formula) && !missing(data)) {
return(.information_gain(formula, data, type, equal, nbins,
threads, discIntegers = discIntegers))
return(.information_gain(formula, data, type = type,
equal = equal, nbins = nbins, threads = threads,
discIntegers = discIntegers))
}
}

Expand Down Expand Up @@ -132,8 +133,8 @@ information_gain <- function(formula, data, x, y,
.information_gain <- function(x, y,
type = c("infogain", "gainratio", "symuncert"),
equal = FALSE,
nbins = 5,
discIntegers = TRUE,
nbins = 5,
threads = 1) {
UseMethod(".information_gain", x)
}
Expand All @@ -145,6 +146,7 @@ information_gain <- function(formula, data, x, y,
"symuncert"),
equal = FALSE,
discIntegers = TRUE,
nbins = 5,
threads = 1) {
stop("Unsupported data type.")
}
Expand Down Expand Up @@ -202,8 +204,8 @@ information_gain <- function(formula, data, x, y,
"gainratio",
"symuncert"),
equal = FALSE,
nbins = 5,
discIntegers = TRUE,
nbins = 5,
threads = 1) {
if (!is.data.frame(y)) {
stop("y must be a data.frame!")
Expand Down Expand Up @@ -231,8 +233,8 @@ information_gain <- function(formula, data, x, y,
"gainratio",
"symuncert"),
equal = FALSE,
nbins = 5,
discIntegers = TRUE,
nbins = 5,
threads = 1) {
type <- match.arg(type)

Expand Down
6 changes: 3 additions & 3 deletions man/dot-information_gain.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extern SEXP _FSelectorRcpp_fs_table_numeric2d(SEXP, SEXP);
extern SEXP _FSelectorRcpp_fs_table1d(SEXP);
extern SEXP _FSelectorRcpp_information_gain_cpp(SEXP, SEXP, SEXP, SEXP);
extern SEXP _FSelectorRcpp_sparse_information_gain_cpp(SEXP, SEXP, SEXP);
extern void run_testthat_tests(void);
extern SEXP run_testthat_tests(SEXP use_xml_sxp);

static const R_CallMethodDef CallEntries[] = {
{"_FSelectorRcpp_cutOff_k", (DL_FUNC) &_FSelectorRcpp_cutOff_k, 3},
Expand Down

0 comments on commit 68d25b1

Please sign in to comment.