Documentation ¶
Index ¶
- type ArrayContainer
- func (a *ArrayContainer) Array() array.Interface
- func (a *ArrayContainer) IsNull(i int) bool
- func (a *ArrayContainer) IsValid(i int) bool
- func (a *ArrayContainer) Len() int
- func (a *ArrayContainer) OrigValue(i int) interface{}
- func (a *ArrayContainer) Release()
- func (a *ArrayContainer) Slice(i int, j int) *ArrayContainer
- func (a *ArrayContainer) Value(i int) values.Value
- type ExponentialMovingAverage
- func (r *ExponentialMovingAverage) Add(v float64, bj int) float64
- func (r *ExponentialMovingAverage) AddNull(bj int)
- func (r *ExponentialMovingAverage) DoNumeric(vs *ArrayContainer, b execute.TableBuilder, bj int, ...) error
- func (r *ExponentialMovingAverage) Finish(cols []flux.ColMeta, builder execute.TableBuilder, valueIdx int) error
- func (r *ExponentialMovingAverage) GetEMA(bj int) []interface{}
- func (r *ExponentialMovingAverage) LastVal(bj int) interface{}
- func (r *ExponentialMovingAverage) PassThrough(vs *ArrayContainer, b execute.TableBuilder, bj int) error
- func (r *ExponentialMovingAverage) PassThroughTime(vs *array.Int64, b execute.TableBuilder, bj int) error
- func (r *ExponentialMovingAverage) Value(bj int) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayContainer ¶
type ArrayContainer struct {
// contains filtered or unexported fields
}
func NewArrayContainer ¶
func NewArrayContainer(a array.Interface) *ArrayContainer
func (*ArrayContainer) Array ¶ added in v0.40.0
func (a *ArrayContainer) Array() array.Interface
func (*ArrayContainer) IsNull ¶
func (a *ArrayContainer) IsNull(i int) bool
func (*ArrayContainer) IsValid ¶
func (a *ArrayContainer) IsValid(i int) bool
func (*ArrayContainer) Len ¶
func (a *ArrayContainer) Len() int
func (*ArrayContainer) OrigValue ¶
func (a *ArrayContainer) OrigValue(i int) interface{}
func (*ArrayContainer) Release ¶
func (a *ArrayContainer) Release()
func (*ArrayContainer) Slice ¶
func (a *ArrayContainer) Slice(i int, j int) *ArrayContainer
type ExponentialMovingAverage ¶
type ExponentialMovingAverage struct { Multiplier float64 // contains filtered or unexported fields }
func New ¶
func New(inTimePeriod int, numCols int) *ExponentialMovingAverage
func (*ExponentialMovingAverage) Add ¶
func (r *ExponentialMovingAverage) Add(v float64, bj int) float64
Used when we need to do EMA step by step
func (*ExponentialMovingAverage) AddNull ¶
func (r *ExponentialMovingAverage) AddNull(bj int)
Used when we need to do EMA step by step Skips over the null, increments cursor
func (*ExponentialMovingAverage) DoNumeric ¶
func (r *ExponentialMovingAverage) DoNumeric(vs *ArrayContainer, b execute.TableBuilder, bj int, doExponentialMovingAverage bool, appendToTable bool) error
func (*ExponentialMovingAverage) Finish ¶
func (r *ExponentialMovingAverage) Finish(cols []flux.ColMeta, builder execute.TableBuilder, valueIdx int) error
If we don't have enough values for a proper EMA, just append the last value (which is the average of the values so far)
func (*ExponentialMovingAverage) GetEMA ¶
func (r *ExponentialMovingAverage) GetEMA(bj int) []interface{}
func (*ExponentialMovingAverage) LastVal ¶
func (r *ExponentialMovingAverage) LastVal(bj int) interface{}
The last value encountered
func (*ExponentialMovingAverage) PassThrough ¶
func (r *ExponentialMovingAverage) PassThrough(vs *ArrayContainer, b execute.TableBuilder, bj int) error
func (*ExponentialMovingAverage) PassThroughTime ¶
func (r *ExponentialMovingAverage) PassThroughTime(vs *array.Int64, b execute.TableBuilder, bj int) error
func (*ExponentialMovingAverage) Value ¶
func (r *ExponentialMovingAverage) Value(bj int) float64
The current EMA value
Click to show internal directories.
Click to hide internal directories.