This is used primarily by the collector object in the tape module to define groups (see the group property in aggregate_mkgroupthe 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)
Defines | |
| #define | AF_ABS 0x01 |
| absolute value aggregation flag | |
Typedefs | |
| typedef struct s_aggregate | AGGREGATION |
| the aggregation type | |
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. | |
| 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,skew,kur,count,gamma) |
| group_expression | grouping rule; see find_mkpgm(char *) |
Definition at line 41 of file aggregate.c.
References AF_ABS, CF_CLASS, class_find_property(), find_first(), output_error(), PT_complex, PT_double, stricmp, unit_convert_ex(), and unit_find().
| double aggregate_value | ( | AGGREGATION * | aggr | ) |
This function performs an aggregate calculation given by the aggregation.
| aggr | the aggregation to perform |
Definition at line 325 of file aggregate.c.
References AF_ABS, CF_CONSTANT, find_first(), find_next(), PT_complex, PT_double, and throw_exception().