OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / gonum.org / v1 / gonum / lapack / testlapack / dlapmt.go
diff --git a/vendor/gonum.org/v1/gonum/lapack/testlapack/dlapmt.go b/vendor/gonum.org/v1/gonum/lapack/testlapack/dlapmt.go
deleted file mode 100644 (file)
index 2a8fee5..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright ©2017 The Gonum Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package testlapack
-
-import (
-       "fmt"
-       "testing"
-
-       "gonum.org/v1/gonum/blas/blas64"
-)
-
-type Dlapmter interface {
-       Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int)
-}
-
-func DlapmtTest(t *testing.T, impl Dlapmter) {
-       for ti, test := range []struct {
-               forward bool
-               k       []int
-
-               want blas64.General
-       }{
-               {
-                       forward: true, k: []int{0, 1, 2},
-                       want: blas64.General{
-                               Rows:   4,
-                               Cols:   3,
-                               Stride: 3,
-                               Data: []float64{
-                                       1, 2, 3,
-                                       4, 5, 6,
-                                       7, 8, 9,
-                                       10, 11, 12,
-                               },
-                       },
-               },
-               {
-                       forward: false, k: []int{0, 1, 2},
-                       want: blas64.General{
-                               Rows:   4,
-                               Cols:   3,
-                               Stride: 3,
-                               Data: []float64{
-                                       1, 2, 3,
-                                       4, 5, 6,
-                                       7, 8, 9,
-                                       10, 11, 12,
-                               },
-                       },
-               },
-               {
-                       forward: true, k: []int{1, 2, 0},
-                       want: blas64.General{
-                               Rows:   4,
-                               Cols:   3,
-                               Stride: 3,
-                               Data: []float64{
-                                       2, 3, 1,
-                                       5, 6, 4,
-                                       8, 9, 7,
-                                       11, 12, 10,
-                               },
-                       },
-               },
-               {
-                       forward: false, k: []int{1, 2, 0},
-                       want: blas64.General{
-                               Rows:   4,
-                               Cols:   3,
-                               Stride: 3,
-                               Data: []float64{
-                                       3, 1, 2,
-                                       6, 4, 5,
-                                       9, 7, 8,
-                                       12, 10, 11,
-                               },
-                       },
-               },
-       } {
-               m := test.want.Rows
-               n := test.want.Cols
-               if len(test.k) != n {
-                       panic("bad length of k")
-               }
-
-               for _, extra := range []int{0, 11} {
-                       x := zeros(m, n, n+extra)
-                       c := 1
-                       for i := 0; i < m; i++ {
-                               for j := 0; j < n; j++ {
-                                       x.Data[i*x.Stride+j] = float64(c)
-                                       c++
-                               }
-                       }
-
-                       k := make([]int, len(test.k))
-                       copy(k, test.k)
-
-                       impl.Dlapmt(test.forward, m, n, x.Data, x.Stride, k)
-
-                       prefix := fmt.Sprintf("Case %v (forward=%t,m=%v,n=%v,extra=%v)", ti, test.forward, m, n, extra)
-                       if !generalOutsideAllNaN(x) {
-                               t.Errorf("%v: out-of-range write to X", prefix)
-                       }
-
-                       if !equalApproxGeneral(x, test.want, 0) {
-                               t.Errorf("%v: unexpected X\n%v\n%v", prefix, x, test.want)
-                       }
-               }
-       }
-}