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

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

Basic summary reporting functions:
--------------------------------------------------------------------------------
cmb_datasummary_count:	10000
cmb_datasummary_min:	1.654e-05
cmb_datasummary_max:	  0.9997
cmb_datasummary_mean:	  0.4966	(expected   0.5000)
cmb_datasummary_variance:	 0.08326	(expected  0.08333)
cmb_datasummary_stddev:	  0.2886	(expected   0.2887)
cmb_datasummary_skewness:	-0.0006596	(expected    0.000)
cmb_datasummary_kurtosis:	  -1.192	(expected   -1.200)
--------------------------------------------------------------------------------

Summary: cmb_datasummary_print
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	  0.4966	  0.2886	 0.08326	-0.0006596	  -1.192
--------------------------------------------------------------------------------

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

Summary: cmb_datasummary_print
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	   1.497	  0.2900	 0.08410	 0.01735	  -1.209

Merging the two data summaries: cmb_datasummary_merge ... Returned 20000 samples
Merged summary: cmb_datasummary_print
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   20000	  0.9970	  0.5780	  0.3341	0.004313	  -1.195

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

Testing weighted data summaries
Fixed unequal-weight dataset, checked against exact constants
Segmentation invariance (weights split 3 ways)
Weight-scale invariance (all weights x1000)
Zero-weight samples are ignored
Merge of two partial summaries matches the whole
Randomized agreement with two-pass reference, 10000 samples
Equal-weight case: weighted(pop) vs unweighted(sample) relationship

Report (Variance must be ~7.933, not the count-based ~9.916):
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
       7	   5.653	   2.817	   7.933	 -0.3103	  -1.219

All weighted-summary assertions passed.
================================================================================

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.494979
0.12688
0.76329
0.602453
0.935855
0.823734
0.0580689
0.577105
0.72644
0.718842
0.82339
0.147701
0.934668
0.838497
0.672179
0.261179
0.874953
0.57617
0.0753159
0.879678
0.766609
0.397194
0.13351
0.488464
0.259628

Making a copy: cmb_dataset_copy ... Returned 25

Content of copy: cmb_dataset_print:
0.494979
0.12688
0.76329
0.602453
0.935855
0.823734
0.0580689
0.577105
0.72644
0.718842
0.82339
0.147701
0.934668
0.838497
0.672179
0.261179
0.874953
0.57617
0.0753159
0.879678
0.766609
0.397194
0.13351
0.488464
0.259628

Sorting the copy: cmb_dataset_sort ...
Content of copy: cmb_dataset_print:
0.0580689
0.0753159
0.12688
0.13351
0.147701
0.259628
0.261179
0.397194
0.488464
0.494979
0.57617
0.577105
0.602453
0.672179
0.718842
0.72644
0.76329
0.766609
0.82339
0.823734
0.838497
0.874953
0.879678
0.934668
0.935855

Clearing the copy: cmb_dataset_reset

Basic dataset reporting functions:
--------------------------------------------------------------------------------
cmb_dataset_count:	25
cmb_dataset_min:	 0.05807
cmb_dataset_max:	  0.9359
cmb_dataset_median:	  0.6025
--------------------------------------------------------------------------------
Five number summary of dataset: cmb_dataset_fivenum_print ...
Min     	First Q 	Median  	Third Q 	Max
 0.05807	  0.2604	  0.6025	  0.8236	  0.9359

Clearing the dataset; cmb_dataset_reset

Drawing 10000 U(0,1) samples: cmb_dataset_add

Summarizing the dataset: cmb_dataset_summarize ...returned 10000
Summary generated from the dataset:
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	  0.5033	  0.2884	 0.08319	-0.006692	  -1.198

Unweighted histogram: cmb_dataset_histogram_print
--------------------------------------------------------------------------------
( -Infinity,      0.000)   |
[     0.000,    0.05000)   |###########################################=
[   0.05000,     0.1000)   |##############################################=
[    0.1000,     0.1500)   |################################################-
[    0.1500,     0.2000)   |#################################################-
[    0.2000,     0.2500)   |################################################-
[    0.2500,     0.3000)   |##############################################-
[    0.3000,     0.3500)   |############################################-
[    0.3500,     0.4000)   |##############################################-
[    0.4000,     0.4500)   |#################################################-
[    0.4500,     0.5000)   |#############################################=
[    0.5000,     0.5500)   |##################################################-
[    0.5500,     0.6000)   |################################################-
[    0.6000,     0.6500)   |################################################=
[    0.6500,     0.7000)   |##############################################=
[    0.7000,     0.7500)   |################################################=
[    0.7500,     0.8000)   |##############################################-
[    0.8000,     0.8500)   |##############################################-
[    0.8500,     0.9000)   |###############################################-
[    0.9000,     0.9500)   |#################################################=
[    0.9500,      1.000)   |#################################################-
[     1.000,   Infinity)   |
--------------------------------------------------------------------------------

