Documentation
¶
Overview ¶
Package vectors is deprecated.
Package vectors provides basic vector operations.
Deprecated: generic numerical operations are available in package gnum.
Index ¶
- func Add(a []float64, b ...[]float64) []float64
- func Copy(a []float64) []float64
- func Dot(a, b []float64) float64
- func L1(a, b []float64) float64
- func L2(a, b []float64) float64
- func Lp(p int) func([]float64, []float64) float64
- func Mul(a []float64, m float64) []float64
- func Norm(a []float64) float64
- func Ones(n int) []float64
- func Sub(a []float64, b ...[]float64) []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lp ¶
Lp returns an Lp distance function. Lp is calculated as follows:
Lp(v) = the p'th root of sum_i(v[i]^p)
For convenience, L1 (Manhattan)and L2 (Euclidean) are prepared package variables.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.