Documentation
¶
Index ¶
- Variables
- func IntLength[I int | int8 | int16 | int32 | int64](num I) uint
- func IntSliceDedupe(elems []int, sortElems bool) []int
- func Itoi16(i int) (int16, error)
- func Itoi32(i int) (int32, error)
- func Itoi8(i int) (int8, error)
- func Itou32(i int) (uint32, error)
- func MatrixColsMax(d [][]float64) []float64
- func MatrixRowsMax(d [][]float64) []float64
- func Ntof64[N constraints.Integer | constraints.Float](val N) (float64, bool)
- func SliceIntBuildBeginEnd(beg, end int) []int
- func SliceToFloat64[T constraints.Integer | constraints.Float](src []T) []float64
- type Integers
- type IntegersMatrix
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOverflow = errors.New("integer overflow")
Functions ¶
func IntSliceDedupe ¶
func MatrixColsMax ¶ added in v0.33.5
func MatrixRowsMax ¶ added in v0.33.5
func Ntof64 ¶ added in v0.68.8
func Ntof64[N constraints.Integer | constraints.Float](val N) (float64, bool)
func SliceIntBuildBeginEnd ¶ added in v0.63.0
SliceIntBuildBeginEnd returns of slice of integers from beginning to end, inclusive.
func SliceToFloat64 ¶ added in v0.41.1
func SliceToFloat64[T constraints.Integer | constraints.Float](src []T) []float64
SliceToFloat64 converts a slice of integers or floats to float64.
Types ¶
type Integers ¶ added in v0.68.8
type Integers[C constraints.Integer] []C
type IntegersMatrix ¶ added in v0.68.8
type IntegersMatrix[C constraints.Integer] [][]C
func (IntegersMatrix[C]) ColumnSums ¶ added in v0.68.8
func (m IntegersMatrix[C]) ColumnSums(colIdx int, zeroOnEmpty bool) ([]C, error)
ColumnSums returns a slice where the element in each value is the sum of the column, e.g. [{sumColumn0},{sumColumn1},{sumColumn2}]
Click to show internal directories.
Click to hide internal directories.