Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
Processor is a function, that can be used to calculate features of a signal.
The result of a Processor might be one, or multiple values depending on the type of work it does. For example a DWT, or AR function might want to return multiple coefficients. A Processor could implement a 'memory' to propagate values (see RMS implementation for example).
type ProcessorResult ¶
type ProcessorResult struct { Id string `json:"id"` Value float64 `json:"value"` ProcessorResults [][]float64 `json:"processorResults"` }
ProcessorResult is a container for the results of a data push into a signal.
type Signal ¶
type Signal struct { Id string // contains filtered or unexported fields }
Signal is a representation of a signal with a pre-defined window size. A Signal uses Processors to calculate features of itself.
func (*Signal) AddProcessor ¶
AddProcessor adds a signal processor to be executed when pushing a new data point to the window. Results will be in the same order as the processors have been appended to the signal.
func (*Signal) ClearWindow ¶
func (s *Signal) ClearWindow()
ClearWindow sets the window values to zero.
func (*Signal) Push ¶
func (s *Signal) Push(value float64) (dataPoint *ProcessorResult)
Push appends the value and shifts the Window. Returns the updated feature of the signal for the current Window.