GLYLIB  0.3.0b
stats.h
Go to the documentation of this file.
00001 /** \file  stats.h  
00002 \brief Statistics utilities for glylib.
00003 
00004 Begun in the spring of 2008 by BLFoley and modified by heaven only
00005 knows who since then. */
00006 
00007 #if !defined(GLYLIB_STATS)
00008 #define GLYLIB_STATS
00009 
00010 /** \addtogroup ANALYSIS
00011  * @{
00012  */
00013 typedef struct {
00014   char t; // type, population (p) or sample (s)
00015   int n; // number in sample/population
00016   double *d; // data points (n of these)
00017 } statsarray;
00018 
00019 typedef struct {
00020         char t; // type population (p) or sample (s)
00021         int n; // number of units in sample
00022         double m; // mean
00023         double v; // variance
00024         double s; // standard deviation
00025 } meanvar;
00026 
00027 typedef struct {
00028         int k; // k intervals used for autocorrelation function
00029         double *a; // a(k) the (estimate of) the autocorrelation function
00030 } autocorr;
00031 
00032 meanvar get_meanvar_array(statsarray S);
00033 meanvar zero_meanvar();
00034 statsarray zero_statsarray(); // if only one allocation
00035 statsarray init_statsarray(); // for dynamic allocations
00036 autocorr zero_autocorr(); // if only one allocation
00037 autocorr init_autocorr(); // for dynamic allocations
00038 autocorr get_autocorr_est_array(statsarray S,meanvar M);
00039 /** @}*/
00040 
00041 #endif
 All Classes Files Functions Variables Typedefs Defines