GLYLIB  0.3.0b
zero_stat.c
Go to the documentation of this file.
00001 #include <stats.h>
00002 #include <mylib.h>
00003 //#include "../inc/stats.h"
00004 //#include "../inc/mylib.h"
00005 
00006 //meanvar zero_meanvar();
00007 meanvar zero_meanvar(){
00008 meanvar M;
00009 M.t='\0'; // type population (p) or sample (s)
00010 M.n=0; // number of units in sample
00011 M.m=0; // mean
00012 M.v=0; // variance
00013 M.s=0; // standard deviation
00014 return M;
00015 }
00016 
00017 statsarray zero_statsarray(){ // if only one allocation
00018 statsarray S;
00019 S.t='\0'; // type, population (p) or sample (s)
00020 S.n=0; // number in sample/population
00021 return S;
00022 } 
00023 
00024 statsarray init_statsarray(){ // for dynamic allocations
00025 statsarray S;
00026 S.t='\0'; // type, population (p) or sample (s)
00027 S.n=0; // number in sample/population
00028 S.d=(double*)calloc(1,sizeof(double));
00029 return S;
00030 } 
00031 
00032 autocorr zero_autocorr(){ // if only one allocation
00033 autocorr A;
00034 A.k=0; // number in autocorrelation function
00035 return A;
00036 } 
00037 autocorr init_autocorr(){ // for dynamic allocations
00038 autocorr A;
00039 A.k=0; // number in autocorrelation function
00040 A.a=(double*)calloc(1,sizeof(double)); //the autocorr function
00041 return A;
00042 } 
00043 
00044 
 All Classes Files Functions Variables Typedefs Defines