kmath

package
v0.0.0-...-d7ca37d Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogSoftmax

func LogSoftmax[T constraints.Float](x ...T) []T

LogSoftmax for []Float

func Max

func Max[T constraints.Ordered](x ...T) T

Max default T

func MaxAny

func MaxAny[T any](less func(a, b T) bool, x ...T) T

MaxAny default less: a<b

func MaxTimes

func MaxTimes(x ...time.Time) time.Time

MaxTimes MaxAny[time.Time]

func Mean

func Mean[T constraints.Integer | constraints.Float](x []T) float64

Mean return float64, default 0

func Min

func Min[T constraints.Ordered](x ...T) T

Min default T

func MinAny

func MinAny[T any](less func(a, b T) bool, x ...T) T

MinAny default less: a<b

func MinTimes

func MinTimes(x ...time.Time) time.Time

MinTimes MinAny[time.Time]

func Reduce

func Reduce[E any, R any](x []E, init R, next func(result R, elem E) R) R

Reduce returns the result of combining the elements of the sequence using the given closure.

func Softmax

func Softmax[T constraints.Float](x ...T) []T

Softmax for Float

func Sum

func Sum[T constraints.Integer | constraints.Float](x []T) T

Sum for []{Integer | Float}

Types

This section is empty.

Jump to

Keyboard shortcuts

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