"Fossies" - the Fresh Open Source Software Archive

Member "heaplayers-351/benchmarks/lindsay/statistics.h" (3 May 2004, 503 Bytes) of package /linux/misc/old/heaplayers_3_5_1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "statistics.h" see the Fossies "Dox" file reference documentation.

    1 // statistics.h
    2 // ------------
    3 //      Copyright 1988 D.C. Lindsay at Carnegie Mellon University
    4 
    5 #ifndef STATISTICS_DEF
    6 #define STATISTICS_DEF 0
    7 
    8 class statistics {   // on a series of events with a value each
    9     float sum;
   10     float sumsquared;
   11     int max, min;
   12    public:
   13     int eventcount;
   14     statistics();           // init
   15     void reset();           // clears
   16     int print( char* );     // returns mean. Summary to cout.
   17                     // String is a label.
   18     void note( int );       // accumulates event of that value
   19 };
   20 
   21 #endif /* STATISTICS_DEF */