Documentation ¶
Index ¶
Constants ¶
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" )
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" )
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" )
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" )
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
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" )
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 ¶
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 ¶
NewClampOp creates a new clamp op based on the type and arguments
func NewRoundOp ¶
NewRoundOp creates a new round op based on the type and arguments