all: fix repeated word typos in comments

Found with m/\b([a-zA-Z]+) \1\b/ and m/\b([a-zA-Z]+)\n[ \t]*// \1\b/.
This commit is contained in:
Dan Kortschak
2019-03-28 22:39:50 +10:30
parent c38fb5f9ef
commit 773146b12d
11 changed files with 19 additions and 19 deletions

View File

@@ -230,11 +230,11 @@ func (t *CmplxFFT) Freq(i int) float64 {
return step * float64(i-t.Len()) return step * float64(i-t.Len())
} }
// ShiftIdx returns returns a shifted index into a slice of // ShiftIdx returns a shifted index into a slice of coefficients
// coefficients returned by the CmplxFFT so that indexing // returned by the CmplxFFT so that indexing into the coefficients
// into the coefficients places the zero frequency component // places the zero frequency component at the center of the spectrum.
// at the center of the spectrum. ShiftIdx will panic if i is // ShiftIdx will panic if i is negative or greater than or equal to
// negative or greater than or equal to t.Len(). // t.Len().
func (t *CmplxFFT) ShiftIdx(i int) int { func (t *CmplxFFT) ShiftIdx(i int) int {
if i < 0 || t.Len() <= i { if i < 0 || t.Len() <= i {
panic("fourier: index out of range") panic("fourier: index out of range")

View File

@@ -379,7 +379,7 @@ func (r *compressedRow) addTo(j int, v float64) {
} }
// dotUnitary performs a simplified scatter-based Ddot operations on // dotUnitary performs a simplified scatter-based Ddot operations on
// v and the receiver. v must have have a unitary vector increment. // v and the receiver. v must have a unitary vector increment.
func (r compressedRow) dotUnitary(v *mat.VecDense) float64 { func (r compressedRow) dotUnitary(v *mat.VecDense) float64 {
var sum float64 var sum float64
vec := v.RawVector().Data vec := v.RawVector().Data
@@ -396,8 +396,8 @@ type sparseElement struct {
} }
// onesDotUnitary performs the equivalent of a Ddot of v with // onesDotUnitary performs the equivalent of a Ddot of v with
// a ones vector of equal length. v must have have a unitary // a ones vector of equal length. v must have a unitary vector
// vector increment. // increment.
func onesDotUnitary(alpha float64, v *mat.VecDense) float64 { func onesDotUnitary(alpha float64, v *mat.VecDense) float64 {
var sum float64 var sum float64
for _, f := range v.RawVector().Data { for _, f := range v.RawVector().Data {

View File

@@ -12,7 +12,7 @@ import (
) )
// Hermite generates sample locations and weights for performing quadrature with // Hermite generates sample locations and weights for performing quadrature with
// with a squared-exponential weight // a squared-exponential weight
// int_-inf^inf e^(-x^2) f(x) dx . // int_-inf^inf e^(-x^2) f(x) dx .
type Hermite struct{} type Hermite struct{}

View File

@@ -348,7 +348,7 @@ func (impl Implementation) Dlaqr5(wantt, wantz bool, kacc22 int, n, ktop, kbot,
h[j*ldh+k+3] -= refsum * v[m*ldv+2] h[j*ldh+k+3] -= refsum * v[m*ldv+2]
} }
if accum { if accum {
// Accumulate U. (If necessary, update Z later with with an // Accumulate U. (If necessary, update Z later with an
// efficient matrix-matrix multiply.) // efficient matrix-matrix multiply.)
kms := k - incol kms := k - incol
for j := max(0, ktop-incol-1); j < kdu; j++ { for j := max(0, ktop-incol-1); j < kdu; j++ {

View File

@@ -18,7 +18,7 @@ import (
// where the scale s is set for numeric stability. // where the scale s is set for numeric stability.
// //
// A is an n×n triangular matrix. On entry, the slice x contains the values of // A is an n×n triangular matrix. On entry, the slice x contains the values of
// of b, and on exit it contains the solution vector x. // b, and on exit it contains the solution vector x.
// //
// If normin == true, cnorm is an input and cnorm[j] contains the norm of the off-diagonal // If normin == true, cnorm is an input and cnorm[j] contains the norm of the off-diagonal
// part of the j^th column of A. If trans == blas.NoTrans, cnorm[j] must be greater // part of the j^th column of A. If trans == blas.NoTrans, cnorm[j] must be greater

View File

@@ -16,7 +16,7 @@
// Most LAPACK functions are built on top the routines defined in the BLAS API, // Most LAPACK functions are built on top the routines defined in the BLAS API,
// and as such the computation time for many LAPACK functions is // and as such the computation time for many LAPACK functions is
// dominated by BLAS calls. Here, BLAS is accessed through the // dominated by BLAS calls. Here, BLAS is accessed through the
// the blas64 package (https://godoc.org/golang.org/v1/gonum/blas/blas64). In particular, // blas64 package (https://godoc.org/golang.org/v1/gonum/blas/blas64). In particular,
// this implies that an external BLAS library will be used if it is // this implies that an external BLAS library will be used if it is
// registered in blas64. // registered in blas64.
// //

View File

@@ -66,7 +66,7 @@ func (f formatter) Format(fs fmt.State, c rune) {
} }
// format prints a pretty representation of m to the fs io.Writer. The format character c // format prints a pretty representation of m to the fs io.Writer. The format character c
// specifies the numerical representation of of elements; valid values are those for float64 // specifies the numerical representation of elements; valid values are those for float64
// specified in the fmt package, with their associated flags. In addition to this, a space // specified in the fmt package, with their associated flags. In addition to this, a space
// preceding a verb indicates that zero values should be represented by the dot character. // preceding a verb indicates that zero values should be represented by the dot character.
// The printed range of the matrix can be limited by specifying a positive value for margin; // The printed range of the matrix can be limited by specifying a positive value for margin;

View File

@@ -48,7 +48,7 @@ func TestHOGSVD(t *testing.T) {
} }
} else { } else {
if ok { if ok {
t.Errorf("HOGSVD factorization unexpectedly succeeded for for %d %d×%d matrices", n, r, c) t.Errorf("HOGSVD factorization unexpectedly succeeded for %d %d×%d matrices", n, r, c)
} }
continue continue
} }

View File

@@ -24,8 +24,8 @@ type Categorical struct {
// //
// Each element holds the sum of weights for // Each element holds the sum of weights for
// the corresponding index, plus the sum of // the corresponding index, plus the sum of
// of its children's weights; the children // its children's weights; the children of
// of an element i can be found at positions // an element i can be found at positions
// 2*(i+1)-1 and 2*(i+1). The root of the // 2*(i+1)-1 and 2*(i+1). The root of the
// weight heap is at element 0. // weight heap is at element 0.
// //

View File

@@ -22,8 +22,8 @@ type Weighted struct {
// //
// Each element holds the sum of weights for // Each element holds the sum of weights for
// the corresponding index, plus the sum of // the corresponding index, plus the sum of
// of its children's weights; the children // its children's weights; the children of
// of an element i can be found at positions // an element i can be found at positions
// 2*(i+1)-1 and 2*(i+1). The root of the // 2*(i+1)-1 and 2*(i+1). The root of the
// weight heap is at element 0. // weight heap is at element 0.
// //

View File

@@ -13,7 +13,7 @@ import (
// TODO(kortschak): Implement weighted routines. // TODO(kortschak): Implement weighted routines.
// GetisOrdGStar returns the Local Getis-Ord G*i statistic for element of of the // GetisOrdGStar returns the Local Getis-Ord G*i statistic for element of the
// weighted data using the provided locality matrix. The returned value is a z-score. // weighted data using the provided locality matrix. The returned value is a z-score.
// //
// G^*_i = num_i / den_i // G^*_i = num_i / den_i