histogram

package
v2.0.0-dev0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 3 Imported by: 1

README

histogram

This package computes a histogram of values in either a []float32 or []float64 array: a count of number of values within different bins of value ranges.

F32 or F64 computes the raw counts into a corresponding float array, and F32Table or F64Table construct an etable with Value and Count columns, suitable for plotting.

The Value column represents the min value for each bin, with the max being, the value of the next bin, or the max if at the end.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func F32

func F32(hist *[]float32, vals []float32, nBins int, min, max float32)

F32 generates a histogram of counts of values within given number of bins and min / max range. hist vals is sized to nBins. if value is < min or > max it is ignored.

func F32Table

func F32Table(dt *etable.Table, vals []float32, nBins int, min, max float32)

F32Table generates an etable with a histogram of counts of values within given number of bins and min / max range. The table has columns: Value, Count if value is < min or > max it is ignored. The Value column represents the min value for each bin, with the max being the value of the next bin, or the max if at the end.

func F64

func F64(hist *[]float64, vals []float64, nBins int, min, max float64)

F64 generates a histogram of counts of values within given number of bins and min / max range. hist vals is sized to nBins. if value is < min or > max it is ignored.

func F64Table

func F64Table(dt *etable.Table, vals []float64, nBins int, min, max float64)

F64Table generates an etable with a histogram of counts of values within given number of bins and min / max range. The table has columns: Value, Count if value is < min or > max it is ignored. The Value column represents the min value for each bin, with the max being the value of the next bin, or the max if at the end.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL