Documentation ¶
Index ¶
- type TimeSeries
- func (t *TimeSeries[T]) AddSample(val T)
- func (t *TimeSeries[T]) AddSampleAt(val T, at time.Time)
- func (t *TimeSeries[T]) ClearSamples()
- func (t *TimeSeries[T]) CommitActiveSample()
- func (t *TimeSeries[T]) CommitActiveSampleAt(at time.Time)
- func (t *TimeSeries[T]) CurrentRun(threshold T, op TimeSeriesCompareOp) time.Duration
- func (t *TimeSeries[T]) GetSamples() []TimeSeriesSample[T]
- func (t *TimeSeries[T]) GetSamplesAfter(at time.Time) []TimeSeriesSample[T]
- func (t *TimeSeries[T]) KendallsTau(numSamplesToUse int) (float64, error)
- func (t *TimeSeries[T]) LinearExtrapolateTo(numSamplesToUse int, after time.Duration) (float64, error)
- func (t *TimeSeries[T]) Max() T
- func (t *TimeSeries[T]) Min() T
- func (t *TimeSeries[T]) OnlineAverage() float64
- func (t *TimeSeries[T]) OnlineStdDev() float64
- func (t *TimeSeries[T]) OnlineVariance() float64
- func (t *TimeSeries[T]) Slope() float64
- func (t *TimeSeries[T]) Sum() float64
- func (t *TimeSeries[T]) UpdateSample(val T)
- func (t *TimeSeries[T]) ZScore(val T) float64
- type TimeSeriesCompareOp
- type TimeSeriesParams
- type TimeSeriesSample
- type TimeSeriesUpdateOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeSeries ¶
type TimeSeries[T number] struct {
// contains filtered or unexported fields
}
func NewTimeSeries ¶
func NewTimeSeries[T number](params TimeSeriesParams) *TimeSeries[T]
func (*TimeSeries[T]) AddSample ¶
func (t *TimeSeries[T]) AddSample(val T)
func (*TimeSeries[T]) AddSampleAt ¶
func (t *TimeSeries[T]) AddSampleAt(val T, at time.Time)
func (*TimeSeries[T]) ClearSamples ¶
func (t *TimeSeries[T]) ClearSamples()
func (*TimeSeries[T]) CommitActiveSample ¶
func (t *TimeSeries[T]) CommitActiveSample()
func (*TimeSeries[T]) CommitActiveSampleAt ¶
func (t *TimeSeries[T]) CommitActiveSampleAt(at time.Time)
func (*TimeSeries[T]) CurrentRun ¶
func (t *TimeSeries[T]) CurrentRun(threshold T, op TimeSeriesCompareOp) time.Duration
func (*TimeSeries[T]) GetSamples ¶
func (t *TimeSeries[T]) GetSamples() []TimeSeriesSample[T]
func (*TimeSeries[T]) GetSamplesAfter ¶ added in v1.5.6
func (t *TimeSeries[T]) GetSamplesAfter(at time.Time) []TimeSeriesSample[T]
func (*TimeSeries[T]) KendallsTau ¶
func (t *TimeSeries[T]) KendallsTau(numSamplesToUse int) (float64, error)
func (*TimeSeries[T]) LinearExtrapolateTo ¶ added in v1.5.6
func (*TimeSeries[T]) Max ¶
func (t *TimeSeries[T]) Max() T
func (*TimeSeries[T]) Min ¶
func (t *TimeSeries[T]) Min() T
func (*TimeSeries[T]) OnlineAverage ¶
func (t *TimeSeries[T]) OnlineAverage() float64
func (*TimeSeries[T]) OnlineStdDev ¶
func (t *TimeSeries[T]) OnlineStdDev() float64
func (*TimeSeries[T]) OnlineVariance ¶
func (t *TimeSeries[T]) OnlineVariance() float64
func (*TimeSeries[T]) Slope ¶ added in v1.5.6
func (t *TimeSeries[T]) Slope() float64
func (*TimeSeries[T]) Sum ¶
func (t *TimeSeries[T]) Sum() float64
func (*TimeSeries[T]) UpdateSample ¶
func (t *TimeSeries[T]) UpdateSample(val T)
func (*TimeSeries[T]) ZScore ¶
func (t *TimeSeries[T]) ZScore(val T) float64
type TimeSeriesCompareOp ¶
type TimeSeriesCompareOp int
const ( TimeSeriesCompareOpEQ TimeSeriesCompareOp = iota TimeSeriesCompareOpNE TimeSeriesCompareOpGT TimeSeriesCompareOpGTE TimeSeriesCompareOpLT TimeSeriesCompareOpLTE )
func (TimeSeriesCompareOp) String ¶
func (t TimeSeriesCompareOp) String() string
type TimeSeriesParams ¶
type TimeSeriesParams struct { UpdateOp TimeSeriesUpdateOp Window time.Duration CollapseDuration time.Duration }
type TimeSeriesSample ¶
type TimeSeriesUpdateOp ¶
type TimeSeriesUpdateOp int
const ( TimeSeriesUpdateOpAdd TimeSeriesUpdateOp = iota TimeSeriesUpdateOpMax TimeSeriesUpdateOpLatest )
func (TimeSeriesUpdateOp) String ¶
func (t TimeSeriesUpdateOp) String() string
Click to show internal directories.
Click to hide internal directories.