mercredi 17 août 2016

Armadillo generates the same random numbers

I generate a matrix with randoms using Armadillo package (v.7.300.1) under cygwin64 (or minGW):

#include<armadillo>

int main(){
  arma::mat(3,3, arma::fill::randu).print();
  return 0;
}

The program (after re-build or re-run) always generates:

0.6900  0.5548  0.2074    
0.5054  0.3784  0.6263    
0.5915  0.2577  0.3401

Why is it always the same? What's wrong?




Aucun commentaire:

Enregistrer un commentaire