1 // Copyright ©2015 The Gonum Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 import "gonum.org/v1/gonum/blas"
9 // Dlaset sets the off-diagonal elements of A to alpha, and the diagonal
10 // elements to beta. If uplo == blas.Upper, only the elements in the upper
11 // triangular part are set. If uplo == blas.Lower, only the elements in the
12 // lower triangular part are set. If uplo is otherwise, all of the elements of A
15 // Dlaset is an internal routine. It is exported for testing purposes.
16 func (impl Implementation) Dlaset(uplo blas.Uplo, m, n int, alpha, beta float64, a []float64, lda int) {
17 checkMatrix(m, n, a, lda)
18 if uplo == blas.Upper {
19 for i := 0; i < m; i++ {
20 for j := i + 1; j < n; j++ {
24 } else if uplo == blas.Lower {
25 for i := 0; i < m; i++ {
26 for j := 0; j < min(i+1, n); j++ {
31 for i := 0; i < m; i++ {
32 for j := 0; j < n; j++ {
37 for i := 0; i < min(m, n); i++ {