Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Number ¶
type Number interface {
constraints.Integer | constraints.Float
}
Number is an interface representing all numerical types in Go.
type Ring ¶
type Ring[N Number] interface { Put(N) // Put adds a sample to the Ring. Min() float64 // Min returns the smallest value of all values in the Ring. Max() float64 // Max returns the largest value of all values in the Ring. Average() float64 // Average computes the average value of all values in the Ring. MinMaxAvg() (float64, float64, float64) // MinMaxAvg computes the min, max, and average values of all values in the Ring. Percentile(p float32) float64 // Percentile computes a given percentile value of all values in the Ring. }
Ring is an entity capable of keeping only the a number of most recent values.
Click to show internal directories.
Click to hide internal directories.