Autocorrelation coefficients: cmb_dataset_ACF

ACF correlogram: cmb_dataset_correlogram_print
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.016                                  |=
   2  -0.001                                 -|
   3   0.000                                  |-
   4  -0.003                                 -|
   5   0.016                                  |=
   6  -0.005                                 -|
   7   0.017                                  |=
   8   0.016                                  |=
   9   0.009                                  |-
  10  -0.003                                 -|
  11  -0.001                                 -|
  12   0.008                                  |-
  13   0.003                                  |-
  14  -0.019                                 =|
  15  -0.016                                 =|
  16   0.009                                  |-
  17  -0.015                                 -|
  18   0.006                                  |-
  19   0.006                                  |-
  20  -0.007                                 -|
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:cmb_dataset_PACF

PACF correlogram: cmb_dataset_correlogram_print
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.016                                  |=
   2  -0.001                                 -|
   3   0.000                                  |-
   4  -0.003                                 -|
   5   0.016                                  |=
   6  -0.005                                 -|
   7   0.017                                  |=
   8   0.016                                  |=
   9   0.009                                  |-
  10  -0.003                                 -|
  11  -0.001                                 -|
  12   0.007                                  |-
  13   0.002                                  |-
  14  -0.020                                 =|
  15  -0.016                                 =|
  16   0.009                                  |-
  17  -0.016                                 =|
  18   0.006                                  |-
  19   0.007                                  |-
  20  -0.007                                 -|
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Creating a new dataset on the heap: cmb_dataset_create
Filling it with noisy sine curves ...
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	-0.002797	   1.501	   2.253	0.0009606	  -1.192
--------------------------------------------------------------------------------
( -Infinity,     -3.500)   |
[    -3.500,     -3.000)   |#-
[    -3.000,     -2.500)   |#########-
[    -2.500,     -2.000)   |#############################-
[    -2.000,     -1.500)   |###############################################=
[    -1.500,     -1.000)   |###############################################=
[    -1.000,    -0.5000)   |######################################=
[   -0.5000,      0.000)   |###################################=
[     0.000,     0.5000)   |###################################-
[    0.5000,      1.000)   |###################################-
[     1.000,      1.500)   |################################################-
[     1.500,      2.000)   |##################################################
[     2.000,      2.500)   |###########################=
[     2.500,      3.000)   |########=
[     3.000,      3.500)   |#-
[     3.500,      4.000)   |-
[     4.000,   Infinity)   |
--------------------------------------------------------------------------------

Autocorrelation coefficients:
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.718                                  |#######################=
   2   0.276                                  |#########-
   3  -0.272                         =########|
   4  -0.717          =#######################|
   5  -0.886    -#############################|
   6  -0.718          =#######################|
   7  -0.275                        -#########|
   8   0.276                                  |#########-
   9   0.719                                  |#######################=
  10   0.887                                  |#############################-
  11   0.718                                  |#######################=
  12   0.274                                  |#########-
  13  -0.274                        -#########|
  14  -0.717          =#######################|
  15  -0.884    -#############################|
  16  -0.716          =#######################|
  17  -0.272                         =########|
  18   0.275                                  |#########-
  19   0.717                                  |#######################=
  20   0.886                                  |#############################-
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.718                                  |#######################=
   2  -0.493                 -################|
   3  -0.584              -###################|
   4  -0.501                 =################|
   5  -0.371                     -############|
   6  -0.211                           =######|
   7  -0.023                                 =|
   8   0.152                                  |#####-
   9   0.212                                  |######=
  10   0.189                                  |######-
  11   0.127                                  |####-
  12   0.028                                  |=
  13  -0.070                               -##|
  14  -0.118                              =###|
  15  -0.109                              =###|
  16  -0.084                               =##|
  17  -0.009                                 -|
  18   0.055                                  |#=
  19   0.089                                  |##=
  20   0.098                                  |###-
--------------------------------------------------------------------------------

Cleaning up: cmb_datasummary_terminate, cmb_dataset_destroy

Testing dataset merger
Generating new samples
Merging into heap dataset, cmb_dataset_merge
Merging into stack dataset, cmb_dataset_merge
Merging with itself, cmb_dataset_merge
Merging itself into itself, cmb_dataset_merge

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

Testing timeseries
Creating timeseries: cmb_timeseries_create
Drawing 10000 x = U(0,1) samples at intervals Exp(2 - x): cmb_timeseries_add
Finalizing at time 15054.6: cmb_timeseries_finalize

