예제 #1
0
// Normalise normalises the vector in-place.
func (v Vector) Normalise() {
	w := blas.Snrm2(len(v), v, 1)
	blas.Sscal(len(v), 1/w, v, 1)
}
예제 #2
0
func scal32(alpha float32, X []float32) {
	blas.Sscal(len(X), alpha, X, 1)
}