datastructs_histograms_mod Module

Module for weighted histograms with statistical operations.

Provides a data structure to accumulate weighted values in bins and compute statistical properties such as mean, variance, and higher-order moments.

Features: - Initialize and reset histograms with user-defined bin ranges - Add weighted values to bins - Compute mean, variance, and moments of any order


Uses

  • module~~datastructs_histograms_mod~~UsesGraph module~datastructs_histograms_mod datastructs_histograms_mod module~datastructs_kinds_mod datastructs_kinds_mod module~datastructs_histograms_mod->module~datastructs_kinds_mod iso_fortran_env iso_fortran_env module~datastructs_kinds_mod->iso_fortran_env

Used by

  • module~~datastructs_histograms_mod~~UsedByGraph module~datastructs_histograms_mod datastructs_histograms_mod module~datastructs_mod datastructs_mod module~datastructs_mod->module~datastructs_histograms_mod

Derived Types

type, public ::  weighted_histogram_t

Weighted histogram type

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable :: bins(:)

Bin weights

integer(kind=i4), public :: min_index

Lower bound of bins

integer(kind=i4), public :: max_index

Upper bound of bins

real(kind=dp), public :: total_weight

Sum of all weights

Type-Bound Procedures

procedure, public :: init => weighted_histogram_init
procedure, public :: reset => weighted_histogram_reset
procedure, public :: add_value => weighted_histogram_add_value
procedure, public :: get_mean => weighted_histogram_get_mean
procedure, public :: get_variance => weighted_histogram_get_variance
procedure, public :: get_moment => weighted_histogram_get_moment