dataset

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constant

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

Constant stream

func NewConstant

func NewConstant(constant float64) *Constant

func (*Constant) Generate

func (s *Constant) Generate() float64

type Dataset

type Dataset struct {
	Values []float64
	Count  float64
	// contains filtered or unexported fields
}

func NewDataset

func NewDataset() *Dataset

func (*Dataset) Add

func (d *Dataset) Add(v float64)

func (*Dataset) LowerQuantile

func (d *Dataset) LowerQuantile(q float64) float64

func (*Dataset) Max

func (d *Dataset) Max() float64

func (*Dataset) Merge added in v1.0.0

func (d *Dataset) Merge(o *Dataset)

func (*Dataset) Min

func (d *Dataset) Min() float64

func (*Dataset) Quantile

func (d *Dataset) Quantile(q float64) float64

Quantile returns the lower quantile of the dataset

func (*Dataset) Sum

func (d *Dataset) Sum() float64

func (*Dataset) UpperQuantile

func (d *Dataset) UpperQuantile(q float64) float64

type Exponential

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

Exponential distribution

func NewExponential

func NewExponential(rate float64) *Exponential

func (*Exponential) Generate

func (g *Exponential) Generate() float64

type Generator

type Generator interface {
	Generate() float64
}

type Linear

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

Linearly increasing stream

func NewLinear

func NewLinear() *Linear

func (*Linear) Generate

func (g *Linear) Generate() float64

type Lognormal

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

Lognormal distribution

func NewLognormal

func NewLognormal(mu, sigma float64) *Lognormal

func (*Lognormal) Generate

func (g *Lognormal) Generate() float64

type Normal

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

Normal distribution

func NewNormal

func NewNormal(mean, stddev float64) *Normal

func (*Normal) Generate

func (g *Normal) Generate() float64

type Pareto

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

Pareto distribution

func NewPareto

func NewPareto(shape, scale float64) *Pareto

func (*Pareto) Generate

func (g *Pareto) Generate() float64

Jump to

Keyboard shortcuts

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