zfloat64s

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInterfaceNotFloat64 = errors.New("encountered non-float64 interface")
)

Functions

func As

func As(slice []interface{}) (res []float64, err error)

Convert a []interface{} slice into []float64 slice if possible

func Contains

func Contains(haystack []float64, needle float64) bool

Check if a slice ([]float64) contains a matching member

func ContainsAll

func ContainsAll(haystack []float64, needles ...float64) bool

Check if a []float64 slice contains ALL of the provided members

func ContainsAny

func ContainsAny(haystack []float64, needles ...float64) bool

Check if a []float64 slice contains ANY of the provided members

func Cut

func Cut(slice []float64, separator float64) (left, right []float64, found bool)

Cut the slice into two slices separated by the separator

func CutAny

func CutAny(val []float64, seperators ...float64) (left, right []float64, found bool)

Cut the slice into two slices separated by the first separator

func Equal

func Equal(a []float64, b []float64) bool

func Index

func Index(haystack []float64, needle float64) int

Find the index where the needle appears. Returns -1 if the needle doesn't appear in the slice.

func Interface

func Interface(slice []float64) (res []interface{}, err error)

Convert a []float64 slice into a slice of interfaces ([]interface{})

func Split

func Split(slice []float64, separator float64) (parts [][]float64)

Split the slice into one or more slices separated by the separator

Types

This section is empty.

Jump to

Keyboard shortcuts

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