aggregation

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 1 module, 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

Overview

Package aggregation implements aggregation functions to statistic a range of values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFieldValue added in v0.3.0

func FromFieldValue[N Number](fieldValue *modelv1.FieldValue) (N, error)

FromFieldValue transforms modelv1.FieldValue to Number.

func ToFieldValue added in v0.3.0

func ToFieldValue[N Number](value N) (*modelv1.FieldValue, error)

ToFieldValue transforms Number to modelv1.FieldValue.

Types

type Func added in v0.3.0

type Func[N Number] interface {
	In(N)
	Val() N
	Reset()
}

Func supports aggregation operations.

func NewFunc added in v0.3.0

func NewFunc[N Number](af modelv1.AggregationFunction) (Func[N], error)

NewFunc returns a aggregation function based on function type.

type Number added in v0.3.0

type Number interface {
	~int64 | ~float64
}

Number denotes the supported number types.

Jump to

Keyboard shortcuts

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