********************************************************************************
**********************      Testing data collectors       **********************
********************************************************************************
Using seed: 0x34f05c64d7ad598f

Testing data summaries
Declaring local variable data summary on stack and initializing it: cmb_datasummary_initialize
Drawing 1000000 U(0,1) samples and adding to data summary: cmb_datasummary_add

Basic summary reporting functions:
--------------------------------------------------------------------------------
cmb_datasummary_count:	1000000
cmb_datasummary_min:	1.140e-07
cmb_datasummary_max:	   1.000
cmb_datasummary_mean:	  0.4999	(expected   0.5000)
cmb_datasummary_variance:	 0.08335	(expected  0.08333)
cmb_datasummary_stddev:	  0.2887	(expected   0.2887)
cmb_datasummary_skewness:	0.0009428	(expected    0.000)
cmb_datasummary_kurtosis:	  -1.200	(expected   -1.200)
--------------------------------------------------------------------------------

Summary: cmb_datasummary_print
N  1000000  Mean   0.4999  StdDev   0.2887  Variance  0.08335  Skewness 0.0009428  Kurtosis   -1.200
Summary without lead-ins:
 1000000	  0.4999	  0.2887	 0.08335	0.0009428	  -1.200
--------------------------------------------------------------------------------

Once more, now on the heap: cmb_datasummary_create()
Drawing 1000000 U(0,1) samples and adding to data summary: cmb_datasummary_add

Summary: cmb_datasummary_print
N  1000000  Mean    1.500  StdDev   0.2886  Variance  0.08329  Skewness 0.001050  Kurtosis   -1.200

Merging the two data summaries: cmb_datasummary_merge ... Returned 2000000 samples
Merged summary: cmb_datasummary_print
N  2000000  Mean    1.000  StdDev   0.5774  Variance   0.3334  Skewness -9.700e-05  Kurtosis   -1.200

Cleaning up: cmb_datasummary_terminate, cmb_datasummary_destroy
================================================================================

Testing weighted data summaries
Weighted and unweighted in parallel, all weights set to 1.0
Drawing 1000000 U(0,1) samples...

		Unweighted	Weighted	Expected:
--------------------------------------------------------------------------------
Count:   	1000000 	1000000 	1000000
Minimum: 	4.164e-06	4.164e-06	   0.000
Maximum: 	   1.000	   1.000	   1.000
Mean:    	  0.5001	  0.5001	  0.5000
Variance:	 0.08342	 0.08342	 0.08333
StdDev:  	  0.2888	  0.2888	  0.2887
Skewness:	0.0003239	0.0003239	   0.000
Kurtosis:	  -1.200	  -1.200	  -1.200
--------------------------------------------------------------------------------

Summary: cmb_wtdsummary_print
N  1000000  Mean   0.5001  StdDev   0.2888  Variance  0.08342  Skewness 0.0003239  Kurtosis   -1.200
Summary without lead-ins, tab separated:
 1000000	  0.5001	  0.2888	 0.08342	0.0003239	  -1.200

Cleaning up: cmb_datasummary_reset, cmb_wtdsummary_reset
--------------------------------------------------------------------------------

Drawing 1000000 new x ~ U(0,1) samples weighted by 1.5 - x
Sum of weights: 1.000e+06
Weighted:   N  1000000  Mean   0.4166  StdDev   0.2762  Variance  0.07628  Skewness   0.3411  Kurtosis   -1.000
Unweighted: N  1000000  Mean   0.4998  StdDev   0.2885  Variance  0.08323  Skewness 0.001611  Kurtosis   -1.200
--------------------------------------------------------------------------------

Creating another weighted data summary on the heap: cmb_wtdsummary_create
Drawing 1000000 new x ~ U(0,1) samples randomly weighted on U(1,5)
Summary: cmb_wtdsummary_print
Old: N  1000000  Mean   0.4166  StdDev   0.2762  Variance  0.07628  Skewness   0.3411  Kurtosis   -1.000
New: N  1000000  Mean   0.5002  StdDev   0.5002  Variance   0.2502  Skewness -0.0005643  Kurtosis   -2.400

