Documentation ¶
Index ¶
- Constants
- Variables
- func Abs(dst, s []float64)
- func Apply(fn ApplyFunc, in, out []float64) []float64
- func Apply2D(fn ApplyFunc2D, in, out [][]float64) [][]float64
- func Apply3D(fn ApplyFunc3D, in, out [][][]float64) [][][]float64
- func Check2D(s [][]float64) (n1, n2 int)
- func Check3D(s [][][]float64) (n1, n2, n3 int)
- func Clear(s []float64)
- func Clear2D(s [][]float64)
- func Clear3D(s [][][]float64)
- func ConvertInf(value float64) float64
- func ConvertInfSlice(values []float64) []float64
- func ConvertInfSlice2D(values [][]float64) [][]float64
- func CopyFloat2D(s [][]float64) [][]float64
- func Exp(dst, s []float64)
- func Flatten2D(s [][]float64) []float64
- func Floorv(min float64) func(r int, v float64) float64
- func Log(dst, s []float64)
- func MakeFloat2D(n1, n2 int) [][]float64
- func MakeFloat3D(n1, n2, n3 int) [][][]float64
- func Sq(dst, s []float64)
- func Sqrt(dst, s []float64)
- func SubSlice2D(s [][]float64, c int) []float64
- type ApplyFunc
- type ApplyFunc2D
- type ApplyFunc3D
- type Error
- type Pool
Constants ¶
const ( ErrIndexOutOfRange = Error("floatx: index out of range") ErrZeroLength = Error("floatx: zero length in slice definition") ErrLength = Error("floatx: length mismatch") )
Variables ¶
var Inv = func(r int, v float64) float64 { return 1.0 / v }
Functions ¶
func Abs ¶
func Abs(dst, s []float64)
Abs returns the absolute value, element-wise, of the elements of s, and stores in dst. Panics if the lengths of dst and s do not match.
func Apply2D ¶
func Apply2D(fn ApplyFunc2D, in, out [][]float64) [][]float64
Apply function to 2D slice. If out slice is empty, the function is applied in place.
func Apply3D ¶
func Apply3D(fn ApplyFunc3D, in, out [][][]float64) [][][]float64
Apply function to 3D slice. If out slice is empty, the function is applied in place.
func ConvertInf ¶
Replace Inf and -Inf to +/- MaxFloat64 value.
func ConvertInfSlice ¶
Replace Inf and -Inf values in slice to +/- MaxFloat64 value.
func ConvertInfSlice2D ¶
Replace Inf and -Inf values in slice of slices to +/- MaxFloat64 value.
func CopyFloat2D ¶
func Exp ¶
func Exp(dst, s []float64)
Exp returns the exponential base-e, element-wise, of the elements of s, and stores in dst. Panics if the lengths of dst and s do not match.
func Log ¶
func Log(dst, s []float64)
Log returns the natural logarithm, element-wise, of the elements of s, and stores in dst. Panics if the lengths of dst and s do not match.
func MakeFloat2D ¶
func MakeFloat3D ¶
func Sq ¶
func Sq(dst, s []float64)
Sq returns the square, element-wise, of the elements of s, and stores in dst. Panics if the lengths of dst and s do not match.
func Sqrt ¶
func Sqrt(dst, s []float64)
Sqrt returns the square root, element-wise, of the elements of s, and stores in dst. Panics if the lengths of dst and s do not match.