accel

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: AGPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const StatsHeader string = "MaxIdx\tMaxY\tMaxAccel\tThreshPos\tThresh\tNoverThresh"

Variables

This section is empty.

Functions

func AccelCol added in v0.1.2

func AccelCol(param string) int

func AccelDistf added in v0.1.2

func AccelDistf(param string) func(float64) float64

func CalcAccel added in v0.1.2

func CalcAccel(data []float64, distf func(p float64) float64) (maxidx int, maxy, maxaccel float64, err error)

func CalcAccelFull

func CalcAccelFull(r io.Reader, param string)

func CalcQuantileAndAccelFull added in v0.1.2

func CalcQuantileAndAccelFull(r io.Reader, accelparam string, quantilethresh float64) error

func CalcQuantileFull added in v0.1.2

func CalcQuantileFull(r io.Reader, param float64)

func Deriv

func Deriv(x []float64, y []float64) (xout, yout []float64, err error)

func DistribIndices

func DistribIndices(n int, f func(float64) float64) []float64

func ExpDistf

func ExpDistf() func(p float64) float64

func LowQuantile added in v0.1.4

func LowQuantile(data []float64, quantile float64) (threshpos int, thresh float64, overthresh []float64)

func MaxIndex

func MaxIndex(fs []float64) int

func MaxSlopeTimes

func MaxSlopeTimes(afsets []Afs) ([]float64, error)

func MeanAfs

func MeanAfs(afs Afs) (means []float64)

func Quantile added in v0.1.2

func Quantile(data []float64, quantile float64) (threshpos int, thresh float64, overthresh []float64)

func QuantileNoInfNoNaN added in v0.1.6

func QuantileNoInfNoNaN(data []float64, quantile float64) (threshpos int, thresh float64, overthresh []float64)

func QuantileNoInfNoNaNNoZeroNoNeg added in v0.1.7

func QuantileNoInfNoNaNNoZeroNoNeg(data []float64, quantile float64) (threshpos int, thresh float64, overthresh []float64)

func ReadTable

func ReadTable(r io.Reader, col int) ([]float64, error)

func Smooth

func Smooth(fs []float64) []float64

func SmoothedMeanSlope

func SmoothedMeanSlope(afs Afs) ([]float64, []float64, error)

func SortedGens

func SortedGens(afs Afs) (gens []float64)

func WriteAll

func WriteAll(w io.Writer, d Data)

Types

type Af

type Af struct {
	Pop string
	Gen int
	Af  float64
}

type Afs

type Afs []Af

type Data

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

func DerivAll

func DerivAll(d Data) (Data, error)

func ReadLines

func ReadLines(r io.Reader) (Data, error)

type IntSet

type IntSet struct {
	List []int
	Map  map[int]struct{}
}

func NewIntSet

func NewIntSet() *IntSet

func (*IntSet) Add

func (s *IntSet) Add(i int)

type Stats added in v0.1.2

type Stats struct {
	MaxIdx     int
	MaxY       float64
	MaxAccel   float64
	ThreshPos  int
	Thresh     float64
	OverThresh []float64
}

func (Stats) Pretty added in v0.1.2

func (s Stats) Pretty() string

Jump to

Keyboard shortcuts

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