Documentation ¶
Index ¶
- func Average[T types.Number](array []T) float64
- func CalculateMaxPrimeFactor(n int64) int64
- func Correlation[T types.Number](arr1, arr2 []T) float64
- func CosineSimilarity(a, b []float64) float64
- func Covariance[T types.Number](arr1, arr2 []T) float64
- func Dot[T types.Number](a, b []T) T
- func DumpMatrix[T any](m [][]T) string
- func EuclideanDistance(v1, v2 []float64) float64
- func ExtractEvenNumber(array []int64) []int64
- func FindDivisor(n int) []int
- func FindIndexValue[T types.Number](array []T, value T) []int
- func GenerateFibonacci[T types.Number](max T) []T
- func InitMatrix[T types.Number](r, c int) [][]T
- func InitMatrixCustom[T types.Number](r, c int, value T) [][]T
- func IsPrime(n int) bool
- func ManhattanDistance(v1, v2 []float64) float64
- func Max[T types.Number](a, b T) T
- func MaxIndex[T types.Number](array []T) int
- func Maxs[T types.Number](a ...T) T
- func Median[T types.Number](arr []T) float64
- func Min[T types.Number](a, b T) T
- func MinIndex[T types.Number](array []T) int
- func Mins[T types.Number](a ...T) T
- func Mode[T types.Number](array []T) []T
- func MultiplyMatrix[T types.Number](m1, m2 [][]T) [][]T
- func NewArray[T types.Number](n int, value T) []T
- func SimilarityPreCheck[T types.Number](a, b []T) bool
- func SortMaxIndex[T types.Number](array []T) []int
- func StandardDeviation[T types.Number](array []T) float64
- func SubtractArray[T types.Number](integers []T) T
- func SubtractArrays[T types.Number](a1, a2 []T) []T
- func SubtractMatrix[T types.Number](m1, m2 [][]T) [][]T
- func SumArray[T types.Number](array []T) T
- func SumArrays[T types.Number](a1, a2 []T) []T
- func SumArraysPadded[T types.Number](n1, n2 []T) []T
- func SumMatrix[T types.Number](m1, m2 [][]T) [][]T
- func Transponse1D[T any](v []T) [][1]T
- func Variance[T types.Number](array []T) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateMaxPrimeFactor ¶ added in v0.0.19
CalculateMaxPrimeFactor is delegated to calculate the max prime factor for the given input
func Correlation ¶ added in v0.0.94
Correlation is delegated to calculate the correlation for the two given arrays
func CosineSimilarity ¶ added in v0.0.22
CosineSimilarity is delegated to calculate the Cosine Similarity for the given array
func Covariance ¶ added in v0.0.94
Covariance is delegated to calculate the Covariance between the given arrays
func Dot ¶ added in v0.0.102
Dot is delegated to multiply the given array and sum every number of the result array
func DumpMatrix ¶ added in v0.0.18
DumpMatrix is delegated to print the given matrix
func EuclideanDistance ¶ added in v0.0.22
EuclideanDistance is delegated to calculate the Euclidean distance for the given array
func ExtractEvenNumber ¶ added in v0.0.102
ExtractEvenNumber Is delegated to extract only the even number from the input array
func FindDivisor ¶ added in v0.0.19
FindDivisor is delegated to find every divisor for the given input
func FindIndexValue ¶ added in v0.0.20
FindIndexValue is delegated to retrieve the index of the given value into the input array.
func GenerateFibonacci ¶ added in v0.0.19
GenerateFibonacci is delegated to generate the Fibonacci sequence
func InitMatrix ¶ added in v0.0.24
InitMatrix is delegated to initialize a new empty matrix
func InitMatrixCustom ¶ added in v0.0.24
InitMatrixCustom is delegated to initialize a matrix with the given dimension using the same value for each field
func ManhattanDistance ¶ added in v0.0.22
ManhattanDistance is delegated to calculate the Manhattan norm for the given array
func MaxIndex ¶ added in v0.0.94
MaxIndex return the index that contains the max value for the given array
func Maxs ¶ added in v0.0.94
Maxs is delegated to return the max value with a variable number of input int
func MinIndex ¶ added in v0.0.94
MinIndex return the index that contains the min value for the given array
func Mins ¶ added in v0.0.94
Mins is delegated to return the min value with a variable number of input int
func MultiplyMatrix ¶ added in v0.0.18
MultiplyMatrix is delegated to execute the multiplication between the given matrix without extra allocation
func NewArray ¶ added in v0.0.94
NewArray is delegated to initialize a new array of the given dimension, populated with the same input value
func SimilarityPreCheck ¶ added in v0.0.22
SimilarityPreCheck is delegated to verify that the given array have the correct size
func SortMaxIndex ¶ added in v0.0.20
SortMaxIndex is delegated to return an array that contains the position of the order value (from max to min) of the given array {1, 9, 2, 10, 3} -> [3 1 4 2 0] || {7, 6, 5, 4, 3, 2, 1} -> [0 1 2 3 4 5 6] || {1, 2, 3, 4, 5, 6, 7} -> [6 5 4 3 2 1 0]
func StandardDeviation ¶ added in v0.0.94
StandardDeviation is delegated to calculate the STD for the given array
func SubtractArray ¶ added in v0.0.94
SubtractArray subtract of every element contained in the array and return the result
func SubtractArrays ¶ added in v0.0.94
SubtractArrays is delegated to sum the two given array
func SubtractMatrix ¶ added in v0.0.18
SubtractMatrix is delegated to sum the given matrix
func SumArraysPadded ¶ added in v0.0.94
SumArraysPadded is delegated to sum 2 array of different length.
func Transponse1D ¶ added in v0.0.101
func Transponse1D[T any](v []T) [][1]T
Transponse1D This method does not perform the real transpose
Types ¶
This section is empty.