func (c *Condition) newTracker() *eventTracker { et := &eventTracker{ df: smoothie.NewDataFrameFromSlice(make([]float64, c.WindowSize)), states: smoothie.NewDataFrameFromSlice(make([]float64, STATUS_SIZE)), } if c.Aggregation != nil { et.agg = &aggregator{} } return et }
func (e *eventTracker) refresh() { e.states = smoothie.NewDataFrameFromSlice(make([]float64, STATUS_SIZE)) e.occurences = 0 }