1 /*
2 file automatically generated by make_test_files.pl
3 Tue Apr 19 14:01:03 2011
4 */
5
6 /*****************************************************************************
7 * *
8 * UNU.RAN -- Universal Non-Uniform Random number generator *
9 * *
10 *****************************************************************************/
11
12 /**
13 ** Tests for VNROU
14 **/
15
16 /*---------------------------------------------------------------------------*/
17 #include "testunuran.h"
18
19 #ifdef UNUR_URNG_DEFAULT_RNGSTREAM
20 #include <RngStream.h>
21 #endif
22 /*---------------------------------------------------------------------------*/
23
24 /*---------------------------------------------------------------------------*/
25 /* global variables */
26
27 static FILE *TESTLOG; /* test log file */
28 static FILE *UNURANLOG; /* unuran log file */
29
30 static int test_ok = TRUE; /* all tests ok (boolean) */
31 static int fullcheck = FALSE; /* whether all checks are performed */
32
33 static TIMER watch; /* stop watch */
34
35 /*---------------------------------------------------------------------------*/
36
37 void run_verify_generator( FILE *LOG, int line, UNUR_PAR *par );
38
39
40
41 /*---------------------------------------------------------------------------*/
42
43 void test_new (void);
44 void test_set (void);
45 void test_get (void);
46 void test_chg (void);
47 void test_init (void);
48 void test_reinit (void);
49 void test_sample (void);
50 void test_validate (void);
51 void test_special(void);
52
53 /*---------------------------------------------------------------------------*/
54
55
56
57 /* prototypes */
58
59 int unur_vnrou_set_pedantic( UNUR_PAR *par, int pedantic );
60
61 #define COMPARE_SAMPLE_SIZE (10000)
62 #define VIOLATE_SAMPLE_SIZE (20)
63
64 /* Chi-square goodness-of-fit tests sometimes fail once due to numerical */
65 /* errors. So we accept more such failure than for other methods. */
66 #define CHI2_FAILURES_TOLERATED (5)
67
68 /* we need marginal distributions for the chi2 tests */
69 #define unur_distr_multicauchy unur_distr_multicauchy_w_marginals
70 #define unur_distr_multinormal unur_distr_multinormal_w_marginals
71 #define unur_distr_multistudent unur_distr_multistudent_w_marginals
72
73
74
75
76 /*---------------------------------------------------------------------------*/
77
78 #ifndef CHI2_FAILURES_TOLERATED
79 # define CHI2_FAILURES_TOLERATED DEFAULT_CHI2_FAILURES_TOLERATED
80 #endif
81
82 /*---------------------------------------------------------------------------*/
83 /* [verbatim] */
84
85
86
87 /* dummy function */
unur_vnrou_set_pedantic(UNUR_PAR * par ATTRIBUTE__UNUSED,int pedantic ATTRIBUTE__UNUSED)88 int unur_vnrou_set_pedantic( UNUR_PAR *par ATTRIBUTE__UNUSED, int pedantic ATTRIBUTE__UNUSED)
89 { return 1; }
90
91 /*---------------------------------------------------------------------------*/
92 /* [new] */
93
test_new(void)94 void test_new (void)
95 {
96 int n_tests_failed; /* number of failed tests */
97
98 /* start test */
99 printf("[new "); fflush(stdout);
100 fprintf(TESTLOG,"\n[new]\n");
101
102 /* reset counter */
103 n_tests_failed = 0;
104
105 /* set stop watch */
106 stopwatch_lap(&watch);
107
108 { /* invalid NULL ptr */
109 UNUR_DISTR *distr = NULL;
110 distr = NULL;
111
112
113 unur_reset_errno();
114 n_tests_failed += (check_expected_NULL(TESTLOG,37,(unur_vnrou_new( distr )))==UNUR_SUCCESS)?0:1;
115 n_tests_failed += (check_errorcode(TESTLOG,37,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
116 unur_distr_free(distr);
117 }
118
119 { /* invalid distribution type */
120 UNUR_DISTR *distr = NULL;
121 distr = unur_distr_discr_new();
122
123
124 unur_reset_errno();
125 n_tests_failed += (check_expected_NULL(TESTLOG,44,(unur_vnrou_new( distr )))==UNUR_SUCCESS)?0:1;
126 n_tests_failed += (check_errorcode(TESTLOG,44,UNUR_ERR_DISTR_INVALID)==UNUR_SUCCESS)?0:1;
127 unur_distr_free(distr);
128 }
129
130
131 /* timing */
132 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
133
134 /* test finished */
135 test_ok &= (n_tests_failed) ? 0 : 1;
136 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
137
138 } /* end of test_new() */
139
140 /*---------------------------------------------------------------------------*/
141 /* [set] */
142
test_set(void)143 void test_set (void)
144 {
145 int n_tests_failed; /* number of failed tests */
146
147 /* start test */
148 printf("[set "); fflush(stdout);
149 fprintf(TESTLOG,"\n[set]\n");
150
151 /* reset counter */
152 n_tests_failed = 0;
153
154 /* set stop watch */
155 stopwatch_lap(&watch);
156
157 { /* invalid NULL ptr */
158 UNUR_PAR *par = NULL;
159 par = NULL;
160
161
162 unur_reset_errno();
163 n_tests_failed += (check_expected_setfailed(TESTLOG,55,(unur_vnrou_set_u( par, NULL, NULL )))==UNUR_SUCCESS)?0:1;
164 n_tests_failed += (check_errorcode(TESTLOG,55,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
165
166 unur_reset_errno();
167 n_tests_failed += (check_expected_setfailed(TESTLOG,58,(unur_vnrou_set_v( par, 1. )))==UNUR_SUCCESS)?0:1;
168 n_tests_failed += (check_errorcode(TESTLOG,58,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
169
170 unur_reset_errno();
171 n_tests_failed += (check_expected_setfailed(TESTLOG,61,(unur_vnrou_set_r( par, 1. )))==UNUR_SUCCESS)?0:1;
172 n_tests_failed += (check_errorcode(TESTLOG,61,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
173
174 unur_reset_errno();
175 n_tests_failed += (check_expected_setfailed(TESTLOG,64,(unur_vnrou_set_verify( par, 1)))==UNUR_SUCCESS)?0:1;
176 n_tests_failed += (check_errorcode(TESTLOG,64,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
177 }
178
179 { /* invalid parameter object */
180 UNUR_DISTR *distr = NULL;
181 UNUR_PAR *par = NULL;
182 double fpar[2] = {0.,1.};
183 distr = unur_distr_normal(fpar,2);
184 par = unur_arou_new(distr);
185
186
187 unur_reset_errno();
188 n_tests_failed += (check_expected_setfailed(TESTLOG,73,(unur_vnrou_set_u( par, NULL, NULL )))==UNUR_SUCCESS)?0:1;
189 n_tests_failed += (check_errorcode(TESTLOG,73,UNUR_ERR_PAR_INVALID)==UNUR_SUCCESS)?0:1;
190
191 unur_reset_errno();
192 n_tests_failed += (check_expected_setfailed(TESTLOG,76,(unur_vnrou_set_v( par, 1. )))==UNUR_SUCCESS)?0:1;
193 n_tests_failed += (check_errorcode(TESTLOG,76,UNUR_ERR_PAR_INVALID)==UNUR_SUCCESS)?0:1;
194
195 unur_reset_errno();
196 n_tests_failed += (check_expected_setfailed(TESTLOG,79,(unur_vnrou_set_r( par, 1. )))==UNUR_SUCCESS)?0:1;
197 n_tests_failed += (check_errorcode(TESTLOG,79,UNUR_ERR_PAR_INVALID)==UNUR_SUCCESS)?0:1;
198
199 unur_reset_errno();
200 n_tests_failed += (check_expected_setfailed(TESTLOG,82,(unur_vnrou_set_verify( par, 1)))==UNUR_SUCCESS)?0:1;
201 n_tests_failed += (check_errorcode(TESTLOG,82,UNUR_ERR_PAR_INVALID)==UNUR_SUCCESS)?0:1;
202 unur_par_free(par);
203 unur_distr_free(distr);
204 }
205
206 { /* invalid parameters */
207 UNUR_DISTR *distr = NULL;
208 UNUR_PAR *par = NULL;
209 const int dim = 3;
210 double mean[] = {1.,2.,3.};
211 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
212 double umin[] = {1.,1.,1.};
213 double umax[] = {2.,1.,2.};
214 distr = unur_distr_multinormal( dim, mean, covar );
215 par = unur_vnrou_new(distr);
216
217
218 unur_reset_errno();
219 n_tests_failed += (check_expected_setfailed(TESTLOG,96,(unur_vnrou_set_u( par, NULL, NULL )))==UNUR_SUCCESS)?0:1;
220 n_tests_failed += (check_errorcode(TESTLOG,96,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
221
222 unur_reset_errno();
223 n_tests_failed += (check_expected_setfailed(TESTLOG,99,(unur_vnrou_set_u( par, umin, umax )))==UNUR_SUCCESS)?0:1;
224 n_tests_failed += (check_errorcode(TESTLOG,99,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
225
226 unur_reset_errno();
227 n_tests_failed += (check_expected_setfailed(TESTLOG,102,(unur_vnrou_set_v( par, -1. )))==UNUR_SUCCESS)?0:1;
228 n_tests_failed += (check_errorcode(TESTLOG,102,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
229
230 unur_reset_errno();
231 n_tests_failed += (check_expected_setfailed(TESTLOG,105,(unur_vnrou_set_v( par, 0. )))==UNUR_SUCCESS)?0:1;
232 n_tests_failed += (check_errorcode(TESTLOG,105,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
233
234 unur_reset_errno();
235 unur_vnrou_set_r( par, 0. );
236 n_tests_failed += (check_errorcode(TESTLOG,108,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
237 unur_par_free(par);
238 unur_distr_free(distr);
239 }
240
241
242 /* timing */
243 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
244
245 /* test finished */
246 test_ok &= (n_tests_failed) ? 0 : 1;
247 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
248
249 } /* end of test_set() */
250
251 /*---------------------------------------------------------------------------*/
252 /* [get] */
253
test_get(void)254 void test_get (void)
255 {
256 int n_tests_failed; /* number of failed tests */
257
258 /* start test */
259 printf("[get "); fflush(stdout);
260 fprintf(TESTLOG,"\n[get]\n");
261
262 /* reset counter */
263 n_tests_failed = 0;
264
265 /* set stop watch */
266 stopwatch_lap(&watch);
267
268 { /* invalid NULL ptr */
269 UNUR_GEN *gen = NULL;
270 gen = NULL;
271
272
273 unur_reset_errno();
274 n_tests_failed += (check_expected_INFINITY(TESTLOG,121,(unur_vnrou_get_volumehat( gen )))==UNUR_SUCCESS)?0:1;
275 n_tests_failed += (check_errorcode(TESTLOG,121,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
276 unur_free(gen);
277 }
278
279 { /* invalid generator object */
280 UNUR_DISTR *distr = NULL;
281 UNUR_PAR *par = NULL;
282 UNUR_GEN *gen = NULL;
283 distr = unur_distr_normal(NULL,0);
284 par = unur_arou_new(distr);
285 gen = unur_init(par);
286 abort_if_NULL(TESTLOG, 125, gen );
287
288
289 unur_reset_errno();
290 n_tests_failed += (check_expected_INFINITY(TESTLOG,129,(unur_vnrou_get_volumehat( gen )))==UNUR_SUCCESS)?0:1;
291 n_tests_failed += (check_errorcode(TESTLOG,129,UNUR_ERR_GEN_INVALID)==UNUR_SUCCESS)?0:1;
292 unur_distr_free(distr);
293 unur_free(gen);
294 }
295
296
297 /* timing */
298 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
299
300 /* test finished */
301 test_ok &= (n_tests_failed) ? 0 : 1;
302 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
303
304 } /* end of test_get() */
305
306 /*---------------------------------------------------------------------------*/
307 /* [chg] */
308
test_chg(void)309 void test_chg (void)
310 {
311 int n_tests_failed; /* number of failed tests */
312
313 /* start test */
314 printf("[chg "); fflush(stdout);
315 fprintf(TESTLOG,"\n[chg]\n");
316
317 /* reset counter */
318 n_tests_failed = 0;
319
320 /* set stop watch */
321 stopwatch_lap(&watch);
322
323 { /* invalid generator object */
324 UNUR_DISTR *distr = NULL;
325 UNUR_PAR *par = NULL;
326 UNUR_GEN *gen = NULL;
327 double umin[] = {1.,1.,1.};
328 double umax[] = {2.,2.,2.};
329 distr = unur_distr_normal(NULL,0);
330 par = unur_arou_new(distr);
331 unur_set_debug(par,0);
332 gen = unur_init( par );
333 abort_if_NULL(TESTLOG, 140, gen );
334
335
336 unur_reset_errno();
337 n_tests_failed += (check_expected_setfailed(TESTLOG,144,(unur_vnrou_chg_u( gen, umin, umax )))==UNUR_SUCCESS)?0:1;
338 n_tests_failed += (check_errorcode(TESTLOG,144,UNUR_ERR_GEN_INVALID)==UNUR_SUCCESS)?0:1;
339
340 unur_reset_errno();
341 n_tests_failed += (check_expected_setfailed(TESTLOG,147,(unur_vnrou_chg_v( gen, 1. )))==UNUR_SUCCESS)?0:1;
342 n_tests_failed += (check_errorcode(TESTLOG,147,UNUR_ERR_GEN_INVALID)==UNUR_SUCCESS)?0:1;
343
344 unur_reset_errno();
345 n_tests_failed += (check_expected_setfailed(TESTLOG,150,(unur_vnrou_chg_verify(gen,1)))==UNUR_SUCCESS)?0:1;
346 n_tests_failed += (check_errorcode(TESTLOG,150,UNUR_ERR_GEN_INVALID)==UNUR_SUCCESS)?0:1;
347 unur_distr_free(distr);
348 unur_free(gen);
349 }
350
351 { /* invalid parameters */
352 UNUR_DISTR *distr = NULL;
353 UNUR_PAR *par = NULL;
354 UNUR_GEN *gen = NULL;
355 const int dim = 3;
356 double mean[] = {1.,2.,3.};
357 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
358 double umin[] = {1.,1.,1.};
359 double umax[] = {2.,1.,2.};
360 distr = unur_distr_multinormal( dim, mean, covar );
361 par = unur_vnrou_new(distr);
362 gen = unur_init(par);
363 abort_if_NULL(TESTLOG, 159, gen );
364
365
366 unur_reset_errno();
367 n_tests_failed += (check_expected_setfailed(TESTLOG,163,(unur_vnrou_chg_u( gen, umin, umax )))==UNUR_SUCCESS)?0:1;
368 n_tests_failed += (check_errorcode(TESTLOG,163,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
369
370 unur_reset_errno();
371 n_tests_failed += (check_expected_setfailed(TESTLOG,166,(unur_vnrou_chg_v( gen, -1. )))==UNUR_SUCCESS)?0:1;
372 n_tests_failed += (check_errorcode(TESTLOG,166,UNUR_ERR_PAR_SET)==UNUR_SUCCESS)?0:1;
373 unur_distr_free(distr);
374 unur_free(gen);
375 }
376
377
378 /* timing */
379 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
380
381 /* test finished */
382 test_ok &= (n_tests_failed) ? 0 : 1;
383 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
384
385 } /* end of test_chg() */
386
387 /*---------------------------------------------------------------------------*/
388 /* [reinit] */
389
test_reinit(void)390 void test_reinit (void)
391 {
392 int n_tests_failed; /* number of failed tests */
393
394 /* start test */
395 printf("[reinit "); fflush(stdout);
396 fprintf(TESTLOG,"\n[reinit]\n");
397
398 /* reset counter */
399 n_tests_failed = 0;
400
401 /* set stop watch */
402 stopwatch_lap(&watch);
403
404 { /* does not exist */
405 UNUR_DISTR *distr = NULL;
406 UNUR_PAR *par = NULL;
407 UNUR_GEN *gen = NULL;
408 distr = unur_distr_multinormal(3,NULL,NULL);
409 par = unur_vnrou_new(distr);
410 gen = unur_init( par );
411 abort_if_NULL(TESTLOG, 179, gen );
412
413
414 unur_reset_errno();
415 n_tests_failed += (check_expected_reinit(TESTLOG,183,(unur_reinit( gen )))==UNUR_SUCCESS)?0:1;
416 unur_distr_free(distr);
417 unur_free(gen);
418 }
419
420
421 /* timing */
422 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
423
424 /* test finished */
425 test_ok &= (n_tests_failed) ? 0 : 1;
426 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
427
428 } /* end of test_reinit() */
429
430 /*---------------------------------------------------------------------------*/
431 /* [sample] */
432
test_sample(void)433 void test_sample (void)
434 {
435 int n_tests_failed; /* number of failed tests */
436
437 /* start test */
438 printf("[sample "); fflush(stdout);
439 fprintf(TESTLOG,"\n[sample]\n");
440
441 /* reset counter */
442 n_tests_failed = 0;
443
444 /* set stop watch */
445 stopwatch_lap(&watch);
446
447 { /* compare */
448 UNUR_DISTR *distr = NULL;
449 UNUR_PAR *par = NULL;
450 UNUR_GEN *gen = NULL;
451 const int dim = 3;
452 double mean[] = {1.,2.,3.};
453 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
454 distr = unur_distr_multinormal( dim, mean, covar );
455 par = unur_vnrou_new(distr);
456 gen = unur_init( par );
457 abort_if_NULL(TESTLOG, 194, gen );
458
459
460 unur_reset_errno();
461 ;
462 n_tests_failed += (compare_sequence_gen_start(TESTLOG,198,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
463
464 unur_reset_errno();
465 unur_free(gen);
466 par = unur_vnrou_new(distr);
467 unur_vnrou_set_verify(par,1);
468 gen = unur_init( par );
469 n_tests_failed += (compare_sequence_gen(TESTLOG,205,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
470
471 unur_reset_errno();
472 unur_free(gen);
473 par = unur_vnrou_new(distr);
474 unur_vnrou_set_r(par,0.5);
475 gen = unur_init( par );
476 n_tests_failed += (compare_sequence_gen_start(TESTLOG,213,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
477
478 unur_reset_errno();
479 unur_free(gen);
480 par = unur_vnrou_new(distr);
481 unur_vnrou_set_r(par,0.5);
482 unur_vnrou_set_verify(par,1);
483 gen = unur_init( par );
484 n_tests_failed += (compare_sequence_gen(TESTLOG,221,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
485 unur_distr_free(distr);
486 unur_free(gen);
487 }
488
489 { /* compare 1dim */
490 UNUR_DISTR *distr = NULL;
491 UNUR_PAR *par = NULL;
492 UNUR_GEN *gen = NULL;
493 const int dim = 1;
494 double mean[] = {1.};
495 double covar[] = {2.};
496 distr = unur_distr_multinormal( dim, mean, covar );
497 par = unur_vnrou_new(distr);
498 gen = unur_init( par );
499 abort_if_NULL(TESTLOG, 229, gen );
500
501
502 unur_reset_errno();
503 ;
504 n_tests_failed += (compare_sequence_gen_start(TESTLOG,233,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
505
506 unur_reset_errno();
507 unur_free(gen);
508 par = unur_vnrou_new(distr);
509 unur_vnrou_set_verify(par,1);
510 gen = unur_init( par );
511 n_tests_failed += (compare_sequence_gen(TESTLOG,240,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
512 unur_distr_free(distr);
513 unur_free(gen);
514 }
515
516 { /* compare clone */
517 UNUR_DISTR *distr = NULL;
518 UNUR_PAR *par = NULL;
519 UNUR_GEN *gen = NULL;
520 const int dim = 3;
521 double mean[] = {1.,2.,3.};
522 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
523 UNUR_GEN *clone;
524 distr = unur_distr_multinormal( dim, mean, covar );
525 par = unur_vnrou_new(distr);
526 gen = unur_init( par );
527 abort_if_NULL(TESTLOG, 249, gen );
528
529
530 unur_reset_errno();
531 /* normal distribution */;
532 n_tests_failed += (compare_sequence_gen_start(TESTLOG,253,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
533
534 unur_reset_errno();
535 /* clone */
536 clone = unur_gen_clone(gen);
537 unur_free(gen);
538 gen = clone;
539 n_tests_failed += (compare_sequence_gen(TESTLOG,259,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
540 unur_distr_free(distr);
541 unur_free(gen);
542 }
543
544 { /* compare clone 1dim */
545 UNUR_DISTR *distr = NULL;
546 UNUR_PAR *par = NULL;
547 UNUR_GEN *gen = NULL;
548 const int dim = 1;
549 double mean[] = {1.};
550 double covar[] = {2.};
551 UNUR_GEN *clone;
552 distr = unur_distr_multinormal( dim, mean, covar );
553 par = unur_vnrou_new(distr);
554 gen = unur_init( par );
555 abort_if_NULL(TESTLOG, 269, gen );
556
557
558 unur_reset_errno();
559 /* normal distribution */;
560 n_tests_failed += (compare_sequence_gen_start(TESTLOG,273,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
561
562 unur_reset_errno();
563 /* clone */
564 clone = unur_gen_clone(gen);
565 unur_free(gen);
566 gen = clone;
567 n_tests_failed += (compare_sequence_gen(TESTLOG,279,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
568 unur_distr_free(distr);
569 unur_free(gen);
570 }
571
572 { /* compare reinit */
573 UNUR_DISTR *distr = NULL;
574 UNUR_PAR *par = NULL;
575 UNUR_GEN *gen = NULL;
576 distr = unur_distr_multinormal(3,NULL,NULL);
577 par = NULL;
578 gen = NULL;
579
580
581 unur_reset_errno();
582 /* original generator object */
583 par = unur_vnrou_new(distr);
584 gen = unur_init(par);
585 n_tests_failed += (compare_sequence_gen_start(TESTLOG,291,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
586
587 unur_reset_errno();
588 /* reinit */
589 unur_reinit(gen);
590 n_tests_failed += (compare_sequence_gen(TESTLOG,295,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
591 unur_distr_free(distr);
592 unur_free(gen);
593 }
594
595
596 /* timing */
597 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
598
599 /* test finished */
600 test_ok &= (n_tests_failed) ? 0 : 1;
601 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
602
603 } /* end of test_sample() */
604
605 /*---------------------------------------------------------------------------*/
606 /* [validate] */
607
608 /*---------------------------------------------------------------------------*/
609
610 /* [validate] */
611
test_validate(void)612 void test_validate (void)
613 {
614 UNUR_DISTR *distr[35];
615 UNUR_PAR *par;
616 UNUR_GEN *gen;
617 int n_tests_failed;
618 int rcode;
619 double *darray;
620 double fpm[10];
621
622 rcode = 0;
623
624 /* start test */
625 printf("[validate "); fflush(stdout);
626 fprintf(TESTLOG,"\n[validate]\n");
627
628 /* reset counter */
629 n_tests_failed = 0;
630
631 /* set stop watch */
632 stopwatch_lap(&watch);
633
634
635 /* distributions: 35 */
636 {
637 distr[0] = unur_distr_multinormal(3,NULL,NULL);
638 }
639
640 {
641 double mean[] = { 1., 2., 3. };
642 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
643 distr[1] = unur_distr_multinormal(3,mean,covar);
644 }
645
646 {
647 #define dim (2)
648 int i;
649 double mean[dim], covar[dim*dim];
650 UNUR_DISTR *covar_distr;
651 UNUR_GEN *covar_gen;
652 UNUR_GEN *mean_gen;
653 covar_distr = unur_distr_correlation(dim);
654 covar_gen = unur_init(unur_mcorr_new(covar_distr));
655 mean_gen = unur_str2gen("normal(5,1)");
656 for (i=0; i<dim; i++)
657 mean[i] = unur_sample_cont(mean_gen);
658 do {
659 unur_sample_matr(covar_gen,covar);
660 distr[2] = unur_distr_multinormal(dim,mean,covar);
661 } while (distr[2]==NULL);
662 unur_distr_free(covar_distr);
663 unur_free(covar_gen);
664 unur_free(mean_gen);
665 #undef dim
666 }
667
668 {
669 #define dim (3)
670 int i;
671 double mean[dim], covar[dim*dim];
672 UNUR_DISTR *covar_distr;
673 UNUR_GEN *covar_gen;
674 UNUR_GEN *mean_gen;
675 covar_distr = unur_distr_correlation(dim);
676 covar_gen = unur_init(unur_mcorr_new(covar_distr));
677 mean_gen = unur_str2gen("normal(5,1)");
678 for (i=0; i<dim; i++)
679 mean[i] = unur_sample_cont(mean_gen);
680 do {
681 unur_sample_matr(covar_gen,covar);
682 distr[3] = unur_distr_multinormal(dim,mean,covar);
683 } while (distr[3]==NULL);
684 unur_distr_free(covar_distr);
685 unur_free(covar_gen);
686 unur_free(mean_gen);
687 #undef dim
688 }
689
690 {
691 double mean[] = { -1., -2., -3. };
692 double covar[] = { 2., 2., 1., 2., 4., 3., 1., 3., 3. };
693 distr[4] = unur_distr_multinormal(3,mean,covar);
694 unur_distr_cvec_set_center(distr[4],NULL);
695 }
696
697 {
698 distr[5] = unur_distr_multinormal(1,NULL,NULL);
699 }
700
701 {
702 double mean[] = { -1. };
703 double covar[] = { 2. };
704 distr[6] = unur_distr_multinormal(1,mean,covar);
705 unur_distr_cvec_set_center(distr[6],NULL);
706 }
707
708 {
709 distr[7] = unur_distr_multinormal_ar1(2,NULL,0.5);
710 }
711
712 {
713 distr[8] = unur_distr_multinormal_ar1(3,NULL,0.5);
714 }
715
716 {
717 distr[9] = unur_distr_multinormal_ar1(4,NULL,0.5);
718 }
719
720 {
721 distr[10] = unur_distr_multinormal_ar1(5,NULL,0.5);
722 }
723
724 {
725 distr[11] = unur_distr_multicauchy_ar1(2,NULL,0.2);
726 }
727
728 {
729 distr[12] = unur_distr_multicauchy_ar1(3,NULL,0.2);
730 }
731
732 {
733 distr[13] = unur_distr_multicauchy_ar1(4,NULL,0.2);
734 }
735
736 {
737 distr[14] = unur_distr_multicauchy_ar1(5,NULL,0.2);
738 }
739
740 {
741 distr[15] = unur_distr_multistudent_ar1(3,4.,NULL,0.4);
742 }
743
744 {
745 distr[16] = unur_distr_multistudent_ar1(3,5.,NULL,0.4);
746 }
747
748 {
749 distr[17] = unur_distr_multistudent_ar1(3,6.,NULL,0.4);
750 }
751
752 {
753 distr[18] = unur_distr_multistudent_ar1(3,7.,NULL,0.4);
754 }
755
756 {
757 distr[19] = unur_distr_multinormal_constantrho(2,NULL,0.5);
758 }
759
760 {
761 distr[20] = unur_distr_multinormal_constantrho(3,NULL,0.5);
762 }
763
764 {
765 distr[21] = unur_distr_multinormal_constantrho(4,NULL,0.5);
766 }
767
768 {
769 distr[22] = unur_distr_multinormal_constantrho(5,NULL,0.5);
770 }
771
772 {
773 distr[23] = unur_distr_multicauchy_constantrho(2,NULL,0.2);
774 }
775
776 {
777 distr[24] = unur_distr_multicauchy_constantrho(3,NULL,0.2);
778 }
779
780 {
781 distr[25] = unur_distr_multicauchy_constantrho(4,NULL,0.2);
782 }
783
784 {
785 distr[26] = unur_distr_multicauchy_constantrho(5,NULL,0.2);
786 }
787
788 {
789 distr[27] = unur_distr_multistudent_constantrho(3,4.,NULL,0.4);
790 }
791
792 {
793 distr[28] = unur_distr_multistudent_constantrho(3,5.,NULL,0.4);
794 }
795
796 {
797 distr[29] = unur_distr_multistudent_constantrho(3,6.,NULL,0.4);
798 }
799
800 {
801 distr[30] = unur_distr_multistudent_constantrho(3,7.,NULL,0.4);
802 }
803
804 {
805 double ll[3] = {0.,0.,0.};
806 double ru[3] = {UNUR_INFINITY,UNUR_INFINITY,UNUR_INFINITY};
807 distr[31] = unur_distr_multinormal(3,NULL,NULL);
808 unur_distr_cvec_set_domain_rect(distr[31],ll,ru);
809 }
810
811 {
812 double ll[3] = {0.,0.,0.};
813 double ru[3] = {1.,UNUR_INFINITY,UNUR_INFINITY};
814 distr[32] = unur_distr_multinormal(3,NULL,NULL);
815 unur_distr_cvec_set_domain_rect(distr[32],ll,ru);
816 }
817
818 {
819 double ll[3] = {-1.,-1.,1.};
820 double ru[3] = {1.,0.,2.};
821 double center[3] = {0.,0.,1.};
822 distr[33] = unur_distr_multinormal(3,NULL,NULL);
823 unur_distr_cvec_set_domain_rect(distr[33],ll,ru);
824 unur_distr_cvec_set_center(distr[33],center);
825 unur_distr_cvec_set_mode(distr[33],center);
826 }
827
828 {
829 double ll[3] = {-1.,-1.,1.};
830 double ru[3] = {1.,0.,2.};
831 distr[34] = unur_distr_multinormal(3,NULL,NULL);
832 unur_distr_cvec_set_domain_rect(distr[34],ll,ru);
833 }
834
835 /* timing */
836 stopwatch_print(TESTLOG,"\n<*>setup time = %.3f ms\n", stopwatch_lap(&watch));
837
838 printf("\n(chi^2) "); fflush(stdout);
839
840 /* chi^2 tests: 210 */
841
842 unur_set_default_debug(~UNUR_DEBUG_SAMPLE);
843 fprintf( TESTLOG,"\nChi^2 Test:\n");
844
845 /* distribution [0] */
846
847 if(TRUE) {
848 unur_reset_errno();
849 do {
850 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
851 par = unur_vnrou_new(distr_localcopy);
852 gen = unur_init(par);
853 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
854 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
855 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
856 unur_free(gen);
857 unur_distr_free(distr_localcopy);
858 } while (0);
859 }
860
861 if(TRUE) {
862 unur_reset_errno();
863 do {
864 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
865 par = unur_vnrou_new(distr_localcopy);
866 unur_vnrou_set_r(par,0.5);
867 gen = unur_init(par);
868 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
869 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
870 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
871 unur_free(gen);
872 unur_distr_free(distr_localcopy);
873 } while (0);
874 }
875
876 if(TRUE) {
877 unur_reset_errno();
878 do {
879 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
880 par = unur_vnrou_new(distr_localcopy);
881 unur_vnrou_set_r(par,2.);
882 gen = unur_init(par);
883 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
884 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
885 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
886 unur_free(gen);
887 unur_distr_free(distr_localcopy);
888 } while (0);
889 }
890
891 if(TRUE) {
892 unur_reset_errno();
893 do {
894 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
895 { double umin[] = {-0.608928,-0.608928,-0.608928};
896 double umax[] = { 0.608928, 0.608928, 0.608928};
897 double vmax = 0.51;
898 par = unur_vnrou_new(distr_localcopy);
899 unur_vnrou_set_u(par,umin,umax);
900 unur_vnrou_set_v(par,vmax); }
901 gen = unur_init(par);
902 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
903 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
904 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
905 unur_free(gen);
906 unur_distr_free(distr_localcopy);
907 } while (0);
908 }
909
910 if(TRUE) {
911 printf("."); fflush(stdout);
912 }
913
914 if(TRUE) {
915 unur_reset_errno();
916 do {
917 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
918 { UNUR_DISTR *dg =NULL;
919 double mean[] = { -1., 2., -3. };
920 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
921 par = unur_vnrou_new(distr_localcopy);
922 gen = unur_init(par);
923 if (gen) {
924 dg = unur_get_distr(gen);
925 unur_distr_cvec_set_mean(dg,mean);
926 unur_distr_cvec_set_covar(dg,covar);
927 unur_distr_cvec_upd_mode(dg);
928 unur_distr_cvec_upd_pdfvol(dg);
929 unur_reinit(gen); }
930 }
931 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
932 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
933 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
934 unur_free(gen);
935 unur_distr_free(distr_localcopy);
936 } while (0);
937 }
938
939 /* distribution [1] */
940
941 if(TRUE) {
942 unur_reset_errno();
943 do {
944 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
945 par = unur_vnrou_new(distr_localcopy);
946 gen = unur_init(par);
947 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'+');
948 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
949 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
950 unur_free(gen);
951 unur_distr_free(distr_localcopy);
952 } while (0);
953 }
954
955 if(TRUE) {
956 unur_reset_errno();
957 do {
958 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
959 par = unur_vnrou_new(distr_localcopy);
960 unur_vnrou_set_r(par,0.5);
961 gen = unur_init(par);
962 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'+');
963 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
964 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
965 unur_free(gen);
966 unur_distr_free(distr_localcopy);
967 } while (0);
968 }
969
970 if(TRUE) {
971 unur_reset_errno();
972 do {
973 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
974 par = unur_vnrou_new(distr_localcopy);
975 unur_vnrou_set_r(par,2.);
976 gen = unur_init(par);
977 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'+');
978 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
979 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
980 unur_free(gen);
981 unur_distr_free(distr_localcopy);
982 } while (0);
983 }
984
985 if(TRUE) {
986 unur_reset_errno();
987 do {
988 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
989 { double umin[] = {-0.608928,-0.608928,-0.608928};
990 double umax[] = { 0.608928, 0.608928, 0.608928};
991 double vmax = 0.51;
992 par = unur_vnrou_new(distr_localcopy);
993 unur_vnrou_set_u(par,umin,umax);
994 unur_vnrou_set_v(par,vmax); }
995 gen = unur_init(par);
996 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'-');
997 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
998 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
999 unur_free(gen);
1000 unur_distr_free(distr_localcopy);
1001 } while (0);
1002 }
1003
1004 if(TRUE) {
1005 printf("."); fflush(stdout);
1006 }
1007
1008 if(TRUE) {
1009 unur_reset_errno();
1010 do {
1011 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
1012 { UNUR_DISTR *dg =NULL;
1013 double mean[] = { -1., 2., -3. };
1014 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1015 par = unur_vnrou_new(distr_localcopy);
1016 gen = unur_init(par);
1017 if (gen) {
1018 dg = unur_get_distr(gen);
1019 unur_distr_cvec_set_mean(dg,mean);
1020 unur_distr_cvec_set_covar(dg,covar);
1021 unur_distr_cvec_upd_mode(dg);
1022 unur_distr_cvec_upd_pdfvol(dg);
1023 unur_reinit(gen); }
1024 }
1025 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'+');
1026 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1027 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1028 unur_free(gen);
1029 unur_distr_free(distr_localcopy);
1030 } while (0);
1031 }
1032
1033 /* distribution [2] */
1034
1035 if(fullcheck) {
1036 unur_reset_errno();
1037 do {
1038 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
1039 par = unur_vnrou_new(distr_localcopy);
1040 gen = unur_init(par);
1041 rcode = run_validate_chi2(TESTLOG,0,gen,distr[2],'+');
1042 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1043 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1044 unur_free(gen);
1045 unur_distr_free(distr_localcopy);
1046 } while (0);
1047 }
1048
1049 if(fullcheck) {
1050 unur_reset_errno();
1051 do {
1052 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
1053 par = unur_vnrou_new(distr_localcopy);
1054 unur_vnrou_set_r(par,0.5);
1055 gen = unur_init(par);
1056 rcode = run_validate_chi2(TESTLOG,0,gen,distr[2],'+');
1057 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1058 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1059 unur_free(gen);
1060 unur_distr_free(distr_localcopy);
1061 } while (0);
1062 }
1063
1064 if(fullcheck) {
1065 unur_reset_errno();
1066 do {
1067 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
1068 par = unur_vnrou_new(distr_localcopy);
1069 unur_vnrou_set_r(par,2.);
1070 gen = unur_init(par);
1071 rcode = run_validate_chi2(TESTLOG,0,gen,distr[2],'+');
1072 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1073 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1074 unur_free(gen);
1075 unur_distr_free(distr_localcopy);
1076 } while (0);
1077 }
1078
1079 if(fullcheck) {
1080 printf("."); fflush(stdout);
1081 }
1082
1083 if(fullcheck) {
1084 printf("."); fflush(stdout);
1085 }
1086
1087 if(fullcheck) {
1088 printf("."); fflush(stdout);
1089 }
1090
1091 /* distribution [3] */
1092
1093 if(fullcheck) {
1094 unur_reset_errno();
1095 do {
1096 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
1097 par = unur_vnrou_new(distr_localcopy);
1098 gen = unur_init(par);
1099 rcode = run_validate_chi2(TESTLOG,0,gen,distr[3],'+');
1100 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1101 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1102 unur_free(gen);
1103 unur_distr_free(distr_localcopy);
1104 } while (0);
1105 }
1106
1107 if(fullcheck) {
1108 unur_reset_errno();
1109 do {
1110 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
1111 par = unur_vnrou_new(distr_localcopy);
1112 unur_vnrou_set_r(par,0.5);
1113 gen = unur_init(par);
1114 rcode = run_validate_chi2(TESTLOG,0,gen,distr[3],'+');
1115 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1116 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1117 unur_free(gen);
1118 unur_distr_free(distr_localcopy);
1119 } while (0);
1120 }
1121
1122 if(fullcheck) {
1123 unur_reset_errno();
1124 do {
1125 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
1126 par = unur_vnrou_new(distr_localcopy);
1127 unur_vnrou_set_r(par,2.);
1128 gen = unur_init(par);
1129 rcode = run_validate_chi2(TESTLOG,0,gen,distr[3],'+');
1130 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1131 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1132 unur_free(gen);
1133 unur_distr_free(distr_localcopy);
1134 } while (0);
1135 }
1136
1137 if(fullcheck) {
1138 printf("."); fflush(stdout);
1139 }
1140
1141 if(fullcheck) {
1142 printf("."); fflush(stdout);
1143 }
1144
1145 if(fullcheck) {
1146 unur_reset_errno();
1147 do {
1148 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
1149 { UNUR_DISTR *dg =NULL;
1150 double mean[] = { -1., 2., -3. };
1151 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1152 par = unur_vnrou_new(distr_localcopy);
1153 gen = unur_init(par);
1154 if (gen) {
1155 dg = unur_get_distr(gen);
1156 unur_distr_cvec_set_mean(dg,mean);
1157 unur_distr_cvec_set_covar(dg,covar);
1158 unur_distr_cvec_upd_mode(dg);
1159 unur_distr_cvec_upd_pdfvol(dg);
1160 unur_reinit(gen); }
1161 }
1162 rcode = run_validate_chi2(TESTLOG,0,gen,distr[3],'+');
1163 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1164 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1165 unur_free(gen);
1166 unur_distr_free(distr_localcopy);
1167 } while (0);
1168 }
1169
1170 /* distribution [4] */
1171
1172 if(TRUE) {
1173 unur_reset_errno();
1174 do {
1175 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
1176 par = unur_vnrou_new(distr_localcopy);
1177 gen = unur_init(par);
1178 rcode = run_validate_chi2(TESTLOG,0,gen,distr[4],'+');
1179 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1180 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1181 unur_free(gen);
1182 unur_distr_free(distr_localcopy);
1183 } while (0);
1184 }
1185
1186 if(TRUE) {
1187 unur_reset_errno();
1188 do {
1189 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
1190 par = unur_vnrou_new(distr_localcopy);
1191 unur_vnrou_set_r(par,0.5);
1192 gen = unur_init(par);
1193 rcode = run_validate_chi2(TESTLOG,0,gen,distr[4],'+');
1194 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1195 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1196 unur_free(gen);
1197 unur_distr_free(distr_localcopy);
1198 } while (0);
1199 }
1200
1201 if(TRUE) {
1202 unur_reset_errno();
1203 do {
1204 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
1205 par = unur_vnrou_new(distr_localcopy);
1206 unur_vnrou_set_r(par,2.);
1207 gen = unur_init(par);
1208 rcode = run_validate_chi2(TESTLOG,0,gen,distr[4],'+');
1209 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1210 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1211 unur_free(gen);
1212 unur_distr_free(distr_localcopy);
1213 } while (0);
1214 }
1215
1216 if(TRUE) {
1217 printf("."); fflush(stdout);
1218 }
1219
1220 if(TRUE) {
1221 printf("."); fflush(stdout);
1222 }
1223
1224 if(TRUE) {
1225 unur_reset_errno();
1226 do {
1227 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
1228 { UNUR_DISTR *dg =NULL;
1229 double mean[] = { -1., 2., -3. };
1230 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1231 par = unur_vnrou_new(distr_localcopy);
1232 gen = unur_init(par);
1233 if (gen) {
1234 dg = unur_get_distr(gen);
1235 unur_distr_cvec_set_mean(dg,mean);
1236 unur_distr_cvec_set_covar(dg,covar);
1237 unur_distr_cvec_upd_mode(dg);
1238 unur_distr_cvec_upd_pdfvol(dg);
1239 unur_reinit(gen); }
1240 }
1241 rcode = run_validate_chi2(TESTLOG,0,gen,distr[4],'+');
1242 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1243 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1244 unur_free(gen);
1245 unur_distr_free(distr_localcopy);
1246 } while (0);
1247 }
1248
1249 /* distribution [5] */
1250
1251 if(TRUE) {
1252 unur_reset_errno();
1253 do {
1254 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
1255 par = unur_vnrou_new(distr_localcopy);
1256 gen = unur_init(par);
1257 rcode = run_validate_chi2(TESTLOG,0,gen,distr[5],'+');
1258 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1259 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1260 unur_free(gen);
1261 unur_distr_free(distr_localcopy);
1262 } while (0);
1263 }
1264
1265 if(TRUE) {
1266 unur_reset_errno();
1267 do {
1268 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
1269 par = unur_vnrou_new(distr_localcopy);
1270 unur_vnrou_set_r(par,0.5);
1271 gen = unur_init(par);
1272 rcode = run_validate_chi2(TESTLOG,0,gen,distr[5],'+');
1273 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1274 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1275 unur_free(gen);
1276 unur_distr_free(distr_localcopy);
1277 } while (0);
1278 }
1279
1280 if(TRUE) {
1281 unur_reset_errno();
1282 do {
1283 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
1284 par = unur_vnrou_new(distr_localcopy);
1285 unur_vnrou_set_r(par,2.);
1286 gen = unur_init(par);
1287 rcode = run_validate_chi2(TESTLOG,0,gen,distr[5],'+');
1288 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1289 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1290 unur_free(gen);
1291 unur_distr_free(distr_localcopy);
1292 } while (0);
1293 }
1294
1295 if(TRUE) {
1296 printf("."); fflush(stdout);
1297 }
1298
1299 if(TRUE) {
1300 unur_reset_errno();
1301 do {
1302 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
1303 { double umin[] = {-0.608928,-0.608928,-0.608928};
1304 double umax[] = { 0.608928, 0.608928, 0.608928};
1305 double vmax = 0.70;
1306 par = unur_vnrou_new(distr_localcopy);
1307 unur_vnrou_set_u(par,umin,umax);
1308 unur_vnrou_set_v(par,vmax); }
1309 gen = unur_init(par);
1310 rcode = run_validate_chi2(TESTLOG,0,gen,distr[5],'+');
1311 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1312 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1313 unur_free(gen);
1314 unur_distr_free(distr_localcopy);
1315 } while (0);
1316 }
1317
1318 if(TRUE) {
1319 printf("."); fflush(stdout);
1320 }
1321
1322 /* distribution [6] */
1323
1324 if(TRUE) {
1325 unur_reset_errno();
1326 do {
1327 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
1328 par = unur_vnrou_new(distr_localcopy);
1329 gen = unur_init(par);
1330 rcode = run_validate_chi2(TESTLOG,0,gen,distr[6],'+');
1331 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1332 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1333 unur_free(gen);
1334 unur_distr_free(distr_localcopy);
1335 } while (0);
1336 }
1337
1338 if(TRUE) {
1339 unur_reset_errno();
1340 do {
1341 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
1342 par = unur_vnrou_new(distr_localcopy);
1343 unur_vnrou_set_r(par,0.5);
1344 gen = unur_init(par);
1345 rcode = run_validate_chi2(TESTLOG,0,gen,distr[6],'+');
1346 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1347 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1348 unur_free(gen);
1349 unur_distr_free(distr_localcopy);
1350 } while (0);
1351 }
1352
1353 if(TRUE) {
1354 unur_reset_errno();
1355 do {
1356 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
1357 par = unur_vnrou_new(distr_localcopy);
1358 unur_vnrou_set_r(par,2.);
1359 gen = unur_init(par);
1360 rcode = run_validate_chi2(TESTLOG,0,gen,distr[6],'+');
1361 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1362 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1363 unur_free(gen);
1364 unur_distr_free(distr_localcopy);
1365 } while (0);
1366 }
1367
1368 if(TRUE) {
1369 printf("."); fflush(stdout);
1370 }
1371
1372 if(TRUE) {
1373 printf("."); fflush(stdout);
1374 }
1375
1376 if(TRUE) {
1377 printf("."); fflush(stdout);
1378 }
1379
1380 /* distribution [7] */
1381
1382 if(TRUE) {
1383 unur_reset_errno();
1384 do {
1385 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
1386 par = unur_vnrou_new(distr_localcopy);
1387 gen = unur_init(par);
1388 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
1389 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1390 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1391 unur_free(gen);
1392 unur_distr_free(distr_localcopy);
1393 } while (0);
1394 }
1395
1396 if(TRUE) {
1397 unur_reset_errno();
1398 do {
1399 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
1400 par = unur_vnrou_new(distr_localcopy);
1401 unur_vnrou_set_r(par,0.5);
1402 gen = unur_init(par);
1403 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
1404 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1405 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1406 unur_free(gen);
1407 unur_distr_free(distr_localcopy);
1408 } while (0);
1409 }
1410
1411 if(TRUE) {
1412 unur_reset_errno();
1413 do {
1414 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
1415 par = unur_vnrou_new(distr_localcopy);
1416 unur_vnrou_set_r(par,2.);
1417 gen = unur_init(par);
1418 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
1419 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1420 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1421 unur_free(gen);
1422 unur_distr_free(distr_localcopy);
1423 } while (0);
1424 }
1425
1426 if(TRUE) {
1427 printf("."); fflush(stdout);
1428 }
1429
1430 if(TRUE) {
1431 printf("."); fflush(stdout);
1432 }
1433
1434 if(TRUE) {
1435 printf("."); fflush(stdout);
1436 }
1437
1438 /* distribution [8] */
1439
1440 if(TRUE) {
1441 unur_reset_errno();
1442 do {
1443 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
1444 par = unur_vnrou_new(distr_localcopy);
1445 gen = unur_init(par);
1446 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
1447 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1448 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1449 unur_free(gen);
1450 unur_distr_free(distr_localcopy);
1451 } while (0);
1452 }
1453
1454 if(TRUE) {
1455 unur_reset_errno();
1456 do {
1457 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
1458 par = unur_vnrou_new(distr_localcopy);
1459 unur_vnrou_set_r(par,0.5);
1460 gen = unur_init(par);
1461 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
1462 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1463 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1464 unur_free(gen);
1465 unur_distr_free(distr_localcopy);
1466 } while (0);
1467 }
1468
1469 if(TRUE) {
1470 unur_reset_errno();
1471 do {
1472 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
1473 par = unur_vnrou_new(distr_localcopy);
1474 unur_vnrou_set_r(par,2.);
1475 gen = unur_init(par);
1476 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
1477 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1478 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1479 unur_free(gen);
1480 unur_distr_free(distr_localcopy);
1481 } while (0);
1482 }
1483
1484 if(TRUE) {
1485 printf("."); fflush(stdout);
1486 }
1487
1488 if(TRUE) {
1489 printf("."); fflush(stdout);
1490 }
1491
1492 if(TRUE) {
1493 unur_reset_errno();
1494 do {
1495 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
1496 { UNUR_DISTR *dg =NULL;
1497 double mean[] = { -1., 2., -3. };
1498 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1499 par = unur_vnrou_new(distr_localcopy);
1500 gen = unur_init(par);
1501 if (gen) {
1502 dg = unur_get_distr(gen);
1503 unur_distr_cvec_set_mean(dg,mean);
1504 unur_distr_cvec_set_covar(dg,covar);
1505 unur_distr_cvec_upd_mode(dg);
1506 unur_distr_cvec_upd_pdfvol(dg);
1507 unur_reinit(gen); }
1508 }
1509 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
1510 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1511 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1512 unur_free(gen);
1513 unur_distr_free(distr_localcopy);
1514 } while (0);
1515 }
1516
1517 /* distribution [9] */
1518
1519 if(TRUE) {
1520 unur_reset_errno();
1521 do {
1522 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
1523 par = unur_vnrou_new(distr_localcopy);
1524 gen = unur_init(par);
1525 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
1526 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1527 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1528 unur_free(gen);
1529 unur_distr_free(distr_localcopy);
1530 } while (0);
1531 }
1532
1533 if(TRUE) {
1534 unur_reset_errno();
1535 do {
1536 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
1537 par = unur_vnrou_new(distr_localcopy);
1538 unur_vnrou_set_r(par,0.5);
1539 gen = unur_init(par);
1540 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
1541 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1542 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1543 unur_free(gen);
1544 unur_distr_free(distr_localcopy);
1545 } while (0);
1546 }
1547
1548 if(TRUE) {
1549 unur_reset_errno();
1550 do {
1551 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
1552 par = unur_vnrou_new(distr_localcopy);
1553 unur_vnrou_set_r(par,2.);
1554 gen = unur_init(par);
1555 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
1556 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1557 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1558 unur_free(gen);
1559 unur_distr_free(distr_localcopy);
1560 } while (0);
1561 }
1562
1563 if(TRUE) {
1564 printf("."); fflush(stdout);
1565 }
1566
1567 if(TRUE) {
1568 printf("."); fflush(stdout);
1569 }
1570
1571 if(TRUE) {
1572 printf("."); fflush(stdout);
1573 }
1574
1575 /* distribution [10] */
1576
1577 if(fullcheck) {
1578 unur_reset_errno();
1579 do {
1580 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
1581 par = unur_vnrou_new(distr_localcopy);
1582 gen = unur_init(par);
1583 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
1584 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1585 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1586 unur_free(gen);
1587 unur_distr_free(distr_localcopy);
1588 } while (0);
1589 }
1590
1591 if(fullcheck) {
1592 unur_reset_errno();
1593 do {
1594 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
1595 par = unur_vnrou_new(distr_localcopy);
1596 unur_vnrou_set_r(par,0.5);
1597 gen = unur_init(par);
1598 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
1599 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1600 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1601 unur_free(gen);
1602 unur_distr_free(distr_localcopy);
1603 } while (0);
1604 }
1605
1606 if(fullcheck) {
1607 unur_reset_errno();
1608 do {
1609 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
1610 par = unur_vnrou_new(distr_localcopy);
1611 unur_vnrou_set_r(par,2.);
1612 gen = unur_init(par);
1613 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
1614 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1615 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1616 unur_free(gen);
1617 unur_distr_free(distr_localcopy);
1618 } while (0);
1619 }
1620
1621 if(fullcheck) {
1622 printf("."); fflush(stdout);
1623 }
1624
1625 if(fullcheck) {
1626 printf("."); fflush(stdout);
1627 }
1628
1629 if(fullcheck) {
1630 printf("."); fflush(stdout);
1631 }
1632
1633 /* distribution [11] */
1634
1635 if(TRUE) {
1636 unur_reset_errno();
1637 do {
1638 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
1639 par = unur_vnrou_new(distr_localcopy);
1640 gen = unur_init(par);
1641 rcode = run_validate_chi2(TESTLOG,0,gen,distr[11],'+');
1642 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1643 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1644 unur_free(gen);
1645 unur_distr_free(distr_localcopy);
1646 } while (0);
1647 }
1648
1649 if(TRUE) {
1650 printf("."); fflush(stdout);
1651 }
1652
1653 if(TRUE) {
1654 unur_reset_errno();
1655 do {
1656 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
1657 par = unur_vnrou_new(distr_localcopy);
1658 unur_vnrou_set_r(par,2.);
1659 gen = unur_init(par);
1660 rcode = run_validate_chi2(TESTLOG,0,gen,distr[11],'+');
1661 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1662 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1663 unur_free(gen);
1664 unur_distr_free(distr_localcopy);
1665 } while (0);
1666 }
1667
1668 if(TRUE) {
1669 printf("."); fflush(stdout);
1670 }
1671
1672 if(TRUE) {
1673 printf("."); fflush(stdout);
1674 }
1675
1676 if(TRUE) {
1677 printf("."); fflush(stdout);
1678 }
1679
1680 /* distribution [12] */
1681
1682 if(TRUE) {
1683 unur_reset_errno();
1684 do {
1685 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
1686 par = unur_vnrou_new(distr_localcopy);
1687 gen = unur_init(par);
1688 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
1689 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1690 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1691 unur_free(gen);
1692 unur_distr_free(distr_localcopy);
1693 } while (0);
1694 }
1695
1696 if(TRUE) {
1697 printf("."); fflush(stdout);
1698 }
1699
1700 if(TRUE) {
1701 unur_reset_errno();
1702 do {
1703 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
1704 par = unur_vnrou_new(distr_localcopy);
1705 unur_vnrou_set_r(par,2.);
1706 gen = unur_init(par);
1707 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
1708 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1709 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1710 unur_free(gen);
1711 unur_distr_free(distr_localcopy);
1712 } while (0);
1713 }
1714
1715 if(TRUE) {
1716 printf("."); fflush(stdout);
1717 }
1718
1719 if(TRUE) {
1720 printf("."); fflush(stdout);
1721 }
1722
1723 if(TRUE) {
1724 unur_reset_errno();
1725 do {
1726 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
1727 { UNUR_DISTR *dg =NULL;
1728 double mean[] = { -1., 2., -3. };
1729 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1730 par = unur_vnrou_new(distr_localcopy);
1731 gen = unur_init(par);
1732 if (gen) {
1733 dg = unur_get_distr(gen);
1734 unur_distr_cvec_set_mean(dg,mean);
1735 unur_distr_cvec_set_covar(dg,covar);
1736 unur_distr_cvec_upd_mode(dg);
1737 unur_distr_cvec_upd_pdfvol(dg);
1738 unur_reinit(gen); }
1739 }
1740 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
1741 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1742 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1743 unur_free(gen);
1744 unur_distr_free(distr_localcopy);
1745 } while (0);
1746 }
1747
1748 /* distribution [13] */
1749
1750 if(TRUE) {
1751 unur_reset_errno();
1752 do {
1753 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
1754 par = unur_vnrou_new(distr_localcopy);
1755 gen = unur_init(par);
1756 rcode = run_validate_chi2(TESTLOG,0,gen,distr[13],'+');
1757 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1758 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1759 unur_free(gen);
1760 unur_distr_free(distr_localcopy);
1761 } while (0);
1762 }
1763
1764 if(TRUE) {
1765 printf("."); fflush(stdout);
1766 }
1767
1768 if(TRUE) {
1769 unur_reset_errno();
1770 do {
1771 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
1772 par = unur_vnrou_new(distr_localcopy);
1773 unur_vnrou_set_r(par,2.);
1774 gen = unur_init(par);
1775 rcode = run_validate_chi2(TESTLOG,0,gen,distr[13],'+');
1776 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1777 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1778 unur_free(gen);
1779 unur_distr_free(distr_localcopy);
1780 } while (0);
1781 }
1782
1783 if(TRUE) {
1784 printf("."); fflush(stdout);
1785 }
1786
1787 if(TRUE) {
1788 printf("."); fflush(stdout);
1789 }
1790
1791 if(TRUE) {
1792 printf("."); fflush(stdout);
1793 }
1794
1795 /* distribution [14] */
1796
1797 if(TRUE) {
1798 unur_reset_errno();
1799 do {
1800 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
1801 par = unur_vnrou_new(distr_localcopy);
1802 gen = unur_init(par);
1803 rcode = run_validate_chi2(TESTLOG,0,gen,distr[14],'+');
1804 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1805 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1806 unur_free(gen);
1807 unur_distr_free(distr_localcopy);
1808 } while (0);
1809 }
1810
1811 if(TRUE) {
1812 printf("."); fflush(stdout);
1813 }
1814
1815 if(TRUE) {
1816 unur_reset_errno();
1817 do {
1818 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
1819 par = unur_vnrou_new(distr_localcopy);
1820 unur_vnrou_set_r(par,2.);
1821 gen = unur_init(par);
1822 rcode = run_validate_chi2(TESTLOG,0,gen,distr[14],'+');
1823 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1824 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1825 unur_free(gen);
1826 unur_distr_free(distr_localcopy);
1827 } while (0);
1828 }
1829
1830 if(TRUE) {
1831 printf("."); fflush(stdout);
1832 }
1833
1834 if(TRUE) {
1835 printf("."); fflush(stdout);
1836 }
1837
1838 if(TRUE) {
1839 printf("."); fflush(stdout);
1840 }
1841
1842 /* distribution [15] */
1843
1844 if(TRUE) {
1845 unur_reset_errno();
1846 do {
1847 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
1848 par = unur_vnrou_new(distr_localcopy);
1849 gen = unur_init(par);
1850 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
1851 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1852 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1853 unur_free(gen);
1854 unur_distr_free(distr_localcopy);
1855 } while (0);
1856 }
1857
1858 if(TRUE) {
1859 unur_reset_errno();
1860 do {
1861 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
1862 par = unur_vnrou_new(distr_localcopy);
1863 unur_vnrou_set_r(par,0.5);
1864 gen = unur_init(par);
1865 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
1866 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1867 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1868 unur_free(gen);
1869 unur_distr_free(distr_localcopy);
1870 } while (0);
1871 }
1872
1873 if(TRUE) {
1874 unur_reset_errno();
1875 do {
1876 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
1877 par = unur_vnrou_new(distr_localcopy);
1878 unur_vnrou_set_r(par,2.);
1879 gen = unur_init(par);
1880 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
1881 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1882 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1883 unur_free(gen);
1884 unur_distr_free(distr_localcopy);
1885 } while (0);
1886 }
1887
1888 if(TRUE) {
1889 printf("."); fflush(stdout);
1890 }
1891
1892 if(TRUE) {
1893 printf("."); fflush(stdout);
1894 }
1895
1896 if(TRUE) {
1897 unur_reset_errno();
1898 do {
1899 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
1900 { UNUR_DISTR *dg =NULL;
1901 double mean[] = { -1., 2., -3. };
1902 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1903 par = unur_vnrou_new(distr_localcopy);
1904 gen = unur_init(par);
1905 if (gen) {
1906 dg = unur_get_distr(gen);
1907 unur_distr_cvec_set_mean(dg,mean);
1908 unur_distr_cvec_set_covar(dg,covar);
1909 unur_distr_cvec_upd_mode(dg);
1910 unur_distr_cvec_upd_pdfvol(dg);
1911 unur_reinit(gen); }
1912 }
1913 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
1914 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1915 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1916 unur_free(gen);
1917 unur_distr_free(distr_localcopy);
1918 } while (0);
1919 }
1920
1921 /* distribution [16] */
1922
1923 if(fullcheck) {
1924 unur_reset_errno();
1925 do {
1926 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
1927 par = unur_vnrou_new(distr_localcopy);
1928 gen = unur_init(par);
1929 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
1930 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1931 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1932 unur_free(gen);
1933 unur_distr_free(distr_localcopy);
1934 } while (0);
1935 }
1936
1937 if(fullcheck) {
1938 unur_reset_errno();
1939 do {
1940 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
1941 par = unur_vnrou_new(distr_localcopy);
1942 unur_vnrou_set_r(par,0.5);
1943 gen = unur_init(par);
1944 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
1945 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1946 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1947 unur_free(gen);
1948 unur_distr_free(distr_localcopy);
1949 } while (0);
1950 }
1951
1952 if(fullcheck) {
1953 unur_reset_errno();
1954 do {
1955 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
1956 par = unur_vnrou_new(distr_localcopy);
1957 unur_vnrou_set_r(par,2.);
1958 gen = unur_init(par);
1959 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
1960 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1961 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1962 unur_free(gen);
1963 unur_distr_free(distr_localcopy);
1964 } while (0);
1965 }
1966
1967 if(fullcheck) {
1968 printf("."); fflush(stdout);
1969 }
1970
1971 if(fullcheck) {
1972 printf("."); fflush(stdout);
1973 }
1974
1975 if(fullcheck) {
1976 unur_reset_errno();
1977 do {
1978 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
1979 { UNUR_DISTR *dg =NULL;
1980 double mean[] = { -1., 2., -3. };
1981 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
1982 par = unur_vnrou_new(distr_localcopy);
1983 gen = unur_init(par);
1984 if (gen) {
1985 dg = unur_get_distr(gen);
1986 unur_distr_cvec_set_mean(dg,mean);
1987 unur_distr_cvec_set_covar(dg,covar);
1988 unur_distr_cvec_upd_mode(dg);
1989 unur_distr_cvec_upd_pdfvol(dg);
1990 unur_reinit(gen); }
1991 }
1992 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
1993 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1994 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1995 unur_free(gen);
1996 unur_distr_free(distr_localcopy);
1997 } while (0);
1998 }
1999
2000 /* distribution [17] */
2001
2002 if(TRUE) {
2003 unur_reset_errno();
2004 do {
2005 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
2006 par = unur_vnrou_new(distr_localcopy);
2007 gen = unur_init(par);
2008 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
2009 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2010 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2011 unur_free(gen);
2012 unur_distr_free(distr_localcopy);
2013 } while (0);
2014 }
2015
2016 if(TRUE) {
2017 unur_reset_errno();
2018 do {
2019 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
2020 par = unur_vnrou_new(distr_localcopy);
2021 unur_vnrou_set_r(par,0.5);
2022 gen = unur_init(par);
2023 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
2024 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2025 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2026 unur_free(gen);
2027 unur_distr_free(distr_localcopy);
2028 } while (0);
2029 }
2030
2031 if(TRUE) {
2032 unur_reset_errno();
2033 do {
2034 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
2035 par = unur_vnrou_new(distr_localcopy);
2036 unur_vnrou_set_r(par,2.);
2037 gen = unur_init(par);
2038 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
2039 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2040 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2041 unur_free(gen);
2042 unur_distr_free(distr_localcopy);
2043 } while (0);
2044 }
2045
2046 if(TRUE) {
2047 printf("."); fflush(stdout);
2048 }
2049
2050 if(TRUE) {
2051 printf("."); fflush(stdout);
2052 }
2053
2054 if(TRUE) {
2055 unur_reset_errno();
2056 do {
2057 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
2058 { UNUR_DISTR *dg =NULL;
2059 double mean[] = { -1., 2., -3. };
2060 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2061 par = unur_vnrou_new(distr_localcopy);
2062 gen = unur_init(par);
2063 if (gen) {
2064 dg = unur_get_distr(gen);
2065 unur_distr_cvec_set_mean(dg,mean);
2066 unur_distr_cvec_set_covar(dg,covar);
2067 unur_distr_cvec_upd_mode(dg);
2068 unur_distr_cvec_upd_pdfvol(dg);
2069 unur_reinit(gen); }
2070 }
2071 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
2072 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2073 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2074 unur_free(gen);
2075 unur_distr_free(distr_localcopy);
2076 } while (0);
2077 }
2078
2079 /* distribution [18] */
2080
2081 if(fullcheck) {
2082 unur_reset_errno();
2083 do {
2084 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
2085 par = unur_vnrou_new(distr_localcopy);
2086 gen = unur_init(par);
2087 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
2088 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2089 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2090 unur_free(gen);
2091 unur_distr_free(distr_localcopy);
2092 } while (0);
2093 }
2094
2095 if(fullcheck) {
2096 unur_reset_errno();
2097 do {
2098 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
2099 par = unur_vnrou_new(distr_localcopy);
2100 unur_vnrou_set_r(par,0.5);
2101 gen = unur_init(par);
2102 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
2103 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2104 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2105 unur_free(gen);
2106 unur_distr_free(distr_localcopy);
2107 } while (0);
2108 }
2109
2110 if(fullcheck) {
2111 unur_reset_errno();
2112 do {
2113 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
2114 par = unur_vnrou_new(distr_localcopy);
2115 unur_vnrou_set_r(par,2.);
2116 gen = unur_init(par);
2117 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
2118 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2119 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2120 unur_free(gen);
2121 unur_distr_free(distr_localcopy);
2122 } while (0);
2123 }
2124
2125 if(fullcheck) {
2126 printf("."); fflush(stdout);
2127 }
2128
2129 if(fullcheck) {
2130 printf("."); fflush(stdout);
2131 }
2132
2133 if(fullcheck) {
2134 unur_reset_errno();
2135 do {
2136 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
2137 { UNUR_DISTR *dg =NULL;
2138 double mean[] = { -1., 2., -3. };
2139 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2140 par = unur_vnrou_new(distr_localcopy);
2141 gen = unur_init(par);
2142 if (gen) {
2143 dg = unur_get_distr(gen);
2144 unur_distr_cvec_set_mean(dg,mean);
2145 unur_distr_cvec_set_covar(dg,covar);
2146 unur_distr_cvec_upd_mode(dg);
2147 unur_distr_cvec_upd_pdfvol(dg);
2148 unur_reinit(gen); }
2149 }
2150 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
2151 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2152 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2153 unur_free(gen);
2154 unur_distr_free(distr_localcopy);
2155 } while (0);
2156 }
2157
2158 /* distribution [19] */
2159
2160 if(TRUE) {
2161 unur_reset_errno();
2162 do {
2163 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
2164 par = unur_vnrou_new(distr_localcopy);
2165 gen = unur_init(par);
2166 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
2167 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2168 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2169 unur_free(gen);
2170 unur_distr_free(distr_localcopy);
2171 } while (0);
2172 }
2173
2174 if(TRUE) {
2175 unur_reset_errno();
2176 do {
2177 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
2178 par = unur_vnrou_new(distr_localcopy);
2179 unur_vnrou_set_r(par,0.5);
2180 gen = unur_init(par);
2181 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
2182 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2183 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2184 unur_free(gen);
2185 unur_distr_free(distr_localcopy);
2186 } while (0);
2187 }
2188
2189 if(TRUE) {
2190 unur_reset_errno();
2191 do {
2192 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
2193 par = unur_vnrou_new(distr_localcopy);
2194 unur_vnrou_set_r(par,2.);
2195 gen = unur_init(par);
2196 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
2197 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2198 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2199 unur_free(gen);
2200 unur_distr_free(distr_localcopy);
2201 } while (0);
2202 }
2203
2204 if(TRUE) {
2205 printf("."); fflush(stdout);
2206 }
2207
2208 if(TRUE) {
2209 printf("."); fflush(stdout);
2210 }
2211
2212 if(TRUE) {
2213 printf("."); fflush(stdout);
2214 }
2215
2216 /* distribution [20] */
2217
2218 if(TRUE) {
2219 unur_reset_errno();
2220 do {
2221 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
2222 par = unur_vnrou_new(distr_localcopy);
2223 gen = unur_init(par);
2224 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
2225 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2226 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2227 unur_free(gen);
2228 unur_distr_free(distr_localcopy);
2229 } while (0);
2230 }
2231
2232 if(TRUE) {
2233 unur_reset_errno();
2234 do {
2235 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
2236 par = unur_vnrou_new(distr_localcopy);
2237 unur_vnrou_set_r(par,0.5);
2238 gen = unur_init(par);
2239 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
2240 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2241 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2242 unur_free(gen);
2243 unur_distr_free(distr_localcopy);
2244 } while (0);
2245 }
2246
2247 if(TRUE) {
2248 unur_reset_errno();
2249 do {
2250 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
2251 par = unur_vnrou_new(distr_localcopy);
2252 unur_vnrou_set_r(par,2.);
2253 gen = unur_init(par);
2254 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
2255 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2256 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2257 unur_free(gen);
2258 unur_distr_free(distr_localcopy);
2259 } while (0);
2260 }
2261
2262 if(TRUE) {
2263 printf("."); fflush(stdout);
2264 }
2265
2266 if(TRUE) {
2267 printf("."); fflush(stdout);
2268 }
2269
2270 if(TRUE) {
2271 unur_reset_errno();
2272 do {
2273 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
2274 { UNUR_DISTR *dg =NULL;
2275 double mean[] = { -1., 2., -3. };
2276 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2277 par = unur_vnrou_new(distr_localcopy);
2278 gen = unur_init(par);
2279 if (gen) {
2280 dg = unur_get_distr(gen);
2281 unur_distr_cvec_set_mean(dg,mean);
2282 unur_distr_cvec_set_covar(dg,covar);
2283 unur_distr_cvec_upd_mode(dg);
2284 unur_distr_cvec_upd_pdfvol(dg);
2285 unur_reinit(gen); }
2286 }
2287 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
2288 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2289 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2290 unur_free(gen);
2291 unur_distr_free(distr_localcopy);
2292 } while (0);
2293 }
2294
2295 /* distribution [21] */
2296
2297 if(TRUE) {
2298 unur_reset_errno();
2299 do {
2300 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
2301 par = unur_vnrou_new(distr_localcopy);
2302 gen = unur_init(par);
2303 rcode = run_validate_chi2(TESTLOG,0,gen,distr[21],'+');
2304 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2305 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2306 unur_free(gen);
2307 unur_distr_free(distr_localcopy);
2308 } while (0);
2309 }
2310
2311 if(TRUE) {
2312 unur_reset_errno();
2313 do {
2314 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
2315 par = unur_vnrou_new(distr_localcopy);
2316 unur_vnrou_set_r(par,0.5);
2317 gen = unur_init(par);
2318 rcode = run_validate_chi2(TESTLOG,0,gen,distr[21],'+');
2319 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2320 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2321 unur_free(gen);
2322 unur_distr_free(distr_localcopy);
2323 } while (0);
2324 }
2325
2326 if(TRUE) {
2327 unur_reset_errno();
2328 do {
2329 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
2330 par = unur_vnrou_new(distr_localcopy);
2331 unur_vnrou_set_r(par,2.);
2332 gen = unur_init(par);
2333 rcode = run_validate_chi2(TESTLOG,0,gen,distr[21],'+');
2334 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2335 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2336 unur_free(gen);
2337 unur_distr_free(distr_localcopy);
2338 } while (0);
2339 }
2340
2341 if(TRUE) {
2342 printf("."); fflush(stdout);
2343 }
2344
2345 if(TRUE) {
2346 printf("."); fflush(stdout);
2347 }
2348
2349 if(TRUE) {
2350 printf("."); fflush(stdout);
2351 }
2352
2353 /* distribution [22] */
2354
2355 if(fullcheck) {
2356 unur_reset_errno();
2357 do {
2358 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
2359 par = unur_vnrou_new(distr_localcopy);
2360 gen = unur_init(par);
2361 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
2362 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2363 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2364 unur_free(gen);
2365 unur_distr_free(distr_localcopy);
2366 } while (0);
2367 }
2368
2369 if(fullcheck) {
2370 unur_reset_errno();
2371 do {
2372 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
2373 par = unur_vnrou_new(distr_localcopy);
2374 unur_vnrou_set_r(par,0.5);
2375 gen = unur_init(par);
2376 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
2377 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2378 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2379 unur_free(gen);
2380 unur_distr_free(distr_localcopy);
2381 } while (0);
2382 }
2383
2384 if(fullcheck) {
2385 unur_reset_errno();
2386 do {
2387 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
2388 par = unur_vnrou_new(distr_localcopy);
2389 unur_vnrou_set_r(par,2.);
2390 gen = unur_init(par);
2391 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
2392 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2393 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2394 unur_free(gen);
2395 unur_distr_free(distr_localcopy);
2396 } while (0);
2397 }
2398
2399 if(fullcheck) {
2400 printf("."); fflush(stdout);
2401 }
2402
2403 if(fullcheck) {
2404 printf("."); fflush(stdout);
2405 }
2406
2407 if(fullcheck) {
2408 printf("."); fflush(stdout);
2409 }
2410
2411 /* distribution [23] */
2412
2413 if(TRUE) {
2414 unur_reset_errno();
2415 do {
2416 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[23]);
2417 par = unur_vnrou_new(distr_localcopy);
2418 gen = unur_init(par);
2419 rcode = run_validate_chi2(TESTLOG,0,gen,distr[23],'+');
2420 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2421 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2422 unur_free(gen);
2423 unur_distr_free(distr_localcopy);
2424 } while (0);
2425 }
2426
2427 if(TRUE) {
2428 printf("."); fflush(stdout);
2429 }
2430
2431 if(TRUE) {
2432 unur_reset_errno();
2433 do {
2434 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[23]);
2435 par = unur_vnrou_new(distr_localcopy);
2436 unur_vnrou_set_r(par,2.);
2437 gen = unur_init(par);
2438 rcode = run_validate_chi2(TESTLOG,0,gen,distr[23],'+');
2439 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2440 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2441 unur_free(gen);
2442 unur_distr_free(distr_localcopy);
2443 } while (0);
2444 }
2445
2446 if(TRUE) {
2447 printf("."); fflush(stdout);
2448 }
2449
2450 if(TRUE) {
2451 printf("."); fflush(stdout);
2452 }
2453
2454 if(TRUE) {
2455 printf("."); fflush(stdout);
2456 }
2457
2458 /* distribution [24] */
2459
2460 if(TRUE) {
2461 unur_reset_errno();
2462 do {
2463 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
2464 par = unur_vnrou_new(distr_localcopy);
2465 gen = unur_init(par);
2466 rcode = run_validate_chi2(TESTLOG,0,gen,distr[24],'+');
2467 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2468 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2469 unur_free(gen);
2470 unur_distr_free(distr_localcopy);
2471 } while (0);
2472 }
2473
2474 if(TRUE) {
2475 printf("."); fflush(stdout);
2476 }
2477
2478 if(TRUE) {
2479 unur_reset_errno();
2480 do {
2481 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
2482 par = unur_vnrou_new(distr_localcopy);
2483 unur_vnrou_set_r(par,2.);
2484 gen = unur_init(par);
2485 rcode = run_validate_chi2(TESTLOG,0,gen,distr[24],'+');
2486 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2487 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2488 unur_free(gen);
2489 unur_distr_free(distr_localcopy);
2490 } while (0);
2491 }
2492
2493 if(TRUE) {
2494 printf("."); fflush(stdout);
2495 }
2496
2497 if(TRUE) {
2498 printf("."); fflush(stdout);
2499 }
2500
2501 if(TRUE) {
2502 unur_reset_errno();
2503 do {
2504 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
2505 { UNUR_DISTR *dg =NULL;
2506 double mean[] = { -1., 2., -3. };
2507 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2508 par = unur_vnrou_new(distr_localcopy);
2509 gen = unur_init(par);
2510 if (gen) {
2511 dg = unur_get_distr(gen);
2512 unur_distr_cvec_set_mean(dg,mean);
2513 unur_distr_cvec_set_covar(dg,covar);
2514 unur_distr_cvec_upd_mode(dg);
2515 unur_distr_cvec_upd_pdfvol(dg);
2516 unur_reinit(gen); }
2517 }
2518 rcode = run_validate_chi2(TESTLOG,0,gen,distr[24],'+');
2519 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2520 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2521 unur_free(gen);
2522 unur_distr_free(distr_localcopy);
2523 } while (0);
2524 }
2525
2526 /* distribution [25] */
2527
2528 if(TRUE) {
2529 unur_reset_errno();
2530 do {
2531 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[25]);
2532 par = unur_vnrou_new(distr_localcopy);
2533 gen = unur_init(par);
2534 rcode = run_validate_chi2(TESTLOG,0,gen,distr[25],'+');
2535 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2536 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2537 unur_free(gen);
2538 unur_distr_free(distr_localcopy);
2539 } while (0);
2540 }
2541
2542 if(TRUE) {
2543 printf("."); fflush(stdout);
2544 }
2545
2546 if(TRUE) {
2547 unur_reset_errno();
2548 do {
2549 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[25]);
2550 par = unur_vnrou_new(distr_localcopy);
2551 unur_vnrou_set_r(par,2.);
2552 gen = unur_init(par);
2553 rcode = run_validate_chi2(TESTLOG,0,gen,distr[25],'+');
2554 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2555 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2556 unur_free(gen);
2557 unur_distr_free(distr_localcopy);
2558 } while (0);
2559 }
2560
2561 if(TRUE) {
2562 printf("."); fflush(stdout);
2563 }
2564
2565 if(TRUE) {
2566 printf("."); fflush(stdout);
2567 }
2568
2569 if(TRUE) {
2570 printf("."); fflush(stdout);
2571 }
2572
2573 /* distribution [26] */
2574
2575 if(TRUE) {
2576 unur_reset_errno();
2577 do {
2578 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
2579 par = unur_vnrou_new(distr_localcopy);
2580 gen = unur_init(par);
2581 rcode = run_validate_chi2(TESTLOG,0,gen,distr[26],'+');
2582 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2583 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2584 unur_free(gen);
2585 unur_distr_free(distr_localcopy);
2586 } while (0);
2587 }
2588
2589 if(TRUE) {
2590 printf("."); fflush(stdout);
2591 }
2592
2593 if(TRUE) {
2594 unur_reset_errno();
2595 do {
2596 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
2597 par = unur_vnrou_new(distr_localcopy);
2598 unur_vnrou_set_r(par,2.);
2599 gen = unur_init(par);
2600 rcode = run_validate_chi2(TESTLOG,0,gen,distr[26],'+');
2601 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2602 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2603 unur_free(gen);
2604 unur_distr_free(distr_localcopy);
2605 } while (0);
2606 }
2607
2608 if(TRUE) {
2609 printf("."); fflush(stdout);
2610 }
2611
2612 if(TRUE) {
2613 printf("."); fflush(stdout);
2614 }
2615
2616 if(TRUE) {
2617 printf("."); fflush(stdout);
2618 }
2619
2620 /* distribution [27] */
2621
2622 if(TRUE) {
2623 unur_reset_errno();
2624 do {
2625 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2626 par = unur_vnrou_new(distr_localcopy);
2627 gen = unur_init(par);
2628 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2629 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2630 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2631 unur_free(gen);
2632 unur_distr_free(distr_localcopy);
2633 } while (0);
2634 }
2635
2636 if(TRUE) {
2637 unur_reset_errno();
2638 do {
2639 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2640 par = unur_vnrou_new(distr_localcopy);
2641 unur_vnrou_set_r(par,0.5);
2642 gen = unur_init(par);
2643 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2644 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2645 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2646 unur_free(gen);
2647 unur_distr_free(distr_localcopy);
2648 } while (0);
2649 }
2650
2651 if(TRUE) {
2652 unur_reset_errno();
2653 do {
2654 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2655 par = unur_vnrou_new(distr_localcopy);
2656 unur_vnrou_set_r(par,2.);
2657 gen = unur_init(par);
2658 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2659 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2660 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2661 unur_free(gen);
2662 unur_distr_free(distr_localcopy);
2663 } while (0);
2664 }
2665
2666 if(TRUE) {
2667 printf("."); fflush(stdout);
2668 }
2669
2670 if(TRUE) {
2671 printf("."); fflush(stdout);
2672 }
2673
2674 if(TRUE) {
2675 unur_reset_errno();
2676 do {
2677 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2678 { UNUR_DISTR *dg =NULL;
2679 double mean[] = { -1., 2., -3. };
2680 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2681 par = unur_vnrou_new(distr_localcopy);
2682 gen = unur_init(par);
2683 if (gen) {
2684 dg = unur_get_distr(gen);
2685 unur_distr_cvec_set_mean(dg,mean);
2686 unur_distr_cvec_set_covar(dg,covar);
2687 unur_distr_cvec_upd_mode(dg);
2688 unur_distr_cvec_upd_pdfvol(dg);
2689 unur_reinit(gen); }
2690 }
2691 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2692 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2693 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2694 unur_free(gen);
2695 unur_distr_free(distr_localcopy);
2696 } while (0);
2697 }
2698
2699 /* distribution [28] */
2700
2701 if(fullcheck) {
2702 unur_reset_errno();
2703 do {
2704 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2705 par = unur_vnrou_new(distr_localcopy);
2706 gen = unur_init(par);
2707 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2708 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2709 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2710 unur_free(gen);
2711 unur_distr_free(distr_localcopy);
2712 } while (0);
2713 }
2714
2715 if(fullcheck) {
2716 unur_reset_errno();
2717 do {
2718 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2719 par = unur_vnrou_new(distr_localcopy);
2720 unur_vnrou_set_r(par,0.5);
2721 gen = unur_init(par);
2722 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2723 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2724 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2725 unur_free(gen);
2726 unur_distr_free(distr_localcopy);
2727 } while (0);
2728 }
2729
2730 if(fullcheck) {
2731 unur_reset_errno();
2732 do {
2733 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2734 par = unur_vnrou_new(distr_localcopy);
2735 unur_vnrou_set_r(par,2.);
2736 gen = unur_init(par);
2737 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2738 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2739 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2740 unur_free(gen);
2741 unur_distr_free(distr_localcopy);
2742 } while (0);
2743 }
2744
2745 if(fullcheck) {
2746 printf("."); fflush(stdout);
2747 }
2748
2749 if(fullcheck) {
2750 printf("."); fflush(stdout);
2751 }
2752
2753 if(fullcheck) {
2754 unur_reset_errno();
2755 do {
2756 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2757 { UNUR_DISTR *dg =NULL;
2758 double mean[] = { -1., 2., -3. };
2759 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2760 par = unur_vnrou_new(distr_localcopy);
2761 gen = unur_init(par);
2762 if (gen) {
2763 dg = unur_get_distr(gen);
2764 unur_distr_cvec_set_mean(dg,mean);
2765 unur_distr_cvec_set_covar(dg,covar);
2766 unur_distr_cvec_upd_mode(dg);
2767 unur_distr_cvec_upd_pdfvol(dg);
2768 unur_reinit(gen); }
2769 }
2770 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2771 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2772 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2773 unur_free(gen);
2774 unur_distr_free(distr_localcopy);
2775 } while (0);
2776 }
2777
2778 /* distribution [29] */
2779
2780 if(fullcheck) {
2781 unur_reset_errno();
2782 do {
2783 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2784 par = unur_vnrou_new(distr_localcopy);
2785 gen = unur_init(par);
2786 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2787 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2788 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2789 unur_free(gen);
2790 unur_distr_free(distr_localcopy);
2791 } while (0);
2792 }
2793
2794 if(fullcheck) {
2795 unur_reset_errno();
2796 do {
2797 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2798 par = unur_vnrou_new(distr_localcopy);
2799 unur_vnrou_set_r(par,0.5);
2800 gen = unur_init(par);
2801 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2802 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2803 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2804 unur_free(gen);
2805 unur_distr_free(distr_localcopy);
2806 } while (0);
2807 }
2808
2809 if(fullcheck) {
2810 unur_reset_errno();
2811 do {
2812 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2813 par = unur_vnrou_new(distr_localcopy);
2814 unur_vnrou_set_r(par,2.);
2815 gen = unur_init(par);
2816 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2817 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2818 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2819 unur_free(gen);
2820 unur_distr_free(distr_localcopy);
2821 } while (0);
2822 }
2823
2824 if(fullcheck) {
2825 printf("."); fflush(stdout);
2826 }
2827
2828 if(fullcheck) {
2829 printf("."); fflush(stdout);
2830 }
2831
2832 if(fullcheck) {
2833 unur_reset_errno();
2834 do {
2835 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2836 { UNUR_DISTR *dg =NULL;
2837 double mean[] = { -1., 2., -3. };
2838 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2839 par = unur_vnrou_new(distr_localcopy);
2840 gen = unur_init(par);
2841 if (gen) {
2842 dg = unur_get_distr(gen);
2843 unur_distr_cvec_set_mean(dg,mean);
2844 unur_distr_cvec_set_covar(dg,covar);
2845 unur_distr_cvec_upd_mode(dg);
2846 unur_distr_cvec_upd_pdfvol(dg);
2847 unur_reinit(gen); }
2848 }
2849 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2850 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2851 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2852 unur_free(gen);
2853 unur_distr_free(distr_localcopy);
2854 } while (0);
2855 }
2856
2857 /* distribution [30] */
2858
2859 if(TRUE) {
2860 unur_reset_errno();
2861 do {
2862 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2863 par = unur_vnrou_new(distr_localcopy);
2864 gen = unur_init(par);
2865 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2866 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2867 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2868 unur_free(gen);
2869 unur_distr_free(distr_localcopy);
2870 } while (0);
2871 }
2872
2873 if(TRUE) {
2874 unur_reset_errno();
2875 do {
2876 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2877 par = unur_vnrou_new(distr_localcopy);
2878 unur_vnrou_set_r(par,0.5);
2879 gen = unur_init(par);
2880 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2881 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2882 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2883 unur_free(gen);
2884 unur_distr_free(distr_localcopy);
2885 } while (0);
2886 }
2887
2888 if(TRUE) {
2889 unur_reset_errno();
2890 do {
2891 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2892 par = unur_vnrou_new(distr_localcopy);
2893 unur_vnrou_set_r(par,2.);
2894 gen = unur_init(par);
2895 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2896 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2897 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2898 unur_free(gen);
2899 unur_distr_free(distr_localcopy);
2900 } while (0);
2901 }
2902
2903 if(TRUE) {
2904 printf("."); fflush(stdout);
2905 }
2906
2907 if(TRUE) {
2908 printf("."); fflush(stdout);
2909 }
2910
2911 if(TRUE) {
2912 unur_reset_errno();
2913 do {
2914 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2915 { UNUR_DISTR *dg =NULL;
2916 double mean[] = { -1., 2., -3. };
2917 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
2918 par = unur_vnrou_new(distr_localcopy);
2919 gen = unur_init(par);
2920 if (gen) {
2921 dg = unur_get_distr(gen);
2922 unur_distr_cvec_set_mean(dg,mean);
2923 unur_distr_cvec_set_covar(dg,covar);
2924 unur_distr_cvec_upd_mode(dg);
2925 unur_distr_cvec_upd_pdfvol(dg);
2926 unur_reinit(gen); }
2927 }
2928 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2929 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2930 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2931 unur_free(gen);
2932 unur_distr_free(distr_localcopy);
2933 } while (0);
2934 }
2935
2936 /* distribution [31] */
2937
2938 if(TRUE) {
2939 unur_reset_errno();
2940 do {
2941 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
2942 par = unur_vnrou_new(distr_localcopy);
2943 gen = unur_init(par);
2944 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
2945 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2946 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2947 unur_free(gen);
2948 unur_distr_free(distr_localcopy);
2949 } while (0);
2950 }
2951
2952 if(TRUE) {
2953 unur_reset_errno();
2954 do {
2955 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
2956 par = unur_vnrou_new(distr_localcopy);
2957 unur_vnrou_set_r(par,0.5);
2958 gen = unur_init(par);
2959 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
2960 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2961 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2962 unur_free(gen);
2963 unur_distr_free(distr_localcopy);
2964 } while (0);
2965 }
2966
2967 if(TRUE) {
2968 unur_reset_errno();
2969 do {
2970 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
2971 par = unur_vnrou_new(distr_localcopy);
2972 unur_vnrou_set_r(par,2.);
2973 gen = unur_init(par);
2974 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
2975 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2976 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2977 unur_free(gen);
2978 unur_distr_free(distr_localcopy);
2979 } while (0);
2980 }
2981
2982 if(TRUE) {
2983 printf("."); fflush(stdout);
2984 }
2985
2986 if(TRUE) {
2987 printf("."); fflush(stdout);
2988 }
2989
2990 if(TRUE) {
2991 printf("."); fflush(stdout);
2992 }
2993
2994 /* distribution [32] */
2995
2996 if(TRUE) {
2997 unur_reset_errno();
2998 do {
2999 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3000 par = unur_vnrou_new(distr_localcopy);
3001 gen = unur_init(par);
3002 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3003 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3004 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3005 unur_free(gen);
3006 unur_distr_free(distr_localcopy);
3007 } while (0);
3008 }
3009
3010 if(TRUE) {
3011 unur_reset_errno();
3012 do {
3013 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3014 par = unur_vnrou_new(distr_localcopy);
3015 unur_vnrou_set_r(par,0.5);
3016 gen = unur_init(par);
3017 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3018 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3019 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3020 unur_free(gen);
3021 unur_distr_free(distr_localcopy);
3022 } while (0);
3023 }
3024
3025 if(TRUE) {
3026 unur_reset_errno();
3027 do {
3028 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3029 par = unur_vnrou_new(distr_localcopy);
3030 unur_vnrou_set_r(par,2.);
3031 gen = unur_init(par);
3032 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3033 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3034 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3035 unur_free(gen);
3036 unur_distr_free(distr_localcopy);
3037 } while (0);
3038 }
3039
3040 if(TRUE) {
3041 printf("."); fflush(stdout);
3042 }
3043
3044 if(TRUE) {
3045 printf("."); fflush(stdout);
3046 }
3047
3048 if(TRUE) {
3049 printf("."); fflush(stdout);
3050 }
3051
3052 /* distribution [33] */
3053
3054 if(TRUE) {
3055 unur_reset_errno();
3056 do {
3057 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3058 par = unur_vnrou_new(distr_localcopy);
3059 gen = unur_init(par);
3060 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3061 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3062 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3063 unur_free(gen);
3064 unur_distr_free(distr_localcopy);
3065 } while (0);
3066 }
3067
3068 if(TRUE) {
3069 unur_reset_errno();
3070 do {
3071 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3072 par = unur_vnrou_new(distr_localcopy);
3073 unur_vnrou_set_r(par,0.5);
3074 gen = unur_init(par);
3075 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3076 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3077 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3078 unur_free(gen);
3079 unur_distr_free(distr_localcopy);
3080 } while (0);
3081 }
3082
3083 if(TRUE) {
3084 unur_reset_errno();
3085 do {
3086 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3087 par = unur_vnrou_new(distr_localcopy);
3088 unur_vnrou_set_r(par,2.);
3089 gen = unur_init(par);
3090 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3091 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3092 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3093 unur_free(gen);
3094 unur_distr_free(distr_localcopy);
3095 } while (0);
3096 }
3097
3098 if(TRUE) {
3099 printf("."); fflush(stdout);
3100 }
3101
3102 if(TRUE) {
3103 printf("."); fflush(stdout);
3104 }
3105
3106 if(TRUE) {
3107 printf("."); fflush(stdout);
3108 }
3109
3110 /* distribution [34] */
3111
3112 if(TRUE) {
3113 unur_reset_errno();
3114 do {
3115 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3116 par = unur_vnrou_new(distr_localcopy);
3117 gen = unur_init(par);
3118 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'0');
3119 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3120 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3121 unur_free(gen);
3122 unur_distr_free(distr_localcopy);
3123 } while (0);
3124 }
3125
3126 if(TRUE) {
3127 unur_reset_errno();
3128 do {
3129 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3130 par = unur_vnrou_new(distr_localcopy);
3131 unur_vnrou_set_r(par,0.5);
3132 gen = unur_init(par);
3133 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'0');
3134 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3135 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3136 unur_free(gen);
3137 unur_distr_free(distr_localcopy);
3138 } while (0);
3139 }
3140
3141 if(TRUE) {
3142 unur_reset_errno();
3143 do {
3144 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3145 par = unur_vnrou_new(distr_localcopy);
3146 unur_vnrou_set_r(par,2.);
3147 gen = unur_init(par);
3148 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'0');
3149 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3150 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3151 unur_free(gen);
3152 unur_distr_free(distr_localcopy);
3153 } while (0);
3154 }
3155
3156 if(TRUE) {
3157 printf("."); fflush(stdout);
3158 }
3159
3160 if(TRUE) {
3161 printf("."); fflush(stdout);
3162 }
3163
3164 if(TRUE) {
3165 printf("."); fflush(stdout);
3166 }
3167
3168 /* timing */
3169 stopwatch_print(TESTLOG,"\n<*>time = %.0f ms\n", stopwatch_lap(&watch));
3170
3171 printf("\n(verify hat) "); fflush(stdout);
3172
3173 /* verify hat tests: 210 */
3174
3175 unur_set_default_debug(~UNUR_DEBUG_SAMPLE);
3176 fprintf( TESTLOG,"\nVerify Hat Test (squeeze <= PDF <= hat):\n");
3177
3178 /* distribution [0] */
3179
3180 if(TRUE) {
3181 unur_reset_errno();
3182 do {
3183 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
3184 par = unur_vnrou_new(distr_localcopy);
3185 unur_vnrou_set_pedantic(par,0);
3186 gen = unur_init(par);
3187 if (gen) unur_vnrou_chg_verify(gen,1);
3188 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[0],'~')==UNUR_SUCCESS)?0:1000;
3189 unur_free(gen);
3190
3191 unur_distr_free(distr_localcopy);
3192 } while (0);
3193 }
3194
3195 if(TRUE) {
3196 unur_reset_errno();
3197 do {
3198 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
3199 par = unur_vnrou_new(distr_localcopy);
3200 unur_vnrou_set_pedantic(par,0);
3201 unur_vnrou_set_r(par,0.5);
3202 gen = unur_init(par);
3203 if (gen) unur_vnrou_chg_verify(gen,1);
3204 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[0],'~')==UNUR_SUCCESS)?0:1000;
3205 unur_free(gen);
3206
3207 unur_distr_free(distr_localcopy);
3208 } while (0);
3209 }
3210
3211 if(TRUE) {
3212 unur_reset_errno();
3213 do {
3214 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
3215 par = unur_vnrou_new(distr_localcopy);
3216 unur_vnrou_set_pedantic(par,0);
3217 unur_vnrou_set_r(par,2.);
3218 gen = unur_init(par);
3219 if (gen) unur_vnrou_chg_verify(gen,1);
3220 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[0],'~')==UNUR_SUCCESS)?0:1000;
3221 unur_free(gen);
3222
3223 unur_distr_free(distr_localcopy);
3224 } while (0);
3225 }
3226
3227 if(TRUE) {
3228 unur_reset_errno();
3229 do {
3230 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
3231 { double umin[] = {-0.608928,-0.608928,-0.608928};
3232 double umax[] = { 0.608928, 0.608928, 0.608928};
3233 double vmax = 0.51;
3234 par = unur_vnrou_new(distr_localcopy);
3235 unur_vnrou_set_pedantic(par,0);
3236 unur_vnrou_set_u(par,umin,umax);
3237 unur_vnrou_set_v(par,vmax); }
3238 gen = unur_init(par);
3239 if (gen) unur_vnrou_chg_verify(gen,1);
3240 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[0],'~')==UNUR_SUCCESS)?0:1000;
3241 unur_free(gen);
3242
3243 unur_distr_free(distr_localcopy);
3244 } while (0);
3245 }
3246
3247 if(TRUE) {
3248 printf("."); fflush(stdout);
3249 }
3250
3251 if(TRUE) {
3252 unur_reset_errno();
3253 do {
3254 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
3255 { UNUR_DISTR *dg =NULL;
3256 double mean[] = { -1., 2., -3. };
3257 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
3258 par = unur_vnrou_new(distr_localcopy);
3259 unur_vnrou_set_pedantic(par,0);
3260 gen = unur_init(par);
3261 if (gen) {
3262 dg = unur_get_distr(gen);
3263 unur_distr_cvec_set_mean(dg,mean);
3264 unur_distr_cvec_set_covar(dg,covar);
3265 unur_distr_cvec_upd_mode(dg);
3266 unur_distr_cvec_upd_pdfvol(dg);
3267 unur_reinit(gen); }
3268 }
3269 if (gen) unur_vnrou_chg_verify(gen,1);
3270 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[0],'~')==UNUR_SUCCESS)?0:1000;
3271 unur_free(gen);
3272
3273 unur_distr_free(distr_localcopy);
3274 } while (0);
3275 }
3276
3277 /* distribution [1] */
3278
3279 if(TRUE) {
3280 unur_reset_errno();
3281 do {
3282 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
3283 par = unur_vnrou_new(distr_localcopy);
3284 unur_vnrou_set_pedantic(par,0);
3285 gen = unur_init(par);
3286 if (gen) unur_vnrou_chg_verify(gen,1);
3287 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[1],'~')==UNUR_SUCCESS)?0:1000;
3288 unur_free(gen);
3289
3290 unur_distr_free(distr_localcopy);
3291 } while (0);
3292 }
3293
3294 if(TRUE) {
3295 unur_reset_errno();
3296 do {
3297 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
3298 par = unur_vnrou_new(distr_localcopy);
3299 unur_vnrou_set_pedantic(par,0);
3300 unur_vnrou_set_r(par,0.5);
3301 gen = unur_init(par);
3302 if (gen) unur_vnrou_chg_verify(gen,1);
3303 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[1],'~')==UNUR_SUCCESS)?0:1000;
3304 unur_free(gen);
3305
3306 unur_distr_free(distr_localcopy);
3307 } while (0);
3308 }
3309
3310 if(TRUE) {
3311 unur_reset_errno();
3312 do {
3313 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
3314 par = unur_vnrou_new(distr_localcopy);
3315 unur_vnrou_set_pedantic(par,0);
3316 unur_vnrou_set_r(par,2.);
3317 gen = unur_init(par);
3318 if (gen) unur_vnrou_chg_verify(gen,1);
3319 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[1],'~')==UNUR_SUCCESS)?0:1000;
3320 unur_free(gen);
3321
3322 unur_distr_free(distr_localcopy);
3323 } while (0);
3324 }
3325
3326 if(TRUE) {
3327 unur_reset_errno();
3328 do {
3329 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
3330 { double umin[] = {-0.608928,-0.608928,-0.608928};
3331 double umax[] = { 0.608928, 0.608928, 0.608928};
3332 double vmax = 0.51;
3333 par = unur_vnrou_new(distr_localcopy);
3334 unur_vnrou_set_pedantic(par,0);
3335 unur_vnrou_set_u(par,umin,umax);
3336 unur_vnrou_set_v(par,vmax); }
3337 gen = unur_init(par);
3338 if (gen) unur_vnrou_chg_verify(gen,1);
3339 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[1],'-')==UNUR_SUCCESS)?0:1000;
3340 unur_free(gen);
3341
3342 unur_distr_free(distr_localcopy);
3343 } while (0);
3344 }
3345
3346 if(TRUE) {
3347 printf("."); fflush(stdout);
3348 }
3349
3350 if(TRUE) {
3351 unur_reset_errno();
3352 do {
3353 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
3354 { UNUR_DISTR *dg =NULL;
3355 double mean[] = { -1., 2., -3. };
3356 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
3357 par = unur_vnrou_new(distr_localcopy);
3358 unur_vnrou_set_pedantic(par,0);
3359 gen = unur_init(par);
3360 if (gen) {
3361 dg = unur_get_distr(gen);
3362 unur_distr_cvec_set_mean(dg,mean);
3363 unur_distr_cvec_set_covar(dg,covar);
3364 unur_distr_cvec_upd_mode(dg);
3365 unur_distr_cvec_upd_pdfvol(dg);
3366 unur_reinit(gen); }
3367 }
3368 if (gen) unur_vnrou_chg_verify(gen,1);
3369 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[1],'~')==UNUR_SUCCESS)?0:1000;
3370 unur_free(gen);
3371
3372 unur_distr_free(distr_localcopy);
3373 } while (0);
3374 }
3375
3376 /* distribution [2] */
3377
3378 if(fullcheck) {
3379 unur_reset_errno();
3380 do {
3381 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
3382 par = unur_vnrou_new(distr_localcopy);
3383 unur_vnrou_set_pedantic(par,0);
3384 gen = unur_init(par);
3385 if (gen) unur_vnrou_chg_verify(gen,1);
3386 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[2],'~')==UNUR_SUCCESS)?0:1000;
3387 unur_free(gen);
3388
3389 unur_distr_free(distr_localcopy);
3390 } while (0);
3391 }
3392
3393 if(fullcheck) {
3394 unur_reset_errno();
3395 do {
3396 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
3397 par = unur_vnrou_new(distr_localcopy);
3398 unur_vnrou_set_pedantic(par,0);
3399 unur_vnrou_set_r(par,0.5);
3400 gen = unur_init(par);
3401 if (gen) unur_vnrou_chg_verify(gen,1);
3402 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[2],'~')==UNUR_SUCCESS)?0:1000;
3403 unur_free(gen);
3404
3405 unur_distr_free(distr_localcopy);
3406 } while (0);
3407 }
3408
3409 if(fullcheck) {
3410 unur_reset_errno();
3411 do {
3412 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
3413 par = unur_vnrou_new(distr_localcopy);
3414 unur_vnrou_set_pedantic(par,0);
3415 unur_vnrou_set_r(par,2.);
3416 gen = unur_init(par);
3417 if (gen) unur_vnrou_chg_verify(gen,1);
3418 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[2],'~')==UNUR_SUCCESS)?0:1000;
3419 unur_free(gen);
3420
3421 unur_distr_free(distr_localcopy);
3422 } while (0);
3423 }
3424
3425 if(fullcheck) {
3426 printf("."); fflush(stdout);
3427 }
3428
3429 if(fullcheck) {
3430 printf("."); fflush(stdout);
3431 }
3432
3433 if(fullcheck) {
3434 printf("."); fflush(stdout);
3435 }
3436
3437 /* distribution [3] */
3438
3439 if(fullcheck) {
3440 unur_reset_errno();
3441 do {
3442 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
3443 par = unur_vnrou_new(distr_localcopy);
3444 unur_vnrou_set_pedantic(par,0);
3445 gen = unur_init(par);
3446 if (gen) unur_vnrou_chg_verify(gen,1);
3447 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[3],'~')==UNUR_SUCCESS)?0:1000;
3448 unur_free(gen);
3449
3450 unur_distr_free(distr_localcopy);
3451 } while (0);
3452 }
3453
3454 if(fullcheck) {
3455 unur_reset_errno();
3456 do {
3457 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
3458 par = unur_vnrou_new(distr_localcopy);
3459 unur_vnrou_set_pedantic(par,0);
3460 unur_vnrou_set_r(par,0.5);
3461 gen = unur_init(par);
3462 if (gen) unur_vnrou_chg_verify(gen,1);
3463 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[3],'~')==UNUR_SUCCESS)?0:1000;
3464 unur_free(gen);
3465
3466 unur_distr_free(distr_localcopy);
3467 } while (0);
3468 }
3469
3470 if(fullcheck) {
3471 unur_reset_errno();
3472 do {
3473 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
3474 par = unur_vnrou_new(distr_localcopy);
3475 unur_vnrou_set_pedantic(par,0);
3476 unur_vnrou_set_r(par,2.);
3477 gen = unur_init(par);
3478 if (gen) unur_vnrou_chg_verify(gen,1);
3479 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[3],'~')==UNUR_SUCCESS)?0:1000;
3480 unur_free(gen);
3481
3482 unur_distr_free(distr_localcopy);
3483 } while (0);
3484 }
3485
3486 if(fullcheck) {
3487 printf("."); fflush(stdout);
3488 }
3489
3490 if(fullcheck) {
3491 printf("."); fflush(stdout);
3492 }
3493
3494 if(fullcheck) {
3495 unur_reset_errno();
3496 do {
3497 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
3498 { UNUR_DISTR *dg =NULL;
3499 double mean[] = { -1., 2., -3. };
3500 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
3501 par = unur_vnrou_new(distr_localcopy);
3502 unur_vnrou_set_pedantic(par,0);
3503 gen = unur_init(par);
3504 if (gen) {
3505 dg = unur_get_distr(gen);
3506 unur_distr_cvec_set_mean(dg,mean);
3507 unur_distr_cvec_set_covar(dg,covar);
3508 unur_distr_cvec_upd_mode(dg);
3509 unur_distr_cvec_upd_pdfvol(dg);
3510 unur_reinit(gen); }
3511 }
3512 if (gen) unur_vnrou_chg_verify(gen,1);
3513 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[3],'~')==UNUR_SUCCESS)?0:1000;
3514 unur_free(gen);
3515
3516 unur_distr_free(distr_localcopy);
3517 } while (0);
3518 }
3519
3520 /* distribution [4] */
3521
3522 if(TRUE) {
3523 unur_reset_errno();
3524 do {
3525 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
3526 par = unur_vnrou_new(distr_localcopy);
3527 unur_vnrou_set_pedantic(par,0);
3528 gen = unur_init(par);
3529 if (gen) unur_vnrou_chg_verify(gen,1);
3530 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[4],'~')==UNUR_SUCCESS)?0:1000;
3531 unur_free(gen);
3532
3533 unur_distr_free(distr_localcopy);
3534 } while (0);
3535 }
3536
3537 if(TRUE) {
3538 unur_reset_errno();
3539 do {
3540 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
3541 par = unur_vnrou_new(distr_localcopy);
3542 unur_vnrou_set_pedantic(par,0);
3543 unur_vnrou_set_r(par,0.5);
3544 gen = unur_init(par);
3545 if (gen) unur_vnrou_chg_verify(gen,1);
3546 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[4],'~')==UNUR_SUCCESS)?0:1000;
3547 unur_free(gen);
3548
3549 unur_distr_free(distr_localcopy);
3550 } while (0);
3551 }
3552
3553 if(TRUE) {
3554 unur_reset_errno();
3555 do {
3556 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
3557 par = unur_vnrou_new(distr_localcopy);
3558 unur_vnrou_set_pedantic(par,0);
3559 unur_vnrou_set_r(par,2.);
3560 gen = unur_init(par);
3561 if (gen) unur_vnrou_chg_verify(gen,1);
3562 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[4],'~')==UNUR_SUCCESS)?0:1000;
3563 unur_free(gen);
3564
3565 unur_distr_free(distr_localcopy);
3566 } while (0);
3567 }
3568
3569 if(TRUE) {
3570 printf("."); fflush(stdout);
3571 }
3572
3573 if(TRUE) {
3574 printf("."); fflush(stdout);
3575 }
3576
3577 if(TRUE) {
3578 unur_reset_errno();
3579 do {
3580 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
3581 { UNUR_DISTR *dg =NULL;
3582 double mean[] = { -1., 2., -3. };
3583 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
3584 par = unur_vnrou_new(distr_localcopy);
3585 unur_vnrou_set_pedantic(par,0);
3586 gen = unur_init(par);
3587 if (gen) {
3588 dg = unur_get_distr(gen);
3589 unur_distr_cvec_set_mean(dg,mean);
3590 unur_distr_cvec_set_covar(dg,covar);
3591 unur_distr_cvec_upd_mode(dg);
3592 unur_distr_cvec_upd_pdfvol(dg);
3593 unur_reinit(gen); }
3594 }
3595 if (gen) unur_vnrou_chg_verify(gen,1);
3596 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[4],'~')==UNUR_SUCCESS)?0:1000;
3597 unur_free(gen);
3598
3599 unur_distr_free(distr_localcopy);
3600 } while (0);
3601 }
3602
3603 /* distribution [5] */
3604
3605 if(TRUE) {
3606 unur_reset_errno();
3607 do {
3608 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
3609 par = unur_vnrou_new(distr_localcopy);
3610 unur_vnrou_set_pedantic(par,0);
3611 gen = unur_init(par);
3612 if (gen) unur_vnrou_chg_verify(gen,1);
3613 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[5],'~')==UNUR_SUCCESS)?0:1000;
3614 unur_free(gen);
3615
3616 unur_distr_free(distr_localcopy);
3617 } while (0);
3618 }
3619
3620 if(TRUE) {
3621 unur_reset_errno();
3622 do {
3623 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
3624 par = unur_vnrou_new(distr_localcopy);
3625 unur_vnrou_set_pedantic(par,0);
3626 unur_vnrou_set_r(par,0.5);
3627 gen = unur_init(par);
3628 if (gen) unur_vnrou_chg_verify(gen,1);
3629 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[5],'~')==UNUR_SUCCESS)?0:1000;
3630 unur_free(gen);
3631
3632 unur_distr_free(distr_localcopy);
3633 } while (0);
3634 }
3635
3636 if(TRUE) {
3637 unur_reset_errno();
3638 do {
3639 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
3640 par = unur_vnrou_new(distr_localcopy);
3641 unur_vnrou_set_pedantic(par,0);
3642 unur_vnrou_set_r(par,2.);
3643 gen = unur_init(par);
3644 if (gen) unur_vnrou_chg_verify(gen,1);
3645 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[5],'~')==UNUR_SUCCESS)?0:1000;
3646 unur_free(gen);
3647
3648 unur_distr_free(distr_localcopy);
3649 } while (0);
3650 }
3651
3652 if(TRUE) {
3653 printf("."); fflush(stdout);
3654 }
3655
3656 if(TRUE) {
3657 unur_reset_errno();
3658 do {
3659 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
3660 { double umin[] = {-0.608928,-0.608928,-0.608928};
3661 double umax[] = { 0.608928, 0.608928, 0.608928};
3662 double vmax = 0.70;
3663 par = unur_vnrou_new(distr_localcopy);
3664 unur_vnrou_set_pedantic(par,0);
3665 unur_vnrou_set_u(par,umin,umax);
3666 unur_vnrou_set_v(par,vmax); }
3667 gen = unur_init(par);
3668 if (gen) unur_vnrou_chg_verify(gen,1);
3669 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[5],'~')==UNUR_SUCCESS)?0:1000;
3670 unur_free(gen);
3671
3672 unur_distr_free(distr_localcopy);
3673 } while (0);
3674 }
3675
3676 if(TRUE) {
3677 printf("."); fflush(stdout);
3678 }
3679
3680 /* distribution [6] */
3681
3682 if(TRUE) {
3683 unur_reset_errno();
3684 do {
3685 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
3686 par = unur_vnrou_new(distr_localcopy);
3687 unur_vnrou_set_pedantic(par,0);
3688 gen = unur_init(par);
3689 if (gen) unur_vnrou_chg_verify(gen,1);
3690 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[6],'~')==UNUR_SUCCESS)?0:1000;
3691 unur_free(gen);
3692
3693 unur_distr_free(distr_localcopy);
3694 } while (0);
3695 }
3696
3697 if(TRUE) {
3698 unur_reset_errno();
3699 do {
3700 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
3701 par = unur_vnrou_new(distr_localcopy);
3702 unur_vnrou_set_pedantic(par,0);
3703 unur_vnrou_set_r(par,0.5);
3704 gen = unur_init(par);
3705 if (gen) unur_vnrou_chg_verify(gen,1);
3706 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[6],'~')==UNUR_SUCCESS)?0:1000;
3707 unur_free(gen);
3708
3709 unur_distr_free(distr_localcopy);
3710 } while (0);
3711 }
3712
3713 if(TRUE) {
3714 unur_reset_errno();
3715 do {
3716 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
3717 par = unur_vnrou_new(distr_localcopy);
3718 unur_vnrou_set_pedantic(par,0);
3719 unur_vnrou_set_r(par,2.);
3720 gen = unur_init(par);
3721 if (gen) unur_vnrou_chg_verify(gen,1);
3722 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[6],'~')==UNUR_SUCCESS)?0:1000;
3723 unur_free(gen);
3724
3725 unur_distr_free(distr_localcopy);
3726 } while (0);
3727 }
3728
3729 if(TRUE) {
3730 printf("."); fflush(stdout);
3731 }
3732
3733 if(TRUE) {
3734 printf("."); fflush(stdout);
3735 }
3736
3737 if(TRUE) {
3738 printf("."); fflush(stdout);
3739 }
3740
3741 /* distribution [7] */
3742
3743 if(TRUE) {
3744 unur_reset_errno();
3745 do {
3746 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
3747 par = unur_vnrou_new(distr_localcopy);
3748 unur_vnrou_set_pedantic(par,0);
3749 gen = unur_init(par);
3750 if (gen) unur_vnrou_chg_verify(gen,1);
3751 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[7],'~')==UNUR_SUCCESS)?0:1000;
3752 unur_free(gen);
3753
3754 unur_distr_free(distr_localcopy);
3755 } while (0);
3756 }
3757
3758 if(TRUE) {
3759 unur_reset_errno();
3760 do {
3761 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
3762 par = unur_vnrou_new(distr_localcopy);
3763 unur_vnrou_set_pedantic(par,0);
3764 unur_vnrou_set_r(par,0.5);
3765 gen = unur_init(par);
3766 if (gen) unur_vnrou_chg_verify(gen,1);
3767 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[7],'~')==UNUR_SUCCESS)?0:1000;
3768 unur_free(gen);
3769
3770 unur_distr_free(distr_localcopy);
3771 } while (0);
3772 }
3773
3774 if(TRUE) {
3775 unur_reset_errno();
3776 do {
3777 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
3778 par = unur_vnrou_new(distr_localcopy);
3779 unur_vnrou_set_pedantic(par,0);
3780 unur_vnrou_set_r(par,2.);
3781 gen = unur_init(par);
3782 if (gen) unur_vnrou_chg_verify(gen,1);
3783 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[7],'~')==UNUR_SUCCESS)?0:1000;
3784 unur_free(gen);
3785
3786 unur_distr_free(distr_localcopy);
3787 } while (0);
3788 }
3789
3790 if(TRUE) {
3791 printf("."); fflush(stdout);
3792 }
3793
3794 if(TRUE) {
3795 printf("."); fflush(stdout);
3796 }
3797
3798 if(TRUE) {
3799 printf("."); fflush(stdout);
3800 }
3801
3802 /* distribution [8] */
3803
3804 if(TRUE) {
3805 unur_reset_errno();
3806 do {
3807 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
3808 par = unur_vnrou_new(distr_localcopy);
3809 unur_vnrou_set_pedantic(par,0);
3810 gen = unur_init(par);
3811 if (gen) unur_vnrou_chg_verify(gen,1);
3812 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[8],'~')==UNUR_SUCCESS)?0:1000;
3813 unur_free(gen);
3814
3815 unur_distr_free(distr_localcopy);
3816 } while (0);
3817 }
3818
3819 if(TRUE) {
3820 unur_reset_errno();
3821 do {
3822 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
3823 par = unur_vnrou_new(distr_localcopy);
3824 unur_vnrou_set_pedantic(par,0);
3825 unur_vnrou_set_r(par,0.5);
3826 gen = unur_init(par);
3827 if (gen) unur_vnrou_chg_verify(gen,1);
3828 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[8],'~')==UNUR_SUCCESS)?0:1000;
3829 unur_free(gen);
3830
3831 unur_distr_free(distr_localcopy);
3832 } while (0);
3833 }
3834
3835 if(TRUE) {
3836 unur_reset_errno();
3837 do {
3838 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
3839 par = unur_vnrou_new(distr_localcopy);
3840 unur_vnrou_set_pedantic(par,0);
3841 unur_vnrou_set_r(par,2.);
3842 gen = unur_init(par);
3843 if (gen) unur_vnrou_chg_verify(gen,1);
3844 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[8],'~')==UNUR_SUCCESS)?0:1000;
3845 unur_free(gen);
3846
3847 unur_distr_free(distr_localcopy);
3848 } while (0);
3849 }
3850
3851 if(TRUE) {
3852 printf("."); fflush(stdout);
3853 }
3854
3855 if(TRUE) {
3856 printf("."); fflush(stdout);
3857 }
3858
3859 if(TRUE) {
3860 unur_reset_errno();
3861 do {
3862 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
3863 { UNUR_DISTR *dg =NULL;
3864 double mean[] = { -1., 2., -3. };
3865 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
3866 par = unur_vnrou_new(distr_localcopy);
3867 unur_vnrou_set_pedantic(par,0);
3868 gen = unur_init(par);
3869 if (gen) {
3870 dg = unur_get_distr(gen);
3871 unur_distr_cvec_set_mean(dg,mean);
3872 unur_distr_cvec_set_covar(dg,covar);
3873 unur_distr_cvec_upd_mode(dg);
3874 unur_distr_cvec_upd_pdfvol(dg);
3875 unur_reinit(gen); }
3876 }
3877 if (gen) unur_vnrou_chg_verify(gen,1);
3878 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[8],'~')==UNUR_SUCCESS)?0:1000;
3879 unur_free(gen);
3880
3881 unur_distr_free(distr_localcopy);
3882 } while (0);
3883 }
3884
3885 /* distribution [9] */
3886
3887 if(TRUE) {
3888 unur_reset_errno();
3889 do {
3890 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3891 par = unur_vnrou_new(distr_localcopy);
3892 unur_vnrou_set_pedantic(par,0);
3893 gen = unur_init(par);
3894 if (gen) unur_vnrou_chg_verify(gen,1);
3895 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[9],'~')==UNUR_SUCCESS)?0:1000;
3896 unur_free(gen);
3897
3898 unur_distr_free(distr_localcopy);
3899 } while (0);
3900 }
3901
3902 if(TRUE) {
3903 unur_reset_errno();
3904 do {
3905 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3906 par = unur_vnrou_new(distr_localcopy);
3907 unur_vnrou_set_pedantic(par,0);
3908 unur_vnrou_set_r(par,0.5);
3909 gen = unur_init(par);
3910 if (gen) unur_vnrou_chg_verify(gen,1);
3911 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[9],'~')==UNUR_SUCCESS)?0:1000;
3912 unur_free(gen);
3913
3914 unur_distr_free(distr_localcopy);
3915 } while (0);
3916 }
3917
3918 if(TRUE) {
3919 unur_reset_errno();
3920 do {
3921 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3922 par = unur_vnrou_new(distr_localcopy);
3923 unur_vnrou_set_pedantic(par,0);
3924 unur_vnrou_set_r(par,2.);
3925 gen = unur_init(par);
3926 if (gen) unur_vnrou_chg_verify(gen,1);
3927 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[9],'~')==UNUR_SUCCESS)?0:1000;
3928 unur_free(gen);
3929
3930 unur_distr_free(distr_localcopy);
3931 } while (0);
3932 }
3933
3934 if(TRUE) {
3935 printf("."); fflush(stdout);
3936 }
3937
3938 if(TRUE) {
3939 printf("."); fflush(stdout);
3940 }
3941
3942 if(TRUE) {
3943 printf("."); fflush(stdout);
3944 }
3945
3946 /* distribution [10] */
3947
3948 if(fullcheck) {
3949 unur_reset_errno();
3950 do {
3951 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3952 par = unur_vnrou_new(distr_localcopy);
3953 unur_vnrou_set_pedantic(par,0);
3954 gen = unur_init(par);
3955 if (gen) unur_vnrou_chg_verify(gen,1);
3956 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[10],'~')==UNUR_SUCCESS)?0:1000;
3957 unur_free(gen);
3958
3959 unur_distr_free(distr_localcopy);
3960 } while (0);
3961 }
3962
3963 if(fullcheck) {
3964 unur_reset_errno();
3965 do {
3966 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3967 par = unur_vnrou_new(distr_localcopy);
3968 unur_vnrou_set_pedantic(par,0);
3969 unur_vnrou_set_r(par,0.5);
3970 gen = unur_init(par);
3971 if (gen) unur_vnrou_chg_verify(gen,1);
3972 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[10],'~')==UNUR_SUCCESS)?0:1000;
3973 unur_free(gen);
3974
3975 unur_distr_free(distr_localcopy);
3976 } while (0);
3977 }
3978
3979 if(fullcheck) {
3980 unur_reset_errno();
3981 do {
3982 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3983 par = unur_vnrou_new(distr_localcopy);
3984 unur_vnrou_set_pedantic(par,0);
3985 unur_vnrou_set_r(par,2.);
3986 gen = unur_init(par);
3987 if (gen) unur_vnrou_chg_verify(gen,1);
3988 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[10],'~')==UNUR_SUCCESS)?0:1000;
3989 unur_free(gen);
3990
3991 unur_distr_free(distr_localcopy);
3992 } while (0);
3993 }
3994
3995 if(fullcheck) {
3996 printf("."); fflush(stdout);
3997 }
3998
3999 if(fullcheck) {
4000 printf("."); fflush(stdout);
4001 }
4002
4003 if(fullcheck) {
4004 printf("."); fflush(stdout);
4005 }
4006
4007 /* distribution [11] */
4008
4009 if(TRUE) {
4010 unur_reset_errno();
4011 do {
4012 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
4013 par = unur_vnrou_new(distr_localcopy);
4014 unur_vnrou_set_pedantic(par,0);
4015 gen = unur_init(par);
4016 if (gen) unur_vnrou_chg_verify(gen,1);
4017 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[11],'~')==UNUR_SUCCESS)?0:1000;
4018 unur_free(gen);
4019
4020 unur_distr_free(distr_localcopy);
4021 } while (0);
4022 }
4023
4024 if(TRUE) {
4025 printf("."); fflush(stdout);
4026 }
4027
4028 if(TRUE) {
4029 unur_reset_errno();
4030 do {
4031 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
4032 par = unur_vnrou_new(distr_localcopy);
4033 unur_vnrou_set_pedantic(par,0);
4034 unur_vnrou_set_r(par,2.);
4035 gen = unur_init(par);
4036 if (gen) unur_vnrou_chg_verify(gen,1);
4037 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[11],'~')==UNUR_SUCCESS)?0:1000;
4038 unur_free(gen);
4039
4040 unur_distr_free(distr_localcopy);
4041 } while (0);
4042 }
4043
4044 if(TRUE) {
4045 printf("."); fflush(stdout);
4046 }
4047
4048 if(TRUE) {
4049 printf("."); fflush(stdout);
4050 }
4051
4052 if(TRUE) {
4053 printf("."); fflush(stdout);
4054 }
4055
4056 /* distribution [12] */
4057
4058 if(TRUE) {
4059 unur_reset_errno();
4060 do {
4061 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
4062 par = unur_vnrou_new(distr_localcopy);
4063 unur_vnrou_set_pedantic(par,0);
4064 gen = unur_init(par);
4065 if (gen) unur_vnrou_chg_verify(gen,1);
4066 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[12],'~')==UNUR_SUCCESS)?0:1000;
4067 unur_free(gen);
4068
4069 unur_distr_free(distr_localcopy);
4070 } while (0);
4071 }
4072
4073 if(TRUE) {
4074 printf("."); fflush(stdout);
4075 }
4076
4077 if(TRUE) {
4078 unur_reset_errno();
4079 do {
4080 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
4081 par = unur_vnrou_new(distr_localcopy);
4082 unur_vnrou_set_pedantic(par,0);
4083 unur_vnrou_set_r(par,2.);
4084 gen = unur_init(par);
4085 if (gen) unur_vnrou_chg_verify(gen,1);
4086 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[12],'~')==UNUR_SUCCESS)?0:1000;
4087 unur_free(gen);
4088
4089 unur_distr_free(distr_localcopy);
4090 } while (0);
4091 }
4092
4093 if(TRUE) {
4094 printf("."); fflush(stdout);
4095 }
4096
4097 if(TRUE) {
4098 printf("."); fflush(stdout);
4099 }
4100
4101 if(TRUE) {
4102 unur_reset_errno();
4103 do {
4104 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
4105 { UNUR_DISTR *dg =NULL;
4106 double mean[] = { -1., 2., -3. };
4107 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4108 par = unur_vnrou_new(distr_localcopy);
4109 unur_vnrou_set_pedantic(par,0);
4110 gen = unur_init(par);
4111 if (gen) {
4112 dg = unur_get_distr(gen);
4113 unur_distr_cvec_set_mean(dg,mean);
4114 unur_distr_cvec_set_covar(dg,covar);
4115 unur_distr_cvec_upd_mode(dg);
4116 unur_distr_cvec_upd_pdfvol(dg);
4117 unur_reinit(gen); }
4118 }
4119 if (gen) unur_vnrou_chg_verify(gen,1);
4120 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[12],'~')==UNUR_SUCCESS)?0:1000;
4121 unur_free(gen);
4122
4123 unur_distr_free(distr_localcopy);
4124 } while (0);
4125 }
4126
4127 /* distribution [13] */
4128
4129 if(TRUE) {
4130 unur_reset_errno();
4131 do {
4132 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
4133 par = unur_vnrou_new(distr_localcopy);
4134 unur_vnrou_set_pedantic(par,0);
4135 gen = unur_init(par);
4136 if (gen) unur_vnrou_chg_verify(gen,1);
4137 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[13],'~')==UNUR_SUCCESS)?0:1000;
4138 unur_free(gen);
4139
4140 unur_distr_free(distr_localcopy);
4141 } while (0);
4142 }
4143
4144 if(TRUE) {
4145 printf("."); fflush(stdout);
4146 }
4147
4148 if(TRUE) {
4149 unur_reset_errno();
4150 do {
4151 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
4152 par = unur_vnrou_new(distr_localcopy);
4153 unur_vnrou_set_pedantic(par,0);
4154 unur_vnrou_set_r(par,2.);
4155 gen = unur_init(par);
4156 if (gen) unur_vnrou_chg_verify(gen,1);
4157 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[13],'~')==UNUR_SUCCESS)?0:1000;
4158 unur_free(gen);
4159
4160 unur_distr_free(distr_localcopy);
4161 } while (0);
4162 }
4163
4164 if(TRUE) {
4165 printf("."); fflush(stdout);
4166 }
4167
4168 if(TRUE) {
4169 printf("."); fflush(stdout);
4170 }
4171
4172 if(TRUE) {
4173 printf("."); fflush(stdout);
4174 }
4175
4176 /* distribution [14] */
4177
4178 if(TRUE) {
4179 unur_reset_errno();
4180 do {
4181 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
4182 par = unur_vnrou_new(distr_localcopy);
4183 unur_vnrou_set_pedantic(par,0);
4184 gen = unur_init(par);
4185 if (gen) unur_vnrou_chg_verify(gen,1);
4186 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[14],'~')==UNUR_SUCCESS)?0:1000;
4187 unur_free(gen);
4188
4189 unur_distr_free(distr_localcopy);
4190 } while (0);
4191 }
4192
4193 if(TRUE) {
4194 printf("."); fflush(stdout);
4195 }
4196
4197 if(TRUE) {
4198 unur_reset_errno();
4199 do {
4200 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
4201 par = unur_vnrou_new(distr_localcopy);
4202 unur_vnrou_set_pedantic(par,0);
4203 unur_vnrou_set_r(par,2.);
4204 gen = unur_init(par);
4205 if (gen) unur_vnrou_chg_verify(gen,1);
4206 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[14],'~')==UNUR_SUCCESS)?0:1000;
4207 unur_free(gen);
4208
4209 unur_distr_free(distr_localcopy);
4210 } while (0);
4211 }
4212
4213 if(TRUE) {
4214 printf("."); fflush(stdout);
4215 }
4216
4217 if(TRUE) {
4218 printf("."); fflush(stdout);
4219 }
4220
4221 if(TRUE) {
4222 printf("."); fflush(stdout);
4223 }
4224
4225 /* distribution [15] */
4226
4227 if(fullcheck) {
4228 unur_reset_errno();
4229 do {
4230 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4231 par = unur_vnrou_new(distr_localcopy);
4232 unur_vnrou_set_pedantic(par,0);
4233 gen = unur_init(par);
4234 if (gen) unur_vnrou_chg_verify(gen,1);
4235 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[15],'~')==UNUR_SUCCESS)?0:1000;
4236 unur_free(gen);
4237
4238 unur_distr_free(distr_localcopy);
4239 } while (0);
4240 }
4241
4242 if(fullcheck) {
4243 unur_reset_errno();
4244 do {
4245 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4246 par = unur_vnrou_new(distr_localcopy);
4247 unur_vnrou_set_pedantic(par,0);
4248 unur_vnrou_set_r(par,0.5);
4249 gen = unur_init(par);
4250 if (gen) unur_vnrou_chg_verify(gen,1);
4251 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[15],'~')==UNUR_SUCCESS)?0:1000;
4252 unur_free(gen);
4253
4254 unur_distr_free(distr_localcopy);
4255 } while (0);
4256 }
4257
4258 if(fullcheck) {
4259 unur_reset_errno();
4260 do {
4261 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4262 par = unur_vnrou_new(distr_localcopy);
4263 unur_vnrou_set_pedantic(par,0);
4264 unur_vnrou_set_r(par,2.);
4265 gen = unur_init(par);
4266 if (gen) unur_vnrou_chg_verify(gen,1);
4267 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[15],'~')==UNUR_SUCCESS)?0:1000;
4268 unur_free(gen);
4269
4270 unur_distr_free(distr_localcopy);
4271 } while (0);
4272 }
4273
4274 if(fullcheck) {
4275 printf("."); fflush(stdout);
4276 }
4277
4278 if(fullcheck) {
4279 printf("."); fflush(stdout);
4280 }
4281
4282 if(fullcheck) {
4283 unur_reset_errno();
4284 do {
4285 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4286 { UNUR_DISTR *dg =NULL;
4287 double mean[] = { -1., 2., -3. };
4288 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4289 par = unur_vnrou_new(distr_localcopy);
4290 unur_vnrou_set_pedantic(par,0);
4291 gen = unur_init(par);
4292 if (gen) {
4293 dg = unur_get_distr(gen);
4294 unur_distr_cvec_set_mean(dg,mean);
4295 unur_distr_cvec_set_covar(dg,covar);
4296 unur_distr_cvec_upd_mode(dg);
4297 unur_distr_cvec_upd_pdfvol(dg);
4298 unur_reinit(gen); }
4299 }
4300 if (gen) unur_vnrou_chg_verify(gen,1);
4301 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[15],'~')==UNUR_SUCCESS)?0:1000;
4302 unur_free(gen);
4303
4304 unur_distr_free(distr_localcopy);
4305 } while (0);
4306 }
4307
4308 /* distribution [16] */
4309
4310 if(fullcheck) {
4311 unur_reset_errno();
4312 do {
4313 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4314 par = unur_vnrou_new(distr_localcopy);
4315 unur_vnrou_set_pedantic(par,0);
4316 gen = unur_init(par);
4317 if (gen) unur_vnrou_chg_verify(gen,1);
4318 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[16],'~')==UNUR_SUCCESS)?0:1000;
4319 unur_free(gen);
4320
4321 unur_distr_free(distr_localcopy);
4322 } while (0);
4323 }
4324
4325 if(fullcheck) {
4326 unur_reset_errno();
4327 do {
4328 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4329 par = unur_vnrou_new(distr_localcopy);
4330 unur_vnrou_set_pedantic(par,0);
4331 unur_vnrou_set_r(par,0.5);
4332 gen = unur_init(par);
4333 if (gen) unur_vnrou_chg_verify(gen,1);
4334 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[16],'~')==UNUR_SUCCESS)?0:1000;
4335 unur_free(gen);
4336
4337 unur_distr_free(distr_localcopy);
4338 } while (0);
4339 }
4340
4341 if(fullcheck) {
4342 unur_reset_errno();
4343 do {
4344 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4345 par = unur_vnrou_new(distr_localcopy);
4346 unur_vnrou_set_pedantic(par,0);
4347 unur_vnrou_set_r(par,2.);
4348 gen = unur_init(par);
4349 if (gen) unur_vnrou_chg_verify(gen,1);
4350 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[16],'~')==UNUR_SUCCESS)?0:1000;
4351 unur_free(gen);
4352
4353 unur_distr_free(distr_localcopy);
4354 } while (0);
4355 }
4356
4357 if(fullcheck) {
4358 printf("."); fflush(stdout);
4359 }
4360
4361 if(fullcheck) {
4362 printf("."); fflush(stdout);
4363 }
4364
4365 if(fullcheck) {
4366 unur_reset_errno();
4367 do {
4368 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4369 { UNUR_DISTR *dg =NULL;
4370 double mean[] = { -1., 2., -3. };
4371 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4372 par = unur_vnrou_new(distr_localcopy);
4373 unur_vnrou_set_pedantic(par,0);
4374 gen = unur_init(par);
4375 if (gen) {
4376 dg = unur_get_distr(gen);
4377 unur_distr_cvec_set_mean(dg,mean);
4378 unur_distr_cvec_set_covar(dg,covar);
4379 unur_distr_cvec_upd_mode(dg);
4380 unur_distr_cvec_upd_pdfvol(dg);
4381 unur_reinit(gen); }
4382 }
4383 if (gen) unur_vnrou_chg_verify(gen,1);
4384 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[16],'~')==UNUR_SUCCESS)?0:1000;
4385 unur_free(gen);
4386
4387 unur_distr_free(distr_localcopy);
4388 } while (0);
4389 }
4390
4391 /* distribution [17] */
4392
4393 if(TRUE) {
4394 unur_reset_errno();
4395 do {
4396 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
4397 par = unur_vnrou_new(distr_localcopy);
4398 unur_vnrou_set_pedantic(par,0);
4399 gen = unur_init(par);
4400 if (gen) unur_vnrou_chg_verify(gen,1);
4401 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[17],'~')==UNUR_SUCCESS)?0:1000;
4402 unur_free(gen);
4403
4404 unur_distr_free(distr_localcopy);
4405 } while (0);
4406 }
4407
4408 if(TRUE) {
4409 unur_reset_errno();
4410 do {
4411 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
4412 par = unur_vnrou_new(distr_localcopy);
4413 unur_vnrou_set_pedantic(par,0);
4414 unur_vnrou_set_r(par,0.5);
4415 gen = unur_init(par);
4416 if (gen) unur_vnrou_chg_verify(gen,1);
4417 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[17],'~')==UNUR_SUCCESS)?0:1000;
4418 unur_free(gen);
4419
4420 unur_distr_free(distr_localcopy);
4421 } while (0);
4422 }
4423
4424 if(TRUE) {
4425 unur_reset_errno();
4426 do {
4427 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
4428 par = unur_vnrou_new(distr_localcopy);
4429 unur_vnrou_set_pedantic(par,0);
4430 unur_vnrou_set_r(par,2.);
4431 gen = unur_init(par);
4432 if (gen) unur_vnrou_chg_verify(gen,1);
4433 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[17],'~')==UNUR_SUCCESS)?0:1000;
4434 unur_free(gen);
4435
4436 unur_distr_free(distr_localcopy);
4437 } while (0);
4438 }
4439
4440 if(TRUE) {
4441 printf("."); fflush(stdout);
4442 }
4443
4444 if(TRUE) {
4445 printf("."); fflush(stdout);
4446 }
4447
4448 if(TRUE) {
4449 unur_reset_errno();
4450 do {
4451 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
4452 { UNUR_DISTR *dg =NULL;
4453 double mean[] = { -1., 2., -3. };
4454 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4455 par = unur_vnrou_new(distr_localcopy);
4456 unur_vnrou_set_pedantic(par,0);
4457 gen = unur_init(par);
4458 if (gen) {
4459 dg = unur_get_distr(gen);
4460 unur_distr_cvec_set_mean(dg,mean);
4461 unur_distr_cvec_set_covar(dg,covar);
4462 unur_distr_cvec_upd_mode(dg);
4463 unur_distr_cvec_upd_pdfvol(dg);
4464 unur_reinit(gen); }
4465 }
4466 if (gen) unur_vnrou_chg_verify(gen,1);
4467 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[17],'~')==UNUR_SUCCESS)?0:1000;
4468 unur_free(gen);
4469
4470 unur_distr_free(distr_localcopy);
4471 } while (0);
4472 }
4473
4474 /* distribution [18] */
4475
4476 if(TRUE) {
4477 unur_reset_errno();
4478 do {
4479 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
4480 par = unur_vnrou_new(distr_localcopy);
4481 unur_vnrou_set_pedantic(par,0);
4482 gen = unur_init(par);
4483 if (gen) unur_vnrou_chg_verify(gen,1);
4484 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[18],'~')==UNUR_SUCCESS)?0:1000;
4485 unur_free(gen);
4486
4487 unur_distr_free(distr_localcopy);
4488 } while (0);
4489 }
4490
4491 if(TRUE) {
4492 unur_reset_errno();
4493 do {
4494 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
4495 par = unur_vnrou_new(distr_localcopy);
4496 unur_vnrou_set_pedantic(par,0);
4497 unur_vnrou_set_r(par,0.5);
4498 gen = unur_init(par);
4499 if (gen) unur_vnrou_chg_verify(gen,1);
4500 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[18],'~')==UNUR_SUCCESS)?0:1000;
4501 unur_free(gen);
4502
4503 unur_distr_free(distr_localcopy);
4504 } while (0);
4505 }
4506
4507 if(TRUE) {
4508 unur_reset_errno();
4509 do {
4510 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
4511 par = unur_vnrou_new(distr_localcopy);
4512 unur_vnrou_set_pedantic(par,0);
4513 unur_vnrou_set_r(par,2.);
4514 gen = unur_init(par);
4515 if (gen) unur_vnrou_chg_verify(gen,1);
4516 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[18],'~')==UNUR_SUCCESS)?0:1000;
4517 unur_free(gen);
4518
4519 unur_distr_free(distr_localcopy);
4520 } while (0);
4521 }
4522
4523 if(TRUE) {
4524 printf("."); fflush(stdout);
4525 }
4526
4527 if(TRUE) {
4528 printf("."); fflush(stdout);
4529 }
4530
4531 if(TRUE) {
4532 unur_reset_errno();
4533 do {
4534 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
4535 { UNUR_DISTR *dg =NULL;
4536 double mean[] = { -1., 2., -3. };
4537 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4538 par = unur_vnrou_new(distr_localcopy);
4539 unur_vnrou_set_pedantic(par,0);
4540 gen = unur_init(par);
4541 if (gen) {
4542 dg = unur_get_distr(gen);
4543 unur_distr_cvec_set_mean(dg,mean);
4544 unur_distr_cvec_set_covar(dg,covar);
4545 unur_distr_cvec_upd_mode(dg);
4546 unur_distr_cvec_upd_pdfvol(dg);
4547 unur_reinit(gen); }
4548 }
4549 if (gen) unur_vnrou_chg_verify(gen,1);
4550 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[18],'~')==UNUR_SUCCESS)?0:1000;
4551 unur_free(gen);
4552
4553 unur_distr_free(distr_localcopy);
4554 } while (0);
4555 }
4556
4557 /* distribution [19] */
4558
4559 if(TRUE) {
4560 unur_reset_errno();
4561 do {
4562 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
4563 par = unur_vnrou_new(distr_localcopy);
4564 unur_vnrou_set_pedantic(par,0);
4565 gen = unur_init(par);
4566 if (gen) unur_vnrou_chg_verify(gen,1);
4567 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[19],'~')==UNUR_SUCCESS)?0:1000;
4568 unur_free(gen);
4569
4570 unur_distr_free(distr_localcopy);
4571 } while (0);
4572 }
4573
4574 if(TRUE) {
4575 unur_reset_errno();
4576 do {
4577 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
4578 par = unur_vnrou_new(distr_localcopy);
4579 unur_vnrou_set_pedantic(par,0);
4580 unur_vnrou_set_r(par,0.5);
4581 gen = unur_init(par);
4582 if (gen) unur_vnrou_chg_verify(gen,1);
4583 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[19],'~')==UNUR_SUCCESS)?0:1000;
4584 unur_free(gen);
4585
4586 unur_distr_free(distr_localcopy);
4587 } while (0);
4588 }
4589
4590 if(TRUE) {
4591 unur_reset_errno();
4592 do {
4593 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
4594 par = unur_vnrou_new(distr_localcopy);
4595 unur_vnrou_set_pedantic(par,0);
4596 unur_vnrou_set_r(par,2.);
4597 gen = unur_init(par);
4598 if (gen) unur_vnrou_chg_verify(gen,1);
4599 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[19],'~')==UNUR_SUCCESS)?0:1000;
4600 unur_free(gen);
4601
4602 unur_distr_free(distr_localcopy);
4603 } while (0);
4604 }
4605
4606 if(TRUE) {
4607 printf("."); fflush(stdout);
4608 }
4609
4610 if(TRUE) {
4611 printf("."); fflush(stdout);
4612 }
4613
4614 if(TRUE) {
4615 printf("."); fflush(stdout);
4616 }
4617
4618 /* distribution [20] */
4619
4620 if(TRUE) {
4621 unur_reset_errno();
4622 do {
4623 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
4624 par = unur_vnrou_new(distr_localcopy);
4625 unur_vnrou_set_pedantic(par,0);
4626 gen = unur_init(par);
4627 if (gen) unur_vnrou_chg_verify(gen,1);
4628 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[20],'~')==UNUR_SUCCESS)?0:1000;
4629 unur_free(gen);
4630
4631 unur_distr_free(distr_localcopy);
4632 } while (0);
4633 }
4634
4635 if(TRUE) {
4636 unur_reset_errno();
4637 do {
4638 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
4639 par = unur_vnrou_new(distr_localcopy);
4640 unur_vnrou_set_pedantic(par,0);
4641 unur_vnrou_set_r(par,0.5);
4642 gen = unur_init(par);
4643 if (gen) unur_vnrou_chg_verify(gen,1);
4644 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[20],'~')==UNUR_SUCCESS)?0:1000;
4645 unur_free(gen);
4646
4647 unur_distr_free(distr_localcopy);
4648 } while (0);
4649 }
4650
4651 if(TRUE) {
4652 unur_reset_errno();
4653 do {
4654 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
4655 par = unur_vnrou_new(distr_localcopy);
4656 unur_vnrou_set_pedantic(par,0);
4657 unur_vnrou_set_r(par,2.);
4658 gen = unur_init(par);
4659 if (gen) unur_vnrou_chg_verify(gen,1);
4660 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[20],'~')==UNUR_SUCCESS)?0:1000;
4661 unur_free(gen);
4662
4663 unur_distr_free(distr_localcopy);
4664 } while (0);
4665 }
4666
4667 if(TRUE) {
4668 printf("."); fflush(stdout);
4669 }
4670
4671 if(TRUE) {
4672 printf("."); fflush(stdout);
4673 }
4674
4675 if(TRUE) {
4676 unur_reset_errno();
4677 do {
4678 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
4679 { UNUR_DISTR *dg =NULL;
4680 double mean[] = { -1., 2., -3. };
4681 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4682 par = unur_vnrou_new(distr_localcopy);
4683 unur_vnrou_set_pedantic(par,0);
4684 gen = unur_init(par);
4685 if (gen) {
4686 dg = unur_get_distr(gen);
4687 unur_distr_cvec_set_mean(dg,mean);
4688 unur_distr_cvec_set_covar(dg,covar);
4689 unur_distr_cvec_upd_mode(dg);
4690 unur_distr_cvec_upd_pdfvol(dg);
4691 unur_reinit(gen); }
4692 }
4693 if (gen) unur_vnrou_chg_verify(gen,1);
4694 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[20],'~')==UNUR_SUCCESS)?0:1000;
4695 unur_free(gen);
4696
4697 unur_distr_free(distr_localcopy);
4698 } while (0);
4699 }
4700
4701 /* distribution [21] */
4702
4703 if(TRUE) {
4704 unur_reset_errno();
4705 do {
4706 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
4707 par = unur_vnrou_new(distr_localcopy);
4708 unur_vnrou_set_pedantic(par,0);
4709 gen = unur_init(par);
4710 if (gen) unur_vnrou_chg_verify(gen,1);
4711 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[21],'~')==UNUR_SUCCESS)?0:1000;
4712 unur_free(gen);
4713
4714 unur_distr_free(distr_localcopy);
4715 } while (0);
4716 }
4717
4718 if(TRUE) {
4719 unur_reset_errno();
4720 do {
4721 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
4722 par = unur_vnrou_new(distr_localcopy);
4723 unur_vnrou_set_pedantic(par,0);
4724 unur_vnrou_set_r(par,0.5);
4725 gen = unur_init(par);
4726 if (gen) unur_vnrou_chg_verify(gen,1);
4727 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[21],'~')==UNUR_SUCCESS)?0:1000;
4728 unur_free(gen);
4729
4730 unur_distr_free(distr_localcopy);
4731 } while (0);
4732 }
4733
4734 if(TRUE) {
4735 unur_reset_errno();
4736 do {
4737 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
4738 par = unur_vnrou_new(distr_localcopy);
4739 unur_vnrou_set_pedantic(par,0);
4740 unur_vnrou_set_r(par,2.);
4741 gen = unur_init(par);
4742 if (gen) unur_vnrou_chg_verify(gen,1);
4743 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[21],'~')==UNUR_SUCCESS)?0:1000;
4744 unur_free(gen);
4745
4746 unur_distr_free(distr_localcopy);
4747 } while (0);
4748 }
4749
4750 if(TRUE) {
4751 printf("."); fflush(stdout);
4752 }
4753
4754 if(TRUE) {
4755 printf("."); fflush(stdout);
4756 }
4757
4758 if(TRUE) {
4759 printf("."); fflush(stdout);
4760 }
4761
4762 /* distribution [22] */
4763
4764 if(fullcheck) {
4765 unur_reset_errno();
4766 do {
4767 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
4768 par = unur_vnrou_new(distr_localcopy);
4769 unur_vnrou_set_pedantic(par,0);
4770 gen = unur_init(par);
4771 if (gen) unur_vnrou_chg_verify(gen,1);
4772 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[22],'~')==UNUR_SUCCESS)?0:1000;
4773 unur_free(gen);
4774
4775 unur_distr_free(distr_localcopy);
4776 } while (0);
4777 }
4778
4779 if(fullcheck) {
4780 unur_reset_errno();
4781 do {
4782 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
4783 par = unur_vnrou_new(distr_localcopy);
4784 unur_vnrou_set_pedantic(par,0);
4785 unur_vnrou_set_r(par,0.5);
4786 gen = unur_init(par);
4787 if (gen) unur_vnrou_chg_verify(gen,1);
4788 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[22],'~')==UNUR_SUCCESS)?0:1000;
4789 unur_free(gen);
4790
4791 unur_distr_free(distr_localcopy);
4792 } while (0);
4793 }
4794
4795 if(fullcheck) {
4796 unur_reset_errno();
4797 do {
4798 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
4799 par = unur_vnrou_new(distr_localcopy);
4800 unur_vnrou_set_pedantic(par,0);
4801 unur_vnrou_set_r(par,2.);
4802 gen = unur_init(par);
4803 if (gen) unur_vnrou_chg_verify(gen,1);
4804 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[22],'~')==UNUR_SUCCESS)?0:1000;
4805 unur_free(gen);
4806
4807 unur_distr_free(distr_localcopy);
4808 } while (0);
4809 }
4810
4811 if(fullcheck) {
4812 printf("."); fflush(stdout);
4813 }
4814
4815 if(fullcheck) {
4816 printf("."); fflush(stdout);
4817 }
4818
4819 if(fullcheck) {
4820 printf("."); fflush(stdout);
4821 }
4822
4823 /* distribution [23] */
4824
4825 if(TRUE) {
4826 unur_reset_errno();
4827 do {
4828 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[23]);
4829 par = unur_vnrou_new(distr_localcopy);
4830 unur_vnrou_set_pedantic(par,0);
4831 gen = unur_init(par);
4832 if (gen) unur_vnrou_chg_verify(gen,1);
4833 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[23],'~')==UNUR_SUCCESS)?0:1000;
4834 unur_free(gen);
4835
4836 unur_distr_free(distr_localcopy);
4837 } while (0);
4838 }
4839
4840 if(TRUE) {
4841 printf("."); fflush(stdout);
4842 }
4843
4844 if(TRUE) {
4845 unur_reset_errno();
4846 do {
4847 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[23]);
4848 par = unur_vnrou_new(distr_localcopy);
4849 unur_vnrou_set_pedantic(par,0);
4850 unur_vnrou_set_r(par,2.);
4851 gen = unur_init(par);
4852 if (gen) unur_vnrou_chg_verify(gen,1);
4853 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[23],'~')==UNUR_SUCCESS)?0:1000;
4854 unur_free(gen);
4855
4856 unur_distr_free(distr_localcopy);
4857 } while (0);
4858 }
4859
4860 if(TRUE) {
4861 printf("."); fflush(stdout);
4862 }
4863
4864 if(TRUE) {
4865 printf("."); fflush(stdout);
4866 }
4867
4868 if(TRUE) {
4869 printf("."); fflush(stdout);
4870 }
4871
4872 /* distribution [24] */
4873
4874 if(TRUE) {
4875 unur_reset_errno();
4876 do {
4877 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
4878 par = unur_vnrou_new(distr_localcopy);
4879 unur_vnrou_set_pedantic(par,0);
4880 gen = unur_init(par);
4881 if (gen) unur_vnrou_chg_verify(gen,1);
4882 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[24],'~')==UNUR_SUCCESS)?0:1000;
4883 unur_free(gen);
4884
4885 unur_distr_free(distr_localcopy);
4886 } while (0);
4887 }
4888
4889 if(TRUE) {
4890 printf("."); fflush(stdout);
4891 }
4892
4893 if(TRUE) {
4894 unur_reset_errno();
4895 do {
4896 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
4897 par = unur_vnrou_new(distr_localcopy);
4898 unur_vnrou_set_pedantic(par,0);
4899 unur_vnrou_set_r(par,2.);
4900 gen = unur_init(par);
4901 if (gen) unur_vnrou_chg_verify(gen,1);
4902 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[24],'~')==UNUR_SUCCESS)?0:1000;
4903 unur_free(gen);
4904
4905 unur_distr_free(distr_localcopy);
4906 } while (0);
4907 }
4908
4909 if(TRUE) {
4910 printf("."); fflush(stdout);
4911 }
4912
4913 if(TRUE) {
4914 printf("."); fflush(stdout);
4915 }
4916
4917 if(TRUE) {
4918 unur_reset_errno();
4919 do {
4920 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
4921 { UNUR_DISTR *dg =NULL;
4922 double mean[] = { -1., 2., -3. };
4923 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
4924 par = unur_vnrou_new(distr_localcopy);
4925 unur_vnrou_set_pedantic(par,0);
4926 gen = unur_init(par);
4927 if (gen) {
4928 dg = unur_get_distr(gen);
4929 unur_distr_cvec_set_mean(dg,mean);
4930 unur_distr_cvec_set_covar(dg,covar);
4931 unur_distr_cvec_upd_mode(dg);
4932 unur_distr_cvec_upd_pdfvol(dg);
4933 unur_reinit(gen); }
4934 }
4935 if (gen) unur_vnrou_chg_verify(gen,1);
4936 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[24],'~')==UNUR_SUCCESS)?0:1000;
4937 unur_free(gen);
4938
4939 unur_distr_free(distr_localcopy);
4940 } while (0);
4941 }
4942
4943 /* distribution [25] */
4944
4945 if(TRUE) {
4946 unur_reset_errno();
4947 do {
4948 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[25]);
4949 par = unur_vnrou_new(distr_localcopy);
4950 unur_vnrou_set_pedantic(par,0);
4951 gen = unur_init(par);
4952 if (gen) unur_vnrou_chg_verify(gen,1);
4953 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[25],'~')==UNUR_SUCCESS)?0:1000;
4954 unur_free(gen);
4955
4956 unur_distr_free(distr_localcopy);
4957 } while (0);
4958 }
4959
4960 if(TRUE) {
4961 printf("."); fflush(stdout);
4962 }
4963
4964 if(TRUE) {
4965 unur_reset_errno();
4966 do {
4967 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[25]);
4968 par = unur_vnrou_new(distr_localcopy);
4969 unur_vnrou_set_pedantic(par,0);
4970 unur_vnrou_set_r(par,2.);
4971 gen = unur_init(par);
4972 if (gen) unur_vnrou_chg_verify(gen,1);
4973 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[25],'~')==UNUR_SUCCESS)?0:1000;
4974 unur_free(gen);
4975
4976 unur_distr_free(distr_localcopy);
4977 } while (0);
4978 }
4979
4980 if(TRUE) {
4981 printf("."); fflush(stdout);
4982 }
4983
4984 if(TRUE) {
4985 printf("."); fflush(stdout);
4986 }
4987
4988 if(TRUE) {
4989 printf("."); fflush(stdout);
4990 }
4991
4992 /* distribution [26] */
4993
4994 if(TRUE) {
4995 unur_reset_errno();
4996 do {
4997 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
4998 par = unur_vnrou_new(distr_localcopy);
4999 unur_vnrou_set_pedantic(par,0);
5000 gen = unur_init(par);
5001 if (gen) unur_vnrou_chg_verify(gen,1);
5002 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[26],'~')==UNUR_SUCCESS)?0:1000;
5003 unur_free(gen);
5004
5005 unur_distr_free(distr_localcopy);
5006 } while (0);
5007 }
5008
5009 if(TRUE) {
5010 printf("."); fflush(stdout);
5011 }
5012
5013 if(TRUE) {
5014 unur_reset_errno();
5015 do {
5016 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
5017 par = unur_vnrou_new(distr_localcopy);
5018 unur_vnrou_set_pedantic(par,0);
5019 unur_vnrou_set_r(par,2.);
5020 gen = unur_init(par);
5021 if (gen) unur_vnrou_chg_verify(gen,1);
5022 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[26],'~')==UNUR_SUCCESS)?0:1000;
5023 unur_free(gen);
5024
5025 unur_distr_free(distr_localcopy);
5026 } while (0);
5027 }
5028
5029 if(TRUE) {
5030 printf("."); fflush(stdout);
5031 }
5032
5033 if(TRUE) {
5034 printf("."); fflush(stdout);
5035 }
5036
5037 if(TRUE) {
5038 printf("."); fflush(stdout);
5039 }
5040
5041 /* distribution [27] */
5042
5043 if(TRUE) {
5044 unur_reset_errno();
5045 do {
5046 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
5047 par = unur_vnrou_new(distr_localcopy);
5048 unur_vnrou_set_pedantic(par,0);
5049 gen = unur_init(par);
5050 if (gen) unur_vnrou_chg_verify(gen,1);
5051 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[27],'~')==UNUR_SUCCESS)?0:1000;
5052 unur_free(gen);
5053
5054 unur_distr_free(distr_localcopy);
5055 } while (0);
5056 }
5057
5058 if(TRUE) {
5059 unur_reset_errno();
5060 do {
5061 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
5062 par = unur_vnrou_new(distr_localcopy);
5063 unur_vnrou_set_pedantic(par,0);
5064 unur_vnrou_set_r(par,0.5);
5065 gen = unur_init(par);
5066 if (gen) unur_vnrou_chg_verify(gen,1);
5067 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[27],'~')==UNUR_SUCCESS)?0:1000;
5068 unur_free(gen);
5069
5070 unur_distr_free(distr_localcopy);
5071 } while (0);
5072 }
5073
5074 if(TRUE) {
5075 unur_reset_errno();
5076 do {
5077 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
5078 par = unur_vnrou_new(distr_localcopy);
5079 unur_vnrou_set_pedantic(par,0);
5080 unur_vnrou_set_r(par,2.);
5081 gen = unur_init(par);
5082 if (gen) unur_vnrou_chg_verify(gen,1);
5083 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[27],'~')==UNUR_SUCCESS)?0:1000;
5084 unur_free(gen);
5085
5086 unur_distr_free(distr_localcopy);
5087 } while (0);
5088 }
5089
5090 if(TRUE) {
5091 printf("."); fflush(stdout);
5092 }
5093
5094 if(TRUE) {
5095 printf("."); fflush(stdout);
5096 }
5097
5098 if(TRUE) {
5099 unur_reset_errno();
5100 do {
5101 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
5102 { UNUR_DISTR *dg =NULL;
5103 double mean[] = { -1., 2., -3. };
5104 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
5105 par = unur_vnrou_new(distr_localcopy);
5106 unur_vnrou_set_pedantic(par,0);
5107 gen = unur_init(par);
5108 if (gen) {
5109 dg = unur_get_distr(gen);
5110 unur_distr_cvec_set_mean(dg,mean);
5111 unur_distr_cvec_set_covar(dg,covar);
5112 unur_distr_cvec_upd_mode(dg);
5113 unur_distr_cvec_upd_pdfvol(dg);
5114 unur_reinit(gen); }
5115 }
5116 if (gen) unur_vnrou_chg_verify(gen,1);
5117 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[27],'~')==UNUR_SUCCESS)?0:1000;
5118 unur_free(gen);
5119
5120 unur_distr_free(distr_localcopy);
5121 } while (0);
5122 }
5123
5124 /* distribution [28] */
5125
5126 if(fullcheck) {
5127 unur_reset_errno();
5128 do {
5129 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
5130 par = unur_vnrou_new(distr_localcopy);
5131 unur_vnrou_set_pedantic(par,0);
5132 gen = unur_init(par);
5133 if (gen) unur_vnrou_chg_verify(gen,1);
5134 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[28],'~')==UNUR_SUCCESS)?0:1000;
5135 unur_free(gen);
5136
5137 unur_distr_free(distr_localcopy);
5138 } while (0);
5139 }
5140
5141 if(fullcheck) {
5142 unur_reset_errno();
5143 do {
5144 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
5145 par = unur_vnrou_new(distr_localcopy);
5146 unur_vnrou_set_pedantic(par,0);
5147 unur_vnrou_set_r(par,0.5);
5148 gen = unur_init(par);
5149 if (gen) unur_vnrou_chg_verify(gen,1);
5150 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[28],'~')==UNUR_SUCCESS)?0:1000;
5151 unur_free(gen);
5152
5153 unur_distr_free(distr_localcopy);
5154 } while (0);
5155 }
5156
5157 if(fullcheck) {
5158 unur_reset_errno();
5159 do {
5160 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
5161 par = unur_vnrou_new(distr_localcopy);
5162 unur_vnrou_set_pedantic(par,0);
5163 unur_vnrou_set_r(par,2.);
5164 gen = unur_init(par);
5165 if (gen) unur_vnrou_chg_verify(gen,1);
5166 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[28],'~')==UNUR_SUCCESS)?0:1000;
5167 unur_free(gen);
5168
5169 unur_distr_free(distr_localcopy);
5170 } while (0);
5171 }
5172
5173 if(fullcheck) {
5174 printf("."); fflush(stdout);
5175 }
5176
5177 if(fullcheck) {
5178 printf("."); fflush(stdout);
5179 }
5180
5181 if(fullcheck) {
5182 unur_reset_errno();
5183 do {
5184 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
5185 { UNUR_DISTR *dg =NULL;
5186 double mean[] = { -1., 2., -3. };
5187 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
5188 par = unur_vnrou_new(distr_localcopy);
5189 unur_vnrou_set_pedantic(par,0);
5190 gen = unur_init(par);
5191 if (gen) {
5192 dg = unur_get_distr(gen);
5193 unur_distr_cvec_set_mean(dg,mean);
5194 unur_distr_cvec_set_covar(dg,covar);
5195 unur_distr_cvec_upd_mode(dg);
5196 unur_distr_cvec_upd_pdfvol(dg);
5197 unur_reinit(gen); }
5198 }
5199 if (gen) unur_vnrou_chg_verify(gen,1);
5200 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[28],'~')==UNUR_SUCCESS)?0:1000;
5201 unur_free(gen);
5202
5203 unur_distr_free(distr_localcopy);
5204 } while (0);
5205 }
5206
5207 /* distribution [29] */
5208
5209 if(fullcheck) {
5210 unur_reset_errno();
5211 do {
5212 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
5213 par = unur_vnrou_new(distr_localcopy);
5214 unur_vnrou_set_pedantic(par,0);
5215 gen = unur_init(par);
5216 if (gen) unur_vnrou_chg_verify(gen,1);
5217 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[29],'~')==UNUR_SUCCESS)?0:1000;
5218 unur_free(gen);
5219
5220 unur_distr_free(distr_localcopy);
5221 } while (0);
5222 }
5223
5224 if(fullcheck) {
5225 unur_reset_errno();
5226 do {
5227 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
5228 par = unur_vnrou_new(distr_localcopy);
5229 unur_vnrou_set_pedantic(par,0);
5230 unur_vnrou_set_r(par,0.5);
5231 gen = unur_init(par);
5232 if (gen) unur_vnrou_chg_verify(gen,1);
5233 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[29],'~')==UNUR_SUCCESS)?0:1000;
5234 unur_free(gen);
5235
5236 unur_distr_free(distr_localcopy);
5237 } while (0);
5238 }
5239
5240 if(fullcheck) {
5241 unur_reset_errno();
5242 do {
5243 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
5244 par = unur_vnrou_new(distr_localcopy);
5245 unur_vnrou_set_pedantic(par,0);
5246 unur_vnrou_set_r(par,2.);
5247 gen = unur_init(par);
5248 if (gen) unur_vnrou_chg_verify(gen,1);
5249 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[29],'~')==UNUR_SUCCESS)?0:1000;
5250 unur_free(gen);
5251
5252 unur_distr_free(distr_localcopy);
5253 } while (0);
5254 }
5255
5256 if(fullcheck) {
5257 printf("."); fflush(stdout);
5258 }
5259
5260 if(fullcheck) {
5261 printf("."); fflush(stdout);
5262 }
5263
5264 if(fullcheck) {
5265 unur_reset_errno();
5266 do {
5267 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
5268 { UNUR_DISTR *dg =NULL;
5269 double mean[] = { -1., 2., -3. };
5270 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
5271 par = unur_vnrou_new(distr_localcopy);
5272 unur_vnrou_set_pedantic(par,0);
5273 gen = unur_init(par);
5274 if (gen) {
5275 dg = unur_get_distr(gen);
5276 unur_distr_cvec_set_mean(dg,mean);
5277 unur_distr_cvec_set_covar(dg,covar);
5278 unur_distr_cvec_upd_mode(dg);
5279 unur_distr_cvec_upd_pdfvol(dg);
5280 unur_reinit(gen); }
5281 }
5282 if (gen) unur_vnrou_chg_verify(gen,1);
5283 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[29],'~')==UNUR_SUCCESS)?0:1000;
5284 unur_free(gen);
5285
5286 unur_distr_free(distr_localcopy);
5287 } while (0);
5288 }
5289
5290 /* distribution [30] */
5291
5292 if(TRUE) {
5293 unur_reset_errno();
5294 do {
5295 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
5296 par = unur_vnrou_new(distr_localcopy);
5297 unur_vnrou_set_pedantic(par,0);
5298 gen = unur_init(par);
5299 if (gen) unur_vnrou_chg_verify(gen,1);
5300 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[30],'~')==UNUR_SUCCESS)?0:1000;
5301 unur_free(gen);
5302
5303 unur_distr_free(distr_localcopy);
5304 } while (0);
5305 }
5306
5307 if(TRUE) {
5308 unur_reset_errno();
5309 do {
5310 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
5311 par = unur_vnrou_new(distr_localcopy);
5312 unur_vnrou_set_pedantic(par,0);
5313 unur_vnrou_set_r(par,0.5);
5314 gen = unur_init(par);
5315 if (gen) unur_vnrou_chg_verify(gen,1);
5316 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[30],'~')==UNUR_SUCCESS)?0:1000;
5317 unur_free(gen);
5318
5319 unur_distr_free(distr_localcopy);
5320 } while (0);
5321 }
5322
5323 if(TRUE) {
5324 unur_reset_errno();
5325 do {
5326 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
5327 par = unur_vnrou_new(distr_localcopy);
5328 unur_vnrou_set_pedantic(par,0);
5329 unur_vnrou_set_r(par,2.);
5330 gen = unur_init(par);
5331 if (gen) unur_vnrou_chg_verify(gen,1);
5332 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[30],'~')==UNUR_SUCCESS)?0:1000;
5333 unur_free(gen);
5334
5335 unur_distr_free(distr_localcopy);
5336 } while (0);
5337 }
5338
5339 if(TRUE) {
5340 printf("."); fflush(stdout);
5341 }
5342
5343 if(TRUE) {
5344 printf("."); fflush(stdout);
5345 }
5346
5347 if(TRUE) {
5348 unur_reset_errno();
5349 do {
5350 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
5351 { UNUR_DISTR *dg =NULL;
5352 double mean[] = { -1., 2., -3. };
5353 double covar[] = { 2., 2., 0.9, 2., 4., 3., 0.9, 3., 3. };
5354 par = unur_vnrou_new(distr_localcopy);
5355 unur_vnrou_set_pedantic(par,0);
5356 gen = unur_init(par);
5357 if (gen) {
5358 dg = unur_get_distr(gen);
5359 unur_distr_cvec_set_mean(dg,mean);
5360 unur_distr_cvec_set_covar(dg,covar);
5361 unur_distr_cvec_upd_mode(dg);
5362 unur_distr_cvec_upd_pdfvol(dg);
5363 unur_reinit(gen); }
5364 }
5365 if (gen) unur_vnrou_chg_verify(gen,1);
5366 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[30],'~')==UNUR_SUCCESS)?0:1000;
5367 unur_free(gen);
5368
5369 unur_distr_free(distr_localcopy);
5370 } while (0);
5371 }
5372
5373 /* distribution [31] */
5374
5375 if(TRUE) {
5376 unur_reset_errno();
5377 do {
5378 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
5379 par = unur_vnrou_new(distr_localcopy);
5380 unur_vnrou_set_pedantic(par,0);
5381 gen = unur_init(par);
5382 if (gen) unur_vnrou_chg_verify(gen,1);
5383 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[31],'~')==UNUR_SUCCESS)?0:1000;
5384 unur_free(gen);
5385
5386 unur_distr_free(distr_localcopy);
5387 } while (0);
5388 }
5389
5390 if(TRUE) {
5391 unur_reset_errno();
5392 do {
5393 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
5394 par = unur_vnrou_new(distr_localcopy);
5395 unur_vnrou_set_pedantic(par,0);
5396 unur_vnrou_set_r(par,0.5);
5397 gen = unur_init(par);
5398 if (gen) unur_vnrou_chg_verify(gen,1);
5399 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[31],'~')==UNUR_SUCCESS)?0:1000;
5400 unur_free(gen);
5401
5402 unur_distr_free(distr_localcopy);
5403 } while (0);
5404 }
5405
5406 if(TRUE) {
5407 unur_reset_errno();
5408 do {
5409 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
5410 par = unur_vnrou_new(distr_localcopy);
5411 unur_vnrou_set_pedantic(par,0);
5412 unur_vnrou_set_r(par,2.);
5413 gen = unur_init(par);
5414 if (gen) unur_vnrou_chg_verify(gen,1);
5415 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[31],'~')==UNUR_SUCCESS)?0:1000;
5416 unur_free(gen);
5417
5418 unur_distr_free(distr_localcopy);
5419 } while (0);
5420 }
5421
5422 if(TRUE) {
5423 printf("."); fflush(stdout);
5424 }
5425
5426 if(TRUE) {
5427 printf("."); fflush(stdout);
5428 }
5429
5430 if(TRUE) {
5431 printf("."); fflush(stdout);
5432 }
5433
5434 /* distribution [32] */
5435
5436 if(TRUE) {
5437 unur_reset_errno();
5438 do {
5439 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
5440 par = unur_vnrou_new(distr_localcopy);
5441 unur_vnrou_set_pedantic(par,0);
5442 gen = unur_init(par);
5443 if (gen) unur_vnrou_chg_verify(gen,1);
5444 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[32],'~')==UNUR_SUCCESS)?0:1000;
5445 unur_free(gen);
5446
5447 unur_distr_free(distr_localcopy);
5448 } while (0);
5449 }
5450
5451 if(TRUE) {
5452 unur_reset_errno();
5453 do {
5454 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
5455 par = unur_vnrou_new(distr_localcopy);
5456 unur_vnrou_set_pedantic(par,0);
5457 unur_vnrou_set_r(par,0.5);
5458 gen = unur_init(par);
5459 if (gen) unur_vnrou_chg_verify(gen,1);
5460 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[32],'~')==UNUR_SUCCESS)?0:1000;
5461 unur_free(gen);
5462
5463 unur_distr_free(distr_localcopy);
5464 } while (0);
5465 }
5466
5467 if(TRUE) {
5468 unur_reset_errno();
5469 do {
5470 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
5471 par = unur_vnrou_new(distr_localcopy);
5472 unur_vnrou_set_pedantic(par,0);
5473 unur_vnrou_set_r(par,2.);
5474 gen = unur_init(par);
5475 if (gen) unur_vnrou_chg_verify(gen,1);
5476 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[32],'~')==UNUR_SUCCESS)?0:1000;
5477 unur_free(gen);
5478
5479 unur_distr_free(distr_localcopy);
5480 } while (0);
5481 }
5482
5483 if(TRUE) {
5484 printf("."); fflush(stdout);
5485 }
5486
5487 if(TRUE) {
5488 printf("."); fflush(stdout);
5489 }
5490
5491 if(TRUE) {
5492 printf("."); fflush(stdout);
5493 }
5494
5495 /* distribution [33] */
5496
5497 if(TRUE) {
5498 unur_reset_errno();
5499 do {
5500 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
5501 par = unur_vnrou_new(distr_localcopy);
5502 unur_vnrou_set_pedantic(par,0);
5503 gen = unur_init(par);
5504 if (gen) unur_vnrou_chg_verify(gen,1);
5505 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[33],'~')==UNUR_SUCCESS)?0:1000;
5506 unur_free(gen);
5507
5508 unur_distr_free(distr_localcopy);
5509 } while (0);
5510 }
5511
5512 if(TRUE) {
5513 unur_reset_errno();
5514 do {
5515 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
5516 par = unur_vnrou_new(distr_localcopy);
5517 unur_vnrou_set_pedantic(par,0);
5518 unur_vnrou_set_r(par,0.5);
5519 gen = unur_init(par);
5520 if (gen) unur_vnrou_chg_verify(gen,1);
5521 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[33],'~')==UNUR_SUCCESS)?0:1000;
5522 unur_free(gen);
5523
5524 unur_distr_free(distr_localcopy);
5525 } while (0);
5526 }
5527
5528 if(TRUE) {
5529 unur_reset_errno();
5530 do {
5531 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
5532 par = unur_vnrou_new(distr_localcopy);
5533 unur_vnrou_set_pedantic(par,0);
5534 unur_vnrou_set_r(par,2.);
5535 gen = unur_init(par);
5536 if (gen) unur_vnrou_chg_verify(gen,1);
5537 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[33],'~')==UNUR_SUCCESS)?0:1000;
5538 unur_free(gen);
5539
5540 unur_distr_free(distr_localcopy);
5541 } while (0);
5542 }
5543
5544 if(TRUE) {
5545 printf("."); fflush(stdout);
5546 }
5547
5548 if(TRUE) {
5549 printf("."); fflush(stdout);
5550 }
5551
5552 if(TRUE) {
5553 printf("."); fflush(stdout);
5554 }
5555
5556 /* distribution [34] */
5557
5558 if(TRUE) {
5559 unur_reset_errno();
5560 do {
5561 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
5562 par = unur_vnrou_new(distr_localcopy);
5563 unur_vnrou_set_pedantic(par,0);
5564 gen = unur_init(par);
5565 if (gen) unur_vnrou_chg_verify(gen,1);
5566 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[34],'0')==UNUR_SUCCESS)?0:1000;
5567 unur_free(gen);
5568
5569 unur_distr_free(distr_localcopy);
5570 } while (0);
5571 }
5572
5573 if(TRUE) {
5574 unur_reset_errno();
5575 do {
5576 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
5577 par = unur_vnrou_new(distr_localcopy);
5578 unur_vnrou_set_pedantic(par,0);
5579 unur_vnrou_set_r(par,0.5);
5580 gen = unur_init(par);
5581 if (gen) unur_vnrou_chg_verify(gen,1);
5582 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[34],'0')==UNUR_SUCCESS)?0:1000;
5583 unur_free(gen);
5584
5585 unur_distr_free(distr_localcopy);
5586 } while (0);
5587 }
5588
5589 if(TRUE) {
5590 unur_reset_errno();
5591 do {
5592 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
5593 par = unur_vnrou_new(distr_localcopy);
5594 unur_vnrou_set_pedantic(par,0);
5595 unur_vnrou_set_r(par,2.);
5596 gen = unur_init(par);
5597 if (gen) unur_vnrou_chg_verify(gen,1);
5598 n_tests_failed += (run_validate_verifyhat(TESTLOG,0,gen,distr[34],'0')==UNUR_SUCCESS)?0:1000;
5599 unur_free(gen);
5600
5601 unur_distr_free(distr_localcopy);
5602 } while (0);
5603 }
5604
5605 if(TRUE) {
5606 printf("."); fflush(stdout);
5607 }
5608
5609 if(TRUE) {
5610 printf("."); fflush(stdout);
5611 }
5612
5613 if(TRUE) {
5614 printf("."); fflush(stdout);
5615 }
5616
5617 /* timing */
5618 stopwatch_print(TESTLOG,"\n<*>time = %.0f ms\n", stopwatch_lap(&watch));
5619
5620
5621 /* free distributions */
5622 unur_distr_free(distr[0]);
5623 unur_distr_free(distr[1]);
5624 unur_distr_free(distr[2]);
5625 unur_distr_free(distr[3]);
5626 unur_distr_free(distr[4]);
5627 unur_distr_free(distr[5]);
5628 unur_distr_free(distr[6]);
5629 unur_distr_free(distr[7]);
5630 unur_distr_free(distr[8]);
5631 unur_distr_free(distr[9]);
5632 unur_distr_free(distr[10]);
5633 unur_distr_free(distr[11]);
5634 unur_distr_free(distr[12]);
5635 unur_distr_free(distr[13]);
5636 unur_distr_free(distr[14]);
5637 unur_distr_free(distr[15]);
5638 unur_distr_free(distr[16]);
5639 unur_distr_free(distr[17]);
5640 unur_distr_free(distr[18]);
5641 unur_distr_free(distr[19]);
5642 unur_distr_free(distr[20]);
5643 unur_distr_free(distr[21]);
5644 unur_distr_free(distr[22]);
5645 unur_distr_free(distr[23]);
5646 unur_distr_free(distr[24]);
5647 unur_distr_free(distr[25]);
5648 unur_distr_free(distr[26]);
5649 unur_distr_free(distr[27]);
5650 unur_distr_free(distr[28]);
5651 unur_distr_free(distr[29]);
5652 unur_distr_free(distr[30]);
5653 unur_distr_free(distr[31]);
5654 unur_distr_free(distr[32]);
5655 unur_distr_free(distr[33]);
5656 unur_distr_free(distr[34]);
5657
5658 /* test finished */
5659 test_ok &= (n_tests_failed>CHI2_FAILURES_TOLERATED) ? 0 : 1;
5660 /* we accept CHI2_FAILURES_TOLERATED failures */
5661 (n_tests_failed>CHI2_FAILURES_TOLERATED) ? printf(" ==> failed] ") : printf(" ==> ok] ");
5662
5663 /* prevent compiler from making useless annoying warnings */
5664 distr[0] = NULL;
5665 par = NULL;
5666 gen = NULL;
5667 darray = NULL;
5668 fpm[0] = 0.;
5669
5670 } /* end of test_validate */
5671
5672
5673 /*---------------------------------------------------------------------------*/
5674 /* run generator in verifying mode */
5675
run_verify_generator(FILE * LOG,int line,UNUR_PAR * par)5676 void run_verify_generator( FILE *LOG, int line, UNUR_PAR *par )
5677 {
5678 UNUR_GEN *gen;
5679 int i;
5680
5681 /* switch to verifying mode */
5682 unur_vnrou_set_verify(par,1);
5683
5684 /* initialize generator */
5685 gen = unur_init( par ); abort_if_NULL(LOG, line, gen);
5686
5687 /* run generator */
5688 for (i=0; i<VIOLATE_SAMPLE_SIZE; i++)
5689 unur_sample_cont(gen);
5690
5691 /* destroy generator */
5692 unur_free(gen);
5693
5694 } /* end of run_verify_generator() */
5695
5696
5697 /*---------------------------------------------------------------------------*/
5698
main(void)5699 int main(void)
5700 {
5701 unsigned long seed;
5702 char *str_seed, *str_tail;
5703
5704 /* start stop watch */
5705 stopwatch_init();
5706 stopwatch_start(&watch);
5707
5708 /* open log file for unuran and set output stream for unuran messages */
5709 UNURANLOG = fopen( "t_vnrou_unuran.log","w" );
5710 abort_if_NULL( stderr,-1, UNURANLOG );
5711 unur_set_stream( UNURANLOG );
5712
5713 /* open log file for testing */
5714 TESTLOG = fopen( "t_vnrou_test.log","w" );
5715 abort_if_NULL( stderr,-1, TESTLOG );
5716
5717 /* seed for uniform generators */
5718
5719 /* seed set by environment */
5720 str_seed = getenv("SEED");
5721
5722 if (str_seed != NULL) {
5723 seed = strtol(str_seed, &str_tail, 10);
5724 if (seed == 0u)
5725 seed = 819902;
5726 }
5727 else {
5728 #ifdef SEED
5729 seed = SEED;
5730 #else
5731 seed = 819902;
5732 #endif
5733 }
5734
5735 /* seed build-in uniform generators */
5736 unur_urng_MRG31k3p_seed(NULL,seed);
5737 unur_urng_fish_seed(NULL,seed);
5738 unur_urng_mstd_seed(NULL,seed);
5739
5740 /* seed uniform random number generator */
5741 #ifdef UNUR_URNG_UNURAN
5742 # ifdef UNUR_URNG_DEFAULT_RNGSTREAM
5743 {
5744 unsigned long sa[6];
5745 int i;
5746 for (i=0; i<6; i++) sa[i] = seed;
5747 RngStream_SetPackageSeed(sa);
5748 }
5749 # else
5750 if (unur_urng_seed(NULL,seed) != UNUR_SUCCESS) {
5751 fprintf(stderr,"WARNING: Seed could not be set at random\n");
5752 seed = ~0u;
5753 }
5754 # endif /* UNUR_URNG_DEFAULT_RNGSTREAM */
5755 #endif /* UNUR_URNG_UNURAN */
5756
5757 /* set default debugging flag */
5758 unur_set_default_debug(UNUR_DEBUG_ALL);
5759
5760 /* detect required check mode */
5761 fullcheck = (getenv("UNURANFULLCHECK")==NULL) ? FALSE : TRUE;
5762
5763 /* write header into log file */
5764 print_test_log_header( TESTLOG, seed, fullcheck );
5765
5766 /* set timer for sending SIGALRM signal */
5767 set_alarm(TESTLOG);
5768
5769 /* start test */
5770 printf("vnrou: ");
5771
5772 /* run tests */
5773 test_new();
5774 test_set();
5775 test_get();
5776 test_chg();
5777 test_reinit();
5778 test_sample();
5779 test_validate();
5780
5781
5782 /* test finished */
5783 printf("\n"); fflush(stdout);
5784
5785 /* close log files */
5786 fprintf(TESTLOG,"\n====================================================\n\n");
5787 if (test_ok)
5788 fprintf(TESTLOG,"All tests PASSED.\n");
5789 else
5790 fprintf(TESTLOG,"Test(s) FAILED.\n");
5791
5792 /* timing */
5793 stopwatch_print(TESTLOG,"\n<*>total time = %.0f ms\n\n", stopwatch_stop(&watch));
5794
5795 fclose(UNURANLOG);
5796 fclose(TESTLOG);
5797
5798 /* free memory */
5799 compare_free_memory();
5800 unur_urng_free(unur_get_default_urng());
5801 unur_urng_free(unur_get_default_urng_aux());
5802
5803 /* exit */
5804 exit( (test_ok) ? EXIT_SUCCESS : EXIT_FAILURE );
5805
5806 } /* end of main */
5807
5808