This is used primarily by the collector object in the tape module to define groups (see the group property in the collector object). The group can be defined by specifying a boolean series are relationship of object properties, e.g.,
class=node and parent=root
Aggregations also must specify the property that is to be aggregated. Most common aggregations and some uncommon ones are supported. In addition, if the aggregation is over a complex quantity, the aggregation must specific how a double is to be obtained from it, e.g., magnitude, angle, real, imaginary. Some examples aggregate property definitions are
sum(cost) max(power.angle) mean(energy.mag) std(price)
Classes | |
| struct | s_aggregate |
Defines | |
| #define | AF_ABS 0x01 |
| absolute value aggregation flag | |
Typedefs | |
| typedef s_aggregate | AGGREGATION |
| the aggregation type | |
Enumerations | |
| enum | AGGREGATOR { AGGR_NOP, AGGR_MIN, AGGR_MAX, AGGR_AVG, AGGR_STD, AGGR_MBE, AGGR_MEAN, AGGR_VAR, AGGR_KUR, AGGR_GAMMA, AGGR_COUNT, AGGR_SUM, AGGR_PROD } |
| enum | AGGRPART { AP_NONE, AP_REAL, AP_IMAG, AP_MAG, AP_ANG, AP_ARG } |
Functions | |
| AGGREGATION * | aggregate_mkgroup (char *aggregator, char *group_expression) |
| This function builds an collection of objects into an aggregation. | |
| double | aggregate_value (AGGREGATION *aggr) |
| This function performs an aggregate calculation given by the aggregation. | |
| double | arg (complex *x) |
| double | mag (complex *x) |
| enum AGGREGATOR |
| AGGR_NOP | |
| AGGR_MIN | |
| AGGR_MAX | |
| AGGR_AVG | |
| AGGR_STD | |
| AGGR_MBE | |
| AGGR_MEAN | |
| AGGR_VAR | |
| AGGR_KUR | |
| AGGR_GAMMA | |
| AGGR_COUNT | |
| AGGR_SUM | |
| AGGR_PROD |
Definition at line 13 of file aggregate.h.
| enum AGGRPART |
| AGGREGATION * aggregate_mkgroup | ( | char * | aggregator, | |
| char * | group_expression | |||
| ) |
This function builds an collection of objects into an aggregation.
The aggregation can be run using aggregate_value(AGGREGATION*)
| aggregator | aggregator (min,max,avg,std,sum,prod,mbe,mean,var,kur,count,gamma) |
| group_expression | grouping rule; see find_mkpgm(char *) |
Definition at line 40 of file aggregate.c.
References AF_ABS, AGGR_AVG, AGGR_COUNT, AGGR_GAMMA, AGGR_KUR, AGGR_MAX, AGGR_MBE, AGGR_MEAN, AGGR_MIN, AGGR_NOP, AGGR_STD, AGGR_SUM, AGGR_VAR, AP_ANG, AP_ARG, AP_IMAG, AP_MAG, AP_NONE, AP_REAL, CF_CLASS, class_find_property(), find_first(), find_mkpgm(), find_pgmconstants(), find_runpgm(), s_aggregate::flags, s_aggregate::group, s_aggregate::last, s_aggregate::next, s_object_list::oclass, s_aggregate::op, output_error(), s_aggregate::part, s_aggregate::pinfo, PT_complex, PT_double, and stricmp.
| double aggregate_value | ( | AGGREGATION * | aggr | ) |
This function performs an aggregate calculation given by the aggregation.
| aggr | the aggregation to perform |
Definition at line 212 of file aggregate.c.
References AF_ABS, AGGR_AVG, AGGR_COUNT, AGGR_GAMMA, AGGR_KUR, AGGR_MAX, AGGR_MBE, AGGR_MEAN, AGGR_MIN, AGGR_PROD, AGGR_STD, AGGR_SUM, AGGR_VAR, AP_ANG, AP_ARG, AP_IMAG, AP_MAG, AP_REAL, arg(), CF_CONSTANT, s_findpgm::constflags, find_first(), find_next(), find_runpgm(), s_aggregate::flags, s_aggregate::group, complex::i, s_aggregate::last, mag(), object_get_complex(), object_get_double(), s_aggregate::op, s_aggregate::part, PI, s_aggregate::pinfo, PT_complex, PT_double, complex::r, and throw_exception().