********************************************************************************
**********************      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.2885	(expected   0.2887)
cmb_datasummary_skewness:	-0.0007084	(expected    0.000)
cmb_datasummary_kurtosis:	  -1.192	(expected   -1.200)
--------------------------------------------------------------------------------

Summary: cmb_datasummary_print
N    10000  Mean   0.4966  StdDev   0.2885  Variance  0.08326  Skewness -0.0007084  Kurtosis   -1.192
Summary without lead-ins:
   10000	  0.4966	  0.2885	 0.08326	-0.0007084	  -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
N    10000  Mean    1.498  StdDev   0.2900  Variance  0.08412  Skewness  0.01717  Kurtosis   -1.209

Merging the two data summaries: cmb_datasummary_merge ... Returned 20000 samples
Merged summary: cmb_datasummary_print
N    20000  Mean   0.9971  StdDev   0.5780  Variance   0.3341  Skewness 0.004390  Kurtosis   -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):
N        7  Mean    5.653  StdDev    2.817  Variance    7.933  Skewness  -0.3103  Kurtosis   -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.290424
0.923769
0.289231
0.670563
0.251634
0.207958
0.410425
0.174038
0.524879
0.471857
0.848748
0.201823
0.0384819
0.573709
0.0765307
0.568542
0.375075
0.245563
0.105277
0.680285
0.4
0.947
0.0841882
0.912585
0.303416

Making a copy: cmb_dataset_copy ... Returned 25

Content of copy: cmb_dataset_print:
0.290424
0.923769
0.289231
0.670563
0.251634
0.207958
0.410425
0.174038
0.524879
0.471857
0.848748
0.201823
0.0384819
0.573709
0.0765307
0.568542
0.375075
0.245563
0.105277
0.680285
0.4
0.947
0.0841882
0.912585
0.303416

Sorting the copy: cmb_dataset_sort ...
Content of copy: cmb_dataset_print:
0.0384819
0.0765307
0.0841882
0.105277
0.174038
0.201823
0.207958
0.245563
0.251634
0.289231
0.290424
0.303416
0.375075
0.4
0.410425
0.471857
0.524879
0.568542
0.573709
0.670563
0.680285
0.848748
0.912585
0.923769
0.947

Clearing the copy: cmb_dataset_reset

Basic dataset reporting functions:
--------------------------------------------------------------------------------
cmb_dataset_count:	25
cmb_dataset_min:	 0.03848
cmb_dataset_max:	  0.9470
cmb_dataset_median:	  0.3751
--------------------------------------------------------------------------------
Five number summary of dataset: cmb_dataset_fivenum_print ...
Min  0.03848  First_Q   0.2049  Median   0.3751  Third_Q   0.6221  Max   0.9470

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:
N    10000  Mean   0.5033  StdDev   0.2883  Variance  0.08313  Skewness -0.007810  Kurtosis   -1.197

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.015                                  |-
   2  -0.003                                 -|
   3  -0.000                                 -|
   4  -0.004                                 -|
   5   0.017                                  |=
   6  -0.006                                 -|
   7   0.016                                  |=
   8   0.017                                  |=
   9   0.008                                  |-
  10  -0.003                                 -|
  11  -0.003                                 -|
  12   0.007                                  |-
  13   0.003                                  |-
  14  -0.018                                 =|
  15  -0.019                                 =|
  16   0.010                                  |-
  17  -0.017                                 =|
  18   0.006                                  |-
  19   0.007                                  |-
  20  -0.008                                 -|
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:cmb_dataset_PACF

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

Creating a new dataset on the heap: cmb_dataset_create
Filling it with noisy sine curves ...
N    10000  Mean -0.002448  StdDev    1.495  Variance    2.235  Skewness -0.0002399  Kurtosis   -1.181
--------------------------------------------------------------------------------
( -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.717                                  |#######################=
   2   0.276                                  |#########-
   3  -0.272                         =########|
   4  -0.717          =#######################|
   5  -0.885    -#############################|
   6  -0.716          =#######################|
   7  -0.274                        -#########|
   8   0.276                                  |#########-
   9   0.719                                  |#######################=
  10   0.885                                  |#############################-
  11   0.718                                  |#######################=
  12   0.273                                  |#########-
  13  -0.274                        -#########|
  14  -0.716          =#######################|
  15  -0.883    -#############################|
  16  -0.715          =#######################|
  17  -0.273                         =########|
  18   0.274                                  |#########-
  19   0.717                                  |#######################=
  20   0.886                                  |#############################-
--------------------------------------------------------------------------------

Partial autocorrelation coefficients:
           -1.0                              0.0                              1.0
--------------------------------------------------------------------------------
   1   0.717                                  |#######################=
   2  -0.491                 -################|
   3  -0.583              -###################|
   4  -0.502                 =################|
   5  -0.371                     -############|
   6  -0.208                           =######|
   7  -0.024                                 =|
   8   0.146                                  |####=
   9   0.212                                  |######=
  10   0.184                                  |######-
  11   0.137                                  |####=
  12   0.024                                  |=
  13  -0.063                               -##|
  14  -0.115                              =###|
  15  -0.106                              =###|
  16  -0.084                               =##|
  17  -0.021                                 =|
  18   0.047                                  |#=
  19   0.095                                  |###-
  20   0.101                                  |###-
--------------------------------------------------------------------------------

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 14816.7: 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 ...
N    10000  Mean   0.4482  StdDev   0.2834  Variance  0.08034  Skewness   0.2095  Kurtosis   -1.103
Min 2.706e-05  First_Q   0.2008  Median   0.4250  Third_Q   0.6788  Max    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 9894.54: cmb_timeseries_finalize
Src: N    10000  Mean    1.505  StdDev   0.2895  Variance  0.08379  Skewness -0.04297  Kurtosis   -1.181
Tgt: N    10000  Mean   0.4482  StdDev   0.2834  Variance  0.08034  Skewness   0.2095  Kurtosis   -1.103
Copying src into tgt: cmb_timeseries_copy ... returned 10001
Tgt: N    10000  Mean    1.505  StdDev   0.2895  Variance  0.08379  Skewness -0.04297  Kurtosis   -1.181
Src: N    10000  Mean    1.505  StdDev   0.2895  Variance  0.08379  Skewness -0.04297  Kurtosis   -1.181

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 26.8537: cmb_timeseries_finalize
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.16401	0.382849
0.382849	1.91088	0.590003
0.972852	1.79186	1.59182
2.56467	1.12435	1.14869
3.71336	1.28435	0.864292
4.57765	1.92037	0.962055
5.5397	1.845	0.537049
6.07675	1.45451	0.388811
6.46556	1.428	0.512522
6.97809	1.41611	1.80535
8.78344	1.84849	1.08766
9.87109	1.59349	1.84963
11.7207	1.36902	0.083651
11.8044	1.82799	1.16093
12.9653	1.45313	0.851032
13.8163	1.70336	0.57707
14.3934	1.47922	0.135435
14.5288	1.58827	1.27058
15.7994	1.82961	2.86711
18.6665	1.45837	4.61931
23.2858	1.66661	0.0170916
23.3029	1.02052	0.413359
23.7163	1.49732	1.93832
25.6546	1.67177	0.0240276
25.6786	1.3259	1.17505
26.8537	1.3259	0
................................................................................

Sorting: cmb_timeseries_sort_x
Content of timeseries: cmb_timeseries_print
................................................................................
23.3029	1.02052	0.413359
2.56467	1.12435	1.14869
0	1.16401	0.382849
3.71336	1.28435	0.864292
25.6786	1.3259	1.17505
26.8537	1.3259	0
11.7207	1.36902	0.083651
6.97809	1.41611	1.80535
6.46556	1.428	0.512522
12.9653	1.45313	0.851032
6.07675	1.45451	0.388811
18.6665	1.45837	4.61931
14.3934	1.47922	0.135435
23.7163	1.49732	1.93832
14.5288	1.58827	1.27058
9.87109	1.59349	1.84963
23.2858	1.66661	0.0170916
25.6546	1.67177	0.0240276
13.8163	1.70336	0.57707
0.972852	1.79186	1.59182
11.8044	1.82799	1.16093
15.7994	1.82961	2.86711
5.5397	1.845	0.537049
8.78344	1.84849	1.08766
0.382849	1.91088	0.590003
4.57765	1.92037	0.962055
................................................................................

Unsorting: cmb_timeseries_sort_t
Content of timeseries: cmb_timeseries_print
................................................................................
0	1.16401	0.382849
0.382849	1.91088	0.590003
0.972852	1.79186	1.59182
2.56467	1.12435	1.14869
3.71336	1.28435	0.864292
4.57765	1.92037	0.962055
5.5397	1.845	0.537049
6.07675	1.45451	0.388811
6.46556	1.428	0.512522
6.97809	1.41611	1.80535
8.78344	1.84849	1.08766
9.87109	1.59349	1.84963
11.7207	1.36902	0.083651
11.8044	1.82799	1.16093
12.9653	1.45313	0.851032
13.8163	1.70336	0.57707
14.3934	1.47922	0.135435
14.5288	1.58827	1.27058
15.7994	1.82961	2.86711
18.6665	1.45837	4.61931
23.2858	1.66661	0.0170916
23.3029	1.02052	0.413359
23.7163	1.49732	1.93832
25.6546	1.67177	0.0240276
25.6786	1.3259	1.17505
26.8537	1.3259	0
................................................................................

cmb_dataset_median:	   1.489
cmb_timeseries_fivenum_print:
--------------------------------------------------------------------------------
Min    1.021  First_Q    1.438  Median    1.489  Third_Q    1.807  Max    1.920
--------------------------------------------------------------------------------

Cleaning up: cmb_timeseries_terminate
================================================================================
--------------------------------------------------------------------------------
Testing empty datasets
    0.0000	dispatcher	cmb_dataset_print (517):  Warning: No data to print, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_sort (275):  Warning: No data to sort, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_median (443):  Warning: Cannot take median of empty data set., seed 0x34f05c64d7ad598f	
Median of empty dataset: 0.000000
    0.0000	dispatcher	cmb_dataset_fivenum_print (470):  Warning: No data to display in five-number summary, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_histogram_print (785):  Warning: No data to display in histogram, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_ACF (814):  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_correlogram_print (1019):  Warning: No data for correlogram, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_summarize (408):  Warning: Cannot summarize empty data set., seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_dataset_summarize (408):  Warning: Cannot summarize empty data set., seed 0x34f05c64d7ad598f	
N        0
--------------------------------------------------------------------------------
Testing empty timeseries
    0.0000	dispatcher	cmb_timeseries_sort_x (440):  Warning: No data to sort, seed 0x34f05c64d7ad598f	
    0.0000	dispatcher	cmb_timeseries_sort_t (473):  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 (508):  Warning: Cannot take median of empty time series., seed 0x34f05c64d7ad598f	
Median of empty timeseries: 0.000000
    0.0000	dispatcher	cmb_timeseries_fivenum_print (563):  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	
N        0
--------------------------------------------------------------------------------
********************************************************************************