Merging the two: cmb_wtdsummary_merge ... Returned 2000000
Merged summary: cmb_wtdsummary_print
N  2000000  Mean   0.4793  StdDev   0.4072  Variance   0.1658  Skewness  0.06095  Kurtosis   -2.094
Cleaning up: cmb_wtdsummary_terminate, cmb_wtdsummary_destroy
================================================================================

Testing datasets
Local variable dataset on stack: cmb_dataset_initialize
Drawing 25 U(0,1) samples: cmb_dataset_add
Content of dataset: cmb_dataset_print:
0.993537
0.293918
0.434949
0.720935
0.544441
0.00733059
0.393971
0.387977
0.639045
0.620231
0.632331
0.159111
0.288061
0.314446
0.918854
0.291165
0.598377
0.403414
0.633186
0.818452
0.606683
0.705748
0.514235
0.315864
0.258731

Making a copy: cmb_dataset_copy ... Returned 25

Content of copy: cmb_dataset_print:
0.993537
0.293918
0.434949
0.720935
0.544441
0.00733059
0.393971
0.387977
0.639045
0.620231
0.632331
0.159111
0.288061
0.314446
0.918854
0.291165
0.598377
0.403414
0.633186
0.818452
0.606683
0.705748
0.514235
0.315864
0.258731

Sorting the copy: cmb_dataset_sort ...
Content of copy: cmb_dataset_print:
0.00733059
0.159111
0.258731
0.288061
0.291165
0.293918
0.314446
0.315864
0.387977
0.393971
0.403414
0.434949
0.514235
0.544441
0.598377
0.606683
0.620231
0.632331
0.633186
0.639045
0.705748
0.720935
0.818452
0.918854
0.993537

Clearing the copy: cmb_dataset_reset

Basic dataset reporting functions:
--------------------------------------------------------------------------------
cmb_dataset_count:	25
cmb_dataset_min:	0.007331
cmb_dataset_max:	  0.9935
cmb_dataset_median:	  0.5142
--------------------------------------------------------------------------------
Five number summary of dataset: cmb_dataset_fivenum_print ...
Min 0.007331  First   0.3042  Median   0.5142  Third   0.6361  Max   0.9935

Clearing the dataset; cmb_dataset_reset

Drawing 1000000 U(0,1) samples: cmb_dataset_add

Summarizing the dataset: cmb_dataset_summarize ...returned 1000000
Summary generated from the dataset:
N  1000000  Mean   0.5001  StdDev   0.2886  Variance  0.08332  Skewness -0.001067  Kurtosis   -1.200

Unweighted histogram: cmb_dataset_histogram_print
--------------------------------------------------------------------------------
( -Infinity,  8.578e-07)   |
[ 8.578e-07,      1.000)   |##################################################
[     1.000,  Infinity )   |-
--------------------------------------------------------------------------------

Autocorrelation coefficients: cmb_dataset_ACF

ACF correlogram: cmb_dataset_correlogram_print
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.001                                  |-
   2   0.000                                  |-
   3   0.001                                  |-
   4   0.000                                  |-
   5  -0.001                                 -|
   6   0.000                                  |-
   7   0.000                                  |-
   8  -0.000                                 -|
   9   0.002                                  |-
  10   0.001                                  |-
  11  -0.000                                 -|
  12  -0.000                                 -|
  13   0.000                                  |-
  14   0.000                                  |-
  15   0.002                                  |-
  16  -0.002                                 -|
  17  -0.001                                 -|
  18  -0.000                                 -|
  19  -0.000                                 -|
  20   0.001                                  |-
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:cmb_dataset_PACF

