00001 /* 00002 Copyright (C) 2016- The University of Notre Dame 00003 This software is distributed under the GNU General Public License. 00004 See the file COPYING for details. 00005 */ 00006 00007 #ifndef HISTOGRAM_H 00008 #define HISTOGRAM_H 00009 00010 #include "int_sizes.h" 00011 00065 struct histogram *histogram_create(double bucket_size); 00066 00071 void histogram_clear(struct histogram *h); 00072 00077 void histogram_delete(struct histogram *h); 00078 00084 int histogram_size(struct histogram *h); 00085 00087 double *histogram_buckets(struct histogram *h); 00088 00090 double histogram_bucket_size(struct histogram *h); 00091 00098 int histogram_insert(struct histogram *h, double value); 00099 00106 int histogram_count(struct histogram *h, double value); 00107 00114 void histogram_set_bucket(struct histogram *h, double value, int count); 00115 00122 void histogram_attach_data(struct histogram *h, double value, void *data); 00123 00130 void *histogram_get_data(struct histogram *h, double value); 00131 00137 int histogram_total_count(struct histogram *h); 00138 00144 double histogram_max_value(struct histogram *h); 00145 00151 double histogram_min_value(struct histogram *h); 00152 00158 double histogram_mode(struct histogram *h); 00159 00160 #endif