generator

package
v0.0.0-...-9e5ecb5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CombineGenerator

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

CombineGenerator uses one generator as base and other generators as mutators.

func NewCombineGenerator

func NewCombineGenerator(base Generator, mutators []Generator) *CombineGenerator

func (*CombineGenerator) LowerBound

func (rw *CombineGenerator) LowerBound() float64

func (*CombineGenerator) Next

func (rw *CombineGenerator) Next(points *[]Point)

func (*CombineGenerator) SetMiddle

func (rw *CombineGenerator) SetMiddle()

func (*CombineGenerator) UpperBound

func (rw *CombineGenerator) UpperBound() float64

type CyclicGenerator

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

CyclicGenerator implements random walk.

func NewCyclicGenerator

func NewCyclicGenerator(r *rand.Rand, lowerBound, upperBound float64) *CyclicGenerator

func (*CyclicGenerator) LowerBound

func (rw *CyclicGenerator) LowerBound() float64

func (*CyclicGenerator) Next

func (rw *CyclicGenerator) Next(points *[]Point)

func (*CyclicGenerator) SetMiddle

func (rw *CyclicGenerator) SetMiddle()

func (*CyclicGenerator) UpperBound

func (rw *CyclicGenerator) UpperBound() float64

type Generator

type Generator interface {
	// fill slice with generated points
	Next(points *[]Point)
	LowerBound() float64
	UpperBound() float64
	SetMiddle()
}

type IncreasingGenerator

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

IncreasingGenerator implements random walk.

func NewIncreasingGenerator

func NewIncreasingGenerator(
	r *rand.Rand, bias, resetProb, step, lowerBound, upperBound float64) *IncreasingGenerator

func (*IncreasingGenerator) LowerBound

func (rw *IncreasingGenerator) LowerBound() float64

func (*IncreasingGenerator) Next

func (rw *IncreasingGenerator) Next(points *[]Point)

func (*IncreasingGenerator) SetMiddle

func (rw *IncreasingGenerator) SetMiddle()

func (*IncreasingGenerator) UpperBound

func (rw *IncreasingGenerator) UpperBound() float64

type Point

type Point struct {
	Timestamp uint64
	Value     float64
}

type RandomWalkGenerator

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

RandomWalkGenerator implements random walk.

func NewRandomWalkGenerator

func NewRandomWalkGenerator(
	r *rand.Rand, step, lowerBound, upperBound float64) *RandomWalkGenerator

func (*RandomWalkGenerator) LowerBound

func (rw *RandomWalkGenerator) LowerBound() float64

func (*RandomWalkGenerator) Next

func (rw *RandomWalkGenerator) Next(points *[]Point)

func (*RandomWalkGenerator) SetMiddle

func (rw *RandomWalkGenerator) SetMiddle()

func (*RandomWalkGenerator) UpperBound

func (rw *RandomWalkGenerator) UpperBound() float64

type ScalingGenerator

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

ScalingGenerator implements random walk.

func NewScalingGenerator

func NewScalingGenerator(inner Generator, scale float64) *ScalingGenerator

func (*ScalingGenerator) LowerBound

func (rw *ScalingGenerator) LowerBound() float64

func (*ScalingGenerator) Next

func (rw *ScalingGenerator) Next(points *[]Point)

func (*ScalingGenerator) SetMiddle

func (rw *ScalingGenerator) SetMiddle()

func (*ScalingGenerator) UpperBound

func (rw *ScalingGenerator) UpperBound() float64

type SpikesGenerator

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

SpikesGenerator implements random walk.

func NewSpikesGenerator

func NewSpikesGenerator(r *rand.Rand, upperBound float64) *SpikesGenerator

func (*SpikesGenerator) LowerBound

func (rw *SpikesGenerator) LowerBound() float64

func (*SpikesGenerator) Next

func (rw *SpikesGenerator) Next(points *[]Point)

func (*SpikesGenerator) SetMiddle

func (rw *SpikesGenerator) SetMiddle()

func (*SpikesGenerator) UpperBound

func (rw *SpikesGenerator) UpperBound() float64

Jump to

Keyboard shortcuts

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