Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnToFloat32 ¶
func ColumnToFloat32(cols io.ColumnInterface, name string) (outCol []float32, err error)
func ColumnToFloat64 ¶
func ColumnToFloat64(cols io.ColumnInterface, name string) (outCol []float64, err error)
Types ¶
type AggInterface ¶
type AggInterface interface { FunctionInterface /* Input arguments, followed by a custom set of arguments */ New(argMap *functions.ArgumentMap, args ...interface{}) (AggInterface, error) /* Accum() sends new data to the aggregate and returns the currently valid output of this aggregate */ //Accum(ts []time.Time, rows io.Rows) // The io.ColumnInterface parameter is one of; ColumnSeries or Rows Accum(io.TimeBucketKey, *functions.ArgumentMap, io.ColumnInterface) (*io.ColumnSeries, error) }
An aggregate is a function that takes rows as input and outputs a processed set of rows
The contract with the agg function is: the input rows must conform to the expected inputs of the agg, known to the caller. For example: If we have an agg that outputs "candles", there must be a column in the input rows that can be used to evaluate "Price". This must be a named column in the input. The output of the candler aggregate will always feature "Open, High, Low, Close", but may also feature summed values like "Volume" or averaged values like VWAP (volume weighted average price).
An agg has a set of "must have" input columns and can output a differing number of columns (and rows) depending on inputs.
type FunctionInterface ¶
type FunctionInterface interface { GetRequiredArgs() []io.DataShape GetOptionalArgs() []io.DataShape GetInitArgs() []io.DataShape }
TODO: This is where we break out a UDF API
type OrderedTime ¶
Sortable time slice
func (OrderedTime) Len ¶
func (ot OrderedTime) Len() int
func (OrderedTime) Less ¶
func (ot OrderedTime) Less(i, j int) bool
func (OrderedTime) Swap ¶
func (ot OrderedTime) Swap(i, j int)
Directories ¶
Path | Synopsis |
---|---|
* File: /Users/robi/Documents/git.hub/marketstore/uda/gap/gap.go * Created Date: Thursday, February 28th 2019, 4:42:41 pm * Author: Robi Lin * ----- * Last Modified: * Modified By: * ----- * Copyright (c) 2019 QK Captial * * Description: *
|
* File: /Users/robi/Documents/git.hub/marketstore/uda/gap/gap.go * Created Date: Thursday, February 28th 2019, 4:42:41 pm * Author: Robi Lin * ----- * Last Modified: * Modified By: * ----- * Copyright (c) 2019 QK Captial * * Description: * |