|
PebbleOS
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>Typedefs | |
| typedef bool(* | pbl_stats_filter_t) (int index, int32_t value, void *context) |
| Filter of the values included in pbl_stats_calculate(). | |
Enumerations | |
| enum | pbl_stats_op { PBL_STATS_OP_SUM = (1 << 0) , PBL_STATS_OP_AVERAGE = (1 << 1) , PBL_STATS_OP_MIN = (1 << 2) , PBL_STATS_OP_MAX = (1 << 3) , PBL_STATS_OP_COUNT = (1 << 4) , PBL_STATS_OP_CONSECUTIVE = (1 << 5) , PBL_STATS_OP_CONSECUTIVE_FIRST = (1 << 6) , PBL_STATS_OP_MEDIAN = (1 << 7) } |
| Operations of pbl_stats_calculate(), combined as a bit field. More... | |
Functions | |
| void | pbl_stats_calculate (enum pbl_stats_op op, const int32_t *data, size_t num_data, pbl_stats_filter_t filter, void *context, int32_t *basic_out) |
| Calculate basic statistics over an array. | |
| int32_t | pbl_stats_weighted_median (const int32_t *vals, const int32_t *weights_x100, size_t num_data) |
| Calculate the weighted median of an array. | |