series

package
v0.0.0-...-31ccac1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evolution

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

func NewEvolution

func NewEvolution(procedures ...*Sequence) *Evolution

func (*Evolution) Current

func (e *Evolution) Current() int

Current returns the current state of the series

func (*Evolution) Limit

func (e *Evolution) Limit() int

Limit returns the amount of iterations defined in this series

func (*Evolution) Next

func (e *Evolution) Next() bool

Next updates the procedures with the next value it returns true if there was an update and false if there is nothing more to evolve.

type Sequence

type Sequence struct {
	Transform
	// contains filtered or unexported fields
}

func NewSequence

func NewSequence(value *float64, transform Transform, limit int) *Sequence

func PerturbationSequence

func PerturbationSequence(value *float64, step float64, limit, rounding int) *Sequence

func RangeSequence

func RangeSequence(value *float64, start, end float64, limit, rounding int) *Sequence

func (*Sequence) Next

func (p *Sequence) Next() bool

func (*Sequence) Reset

func (p *Sequence) Reset()

func (*Sequence) Run

func (p *Sequence) Run() []float64

type Transform

type Transform func(v float64) float64

func IncMul

func IncMul(w float64, rounding int) Transform

func IncNum

func IncNum(w float64, rounding int) Transform

Jump to

Keyboard shortcuts

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