BRL-CAD
|
General purpose histogram handling routines. More...
Files | |
file | hist.h |
Data Structures | |
struct | bu_hist |
Macros | |
#define | BU_HIST_NULL ((struct bu_hist *)0) |
#define | BU_CK_HIST(_p) BU_CKMAG(_p, BU_HIST_MAGIC, "struct bu_hist") |
#define | BU_HIST_INIT(_hp) |
#define | BU_HIST_INIT_ZERO {BU_HIST_MAGIC, 0.0, 0.0, 0.0, 0, 0, NULL} |
#define | BU_HIST_IS_INITIALIZED(_hp) (((struct bu_hist *)(_hp) != BU_HIST_NULL) && LIKELY((_hp)->magic == BU_HIST_MAGIC)) |
#define | BU_HIST_TALLY(_hp, _val) |
#define | BU_HIST_TALLY_MULTIPLE(_hp, _val, _count) |
Typedefs | |
typedef struct bu_hist | bu_hist_t |
Functions | |
void | bu_hist_free (struct bu_hist *histp) |
void | bu_hist_init (struct bu_hist *histp, fastf_t min, fastf_t max, size_t nbins) |
void | bu_hist_range (struct bu_hist *hp, fastf_t low, fastf_t high) |
void | bu_hist_pr (const struct bu_hist *histp, const char *title) |
General purpose histogram handling routines.
The subroutine bu_hist_range() is used to record items that may extend across multiple "bin"s.
initialize a bu_hist struct without allocating any memory.
#define BU_HIST_INIT_ZERO {BU_HIST_MAGIC, 0.0, 0.0, 0.0, 0, 0, NULL} |
#define BU_HIST_IS_INITIALIZED | ( | _hp | ) | (((struct bu_hist *)(_hp) != BU_HIST_NULL) && LIKELY((_hp)->magic == BU_HIST_MAGIC)) |
returns truthfully whether a bu_hist has been initialized via BU_HIST_INIT() or BU_HIST_INIT_ZERO.
Initialize a bu_hist structure.
It is expected that the structure is junk upon entry.