sSlice

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFloat

func CompareFloat(s1, s2 []float64, prec int, diff float64) bool

func CompareReverseFloat

func CompareReverseFloat(s1, s2 []float64, prec int, diff float64) bool

func CountF

func CountF(values []float64) map[float64]int

func CountI

func CountI(values []int) map[int]int

func DeleteStrings added in v0.5.4

func DeleteStrings(values []string, needle string) []string

func FloatsToString added in v0.5.3

func FloatsToString(s []float64, prec int) string

func InInts added in v0.1.7

func InInts(needle int, values []int) bool

func InIntsPos added in v0.1.7

func InIntsPos(needle int, values []int) int

func InStrings

func InStrings(needle string, values []string) bool

func InStringsPos added in v0.1.7

func InStringsPos(needle string, values []string) int

func MapNames added in v0.1.7

func MapNames(values map[string]any) []string

func MinMaxF

func MinMaxF(values []float64, zero bool) (float64, float64)

Min and Max positive values of the float slice, including "0" or not

func SortF

func SortF(values []float64, order int)

SortF, order "0=asc","1=desc"

func SortFloat64 added in v0.4.0

func SortFloat64(values []float64, order int)

SortFloat64, order "1=asc","-1=desc"

func SortUniqueMinMaxF

func SortUniqueMinMaxF(values []float64) (float64, float64)

SortUniqueMinMax and delete values "0"

func SumF

func SumF(slice []float64) (sum float64)

func SumI

func SumI(slice []int) (sum int)

func TrimF

func TrimF(values []float64, keepOut float64, order int) []float64

TrimF, trim greater or lesser, order "0=asc: greater","1=desc: lesser"

func TrimLastF

func TrimLastF(values []float64, keepOut float64, order int) []float64

TrimLastF, trim greater or lesser, order "0=asc: greater","1=desc: lesser"

func WeightF

func WeightF(values []float64, prec int) map[float64]float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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