File: hist.h

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (71 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// $Id: hist.h 80826 2008-03-04 14:51:23Z wotte $

#include <stdio.h>

#define HIST_VERSION  "1.3"

namespace ACE_SCTP
{

  struct optheader {
    char *key;
    char *value;
    struct optheader *next;
  };

  typedef struct hist_s {
    char *name;
    double max, min, sum, sum2, sum3, sum4;
    double first, last;
    unsigned int num_points, num_bins;
    unsigned int *hs;
    unsigned int num_outer, max_num_outer;
    double *outer;
    struct hist_s *next;
    int skew;
    struct optheader *firstoptheader;
  } hist_t;

  #define HIST hist_t *

  hist_t *histogram(char *name, unsigned int num_bins, double first,
                    double last);

  void set_outer(unsigned int max_num_outer, hist_t *hist);

  void enable_skew(hist_t *hist);

  void add_field(char *key, char *value, hist_t *hist);

  void add_field_n(char *key, int value, hist_t *hist);

  void record(double point, hist_t *hist);

  void report_to(FILE *strm, hist_t *hist);

  void report();

  void stats_init();

  double get_mean(HIST hist);

  double get_min(HIST hist);

  double get_max(HIST hist);

  double get_variance(HIST hist);

  double get_num(HIST hist);

  void set_mean(HIST hist, double mean);

  void set_min(HIST hist, double min);

  void set_max(HIST hist, double max);

  void set_variance(HIST hist, double variance);

  void add_histogram(HIST dest, HIST source);

  double histfloor(double x);
}