Skip to content

Commit

Permalink
lapack/testlapack: add intsEqual helper
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Jun 16, 2021
1 parent c0f40d7 commit 4d954ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lapack/testlapack/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,18 @@ func equalApproxGeneral(a, b blas64.General, tol float64) bool {
return true
}

func intsEqual(a, b []int) bool {
if len(a) != len(b) {
return false
}
for i, ai := range a {
if b[i] != ai {
return false
}
}
return true
}

// randSymBand returns an n×n random symmetric positive definite band matrix
// with kd diagonals.
func randSymBand(uplo blas.Uplo, n, kd, ldab int, rnd *rand.Rand) []float64 {
Expand Down

0 comments on commit 4d954ef

Please sign in to comment.