linear

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ClampMinType ensures all values except NaNs are greater than or equal to the provided argument
	ClampMinType = "clamp_min"

	// ClampMaxType ensures all values except NaNs are lesser than or equal to provided argument
	ClampMaxType = "clamp_max"
)
View Source
const (
	// DayOfMonthType returns the day of the month for each of the given times in UTC.
	// Returned values are from 1 to 31.
	DayOfMonthType = "day_of_month"

	// DayOfWeekType returns the day of the week for each of the given times in UTC.
	// Returned values are from 0 to 6, where 0 means Sunday etc.
	DayOfWeekType = "day_of_week"

	// DaysInMonthType returns number of days in the month for each of the given times in UTC.
	// Returned values are from 28 to 31.
	DaysInMonthType = "days_in_month"

	// HourType returns the hour of the day for each of the given times in UTC.
	// Returned values are from 0 to 23.
	HourType = "hour"

	// MinuteType returns the minute of the hour for each of the given times in UTC.
	// Returned values are from 0 to 59.
	MinuteType = "minute"

	// MonthType returns the month of the year for each of the given times in UTC.
	// Returned values are from 1 to 12, where 1 means January etc.
	MonthType = "month"

	// YearType returns the year for each of the given times in UTC.
	YearType = "year"
)
View Source
const (
	// AbsType takes absolute value of each datapoint in the series
	AbsType = "abs"

	// CeilType rounds each value in the timeseries up to the nearest integer
	CeilType = "ceil"

	// FloorType rounds each value in the timeseries down to the nearest integer
	FloorType = "floor"

	// ExpType calculates the exponential function for all values in the timerseies
	// Special cases are: Exp(+Inf) = +Inf and Exp(NaN) = NaN
	ExpType = "exp"

	// SqrtType calculates the square root for all values in the timeseries
	SqrtType = "sqrt"

	// LnType calculates the natural logarithm for all values in the timeseries
	LnType = "ln"

	// Log2Type calculates the binary logarithm for all values in the timeseries
	Log2Type = "log2"

	// Log10Type calculates the decimal logarithm for all values in the timeseries
	Log10Type = "log10"
)
View Source
const (

	// SortType returns timeseries elements sorted by their values, in ascending order.
	SortType = "sort"

	// SortDescType is the same as sort, but sorts in descending order.
	SortDescType = "sort_desc"
)
View Source
const AbsentType = "absent"

AbsentType returns a timeseries with all NaNs if the timeseries passed in has any non NaNs, and returns a timeseries with the value 1 if the timeseries passed in has no elements

View Source
const (
	// HistogramQuantileType calculates the quantile for histogram buckets.
	//
	// NB: each sample must contain a tag with a bucket name (given by tag
	// options) that denotes the upper bound of that bucket; series without this
	// tag are ignored.
	HistogramQuantileType = "histogram_quantile"
)
View Source
const RoundType = "round"

RoundType rounds each value in the timeseries to the nearest integer. Ties are resolved by rounding up. The optional to_nearest argument allows specifying the nearest multiple to which the timeseries values should be rounded (default=1). This multiple may also be a fraction.

Variables

This section is empty.

Functions

func NewHistogramQuantileOp added in v0.6.0

func NewHistogramQuantileOp(
	args []interface{},
	opType string,
) (parser.Params, error)

NewHistogramQuantileOp creates a new histogram quantile operation.

Types

type BaseOp

type BaseOp struct {
	// contains filtered or unexported fields
}

BaseOp stores required properties for logical operations

func NewAbsentOp

func NewAbsentOp() BaseOp

NewAbsentOp creates a new base linear transform with an absent node

func NewClampOp

func NewClampOp(args []interface{}, optype string) (BaseOp, error)

NewClampOp creates a new clamp op based on the type and arguments

func NewDateOp

func NewDateOp(optype string) (BaseOp, error)

NewDateOp creates a new date op based on the type

func NewMathOp

func NewMathOp(optype string) (BaseOp, error)

NewMathOp creates a new math op based on the type

func NewRoundOp

func NewRoundOp(args []interface{}) (BaseOp, error)

NewRoundOp creates a new round op based on the type and arguments

func (BaseOp) Node

func (o BaseOp) Node(controller *transform.Controller, _ transform.Options) transform.OpNode

Node creates an execution node

func (BaseOp) OpType

func (o BaseOp) OpType() string

OpType for the operator

func (BaseOp) String

func (o BaseOp) String() string

String representation

type Processor

type Processor interface {
	Process(values []float64) []float64
}

Processor is implemented by the underlying transforms

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL