1 /*****************************************************************************
2 * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008
3 *****************************************************************************
4 * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection
5 *****************************************************************************/
7 /* functions implemented in rrd_hw.c */
8 int update_aberrant_CF(
11 enum cf_en current_cf,
12 unsigned long cdp_idx,
13 unsigned long rra_idx,
15 unsigned short CDP_scratch_idx,
16 rrd_value_t *seasonal_coef);
17 int create_hw_contingent_rras(
19 unsigned short period,
20 unsigned long hashed_name);
23 unsigned long rra_idx,
24 unsigned long rra_start,
27 rrd_value_t **seasonal_coef);
28 void erase_violations(
30 unsigned long cdp_idx,
31 unsigned long rra_idx);
34 unsigned long rra_idx,
35 unsigned long rra_start,
36 rrd_file_t *rrd_file);
37 void reset_aberrant_coefficients(
40 unsigned long ds_idx);
41 void init_hwpredict_cdp(
43 void init_seasonal_cdp(
46 #define BURNIN_CYCLES 3
48 /* a standard fixed-capacity FIFO queue implementation */
49 typedef struct FIFOqueue {
51 int capacity, head, tail;
64 rrd_value_t queue_pop(