Skip to content

Commit

Permalink
update to remove use of deprecated std:: function
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhuling committed Jun 2, 2020
1 parent b215dc6 commit 8fef0ab
Show file tree
Hide file tree
Showing 15 changed files with 145 additions and 48 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports:
LinkingTo: Rcpp,
RcppEigen,
RcppNumerical
RoxygenNote: 6.1.0
RoxygenNote: 7.1.0
Suggests:
knitr,
rmarkdown
Expand Down
19 changes: 15 additions & 4 deletions man/cv.vennLasso.Rd

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

10 changes: 8 additions & 2 deletions man/estimate.hier.sparsity.param.Rd

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

11 changes: 8 additions & 3 deletions man/genHierSparseBeta.Rd

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

22 changes: 17 additions & 5 deletions man/genHierSparseData.Rd

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

38 changes: 29 additions & 9 deletions man/oglasso.Rd

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

11 changes: 8 additions & 3 deletions man/plot.Rd

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

11 changes: 8 additions & 3 deletions man/plotVenn.Rd

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

13 changes: 10 additions & 3 deletions man/predict.Rd

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

3 changes: 1 addition & 2 deletions man/predict.cv.vennLasso.Rd

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

38 changes: 29 additions & 9 deletions man/vennLasso.Rd

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

12 changes: 8 additions & 4 deletions src/DataStd.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ class DataStd
scaleX[i] = std::sqrt(ss - s * s / n) * n_invsqrt;
standardize_vec_avx<double>(begin, n, meanX[i], 1.0 / scaleX[i]);
#else
double *begin = &X(0, i);
double *end = begin + n;
// double *begin = &X(0, i);
// double *end = begin + n;
// meanX[i] = X.col(i).mean();
// std::transform(begin, end, begin, std::bind2nd(std::minus<double>(), meanX[i]));
// scaleX[i] = X.col(i).norm() * n_invsqrt;
// std::transform(begin, end, begin, std::bind2nd(std::multiplies<double>(), 1.0 / scaleX[i]));
meanX[i] = X.col(i).mean();
std::transform(begin, end, begin, std::bind2nd(std::minus<double>(), meanX[i]));
X.col(i).array() -= meanX[i];
scaleX[i] = X.col(i).norm() * n_invsqrt;
std::transform(begin, end, begin, std::bind2nd(std::multiplies<double>(), 1.0 / scaleX[i]));
X.col(i).array() /= scaleX[i];
#endif
}
break;
Expand Down
1 change: 1 addition & 0 deletions src/FADMMBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <RcppEigen.h>
#include "Linalg/BlasWrapper.h"

// [[Rcpp::plugins(cpp17)]]

// General problem setting
// minimize f(x) + g(z)
Expand Down
1 change: 1 addition & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ PKG_CXXFLAGS = -DNDEBUG
##PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

CXX_STD = CXX17
1 change: 1 addition & 0 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

PKG_CPPFLAGS = -I. -DNDEBUG

CXX_STD = CXX17

0 comments on commit 8fef0ab

Please sign in to comment.