- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/LinearAlgebra/RealSpaceMatrix.cpp
r66fd49 ra5028f 28 28 #include "LinearAlgebra/Vector.hpp" 29 29 #include "LinearAlgebra/VectorContent.hpp" 30 #include "RandomNumbers/RandomNumberGeneratorFactory.hpp" 31 #include "RandomNumbers/RandomNumberGenerator.hpp" 30 32 31 33 #include <gsl/gsl_blas.h> … … 125 127 { 126 128 double phi[NDIM]; 129 RandomNumberGenerator &random = RandomNumberGeneratorFactory::getInstance().makeRandomNumberGenerator(); 130 const double rng_min = random.min(); 131 const double rng_max = random.max(); 132 127 133 128 134 for (int i=0;i<NDIM;i++) { 129 phi[i] = rand()/(RAND_MAX/(2.*M_PI)); 135 phi[i] = (random()/(rng_max-rng_min))*(2.*M_PI); 136 std::cout << "Random angle is " << phi[i] << std::endl; 130 137 } 131 138
Note:
See TracChangeset
for help on using the changeset viewer.