Documentation
¶
Index ¶
- func Add(s []int, t []int) []int
- func AnyTrue(values []bool) bool
- func Bool2Int(s []bool) []int
- func BoolEq(a, b []bool) bool
- func CartProductInt(values [][]int) [][]int
- func Complement(s []int, t []int) []int
- func ContainsFloat64(q float64, vals []float64) bool
- func ContainsInt(q int, vals []int) bool
- func CountFloat64(values []float64, value float64) int
- func CountInt(values []int, value int) int
- func CountTrue(values []bool) int
- func CumProdInt(vals []int) []int
- func DotInt(a, b []int) int
- func FillSliceBool(values []bool, value bool)
- func FillSliceFloat64(values []float64, value float64)
- func FillSliceInt(values []int, value int)
- func FillSliceRangeBool(values []bool, value bool, start, length int)
- func FillSliceWithIdxInt(values []int)
- func Make1DBool(values []int) []bool
- func Make2DBool(values [][]int) [][]bool
- func MakeSliceFloat64(size int, initialValue float64) []float64
- func MakeSliceInt(size, initialValue int) []int
- func MaxInt(a, b []int) []int
- func MaxSliceFloat64(values []float64) float64
- func MaxSliceInt(values []int) int
- func Mod(a, b int) int
- func OnIndices(s []bool) []int
- func OrBool(a, b []bool) []bool
- func ProdInt(vals []int) int
- func RandFloatRange(min, max float64) float64
- func RandomSample(length int) []float64
- func RevCumProdInt(vals []int) []int
- func RoundPrec(x float64, prec int) float64
- func SetIdxBool(values []bool, indexes []int, value bool)
- func SubsetSliceBool(values []bool, indices []int) []bool
- func SubsetSliceFloat64(values []float64, indices []int) []float64
- func SubsetSliceInt(values, indices []int) []int
- func SumSliceFloat64(values []float64) float64
- type TupleFloat
- type TupleInt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CartProductInt ¶
Returns cartesian product of specified 2d arrayb
func ContainsFloat64 ¶
func ContainsInt ¶
Searches int slice for specified integer
func CountFloat64 ¶
Returns number of on bits
func FillSliceBool ¶
Populates bool slice with specified value
func FillSliceFloat64 ¶
Populates float64 slice with specified value
func FillSliceInt ¶
Populates float64 slice with specified value
func FillSliceRangeBool ¶
Populates bool slice with specified value
func FillSliceWithIdxInt ¶
func FillSliceWithIdxInt(values []int)
Populates integer slice with index values
func Make1DBool ¶
func Make2DBool ¶
Helper for unit tests where int literals are easier to read
func MakeSliceFloat64 ¶
func MakeSliceInt ¶
Creates an integer slice with indices containing the specified initial value
func MaxSliceFloat64 ¶
Returns max value from specified float slice
func RandFloatRange ¶
func RandomSample ¶
Returns random slice of floats of specified length
func RevCumProdInt ¶
Returns cumulative product starting from end
func SetIdxBool ¶
sets the specified indexes of a bool slice to specified value
func SubsetSliceBool ¶
returns a copy of specified indices
func SubsetSliceFloat64 ¶
Returns the subset of values specified by indices
func SubsetSliceInt ¶
Returns the subset of values specified by indices