aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-03-10 14:16:54 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2016-03-10 14:16:54 -0300
commit6e45e96296c4f0b4a2a4ea701bb6bc69342e316d (patch)
treeb3e6f564c25466fd1f80aa844258119f31201331
parentba00bfa92a4e92b6be102c15230d12ca0f5411ac (diff)
main(): shuffle() values were being ignored, now fixed.
-rw-r--r--main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index e778dca..0208db4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -38,8 +38,7 @@ arma::uvec extractCPs(const arma::mat &X)
int numCPs = (int) (3 * sqrt(X.n_rows));
arma::uvec indices(X.n_rows);
std::iota(indices.begin(), indices.end(), 0);
- arma::shuffle(indices);
-
+ indices = arma::shuffle(indices);
return indices.subvec(0, numCPs-1);
}