Documentation
¶
Index ¶
- type MovingStats
- func (stats *MovingStats) Add(val float64)
- func (stats *MovingStats) AddStater(stater StepStater) StatHandler
- func (stats *MovingStats) GetWeightUnilateralValueStater(newFactor float64, oldFactor float64) StepStater
- func (stats *MovingStats) GetWeightValueStater(newFactor float64, oldFactor float64) StepStater
- func (stats *MovingStats) History() []float64
- func (stats *MovingStats) Last() float64
- func (stats *MovingStats) LastN(n int64) float64
- func (stats *MovingStats) N() int64
- func (stats *MovingStats) SumStater(_ StatsProvider, old float64, removed float64, val float64) (new float64)
- func (stats *MovingStats) Value() float64
- func (stats *MovingStats) Window() int64
- type SquareStatsProvider
- type StatHandler
- type StatsProvider
- type StepStater
- type SumStatsProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovingStats ¶
type MovingStats struct {
// contains filtered or unexported fields
}
func NewMovingStats ¶
func NewMovingStats(window int64) *MovingStats
func NewMovingSum ¶
func NewMovingSum(window int64) *MovingStats
func NewMovingUnilateralValue ¶
func NewMovingUnilateralValue(window int64, newFactor float64, oldFactor float64) *MovingStats
func NewMovingValue ¶
func NewMovingValue(window int64, newFactor float64, oldFactor float64) *MovingStats
func (*MovingStats) Add ¶
func (stats *MovingStats) Add(val float64)
func (*MovingStats) AddStater ¶
func (stats *MovingStats) AddStater(stater StepStater) StatHandler
func (*MovingStats) GetWeightUnilateralValueStater ¶
func (stats *MovingStats) GetWeightUnilateralValueStater(newFactor float64, oldFactor float64) StepStater
func (*MovingStats) GetWeightValueStater ¶
func (stats *MovingStats) GetWeightValueStater(newFactor float64, oldFactor float64) StepStater
func (*MovingStats) History ¶
func (stats *MovingStats) History() []float64
func (*MovingStats) Last ¶
func (stats *MovingStats) Last() float64
func (*MovingStats) LastN ¶
func (stats *MovingStats) LastN(n int64) float64
func (*MovingStats) N ¶
func (stats *MovingStats) N() int64
func (*MovingStats) SumStater ¶
func (stats *MovingStats) SumStater(_ StatsProvider, old float64, removed float64, val float64) (new float64)
func (*MovingStats) Value ¶
func (stats *MovingStats) Value() float64
func (*MovingStats) Window ¶
func (stats *MovingStats) Window() int64
type SquareStatsProvider ¶
type SquareStatsProvider interface {
SumStatsProvider
Sum2() float64
}
type StatHandler ¶
type StatHandler int
type StatsProvider ¶
type StepStater ¶
type StepStater func(stats StatsProvider, old float64, removed float64, val float64) (new float64)
type SumStatsProvider ¶
type SumStatsProvider interface {
StatsProvider
Sum() float64
}
Click to show internal directories.
Click to hide internal directories.