Basic timeseries reporting functions:
--------------------------------------------------------------------------------
cmb_timeseries_count:	10001
cmb_timeseries_min:	2.706e-05
cmb_timeseries_max:	   1.000
--------------------------------------------------------------------------------

Summarizing: cmb_timeseries_summarize, cmb_wtdsummary_print, cmb_timeseries_fivenum_print ...
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	  0.4479	  0.2817	 0.07938	  0.1994	  -1.103
Min     	First Q 	Median  	Third Q 	Max
2.706e-05	  0.2012	  0.4299	  0.6779	   1.000

Weighted histogram:
--------------------------------------------------------------------------------
( -Infinity,      0.000)   |
[     0.000,    0.05000)   |##################################################
[   0.05000,     0.1000)   |################################################=
[    0.1000,     0.1500)   |###########################################=
[    0.1500,     0.2000)   |############################################=
[    0.2000,     0.2500)   |#########################################=
[    0.2500,     0.3000)   |##########################################=
[    0.3000,     0.3500)   |########################################=
[    0.3500,     0.4000)   |##########################################-
[    0.4000,     0.4500)   |#######################################-
[    0.4500,     0.5000)   |############################################-
[    0.5000,     0.5500)   |#####################################-
[    0.5500,     0.6000)   |#####################################-
[    0.6000,     0.6500)   |####################################=
[    0.6500,     0.7000)   |###############################=
[    0.7000,     0.7500)   |##############################-
[    0.7500,     0.8000)   |####################################=
[    0.8000,     0.8500)   |#############################-
[    0.8500,     0.9000)   |############################-
[    0.9000,     0.9500)   |########################-
[    0.9500,      1.000)   |##########################-
[     1.000,   Infinity)   |
--------------------------------------------------------------------------------
Unweighted histogram of same data:
--------------------------------------------------------------------------------
( -Infinity,      0.000)   |
[     0.000,    0.05000)   |###############################################-
[   0.05000,     0.1000)   |################################################-
[    0.1000,     0.1500)   |##########################################-
[    0.1500,     0.2000)   |###############################################-
[    0.2000,     0.2500)   |##############################################-
[    0.2500,     0.3000)   |###########################################=
[    0.3000,     0.3500)   |##########################################-
[    0.3500,     0.4000)   |############################################-
[    0.4000,     0.4500)   |############################################=
[    0.4500,     0.5000)   |##################################################
[    0.5000,     0.5500)   |##############################################-
[    0.5500,     0.6000)   |#############################################-
[    0.6000,     0.6500)   |##############################################-
[    0.6500,     0.7000)   |############################################-
[    0.7000,     0.7500)   |############################################-
[    0.7500,     0.8000)   |#################################################-
[    0.8000,     0.8500)   |###############################################-
[    0.8500,     0.9000)   |##############################################-
[    0.9000,     0.9500)   |############################################-
[    0.9500,      1.000)   |############################################=
[     1.000,   Infinity)   |
--------------------------------------------------------------------------------
================================================================================

Declaring another timeseries on the stack: cmb_timeseries_initialize
Drawing 10000 x = U(1,2) samples at intervals Exp(1): cmb_timeseries_add
Finalizing at time 9947.58: cmb_timeseries_finalize
Src: Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	   1.502	  0.2905	 0.08440	-0.01326	  -1.210
Tgt: Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	  0.4479	  0.2817	 0.07938	  0.1994	  -1.103
Copying src into tgt: cmb_timeseries_copy ... returned 10001
Tgt: Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	   1.502	  0.2905	 0.08440	-0.01326	  -1.210
Src: Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
   10000	   1.502	  0.2905	 0.08440	-0.01326	  -1.210

Cleaning up: cmb_timeseries_terminate, cmb_timeseries_destroy
--------------------------------------------------------------------------------

Testing sorting functions
Drawing 25 x = U(1,2) samples at intervals Exp(1): cmb_timeseries_add
Finalizing at time 32.089: cmb_timeseries_finalize
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.96278	1.23632
1.23632	1.89291	0.907448
2.14377	1.83649	0.455373
2.59914	1.24188	3.70048
6.29963	1.57506	2.06614
8.36577	1.34185	2.61954
10.9853	1.09422	0.232464
11.2178	1.33667	0.362745
11.5805	1.05709	1.21545
12.796	1.06777	0.191366
12.9873	1.00582	0.795226
13.7826	1.46171	1.13352
14.9161	1.36275	0.255035
15.1711	1.31541	1.3543
16.5254	1.46791	2.4718
18.9972	1.41515	0.105696
19.1029	1.93545	2.16317
21.2661	1.06573	2.21721
23.4833	1.25948	1.04938
24.5327	1.89798	2.21201
26.7447	1.4299	0.591122
27.3358	1.9989	3.02043
30.3562	1.10588	0.0433218
30.3996	1.81865	1.26807
31.6676	1.07361	0.421315
32.089	1.07361	0
................................................................................

