Documentation
¶
Index ¶
- func ShortUUID(prefix string) string
- func TimeMS() int64
- type ExpFilter
- func (e *ExpFilter) Apply(exp float64, sample float64) float64
- func (e *ExpFilter) ApplyWithoutSample(exp float64) (float64, error)
- func (e *ExpFilter) Filtered() float64
- func (e *ExpFilter) Reset(alpha float64)
- func (e *ExpFilter) ResetWithOptions(options ExpFilterOptions) error
- func (e *ExpFilter) UpdateBase(alpha float64)
- func (e *ExpFilter) Value() (float64, bool)
- type ExpFilterOptions
- type MovingAverage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExpFilter ¶
type ExpFilter struct {
// contains filtered or unexported fields
}
func NewExpFilter ¶
func NewExpFilterWithOptions ¶ added in v0.0.15
func NewExpFilterWithOptions(alpha float64, options ExpFilterOptions) (*ExpFilter, error)
func (*ExpFilter) ApplyWithoutSample ¶ added in v0.0.15
func (*ExpFilter) ResetWithOptions ¶ added in v0.0.15
func (e *ExpFilter) ResetWithOptions(options ExpFilterOptions) error
func (*ExpFilter) UpdateBase ¶
type ExpFilterOptions ¶ added in v0.0.15
type MovingAverage ¶
type MovingAverage struct {
// contains filtered or unexported fields
}
func NewMovingAverage ¶
func NewMovingAverage(windowSize int) *MovingAverage
func (*MovingAverage) AddSample ¶
func (m *MovingAverage) AddSample(sample float64)
func (*MovingAverage) GetAvg ¶
func (m *MovingAverage) GetAvg() float64
func (*MovingAverage) Reset ¶
func (m *MovingAverage) Reset()
func (*MovingAverage) Size ¶
func (m *MovingAverage) Size() int
Click to show internal directories.
Click to hide internal directories.