ex-3: revert testing change left by someone
This commit is contained in:
parent
f2679b8204
commit
a82bbfaec0
@ -85,16 +85,12 @@ int main(int argc, char **argv) {
|
|||||||
fputs("# event sampling\n\n", stderr);
|
fputs("# event sampling\n\n", stderr);
|
||||||
fprintf(stderr, "generating %ld events...", opts.num_events);
|
fprintf(stderr, "generating %ld events...", opts.num_events);
|
||||||
struct event *e;
|
struct event *e;
|
||||||
// for (size_t i = 0; i < s.size; i++){
|
|
||||||
// e = &s.events[i];
|
|
||||||
// do {
|
|
||||||
// e->th = acos(1 - 2*gsl_rng_uniform(r));
|
|
||||||
// e->ph = 2 * M_PI * gsl_rng_uniform(r);
|
|
||||||
// } while(0.2 * gsl_rng_uniform(r) > distr(def_par, e));
|
|
||||||
for (size_t i = 0; i < s.size; i++){
|
for (size_t i = 0; i < s.size; i++){
|
||||||
e = &s.events[i];
|
e = &s.events[i];
|
||||||
|
do {
|
||||||
e->th = acos(1 - 2*gsl_rng_uniform(r));
|
e->th = acos(1 - 2*gsl_rng_uniform(r));
|
||||||
e->ph = 2 * M_PI * gsl_rng_uniform(r);
|
e->ph = 2 * M_PI * gsl_rng_uniform(r);
|
||||||
|
} while(0.2 * gsl_rng_uniform(r) > distr(def_par, e));
|
||||||
|
|
||||||
// update the histogram
|
// update the histogram
|
||||||
gsl_histogram2d_increment(hist, e->th, e->ph);
|
gsl_histogram2d_increment(hist, e->th, e->ph);
|
||||||
|
Loading…
Reference in New Issue
Block a user