Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

stat2.h

Go to the documentation of this file.
00001 #ifndef STAT2_H
00002 #define STAT2_H
00003 
00004 /* ==== HEADER stat2.h ==== */
00005 
00013 /* ANSI C, 25. Aug. 1997. Andras Aszodi */
00014 
00015 /* ---- STANDARD HEADERS ---- */
00016 
00017 #include <stdio.h>
00018 #include <stdlib.h>
00019 #include <math.h>
00020 
00021 /* ---- TYPES ---- */
00022 
00023 #ifdef __cplusplus
00024 namespace RazorBack {
00025 #endif
00026 
00031 typedef struct
00032 {
00033     double Sx, Sx2, Min, Max;
00034     unsigned long N;
00035 }
00036 Statrec_ ;
00037 
00042 typedef struct
00043 {
00044     double Sx, Sy, Sx2, Sy2, Sxy, Minx, Maxx, Miny, Maxy;
00045     unsigned long N;
00046 }
00047 Stat2rec_ ;
00048 
00049 /* ---- DEFINITIONS ---- */
00050 
00055 typedef enum {STAT_NOOP=0, STAT_AVG, STAT_SD, STAT_MIN, STAT_MAX} Statops_;
00056 
00061 typedef enum {STAT2_NOOP=0, STAT2_AVGX, STAT2_SDX, STAT2_MINX, STAT2_MAXX, 
00062             STAT2_AVGY, STAT2_SDY, STAT2_MINY, STAT2_MAXY, STAT2_CORR} Stat2ops_;
00063 
00064 /* ---- PROTOTYPES ---- */
00065 
00066 #ifdef __cplusplus
00067 extern "C" {
00068 #endif
00069 
00070 /* ---- UNIVARIATE STATISTICS ---- */
00071 
00076 void init_stat(Statrec_ *St);
00077 
00082 void add_stat(double X, Statrec_ *St);
00083 
00088 double eval_stat(const Statrec_ *St, Statops_ Op);
00089 
00090 /* ---- BIVARIATE STATISTICS ---- */
00091 
00096 void init_stat2(Stat2rec_ *St);
00097 
00102 void add_stat2(double X, double Y, Stat2rec_ *St);
00103 
00109 double eval_stat2(const Stat2rec_ *St, Stat2ops_ Op);
00110 
00111 #ifdef __cplusplus
00112 } }
00113 #endif
00114 
00115 /* ==== END OF HEADER stat2.h ==== */
00116 #endif  /* STAT2_H */

Generated at Wed Aug 21 09:33:29 2002 for The Razorback C Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001