Documentation ¶
Index ¶
- func Abs(x []float64) []float64
- func Abs_Inplace(x []float64)
- func Abs_Into(dst, x []float64) []float64
- func Add(x, y []float64) []float64
- func AddNumber(x []float64, a float64) []float64
- func AddNumber_Inplace(x []float64, a float64)
- func AddNumber_Into(dst, x []float64, a float64) []float64
- func Add_Inplace(x, y []float64)
- func Add_Into(dst, x, y []float64) []float64
- func All(x []bool) bool
- func And(x, y []bool) []bool
- func And_Inplace(x, y []bool)
- func And_Into(dst, x, y []bool) []bool
- func Any(x []bool) bool
- func ArgMax(x []float64) int
- func ArgMin(x []float64) int
- func Ceil(x []float64) []float64
- func Ceil_Inplace(x []float64)
- func Ceil_Into(dst, x []float64) []float64
- func ChangeRate[B Number, C Number](baseValue B, currentValue C) (changeRate float64)
- func CosineSimilarity(x, y []float64) float64
- func Count(x []bool) int
- func CumProd(x []float64) []float64
- func CumProd_Inplace(x []float64)
- func CumProd_Into(dst, x []float64) []float64
- func CumSum(x []float64) []float64
- func CumSum_Inplace(x []float64)
- func CumSum_Into(dst, x []float64) []float64
- func Decimal(value float64, digits ...int) float64
- func Distance(x, y []float64) float64
- func Div(x, y []float64) []float64
- func DivNumber(x []float64, a float64) []float64
- func DivNumber_Inplace(x []float64, a float64)
- func DivNumber_Into(dst, x []float64, a float64) []float64
- func Div_Inplace(x, y []float64)
- func Div_Into(dst, x, y []float64) []float64
- func Dot(x, y []float64) float64
- func Eq(x, y []float64) []bool
- func EqNumber(x []float64, a float64) []bool
- func EqNumber_Into(dst []bool, x []float64, a float64) []bool
- func Eq_Into(dst []bool, x, y []float64) []bool
- func Find(x []float64, a float64) int
- func Floor(x []float64) []float64
- func Floor_Inplace(x []float64)
- func Floor_Into(dst, x []float64) []float64
- func FromBool(x []bool) []float64
- func FromBool_Into(dst []float64, x []bool) []float64
- func FromFloat32(x []float32) []float64
- func FromFloat32_Into(dst []float64, x []float32) []float64
- func FromInt32(x []int32) []float64
- func FromInt32_Into(dst []float64, x []int32) []float64
- func FromInt64(x []int64) []float64
- func FromInt64_Into(dst []float64, x []int64) []float64
- func Gather(x []float64, idx []int) []float64
- func Gather_Into(dst, x []float64, idx []int) []float64
- func Gt(x, y []float64) []bool
- func GtNumber(x []float64, a float64) []bool
- func GtNumber_Into(dst []bool, x []float64, a float64) []bool
- func Gt_Into(dst []bool, x, y []float64) []bool
- func Gte(x, y []float64) []bool
- func GteNumber(x []float64, a float64) []bool
- func GteNumber_Into(dst []bool, x []float64, a float64) []bool
- func Gte_Into(dst []bool, x, y []float64) []bool
- func Inv(x []float64) []float64
- func Inv_Inplace(x []float64)
- func Inv_Into(dst, x []float64) []float64
- func IsNaN(f float64) bool
- func Lt(x, y []float64) []bool
- func LtNumber(x []float64, a float64) []bool
- func LtNumber_Into(dst []bool, x []float64, a float64) []bool
- func Lt_Into(dst []bool, x, y []float64) []bool
- func Lte(x, y []float64) []bool
- func LteNumber(x []float64, a float64) []bool
- func LteNumber_Into(dst []bool, x []float64, a float64) []bool
- func Lte_Into(dst []bool, x, y []float64) []bool
- func ManhattanDistance(x, y []float64) float64
- func ManhattanNorm(x []float64) float64
- func Mat4Mul(x, y []float64) []float64
- func Mat4Mul_Into(dst, x, y []float64) []float64
- func MatMul(x, y []float64, n int) []float64
- func MatMul_Into(dst, x, y []float64, n int) []float64
- func Max(x []float64) float64
- func Maximum(x, y []float64) []float64
- func MaximumNumber(x []float64, a float64) []float64
- func MaximumNumber_Inplace(x []float64, a float64)
- func MaximumNumber_Into(dst, x []float64, a float64) []float64
- func Maximum_Inplace(x, y []float64)
- func Maximum_Into(dst, x, y []float64) []float64
- func Mean(x []float64) float64
- func Median(x []float64) float64
- func Min(x []float64) float64
- func Minimum(x, y []float64) []float64
- func MinimumNumber(x []float64, a float64) []float64
- func MinimumNumber_Inplace(x []float64, a float64)
- func MinimumNumber_Into(dst, x []float64, a float64) []float64
- func Minimum_Inplace(x, y []float64)
- func Minimum_Into(dst, x, y []float64) []float64
- func Mul(x, y []float64) []float64
- func MulNumber(x []float64, a float64) []float64
- func MulNumber_Inplace(x []float64, a float64)
- func MulNumber_Into(dst, x []float64, a float64) []float64
- func Mul_Inplace(x, y []float64)
- func Mul_Into(dst, x, y []float64) []float64
- func Neg(x []float64) []float64
- func Neg_Inplace(x []float64)
- func Neg_Into(dst, x []float64) []float64
- func Neq(x, y []float64) []bool
- func NeqNumber(x []float64, a float64) []bool
- func NeqNumber_Into(dst []bool, x []float64, a float64) []bool
- func Neq_Into(dst []bool, x, y []float64) []bool
- func NetChangeRate[B Number, C Number](baseValue B, currentValue C) (changeRate float64)
- func None(x []bool) bool
- func Norm(x []float64) float64
- func Not(x []bool) []bool
- func Not_Inplace(x []bool)
- func Not_Into(dst, x []bool) []bool
- func Ones(n int) []float64
- func Ones_Into(dst []float64, n int) []float64
- func Or(x, y []bool) []bool
- func Or_Inplace(x, y []bool)
- func Or_Into(dst, x, y []bool) []bool
- func Pow(x, y []float64) []float64
- func Pow_Inplace(x, y []float64)
- func Pow_Into(dst, x, y []float64) []float64
- func Prod(x []float64) float64
- func Quantile(x []float64, q float64) float64
- func Range(a, b float64) []float64
- func Range_Into(dst []float64, a, b float64) []float64
- func Repeat(a float64, n int) []float64
- func Repeat_Into(dst []float64, a float64, n int) []float64
- func Round(x []float64) []float64
- func Round_Inplace(x []float64)
- func Round_Into(dst, x []float64) []float64
- func Scatter(x []float64, idx []int, size int) []float64
- func Scatter_Into(dst, x []float64, idx []int) []float64
- func Select(x []float64, y []bool) []float64
- func Select_Into(dst, x []float64, y []bool) []float64
- func SetAcceleration(enabled bool)
- func Sqrt(x []float64) []float64
- func Sqrt_Inplace(x []float64)
- func Sqrt_Into(dst, x []float64) []float64
- func Sub(x, y []float64) []float64
- func SubNumber(x []float64, a float64) []float64
- func SubNumber_Inplace(x []float64, a float64)
- func SubNumber_Into(dst, x []float64, a float64) []float64
- func Sub_Inplace(x, y []float64)
- func Sub_Into(dst, x, y []float64) []float64
- func Sum(x []float64) float64
- func ToBool(x []float64) []bool
- func ToBool_Into(dst []bool, x []float64) []bool
- func ToFloat32(x []float64) []float32
- func ToFloat32_Into(dst []float32, x []float64) []float32
- func ToInt32(x []float64) []int32
- func ToInt32_Into(dst []int32, x []float64) []int32
- func ToInt64(x []float64) []int64
- func ToInt64_Into(dst []int64, x []float64) []int64
- func Xor(x, y []bool) []bool
- func Xor_Inplace(x, y []bool)
- func Xor_Into(dst, x, y []bool) []bool
- func Zeros(n int) []float64
- func Zeros_Into(dst []float64, n int) []float64
- type BaseType
- type BigFloat
- type Complex
- type Float
- type GenericType
- type Integer
- type MoveTypedeprecated
- type Number
- type Number16deprecated
- type Number32deprecated
- type Number64deprecated
- type Number8deprecated
- type NumberOfCPUBitsRelated
- type Ordered
- type Signed
- type StatType
- type SystemInfo
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs_Inplace ¶
func Abs_Inplace(x []float64)
Abs_Inplace computes the absolute value of each slice element, inplace.
func Abs_Into ¶
Abs_Into computes the absolute value of each slice element and stores the result in the destination slice.
func AddNumber_Inplace ¶
AddNumber_Inplace adds a number to each slice element, inplace.
func AddNumber_Into ¶
AddNumber_Into adds a number to each slice element and stores the result in the destination slice.
func Add_Inplace ¶
func Add_Inplace(x, y []float64)
Add_Inplace adds a slice element-wise to the first slice, inplace.
func Add_Into ¶
Add_Into adds two slices element-wise and stores the result in the destination slice.
func And_Inplace ¶
func And_Inplace(x, y []bool)
And_Inplace computes the element-wise logical "and" operation between two slices, inplace.
func And_Into ¶
And_Into stores the element-wise logical "and" operation between two slices in the destination slice.
func Ceil ¶
Ceil returns the result of rounding each slice element to the nearest greater integer value.
func Ceil_Inplace ¶
func Ceil_Inplace(x []float64)
Ceil_Inplace rounds each slice element to the nearest greater integer value, inplace.
func Ceil_Into ¶
Ceil_Into rounds each slice element to the nearest greater integer value and stores the result in the destination slice.
func ChangeRate ¶ added in v1.6.1
ChangeRate 增长率
func CosineSimilarity ¶
CosineSimilarity returns the cosine similarity of two vectors.
func CumProd ¶
CumProd returns the cumulative product of a slice. The element at index i equals the product of x[:i+1].
func CumProd_Inplace ¶
func CumProd_Inplace(x []float64)
CumProd_Inplace computes the cumulative product of a slice, inplace. The new element at index i equals the product of x[:i+1].
func CumProd_Into ¶
CumProd_Into computes the cumulative product of a slice and stores the result in the destination slice. The element at index i equals the product of x[:i+1].
func CumSum ¶
CumSum returns the cumulative sum of a slice. The element at index i equals the sum of x[:i+1].
func CumSum_Inplace ¶
func CumSum_Inplace(x []float64)
CumSum_Inplace computes the cumulative sum of a slice, inplace. The new element at index i equals the sum of x[:i+1].
func CumSum_Into ¶
CumSum_Into computes the cumulative sum of a slice and stores the result in the destination slice. The element at index i equals the sum of x[:i+1].
func DivNumber_Inplace ¶
DivNumber_Inplace divides each slice element by a number, inplace.
func DivNumber_Into ¶
DivNumber_Into divides each slice element by a number and stores the result in the destination slice.
func Div_Inplace ¶
func Div_Inplace(x, y []float64)
Div_Inplace divides the first slice element-wise by the second, inplace.
func Div_Into ¶
Div_Into divides two slices element-wise and stores the result in the destination slice.
func EqNumber ¶
EqNumber returns an element-wise equality comparison between each slice element and a number.
func EqNumber_Into ¶
EqNumber_Into stores an element-wise equality comparison between each slice element and a number in the destination slice.
func Eq_Into ¶
Eq_Into stores an element-wise equality comparison between two slices in the destination slice.
func Find ¶
Find returns the index of the first slice element equal to the given value, or -1 if not found.
func Floor ¶
Floor returns the result of rounding each slice element to the nearest lesser integer value.
func Floor_Inplace ¶
func Floor_Inplace(x []float64)
Floor_Inplace rounds each slice element to the nearest lesser integer value, inplace.
func Floor_Into ¶
Floor_Into rounds each slice element to the nearest lesser integer value and stores the result in the destination slice.
func FromBool ¶
FromBool creates a slice of floats from a slice of bools by converting all false values to 0 and all true values to 1.
func FromBool_Into ¶
FromBool_Into creates a slice of floats from a slice of bools by converting all false values to 0 and all true values to 1. The result is stored in the destination slice.
func FromFloat32 ¶
FromFloat32 creates a slice of floats from a slice of 32-bit floats. Standard conversion rules apply.
func FromFloat32_Into ¶
FromFloat32_Into creates a slice of floats from a slice of 32-bit floats. Standard conversion rules apply. The result is stored in the destination slice.
func FromInt32 ¶
FromInt32 creates a slice of floats from a slice of 32-bit ints. Standard conversion rules apply.
func FromInt32_Into ¶
FromInt32_Into creates a slice of floats from a slice of 32-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func FromInt64 ¶
FromInt64 creates a slice of floats from a slice of 64-bit ints. Standard conversion rules apply.
func FromInt64_Into ¶
FromInt64_Into creates a slice of floats from a slice of 64-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func Gather_Into ¶
Gather_Into stores the slice elements at the given indices in the destination slice.
func GtNumber ¶
GtNumber returns an element-wise "greater than" comparison between each slice element and a number.
func GtNumber_Into ¶
GtNumber_Into stores an element-wise "greater than" comparison between each slice element and a number in the destination slice.
func Gt_Into ¶
Gt_Into stores an element-wise "greater than" comparison between two slices in the destination slice.
func GteNumber ¶
GteNumber returns an element-wise "greater than or equal" comparison between each slice element and a number.
func GteNumber_Into ¶
GteNumber_Into stores an element-wise "greater than or equal" comparison between each slice element and a number in the destination slice.
func Gte_Into ¶
Gte_Into stores an element-wise "greater than or equal" comparison between two slices in the destination slice.
func Inv_Inplace ¶
func Inv_Inplace(x []float64)
Inv_Inplace computes the multiplicative inverse of each slice element, inplace.
func Inv_Into ¶
Inv_Into computes the multiplicative inverse of each slice element and stores the result in the destination slice.
func LtNumber ¶
LtNumber returns an element-wise "less than" comparison between each slice element and a number.
func LtNumber_Into ¶
LtNumber_Into stores an element-wise "less than" comparison between each slice element and a number in the destination slice.
func Lt_Into ¶
Lt_Into stores an element-wise "less than" comparison between two slices in the destination slice.
func LteNumber ¶
LteNumber returns an element-wise "less than or equal" comparison between each slice element and a number.
func LteNumber_Into ¶
LteNumber_Into stores an element-wise "less than or equal" comparison between each slice element and a number in the destination slice.
func Lte_Into ¶
Lte_Into stores an element-wise "less than or equal" comparison between two slices in the destination slice.
func ManhattanDistance ¶
ManhattanDistance returns the sum of element-wise absolute differences between two slices.
func ManhattanNorm ¶
ManhattanNorm returns the sum of absolute values of the slice elements.
func Mat4Mul ¶
Mat4Mul multiplies two 4-by-4 matrices and returns the resulting 4-by-4 matrix. The matrices should be in row-major order. To multiply a matrix and a vector batch them into groups of 4.
func Mat4Mul_Into ¶
Mat4Mul_Into multiplies two 4-by-4 matrices and stores the resulting 4-by-4 matrix in the destination slice. The matrices should be in row-major order. To multiply a matrix and a vector batch them into groups of 4.
func MatMul ¶
MatMul multiplies an m-by-n and n-by-p matrix and returns the resulting m-by-p matrix. The matrices should be in row-major order. To multiply a matrix and a vector pass an n-by-1 matrix.
func MatMul_Into ¶
MatMul_Into multiplies an m-by-n and n-by-p matrix and stores the resulting m-by-p matrix in the destination slice. The matrices should be in row-major order. To multiply a matrix and a vector pass an n-by-1 matrix.
func MaximumNumber ¶
MaximumNumber returns the maximum of a number and each slice element.
func MaximumNumber_Inplace ¶
MaximumNumber_Inplace compares a number to each slice element and replaces the values in the slice with the maximum value.
func MaximumNumber_Into ¶
MaximumNumber_Into compares a number to each slice element and stores the maximum values in the destination slice.
func Maximum_Inplace ¶
func Maximum_Inplace(x, y []float64)
Maximum_Inplace compares two slices element-wise and replaces the values in the first slice with the maximum value.
func Maximum_Into ¶
Maximum_Into compares two slices element-wise and stores the maximum values in the destination slice.
func MinimumNumber ¶
MinimumNumber returns the minimum of a number and each slice element.
func MinimumNumber_Inplace ¶
MinimumNumber_Inplace compares a number to each slice element and replaces the values in the slice with the minimum value.
func MinimumNumber_Into ¶
MinimumNumber_Into compares a number to each slice element and stores the minimum values in the destination slice.
func Minimum_Inplace ¶
func Minimum_Inplace(x, y []float64)
Minimum_Inplace compares two slices element-wise and replaces the values in the first slice with the minimum value.
func Minimum_Into ¶
Minimum_Into compares two slices element-wise and stores the minimum values in the destination slice.
func MulNumber_Inplace ¶
MulNumber_Inplace multiplies each slice element by a number, inplace.
func MulNumber_Into ¶
MulNumber_Into multiplies each slice element by a number and stores the result in the destination slice.
func Mul_Inplace ¶
func Mul_Inplace(x, y []float64)
Mul_Inplace multiplies the first slice element-wise by the second, inplace.
func Mul_Into ¶
Mul_Into multiplies two slices element-wise and stores the result in the destination slice.
func Neg_Inplace ¶
func Neg_Inplace(x []float64)
Neg_Inplace computes the additive inverse of each slice element, inplace.
func Neg_Into ¶
Neg_Into computes the additive inverse of each slice element and stores the result in the destination slice.
func NeqNumber ¶
NeqNumber returns an element-wise "not equal" comparison between each slice element and a number.
func NeqNumber_Into ¶
NeqNumber_Into stores an element-wise "not equal" comparison between each slice element and a number in the destination slice.
func Neq_Into ¶
Neq_Into stores an element-wise "not equal" comparison between two slices in the destination slice.
func NetChangeRate ¶ added in v1.6.1
NetChangeRate 净增长率, 去掉百分比
func Not_Inplace ¶
func Not_Inplace(x []bool)
Not_Inplace computes the logical negation of each slice element, inplace.
func Not_Into ¶
Not_Into stores the logical negation of each slice element in the destination slice.
func Or_Inplace ¶
func Or_Inplace(x, y []bool)
Or_Inplace computes the element-wise logical "or" operation between two slices, inplace.
func Or_Into ¶
Or_Into stores the element-wise logical "or" operation between two slices in the destination slice.
func Pow_Inplace ¶
func Pow_Inplace(x, y []float64)
Pow_Inplace raises the elements in the first slice to the power in the second, inplace.
func Pow_Into ¶
Pow_Into raises the elements in the first slice to the power in the second and stores the result in the destination slice.
func Quantile ¶
Quantile returns the q-th quantile of the slice elements. The value of q should be between 0 and 1 (inclusive).
func Range_Into ¶
Range_Into writes values incrementing from a to b (excl.) in steps of 1 to the destination slice.
func Repeat_Into ¶
Repeat_Into sets the first n elements in the destination slice to the given value.
func Round_Inplace ¶
func Round_Inplace(x []float64)
Round_Inplace rounds each slice element to the nearest integer value, inplace.
func Round_Into ¶
Round_Into rounds each slice element to the nearest integer value and stores the result in the destination slice.
func Scatter ¶
Scatter returns a slice of size elements where position idx[i] is set to x[i], for all i < len(x) = len(idx). The other elements are set to zero.
func Scatter_Into ¶
Scatter_Into sets positions idx[i] to x[i] in the destination slice, for all i < len(x) = len(idx). The other elements are not modified.
func Select ¶
Select returns the slice elements for which the corresponding boolean values are true.
func Select_Into ¶
Select_Into stores the slice elements for which the corresponding boolean values are true in the destination slice. This function grows the destination slice if the selection yields more values than it has capacity for.
func SetAcceleration ¶
func SetAcceleration(enabled bool)
SetAcceleration toggles simd acceleration. Not thread safe.
func Sqrt_Inplace ¶
func Sqrt_Inplace(x []float64)
Sqrt_Inplace computes the square root of each slice element, inplace.
func Sqrt_Into ¶
Sqrt_Into computes the square root of each slice element and stores the result in the destination slice.
func SubNumber_Inplace ¶
SubNumber_Inplace subtracts a number from each slice element, inplace.
func SubNumber_Into ¶
SubNumber_Into subtracts a number from each slice element and stores the result in the destination slice.
func Sub_Inplace ¶
func Sub_Inplace(x, y []float64)
Sub_Inplace subtracts a slice element-wise from the first slice, inplace.
func Sub_Into ¶
Sub_Into subtracts two slices element-wise and stores the result in the destination slice.
func ToBool ¶
ToBool converts a slice of floats to a slice of bools by setting all zero values to true and all non-zero values to false.
func ToBool_Into ¶
ToBool_Into converts a slice of floats to a slice of bools by setting all zero values to true and all non-zero values to false. The result is stored in the destination slice.
func ToFloat32 ¶
ToFloat32 converts a slice of floats to a slice of 32-bit floats. Standard conversion rules apply.
func ToFloat32_Into ¶
ToFloat32_Into converts a slice of floats to a slice of 32-bit floats. Standard conversion rules apply. The result is stored in the destination slice.
func ToInt32 ¶
ToInt32 converts a slice of floats to a slice of 32-bit ints. Standard conversion rules apply.
func ToInt32_Into ¶
ToInt32_Into converts a slice of floats to a slice of 32-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func ToInt64 ¶
ToInt64 converts a slice of floats to a slice of 64-bit ints. Standard conversion rules apply.
func ToInt64_Into ¶
ToInt64_Into converts a slice of floats to a slice of 64-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func Xor_Inplace ¶
func Xor_Inplace(x, y []bool)
Xor_Inplace computes the element-wise "exclusive or" operation between two slices, inplace.
func Xor_Into ¶
Xor_Into stores the element-wise "exclusive or" operation between two slices in the destination slice.
func Zeros_Into ¶
Zeros_Into sets the first n elements in the destination slice to zero.
Types ¶
type Complex ¶ added in v1.6.1
type Complex interface { ~complex64 | ~complex128 }
Complex is a constraint that permits any complex numeric type. If future releases of Go add new predeclared complex numeric types, this constraint will be modified to include them.
type Float ¶ added in v1.6.1
Float is a constraint that permits any floating-point type. If future releases of Go add new predeclared floating-point types, this constraint will be modified to include them.
type GenericType ¶ added in v1.6.1
GenericType Series支持的所有类型 Deprecated: 不推荐使用
type Integer ¶ added in v1.6.1
Integer is a constraint that permits any integer type. If future releases of Go add new predeclared integer types, this constraint will be modified to include them.
type NumberOfCPUBitsRelated ¶ added in v1.6.1
NumberOfCPUBitsRelated The number of CPU bits is related Deprecated: 不推荐使用
type Ordered ¶ added in v1.6.1
Ordered is a constraint that permits any ordered type: any type that supports the operators < <= >= >. If future releases of Go add new ordered types, this constraint will be modified to include them.
type Signed ¶ added in v1.6.1
Signed is a constraint that permits any signed integer type. If future releases of Go add new predeclared signed integer types, this constraint will be modified to include them.
type SystemInfo ¶
SystemInfo contains information about the current operating environment.
func Info ¶
func Info() SystemInfo
Info returns information about the current operating environment.