diff options
author | pants <jaron@kent-dobias.com> | 2016-09-08 12:28:07 -0400 |
---|---|---|
committer | pants <jaron@kent-dobias.com> | 2016-09-08 12:28:07 -0400 |
commit | 0b6e6a4337e8e9b6728f3604bb61a59365be3446 (patch) | |
tree | 389798c8a4638506a236a276e6847d65648f6640 /src/randfuncs.c | |
parent | cf272339a3b72cf192ba986d37e50de16a4cbe49 (diff) | |
download | fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.tar.gz fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.tar.bz2 fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.zip |
src/bound_set.c
Diffstat (limited to 'src/randfuncs.c')
-rw-r--r-- | src/randfuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/randfuncs.c b/src/randfuncs.c index 830e078..137c7ff 100644 --- a/src/randfuncs.c +++ b/src/randfuncs.c @@ -57,10 +57,10 @@ double *genfunc_hyperuniform(unsigned int L, bound_t boundary, gsl_rng *r, unsig ds[2] = pow(x-lattice[2*j] - 1,2)+pow(y-lattice[2*j+1],2); ds[3] = pow(x-lattice[2*j],2)+pow(y-lattice[2*j+1] + 1,2); ds[4] = pow(x-lattice[2*j],2)+pow(y-lattice[2*j+1] - 1,2); - unsigned int min_pos = 0; double min_val = 100; + double min_val = 100; for (unsigned int k = 0; k < 5; k++) { if (min_val > ds[k]) { - min_pos = k; min_val = ds[k]; + min_val = ds[k]; } } if (1-gsl_sf_exp(-M_PI * rho * min_val) < gsl_ran_flat(r, 0, 1)) { |