Skip to content

Commit

Permalink
Merge pull request #58 from lkreft/master
Browse files Browse the repository at this point in the history
Fix operator
  • Loading branch information
Jakob Bossek committed Nov 24, 2015
2 parents 5572aa2 + 6143171 commit ee23a85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dtlz.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// [[Rcpp::depends(RcppArmadillo)]]
# include <RcppArmadillo.h>

using namespace Rcpp;
Expand Down Expand Up @@ -168,7 +167,7 @@ SEXP dtlz_7(arma::vec x, int M) {

arma::vec fi = f.subvec(0, M - 2);

double h = M - sum(fi * (1 + arma::sin(3 * M_PI * fi)) / (1 + g));
double h = M - sum(fi % (1 + arma::sin(3 * M_PI * fi)) / (1 + g));
f(M-1) = (1 + g) * h;

return NumericVector(f.begin(), f.end());
Expand Down

0 comments on commit ee23a85

Please sign in to comment.