linear

package
v0.0.0-...-9649366 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.
	// Special cases are: Exp(+Inf) = +Inf and Exp(NaN) = NaN
	ExpType = "exp"

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

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

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

	// Log10Type calculates the decimal logarithm for values.
	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 (
	// 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 datapoint in the series. 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 variable may be a fraction. Special cases are: round(_, 0) = NaN

Variables

This section is empty.

Functions

func NewClampOp

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

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

func NewDateOp

func NewDateOp(opType string, usingSeries bool) (parser.Params, error)

NewDateOp creates a new date op based on the type.

func NewHistogramQuantileOp

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

NewHistogramQuantileOp creates a new histogram quantile operation.

func NewMathOp

func NewMathOp(opType string) (parser.Params, error)

NewMathOp creates a new math op based on the type.

func NewRoundOp

func NewRoundOp(args []interface{}) (parser.Params, error)

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

Types

type BaseOp

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

BaseOp stores required properties for logical operations.

func (BaseOp) Node

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

func (BaseOp) OpType

func (o BaseOp) OpType() string

func (BaseOp) String

func (o BaseOp) String() string

type Processor

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

Processor is implemented by the underlying transforms. todo: remove public visibility

Jump to

Keyboard shortcuts

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