Documentation ¶
Index ¶
- type ConcurrentMovingAverage
- func (c *ConcurrentMovingAverage) Add(values ...float64)
- func (c *ConcurrentMovingAverage) Avg() float64
- func (c *ConcurrentMovingAverage) Count() int
- func (c *ConcurrentMovingAverage) Max() (float64, error)
- func (c *ConcurrentMovingAverage) Min() (float64, error)
- func (c *ConcurrentMovingAverage) SlotsFilled() bool
- func (c *ConcurrentMovingAverage) Values() []float64
- type MovingAverage
- func (ma *MovingAverage) Add(values ...float64)
- func (ma *MovingAverage) Avg() float64
- func (ma *MovingAverage) Count() int
- func (ma *MovingAverage) Max() (float64, error)
- func (ma *MovingAverage) Min() (float64, error)
- func (ma *MovingAverage) SetIgnoreInfValues(ignoreInfValues bool)
- func (ma *MovingAverage) SetIgnoreNanValues(ignoreNanValues bool)
- func (ma *MovingAverage) SlotsFilled() bool
- func (ma *MovingAverage) Values() []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentMovingAverage ¶
type ConcurrentMovingAverage struct {
// contains filtered or unexported fields
}
func Concurrent ¶
func Concurrent(ma *MovingAverage) *ConcurrentMovingAverage
func (*ConcurrentMovingAverage) Add ¶
func (c *ConcurrentMovingAverage) Add(values ...float64)
func (*ConcurrentMovingAverage) Avg ¶
func (c *ConcurrentMovingAverage) Avg() float64
func (*ConcurrentMovingAverage) Count ¶
func (c *ConcurrentMovingAverage) Count() int
func (*ConcurrentMovingAverage) Max ¶
func (c *ConcurrentMovingAverage) Max() (float64, error)
func (*ConcurrentMovingAverage) Min ¶
func (c *ConcurrentMovingAverage) Min() (float64, error)
func (*ConcurrentMovingAverage) SlotsFilled ¶
func (c *ConcurrentMovingAverage) SlotsFilled() bool
func (*ConcurrentMovingAverage) Values ¶
func (c *ConcurrentMovingAverage) Values() []float64
type MovingAverage ¶
type MovingAverage struct { Window int // contains filtered or unexported fields }
func New ¶
func New(window int) *MovingAverage
func (*MovingAverage) Add ¶
func (ma *MovingAverage) Add(values ...float64)
func (*MovingAverage) Avg ¶
func (ma *MovingAverage) Avg() float64
func (*MovingAverage) Count ¶
func (ma *MovingAverage) Count() int
func (*MovingAverage) Max ¶
func (ma *MovingAverage) Max() (float64, error)
func (*MovingAverage) Min ¶
func (ma *MovingAverage) Min() (float64, error)
func (*MovingAverage) SetIgnoreInfValues ¶
func (ma *MovingAverage) SetIgnoreInfValues(ignoreInfValues bool)
func (*MovingAverage) SetIgnoreNanValues ¶
func (ma *MovingAverage) SetIgnoreNanValues(ignoreNanValues bool)
func (*MovingAverage) SlotsFilled ¶
func (ma *MovingAverage) SlotsFilled() bool
func (*MovingAverage) Values ¶
func (ma *MovingAverage) Values() []float64
Click to show internal directories.
Click to hide internal directories.