lapack/testlapack: remove some lint found by megacheck

This commit is contained in:
Vladimir Chalupecky
2017-06-02 19:20:06 +02:00
parent d399fd561a
commit 77c160c8f0
6 changed files with 0 additions and 82 deletions

View File

@@ -5,7 +5,6 @@
package testlapack package testlapack
import ( import (
"fmt"
"math" "math"
"math/rand" "math/rand"
"testing" "testing"
@@ -14,14 +13,6 @@ import (
"gonum.org/v1/gonum/blas/blas64" "gonum.org/v1/gonum/blas/blas64"
) )
func printDlasq1FortranInput(d, e, work []float64, n int) {
printFortranArray(d, "d")
printFortranArray(e, "e")
printFortranArray(work, "work")
fmt.Println("n = ", n)
fmt.Println("info = 0")
}
type Dlasq1er interface { type Dlasq1er interface {
Dlasq1(n int, d, e, work []float64) int Dlasq1(n int, d, e, work []float64) int
Dgetrfer Dgetrfer

View File

@@ -5,7 +5,6 @@
package testlapack package testlapack
import ( import (
"fmt"
"math" "math"
"math/rand" "math/rand"
"testing" "testing"
@@ -13,12 +12,6 @@ import (
"gonum.org/v1/gonum/floats" "gonum.org/v1/gonum/floats"
) )
func printDlasq2FortranInput(z []float64, n int) {
printFortranArray(z, "z")
fmt.Println("n = ", n)
fmt.Println("info = 0")
}
type Dlasq2er interface { type Dlasq2er interface {
Dgetrfer Dgetrfer
Dlasq2(n int, z []float64) (info int) Dlasq2(n int, z []float64) (info int)

View File

@@ -5,7 +5,6 @@
package testlapack package testlapack
import ( import (
"fmt"
"testing" "testing"
"gonum.org/v1/gonum/floats" "gonum.org/v1/gonum/floats"
@@ -16,30 +15,6 @@ type Dlasq3er interface {
i0Out, n0Out, ppOut int, dminOut, sigmaOut, desigOut, qmaxOut float64, nFailOut, iterOut, nDivOut, ttypeOut int, dmin1Out, dmin2Out, dnOut, dn1Out, dn2Out, gOut, tauOut float64) i0Out, n0Out, ppOut int, dminOut, sigmaOut, desigOut, qmaxOut float64, nFailOut, iterOut, nDivOut, ttypeOut int, dmin1Out, dmin2Out, dnOut, dn1Out, dn2Out, gOut, tauOut float64)
} }
func printDlasq3FortranInput(d dlasq3teststruct) {
z := d.z
printFortranArray(z, "z")
fmt.Println("i0 =", d.i0)
fmt.Println("n0 =", d.n0)
fmt.Println("pp =", d.pp)
fmt.Println("dmin =", fortran64(d.dmin))
fmt.Println("sigma =", fortran64(d.sigma))
fmt.Println("desig =", fortran64(d.desig))
fmt.Println("qmax =", fortran64(d.qmax))
fmt.Println("nFail =", d.nFail)
fmt.Println("iter =", d.iter)
fmt.Println("nDiv =", d.nDiv)
fmt.Println("ttype =", d.ttype)
fmt.Println("dmin1 =", fortran64(d.dmin1))
fmt.Println("dmin2 =", fortran64(d.dmin2))
fmt.Println("dn =", fortran64(d.dn))
fmt.Println("dn1 =", fortran64(d.dn1))
fmt.Println("dn2 =", fortran64(d.dn2))
fmt.Println("g =", fortran64(d.g))
fmt.Println("tau =", fortran64(d.tau))
}
type dlasq3teststruct struct { type dlasq3teststruct struct {
z []float64 z []float64
i0, n0, pp int i0, n0, pp int

View File

@@ -5,7 +5,6 @@
package testlapack package testlapack
import ( import (
"fmt"
"testing" "testing"
"gonum.org/v1/gonum/floats" "gonum.org/v1/gonum/floats"
@@ -24,25 +23,6 @@ type dlasq4teststruct struct {
gOut float64 gOut float64
} }
func printDlasq4FortranInput(d dlasq4teststruct) {
z := d.z
printFortranArray(z, "z")
fmt.Println("i0 =", d.i0)
fmt.Println("n0 =", d.n0)
fmt.Println("pp =", d.pp)
fmt.Println("n0in =", d.n0in)
fmt.Println("dmin =", fortran64(d.dmin))
fmt.Println("dmin1 =", fortran64(d.dmin1))
fmt.Println("dmin2 =", fortran64(d.dmin2))
fmt.Println("dn =", fortran64(d.dn))
fmt.Println("dn1 =", fortran64(d.dn1))
fmt.Println("dn2 =", fortran64(d.dn2))
fmt.Println("g =", fortran64(d.g))
fmt.Println("tau =", fortran64(d.tau))
fmt.Println("ttype =", d.ttype)
}
type Dlasq4er interface { type Dlasq4er interface {
Dlasq4(i0, n0 int, z []float64, pp int, n0in int, dmin, dmin1, dmin2, dn, dn1, dn2, tau float64, ttype int, g float64) (tauOut float64, ttypeOut int, gOut float64) Dlasq4(i0, n0 int, z []float64, pp int, n0in int, dmin, dmin1, dmin2, dn, dn1, dn2, tau float64, ttype int, g float64) (tauOut float64, ttypeOut int, gOut float64)
} }

View File

@@ -18,7 +18,6 @@ type Dpotf2er interface {
func Dpotf2Test(t *testing.T, impl Dpotf2er) { func Dpotf2Test(t *testing.T, impl Dpotf2er) {
for _, test := range []struct { for _, test := range []struct {
a [][]float64 a [][]float64
ul blas.Uplo
pos bool pos bool
U [][]float64 U [][]float64
}{ }{

View File

@@ -206,26 +206,6 @@ func nanTriangular(uplo blas.Uplo, n, stride int) blas64.Triangular {
} }
} }
// randomTriangular allocates a new r×c triangular matrix filled with random
// numbers. Out-of-triangle elements are filled with NaN values.
func randomTriangular(uplo blas.Uplo, n, stride int, rnd *rand.Rand) blas64.Triangular {
ans := nanTriangular(uplo, n, stride)
if uplo == blas.Upper {
for i := 0; i < n; i++ {
for j := i; j < n; j++ {
ans.Data[i*ans.Stride+j] = rnd.NormFloat64()
}
}
return ans
}
for i := 0; i < n; i++ {
for j := 0; j <= i; j++ {
ans.Data[i*ans.Stride+j] = rnd.NormFloat64()
}
}
return ans
}
// generalOutsideAllNaN returns whether all out-of-range elements have NaN // generalOutsideAllNaN returns whether all out-of-range elements have NaN
// values. // values.
func generalOutsideAllNaN(a blas64.General) bool { func generalOutsideAllNaN(a blas64.General) bool {