Documentation ¶
Index ¶
- func GetAverageColumnFloat32(cols io.ColumnInterface, srcCols []io.DataShape) (avgCol []float32, err error)
- type Candle
- type CandleMap
- type Candler
- func (ca *Candler) Accum(_ io.TimeBucketKey, _ *functions.ArgumentMap, _ io.ColumnInterface, ...) (*io.ColumnSeries, error)
- func (ca *Candler) GetCandle(t time.Time, cndl ...*Candle) *Candle
- func (ca *Candler) GetInitArgs() []io.DataShape
- func (ca *Candler) GetOptionalArgs() []io.DataShape
- func (ca *Candler) GetRequiredArgs() []io.DataShape
- func (ca *Candler) New(argMap *functions.ArgumentMap, args ...interface{}) (c *Candler, err error)
- func (ca *Candler) Output() *io.ColumnSeries
- type EOHLCStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAverageColumnFloat32 ¶
Types ¶
type Candle ¶
type Candle struct { StartTime time.Time Duration *utils.CandleDuration /* Every candle has OHLC */ EOHLC EOHLCStruct OpenTime, CloseTime time.Time // The time at which the Open and Close prices happened /* Some candles optionally sum quantities like "Volume" from the input columns */ SumMap map[string]float64 // One sum per mapped column Count int64 // Counts the elements incorporated in the Sums /* Does this candle have complete data? Sometimes we can tell... */ Complete bool }
func (*Candle) SerializeToRowData ¶
type Candler ¶
type Candler struct { uda.AggInterface /* Manages one timeframe, creates candles in that timeframe from input and outputs them on demand. */ MyCD *utils.CandleDuration CMap CandleMap /* We need to keep an ordered list of sum and avg names to ensure ordered output */ SumNames, AvgNames []string // A cache of the column names that are summed and averaged in the candles AccumSumNames []string // Consolidated list of names either summed or averaged }
func (*Candler) Accum ¶
func (ca *Candler) Accum(_ io.TimeBucketKey, _ *functions.ArgumentMap, _ io.ColumnInterface, _ *catalog.Directory, ) (*io.ColumnSeries, error)
Accum sends new data to the aggregate.
func (*Candler) GetInitArgs ¶
func (*Candler) GetOptionalArgs ¶
func (*Candler) GetRequiredArgs ¶
func (*Candler) New ¶
func (ca *Candler) New(argMap *functions.ArgumentMap, args ...interface{}) (c *Candler, err error)
OVERRIDE THIS METHOD Creates a new candler using the arguments of the specific implementation for inputColumns and optionalInputColumns
func (*Candler) Output ¶
func (ca *Candler) Output() *io.ColumnSeries
Output() returns the currently valid output of this aggregate
type EOHLCStruct ¶
Click to show internal directories.
Click to hide internal directories.