gorse: github.com/zhenghaoz/gorse/floats Index | Files

package floats

import "github.com/zhenghaoz/gorse/floats"

Package floats provides functions for numeric computations.

There are two implementations:

* gonum version: implemented by gonum. It is the default implementation.
* AVX2 version: implemented by AVX2 instructions. This implementation should be built with `avx2` tag.

Index

Package Files

doc.go opt_noasm.go universal.go

func Add Uses

func Add(dst, s []float64)

Add two vectors: dst = dst + s

func AddTo Uses

func AddTo(a, b, dst []float64)

AddTo adds two vectors and saves the result in dst: dst = a + b

func Div Uses

func Div(dst, s []float64)

Div one vectors by another: dst = dst / s

func Dot Uses

func Dot(a, b []float64) float64

Dot two vectors.

func Mul Uses

func Mul(dst, s []float64)

Mul two vectors: dst = dst * s

func MulConst Uses

func MulConst(dst []float64, c float64)

MulConst multiplies a vector with a const: dst = dst * c

func MulConstAddTo Uses

func MulConstAddTo(a []float64, c float64, dst []float64)

MulConstAddTo multiplies a vector and a const, then adds to dst: dst = dst + a * c

func MulConstTo Uses

func MulConstTo(a []float64, c float64, dst []float64)

MulConstTo multiplies a vector and a const, then saves the result in dst: dst = a * c

func Sub Uses

func Sub(dst, s []float64)

Sub one vector by another: dst = dst - s

func SubTo Uses

func SubTo(a, b, dst []float64)

SubTo subtracts one vector by another and saves the result in dst: dst = a - b

Package floats imports 1 packages (graph) and is imported by 4 packages. Updated 2019-05-19. Refresh now. Tools for package owners.