histogram

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

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 table.Table 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 *table.Table, vals []float32, nBins int, min, max float32)

F32Table generates an table 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 *table.Table, vals []float64, nBins int, min, max float64)

F64Table generates an table 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