testUtils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigFloatEqUpTo

func BigFloatEqUpTo(a, b, maxDiff *big.Float) bool

BigFloatEqUpTo returns true if abs(a-b)<=maxDiff

func DRNGFloat64Slice

func DRNGFloat64Slice(length int, seed int64) []float64

DRNGFloat64Slice wraps DRNGFloat64SliceCustomScale with scaleFactor set to 1000

func DRNGFloat64SliceCustomScale

func DRNGFloat64SliceCustomScale(length int, seed int64, scaleFactor float64) []float64

DRNGFloat64SliceCustomScale returns a slice of length entries with pseudo random values from -scaleFactor to scaleFactor Calling with the same seed will yield the same sequence. Intended to generate large test data sets

func FloatEqUpTo

func FloatEqUpTo(a, b, maxDiff float64) bool

FloatEqUpTo returns true if abs(a-b)<=maxDiff

func FloatSliceEqUpTo

func FloatSliceEqUpTo(a, b []float64, maxDiff float64) bool

FloatSliceEqUpTo returns true if FloatEqUpTo(a[i],b[i],maxDiff) holds for all elements

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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