Documentation
¶
Index ¶
- func AverageFloat32(array []float32) float64
- func AverageFloat64(array []float64) float64
- func AverageInt(array []int) float64
- func AverageInt32(array []int32) float64
- func AverageInt64(array []int64) float64
- func CalculateMaxPrimeFactor(n int64) int64
- func CreateEmptyMatrix(r, c int) [][]int
- func DumpMatrix(m [][]int)
- func ExtractEvenValuedNumber(array []int64) []int64
- func FindDivisor(n int) []int
- func FindIndexValue(array []int, value int) int
- func GenerateFibonacci(max int64) []int64
- func InitIntArray(dimension, value int) []int
- func InitRandomMatrix(r, c int) [][]int
- func InitStaticMatrix(r, c, value int) [][]int
- func IsPrime(n int) bool
- func MaxFloat32Index(array []float32) int
- func MaxFloat64Index(array []float64) int
- func MaxInt32Index(array []int32) int
- func MaxInt64Index(array []int64) int
- func MaxIntIndex(array []int) int
- func MultiplyMatrix(m1, m2 [][]int) [][]int
- func MultiplySumArray(a, b []int) int
- func PadArray(array []int, n int) []int
- func SortMaxIndex(array []int) []int
- func SubtractIntArray(integers []int) int
- func SubtractIntArrays(a1, a2 []int) []int
- func SubtractMatrix(m1, m2 [][]int) [][]int
- func SumArrays(n1, n2 []int) []int
- func SumFloat32Array(integers []float32) float32
- func SumFloat64Array(integers []float64) float64
- func SumInt32Array(integers []int32) int32
- func SumInt64Array(integers []int64) int64
- func SumIntArray(integers []int) int
- func SumIntArrays(a1, a2 []int) []int
- func SumMatrix(m1, m2 [][]int) [][]int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AverageFloat32 ¶ added in v0.0.7
AverageFloat32 is delegated to calculate the average of an float32 array
func AverageFloat64 ¶ added in v0.0.7
AverageFloat64 is delegated to calculate the average of an float64 array
func AverageInt ¶ added in v0.0.7
AverageInt is delegated to calculate the average of an int array
func AverageInt32 ¶ added in v0.0.14
AverageInt32 is delegated to calculate the average of an int array
func AverageInt64 ¶ added in v0.0.14
AverageInt64 is delegated to calculate the average of an int array
func CalculateMaxPrimeFactor ¶ added in v0.0.19
CalculateMaxPrimeFactor is delegated to calculate the max prime factor for the input number
func CreateEmptyMatrix ¶ added in v0.0.18
CreateEmptyMatrix is delegated to initialize a new empty matrix
func DumpMatrix ¶ added in v0.0.18
func DumpMatrix(m [][]int)
DumpMatrix is delegated to print the given matrix
func ExtractEvenValuedNumber ¶ added in v0.0.19
ExtractEvenValuedNumber 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 input number
func FindIndexValue ¶ added in v0.0.20
FindIndexValue is delegated to retrieve the index of the given value into the input array. NOTE: FIXME in case of multiple value, only the first will be returned
func GenerateFibonacci ¶ added in v0.0.19
GenerateFibonacci is delegated to generate the Fibonacci sequence
func InitIntArray ¶ added in v0.0.18
InitIntArray is delegated to initialize a new array of the given dimension, populated with the same input value
func InitRandomMatrix ¶ added in v0.0.18
InitRandomMatrix is delegated to initialize a random matrix with the given dimension
func InitStaticMatrix ¶ added in v0.0.18
InitStaticMatrix is delegated to initialize a matrix with the given dimension using the same value for each field
func MaxFloat32Index ¶ added in v0.0.14
MaxFloat32Index return the index that contains the max value for the given array
func MaxFloat64Index ¶ added in v0.0.14
MaxFloat64Index return the index that contains the max value for the given array
func MaxInt32Index ¶ added in v0.0.14
MaxInt32Index return the index that contains the max value for the given array
func MaxInt64Index ¶ added in v0.0.14
MaxInt64Index return the index that contains the max value for the given array
func MaxIntIndex ¶
MaxIntIndex return the index that contains the max value for the given array
func MultiplyMatrix ¶ added in v0.0.18
MultiplyMatrix is delegated to execute the multiplication between the given matrix
func MultiplySumArray ¶ added in v0.0.18
MultiplySumArray is delegated to multiply the given array and sum every number of the result array
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 SubtractIntArray ¶ added in v0.0.18
SubtractIntArray return the subtract of every element contained in the array
func SubtractIntArrays ¶ added in v0.0.18
SubtractIntArrays is delegated to sum the two given array
func SubtractMatrix ¶ added in v0.0.18
SubtractMatrix is delegated to sum the given matrix
func SumFloat32Array ¶ added in v0.0.14
SumFloat32Array return the of every element contained in the array
func SumFloat64Array ¶ added in v0.0.14
SumFloat64Array return the of every element contained in the array
func SumInt32Array ¶ added in v0.0.14
SumInt32Array return the of every element contained in the array
func SumInt64Array ¶ added in v0.0.14
SumInt64Array return the of every element contained in the array
func SumIntArray ¶
SumIntArray return the sum of every element contained in the array
func SumIntArrays ¶ added in v0.0.18
SumIntArrays is delegated to sum the two given array
Types ¶
This section is empty.