PACF correlogram: cmb_dataset_correlogram_print
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.001                                  |-
   2   0.000                                  |-
   3   0.001                                  |-
   4   0.000                                  |-
   5  -0.001                                 -|
   6   0.000                                  |-
   7   0.000                                  |-
   8  -0.000                                 -|
   9   0.002                                  |-
  10   0.001                                  |-
  11  -0.000                                 -|
  12  -0.000                                 -|
  13   0.000                                  |-
  14   0.000                                  |-
  15   0.002                                  |-
  16  -0.002                                 -|
  17  -0.001                                 -|
  18  -0.000                                 -|
  19  -0.000                                 -|
  20   0.001                                  |-
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Creating a new dataset on the heap: cmb_dataset_create
Filling it with noisy sine curves ...
N  1000000  Mean 0.0004717  StdDev    1.500  Variance    2.251  Skewness -0.0003391  Kurtosis   -1.185
--------------------------------------------------------------------------------
( -Infinity,     -4.118)   |
[    -4.118,     -3.196)   |-
[    -3.196,     -2.274)   |############-
[    -2.274,     -1.352)   |##################################################
[    -1.352,    -0.4295)   |#############################################-
[   -0.4295,     0.4928)   |########################################=
[    0.4928,      1.415)   |##############################################=
[     1.415,      2.337)   |################################################-
[     2.337,      3.260)   |##########-
[     3.260,      4.182)   |-
[     4.182,  Infinity )   |-
--------------------------------------------------------------------------------

Autocorrelation coefficients:
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.719                                  |#######################=
   2   0.275                                  |#########-
   3  -0.275                        -#########|
   4  -0.719          =#######################|
   5  -0.889    -#############################|
   6  -0.719          =#######################|
   7  -0.275                        -#########|
   8   0.275                                  |#########-
   9   0.719                                  |#######################=
  10   0.889                                  |#############################-
  11   0.719                                  |#######################=
  12   0.275                                  |#########-
  13  -0.275                        -#########|
  14  -0.719          =#######################|
  15  -0.889    -#############################|
  16  -0.719          =#######################|
  17  -0.275                        -#########|
  18   0.275                                  |#########-
  19   0.719                                  |#######################=
  20   0.889                                  |#############################-
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.719                                  |#######################=
   2  -0.502                 =################|
   3  -0.582              -###################|
   4  -0.498                 -################|
   5  -0.382                     =############|
   6  -0.222                          -#######|
   7  -0.037                                -#|
   8   0.117                                  |###=
   9   0.196                                  |######-
  10   0.195                                  |######-
  11   0.132                                  |####-
  12   0.036                                  |#-
  13  -0.061                               -##|
  14  -0.122                             -####|
  15  -0.132                             -####|
  16  -0.095                              -###|
  17  -0.028                                 =|
  18   0.041                                  |#-
  19   0.090                                  |##=
  20   0.099                                  |###-
--------------------------------------------------------------------------------

Cleaning up: cmb_datasummary_terminate, cmb_dataset_destroy
================================================================================

Testing timeseries
Creating timeseries: cmb_timeseries_create
Drawing 1000000 x = U(0,1) samples at intervals Exp(2 - x): cmb_timeseries_add
Finalizing at time 1.50029e+06: cmb_timeseries_finalize

Basic timeseries reporting functions:
--------------------------------------------------------------------------------
cmb_timeseries_count:	1000001
cmb_timeseries_min:	5.185e-07
cmb_timeseries_max:	   1.000
--------------------------------------------------------------------------------

Summarizing: cmb_timeseries_summarize, cmb_wtdsummary_print, cmb_timeseries_fivenum_print ...
N  1000000  Mean   0.4442  StdDev   0.3470  Variance   0.1204  Skewness   0.1877  Kurtosis   -1.741
Min 5.185e-07  First   0.1967  Median   0.4188  Third   0.6768  Max    1.000

Weighted histogram:
--------------------------------------------------------------------------------
( -Infinity,  5.185e-07)   |
[ 5.185e-07,      1.000)   |##################################################
[     1.000,  Infinity )   |-
--------------------------------------------------------------------------------
Unweighted histogram of same data:
--------------------------------------------------------------------------------
( -Infinity,  5.185e-07)   |
[ 5.185e-07,      1.000)   |##################################################
[     1.000,  Infinity )   |-
--------------------------------------------------------------------------------
================================================================================

Declaring another timeseries on the stack: cmb_timeseries_initialize
Drawing 1000000 x = U(1,2) samples at intervals Exp(1): cmb_timeseries_add
Finalizing at time 999927: cmb_timeseries_finalize
Src: N  1000000  Mean    1.500  StdDev   0.2886  Variance  0.08332  Skewness -0.0008466  Kurtosis   -1.200
Tgt: N  1000000  Mean   0.4442  StdDev   0.3470  Variance   0.1204  Skewness   0.1877  Kurtosis   -1.741
Copying src into tgt: cmb_timeseries_copy ... returned 1000001
Tgt: N  1000000  Mean    1.500  StdDev   0.2886  Variance  0.08332  Skewness -0.0008466  Kurtosis   -1.200
Src: N  1000000  Mean    1.500  StdDev   0.2886  Variance  0.08332  Skewness -0.0008466  Kurtosis   -1.200

Cleaning up: cmb_timeseries_reset, cmb_timeseries_destroy
--------------------------------------------------------------------------------

Testing sorting functions
Drawing 25 x = U(1,2) samples at intervals Exp(1): cmb_timeseries_add
Finalizing at time 26.8356: cmb_timeseries_finalize
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.31243	0.860305
0.860305	1.74372	0.768457
1.62876	1.16335	0.589839
2.2186	1.96459	5.8352
8.0538	1.01084	0.508022
8.56182	1.21483	0.164021
8.72584	1.24399	0.145538
8.87138	1.81995	1.06924
9.94062	1.57798	1.98022
11.9208	1.75395	0.515195
12.436	1.45448	2.75817
15.1942	1.30606	0.122512
15.3167	1.64736	0.975856
16.2926	1.06547	0.116184
16.4087	1.30976	2.06335
18.4721	1.87768	0.359182
18.8313	1.17717	0.940227
19.7715	1.61507	1.50402
21.2755	1.25512	0.962494
22.238	1.15813	0.0558308
22.2938	1.5734	0.58267
22.8765	1.21024	0.0805141
22.957	1.43024	2.95553
25.9126	1.58584	0.433877
26.3464	1.83423	0.489167
26.8356	1.83423	0
................................................................................

Sorting: cmb_timeseries_sort_x
Content of timeseries: cmb_timeseries_print
................................................................................
8.0538	1.01084	0.508022
16.2926	1.06547	0.116184
22.238	1.15813	0.0558308
1.62876	1.16335	0.589839
18.8313	1.17717	0.940227
22.8765	1.21024	0.0805141
8.56182	1.21483	0.164021
8.72584	1.24399	0.145538
21.2755	1.25512	0.962494
15.1942	1.30606	0.122512
16.4087	1.30976	2.06335
0	1.31243	0.860305
22.957	1.43024	2.95553
12.436	1.45448	2.75817
22.2938	1.5734	0.58267
9.94062	1.57798	1.98022
25.9126	1.58584	0.433877
19.7715	1.61507	1.50402
15.3167	1.64736	0.975856
0.860305	1.74372	0.768457
11.9208	1.75395	0.515195
8.87138	1.81995	1.06924
26.8356	1.83423	0
26.3464	1.83423	0.489167
18.4721	1.87768	0.359182
2.2186	1.96459	5.8352
................................................................................

Unsorting: cmb_timeseries_sort_t
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.31243	0.860305
0.860305	1.74372	0.768457
1.62876	1.16335	0.589839
2.2186	1.96459	5.8352
8.0538	1.01084	0.508022
8.56182	1.21483	0.164021
8.72584	1.24399	0.145538
8.87138	1.81995	1.06924
9.94062	1.57798	1.98022
11.9208	1.75395	0.515195
12.436	1.45448	2.75817
15.1942	1.30606	0.122512
15.3167	1.64736	0.975856
16.2926	1.06547	0.116184
16.4087	1.30976	2.06335
18.4721	1.87768	0.359182
18.8313	1.17717	0.940227
19.7715	1.61507	1.50402
21.2755	1.25512	0.962494
22.238	1.15813	0.0558308
22.2938	1.5734	0.58267
22.8765	1.21024	0.0805141
22.957	1.43024	2.95553
25.9126	1.58584	0.433877
26.3464	1.83423	0.489167
26.8356	1.83423	0
................................................................................

cmb_dataset_median:	   1.575
cmb_timeseries_fivenum_print:
--------------------------------------------------------------------------------
Min    1.011  First    1.316  Median    1.575  Third    1.818  Max    1.965
--------------------------------------------------------------------------------

Cleaning up: cmb_timeseries_terminate
================================================================================
********************************************************************************
