ze-filter  (ze-filter-0.8.0-develop-180218)
ze-bestof-n.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : Sun Aug 19 22:21:21 CEST 2007
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 
25 #ifndef __ZE_BESTOF_N_H
26 
27 
28 typedef int (*bestcomp_F) (const void *, const void *);
29 
30 #define BOFDIM 48
31 
32 typedef struct
33 {
34  int dim;
35  int n;
36  double best[BOFDIM];
38 } bestof_T;
39 
40 bool bestof_init(bestof_T *b, int dim, bestcomp_F bcmp);
41 
42 bool bestof_add(bestof_T *b, double v);
43 
44 double bestof_average(bestof_T *b);
45 
46 int bestof_count(bestof_T *b);
47 
48 
49 # define __ZE_BESTOF_N_H 1
50 #endif /* __ZE_BESTOF_N_H */
bool bestof_init(bestof_T *b, int dim, bestcomp_F bcmp)
Definition: ze-bestof-n.c:51
double bestof_average(bestof_T *b)
Definition: ze-bestof-n.c:97
bool bestof_add(bestof_T *b, double v)
Definition: ze-bestof-n.c:75
int(* bestcomp_F)(const void *, const void *)
Definition: ze-bestof-n.h:28
#define BOFDIM
Definition: ze-bestof-n.h:30
int bestof_count(bestof_T *b)
bestcomp_F bcmp
Definition: ze-bestof-n.h:37