Versions in this module Expand all Collapse all v1 v1.11.13-rc.2 Dec 4, 2024 v1.0.0 Dec 4, 2024 Changes in this version + var ErrOverflow = errors.New("overflow") + var ErrUnderflow = errors.New("underflow") + func AbsDiff[T constraints.Unsigned](a, b T) T + func Add64(a, b uint64) (uint64, error) + func Mul64(a, b uint64) (uint64, error) + func Sub[T constraints.Unsigned](a, b T) (T, error) + type Averager interface + Observe func(value float64, currentTime time.Time) + Read func() float64 + func NewAverager(initialPrediction float64, halflife time.Duration, currentTime time.Time) Averager + func NewSyncAverager(averager Averager) Averager + func NewUninitializedAverager(halfLife time.Duration) Averager + type AveragerHeap interface + Add func(nodeID ids.NodeID, averager Averager) (Averager, bool) + Len func() int + Peek func() (ids.NodeID, Averager, bool) + Pop func() (ids.NodeID, Averager, bool) + Remove func(nodeID ids.NodeID) (Averager, bool) + func NewMaxAveragerHeap() AveragerHeap