statistics.h 793 Bytes
/*
 * Copyright (C) 1996-1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * 
 * This file is part of the SimOS distribution. 
 * See LICENSE file for terms of the license. 
 *
 */


#ifndef _STATISTICS_H
#define _STATISTICS_H

typedef struct Stats {

   int     num;
   double  sumX;
   double  sumY;
   double  sumXsq;
   double  sumYsq;
   double  sumXY;
   
   double  minX;
   double  maxX;
   double  minY;
   double  maxY;

   int     numBuckets;
   double  minVal;
   double  increment;
   double  *buckets;

} Stats;


Stats *StatsCreate(int numBuckets, double minValue, double increment);
void StatsDestroy(Stats *s);
void StatsEntry(Stats *s, double x, double y);
void StatsTransfer(Stats *src, Stats *dest);
void StatsList(Stats *s, char *leader);

#endif