00001 00008 #ifndef _AGGREGATE_H 00009 #define _AGGREGATE_H 00010 00011 #include "platform.h" 00012 #include "find.h" 00013 00014 typedef enum {AGGR_NOP, AGGR_MIN, AGGR_MAX, AGGR_AVG, AGGR_STD, AGGR_MBE, AGGR_MEAN, AGGR_VAR, AGGR_SKEW, AGGR_KUR, AGGR_GAMMA, AGGR_COUNT, AGGR_SUM, AGGR_PROD} AGGREGATOR; 00015 typedef enum {AP_NONE, AP_REAL, AP_IMAG, AP_MAG, AP_ANG, AP_ARG} AGGRPART; 00017 #define AF_ABS 0x01 00019 typedef struct s_aggregate { 00020 AGGREGATOR op; 00021 struct s_findpgm *group; 00022 PROPERTY *pinfo; 00023 UNIT *punit; 00024 double scale; 00025 AGGRPART part; 00026 unsigned char flags; 00027 struct s_findlist *last; 00028 struct s_aggregate *next; 00029 } AGGREGATION; 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 AGGREGATION *aggregate_mkgroup(char *aggregator, char *group_expression); 00036 double aggregate_value(AGGREGATION *aggregate); 00037 00038 #ifdef __cplusplus 00039 } 00040 #endif 00041 00042 #endif 00043