mirror of
https://github.com/gonum/gonum.git
synced 2025-10-05 23:26:52 +08:00
mat: clean up lint
This commit is contained in:
@@ -214,7 +214,10 @@ func TestSolve(t *testing.T) {
|
||||
}
|
||||
}
|
||||
var x Dense
|
||||
x.Solve(a, b)
|
||||
err := x.Solve(a, b)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error from dense solve: %v", err)
|
||||
}
|
||||
|
||||
// Test that the normal equations hold.
|
||||
// Aᵀ * A * x = Aᵀ * b
|
||||
@@ -233,10 +236,10 @@ func TestSolve(t *testing.T) {
|
||||
Solve(a, b Matrix) error
|
||||
}
|
||||
rd := receiver.(Solver)
|
||||
rd.Solve(a, b)
|
||||
_ = rd.Solve(a, b)
|
||||
}
|
||||
denseComparison := func(receiver, a, b *Dense) {
|
||||
receiver.Solve(a, b)
|
||||
_ = receiver.Solve(a, b)
|
||||
}
|
||||
testTwoInput(t, "Solve", &Dense{}, method, denseComparison, legalTypesAll, legalSizeSolve, 1e-7)
|
||||
}
|
||||
@@ -269,7 +272,10 @@ func TestSolveVec(t *testing.T) {
|
||||
b.SetVec(i, rand.Float64())
|
||||
}
|
||||
var x VecDense
|
||||
x.SolveVec(a, b)
|
||||
err := x.SolveVec(a, b)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error from dense vector solve: %v", err)
|
||||
}
|
||||
|
||||
// Test that the normal equations hold.
|
||||
// Aᵀ * A * x = Aᵀ * b
|
||||
@@ -288,10 +294,10 @@ func TestSolveVec(t *testing.T) {
|
||||
SolveVec(a Matrix, b Vector) error
|
||||
}
|
||||
rd := receiver.(SolveVecer)
|
||||
rd.SolveVec(a, b.(Vector))
|
||||
_ = rd.SolveVec(a, b.(Vector))
|
||||
}
|
||||
denseComparison := func(receiver, a, b *Dense) {
|
||||
receiver.Solve(a, b)
|
||||
_ = receiver.Solve(a, b)
|
||||
}
|
||||
testTwoInput(t, "SolveVec", &VecDense{}, method, denseComparison, legalTypesMatrixVector, legalSizeSolve, 1e-12)
|
||||
}
|
||||
|
Reference in New Issue
Block a user