summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKiwamu Ishikura <ishikura.kiwamu@gmail.com>2014-12-29 12:00:03 +0900
committerKiwamu Ishikura <ishikura.kiwamu@gmail.com>2014-12-29 12:00:03 +0900
commitcc7d4003ae9ccd7f8729de58f9fbfad481f94c60 (patch)
tree6af449c11afa2bfb70dc146dc952f48d4a088854 /packages
parentd2ebf68716ad50afc58d008f562d4f960bb8f126 (diff)
add random
to add srandom to set seed
Diffstat (limited to 'packages')
-rw-r--r--packages/base/src/C/vector-aux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/base/src/C/vector-aux.c b/packages/base/src/C/vector-aux.c
index 51bff73..d01e788 100644
--- a/packages/base/src/C/vector-aux.c
+++ b/packages/base/src/C/vector-aux.c
@@ -730,8 +730,10 @@ double gaussrand(int *phase, double *pV1, double *pV2, double *pS)
730int random_vector(unsigned int seed, int code, DVEC(r)) { 730int random_vector(unsigned int seed, int code, DVEC(r)) {
731 int phase = 0; 731 int phase = 0;
732 double V1,V2,S; 732 double V1,V2,S;
733
734 int k; 733 int k;
734
735 srandom(seed);
736
735 switch (code) { 737 switch (code) {
736 case 0: { // uniform 738 case 0: { // uniform
737 for (k=0; k<rn; k++) { 739 for (k=0; k<rn; k++) {