all: fix doc comments identified by staticcheck
All complaints in mathext/internal are ignored, and an unfortunate naming
of methods in spatial/{r2,r3} is now permanent.
diff --git a/dsp/window/window_complex.go b/dsp/window/window_complex.go
index 404d523..9ee0bae 100644
--- a/dsp/window/window_complex.go
+++ b/dsp/window/window_complex.go
@@ -6,8 +6,8 @@
import "math"
-// Rectangular modifies seq in place by the Rectangular window and returns
-// the result.
+// RectangularComplex modifies seq in place by the Rectangular window and
+// returns the result.
// See https://en.wikipedia.org/wiki/Window_function#Rectangular_window and
// https://www.recordingblogs.com/wiki/rectangular-window for details.
//
diff --git a/floats/floats.go b/floats/floats.go
index 3dd351d..68c4e65 100644
--- a/floats/floats.go
+++ b/floats/floats.go
@@ -633,9 +633,9 @@
return prod
}
-// Deprecated: This function simply calls [slices.Reverse].
-//
// Reverse reverses the order of elements in the slice.
+//
+// Deprecated: This function simply calls [slices.Reverse].
func Reverse(s []float64) {
slices.Reverse(s)
}
diff --git a/graph/formats/dot/internal/errors/doc.go b/graph/formats/dot/internal/errors/doc.go
index 9606242..58cab63 100644
--- a/graph/formats/dot/internal/errors/doc.go
+++ b/graph/formats/dot/internal/errors/doc.go
@@ -2,5 +2,5 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package error provides generated internal error functions for DOT parsing.
+// Package errors provides generated internal error functions for DOT parsing.
package errors // import "gonum.org/v1/gonum/graph/formats/dot/internal/errors"
diff --git a/graph/path/internal/testgraphs/doc.go b/graph/path/internal/testgraphs/doc.go
index 2845d13..4f797bd 100644
--- a/graph/path/internal/testgraphs/doc.go
+++ b/graph/path/internal/testgraphs/doc.go
@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package testsgraphs provides a number of graphs used for testing
+// Package testgraphs provides a number of graphs used for testing
// routines in the path and path/dynamic packages.
package testgraphs // import "gonum.org/v1/gonum/graph/path/internal/testgraphs"
diff --git a/integrate/quad/quad.go b/integrate/quad/quad.go
index 121dd94..b4fa0cf 100644
--- a/integrate/quad/quad.go
+++ b/integrate/quad/quad.go
@@ -18,9 +18,11 @@
FixedLocations(x, weight []float64, min, max float64)
}
-// FixedLocationSingle returns the location and weight for element k in a
-// fixed quadrature rule with n total samples and integral bounds from min to max.
+// FixedLocationSingler wraps the FixedLocationSingle method.
type FixedLocationSingler interface {
+ // FixedLocationSingle returns the location and weight for
+ // element k in a fixed quadrature rule with n total samples
+ // and integral bounds from min to max.
FixedLocationSingle(n, k int, min, max float64) (x, weight float64)
}
diff --git a/lapack/lapack.go b/lapack/lapack.go
index 60b5d0d..60ef1c2 100644
--- a/lapack/lapack.go
+++ b/lapack/lapack.go
@@ -221,7 +221,7 @@
EVSelected EVHowMany = 'S' // Compute selected right and/or left eigenvectors.
)
-// MaximizeNormX specifies the heuristic method for computing a contribution to
+// MaximizeNormXJob specifies the heuristic method for computing a contribution to
// the reciprocal Dif-estimate in Dlatdf.
type MaximizeNormXJob byte
diff --git a/lapack/testlapack/dgesc2.go b/lapack/testlapack/dgesc2.go
index 90c4227..dd48ca9 100644
--- a/lapack/testlapack/dgesc2.go
+++ b/lapack/testlapack/dgesc2.go
@@ -1,6 +1,7 @@
// Copyright ©2021 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+
package testlapack
import (
diff --git a/mat/lu.go b/mat/lu.go
index 18ed3da..b530ada 100644
--- a/mat/lu.go
+++ b/mat/lu.go
@@ -237,6 +237,8 @@
return dst
}
+// Pivot returns the row pivots of the receiver.
+//
// Deprecated: Use RowPivots instead.
func (lu *LU) Pivot(dst []int) []int {
return lu.RowPivots(dst)
diff --git a/optimize/convex/lp/simplex.go b/optimize/convex/lp/simplex.go
index 5fd0dd8..b03d300 100644
--- a/optimize/convex/lp/simplex.go
+++ b/optimize/convex/lp/simplex.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// package lp implements routines for solving linear programs.
+// Package lp implements routines for solving linear programs.
package lp
import (
diff --git a/spatial/r2/box.go b/spatial/r2/box.go
index 6c988b3..d3bc522 100644
--- a/spatial/r2/box.go
+++ b/spatial/r2/box.go
@@ -31,7 +31,7 @@
return Scale(0.5, Add(a.Min, a.Max))
}
-// IsEmpty returns true if a Box's volume is zero
+// Empty returns true if a Box's volume is zero
// or if a Min component is greater than its Max component.
func (a Box) Empty() bool {
return a.Min.X >= a.Max.X || a.Min.Y >= a.Max.Y
diff --git a/spatial/r3/box.go b/spatial/r3/box.go
index b7552af..86cf6eb 100644
--- a/spatial/r3/box.go
+++ b/spatial/r3/box.go
@@ -21,7 +21,7 @@
}
}
-// IsEmpty returns true if a Box's volume is zero
+// Empty returns true if a Box's volume is zero
// or if a Min component is greater than its Max component.
func (a Box) Empty() bool {
return a.Min.X >= a.Max.X || a.Min.Y >= a.Max.Y || a.Min.Z >= a.Max.Z