all: run gofmt and generate all packages

Changes made in dsp/fourier/internal/fftpack break the formatting used
there, so these are reverted. There will be complaints in CI.

[git-generate]
gofmt -w .
go generate gonum.org/v1/gonum/blas
go generate gonum.org/v1/gonum/blas/gonum
go generate gonum.org/v1/gonum/unit
go generate gonum.org/v1/gonum/unit/constant
go generate gonum.org/v1/gonum/graph/formats/dot
go generate gonum.org/v1/gonum/graph/formats/rdf
go generate gonum.org/v1/gonum/stat/card

git checkout -- dsp/fourier/internal/fftpack
This commit is contained in:
Dan Kortschak
2022-08-05 20:57:59 +09:30
parent fee5019b48
commit 5f0141ca4c
308 changed files with 5004 additions and 3064 deletions

View File

@@ -58,13 +58,15 @@ func Rotate(p Vec, alpha float64, axis Vec) Vec {
}
// Norm returns the Euclidean norm of p
// |p| = sqrt(p_x^2 + p_y^2 + p_z^2).
//
// |p| = sqrt(p_x^2 + p_y^2 + p_z^2).
func Norm(p Vec) float64 {
return math.Hypot(p.X, math.Hypot(p.Y, p.Z))
}
// Norm2 returns the Euclidean squared norm of p
// |p|^2 = p_x^2 + p_y^2 + p_z^2.
//
// |p|^2 = p_x^2 + p_y^2 + p_z^2.
func Norm2(p Vec) float64 {
return p.X*p.X + p.Y*p.Y + p.Z*p.Z
}
@@ -123,7 +125,8 @@ func absElem(a Vec) Vec {
}
// mulElem returns the Hadamard product between vectors a and b.
// v = {a.X*b.X, a.Y*b.Y, a.Z*b.Z}
//
// v = {a.X*b.X, a.Y*b.Y, a.Z*b.Z}
func mulElem(a, b Vec) Vec {
return Vec{
X: a.X * b.X,
@@ -134,7 +137,8 @@ func mulElem(a, b Vec) Vec {
// divElem returns the Hadamard product between vector a
// and the inverse components of vector b.
// v = {a.X/b.X, a.Y/b.Y, a.Z/b.Z}
//
// v = {a.X/b.X, a.Y/b.Y, a.Z/b.Z}
func divElem(a, b Vec) Vec {
return Vec{
X: a.X / b.X,