Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket[T Indexable] struct { // Min is the low, inclusive bound of the bucket. Min T // Max is the high, exclusive bound of the bucket. If // this bucket is the last bucket, the bound is inclusive // and contains the max value of the histogram. Max T // Count is the number of values represented in the bucket. Count int // contains filtered or unexported fields }
Bucket counts a partion of values.
type Histogram ¶
type Histogram[T Indexable] struct { // Min is the size of the smallest bucket. Min int // Max is the size of the biggest bucket. Max int // Count is the total size of all buckets. Count int // Buckets over which values are partionned. Buckets []Bucket[T] }
Histogram holds a count of values partioned over buckets.
func CreateRanged ¶
CreateRanged creates a histogram by custom range
type Indexable ¶
type Indexable interface { constraints.Unsigned | constraints.Signed | constraints.Float }
Indexable defines the constraints for Histogram values
Click to show internal directories.
Click to hide internal directories.