Sorting: cmb_timeseries_sort_x
Content of timeseries: cmb_timeseries_print
................................................................................
12.9873	1.00582	0.795226
11.5805	1.05709	1.21545
21.2661	1.06573	2.21721
12.796	1.06777	0.191366
32.089	1.07361	0
31.6676	1.07361	0.421315
10.9853	1.09422	0.232464
30.3562	1.10588	0.0433218
2.59914	1.24188	3.70048
23.4833	1.25948	1.04938
15.1711	1.31541	1.3543
11.2178	1.33667	0.362745
8.36577	1.34185	2.61954
14.9161	1.36275	0.255035
18.9972	1.41515	0.105696
26.7447	1.4299	0.591122
13.7826	1.46171	1.13352
16.5254	1.46791	2.4718
6.29963	1.57506	2.06614
30.3996	1.81865	1.26807
2.14377	1.83649	0.455373
1.23632	1.89291	0.907448
24.5327	1.89798	2.21201
19.1029	1.93545	2.16317
0	1.96278	1.23632
27.3358	1.9989	3.02043
................................................................................

Unsorting: cmb_timeseries_sort_t
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.96278	1.23632
1.23632	1.89291	0.907448
2.14377	1.83649	0.455373
2.59914	1.24188	3.70048
6.29963	1.57506	2.06614
8.36577	1.34185	2.61954
10.9853	1.09422	0.232464
11.2178	1.33667	0.362745
11.5805	1.05709	1.21545
12.796	1.06777	0.191366
12.9873	1.00582	0.795226
13.7826	1.46171	1.13352
14.9161	1.36275	0.255035
15.1711	1.31541	1.3543
16.5254	1.46791	2.4718
18.9972	1.41515	0.105696
19.1029	1.93545	2.16317
21.2661	1.06573	2.21721
23.4833	1.25948	1.04938
24.5327	1.89798	2.21201
26.7447	1.4299	0.591122
27.3358	1.9989	3.02043
30.3562	1.10588	0.0433218
30.3996	1.81865	1.26807
31.6676	1.07361	0.421315
32.089	1.07361	0
................................................................................

cmb_dataset_median:	   1.455
cmb_timeseries_fivenum_print:
--------------------------------------------------------------------------------
Min     	First Q 	Median  	Third Q 	Max
   1.006	   1.213	   1.455	   1.894	   1.999
--------------------------------------------------------------------------------

Cleaning up: cmb_timeseries_terminate
================================================================================
--------------------------------------------------------------------------------
Testing empty datasets
    0.0000	dispatcher	cmb_dataset_print (508):  Warning: No data to print, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_sort (260):  Warning: No data to sort, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_median (429):  Warning: Cannot take median of empty data set, seed 0x34f05c64d7ad598f	
Median of empty dataset: 0.000000
    0.0000	dispatcher	cmb_dataset_fivenum_print (456):  Warning: No data to display in five-number summary, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_histogram_print (784):  Warning: No data to display in histogram, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_ACF (813):  Warning: No data for calculating ACF, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_PACF (883):  Warning: No data for calculating PACF, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_PACF (883):  Warning: No data for calculating PACF, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_correlogram_print (1019):  Warning: No data for correlogram, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_summarize (394):  Warning: Cannot summarize empty data set, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_summarize (394):  Warning: Cannot summarize empty data set, seed 0x34f05c64d7ad598f	
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
       0
--------------------------------------------------------------------------------
Testing empty timeseries
    0.0000	dispatcher	cmb_timeseries_sort_x (439):  Warning: No data to sort, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_sort_t (472):  Warning: No data to sort, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_finalize (191):  Warning: Finalizing empty time series, nothing added, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_print (260):  Warning: No data to print, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_median (507):  Warning: Cannot take median of empty time series, seed 0x34f05c64d7ad598f	
Median of empty timeseries: 0.000000
    0.0000	dispatcher	cmb_timeseries_fivenum_print (562):  Warning: No data to display in five-number summary, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_histogram_print (323):  Warning: No data to display in histogram, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_summarize (232):  Warning: Cannot summarize empty time series, seed 0x34f05c64d7ad598f	
Count   	Mean    	StdDev  	Variance	Skewness	Excess kurtosis
       0
--------------------------------------------------------------------------------
********************************************************************************
