mirror of
https://github.com/gonum/gonum.git
synced 2025-10-06 07:37:03 +08:00
all: replace internal rand shim with math/rand/v2
This commit is contained in:
@@ -5,15 +5,15 @@
|
||||
package testlapack
|
||||
|
||||
import (
|
||||
"math/rand/v2"
|
||||
"testing"
|
||||
|
||||
"gonum.org/v1/gonum/blas/blas64"
|
||||
"gonum.org/v1/gonum/internal/rand"
|
||||
)
|
||||
|
||||
func TestDlagsy(t *testing.T) {
|
||||
const tol = 1e-14
|
||||
rnd := rand.New(rand.NewSource(1))
|
||||
rnd := rand.New(rand.NewPCG(1, 1))
|
||||
for _, n := range []int{0, 1, 2, 3, 4, 5, 10, 50} {
|
||||
for _, lda := range []int{0, 2*n + 1} {
|
||||
if lda == 0 {
|
||||
@@ -41,7 +41,7 @@ func TestDlagsy(t *testing.T) {
|
||||
|
||||
func TestDlagge(t *testing.T) {
|
||||
const tol = 1e-14
|
||||
rnd := rand.New(rand.NewSource(1))
|
||||
rnd := rand.New(rand.NewPCG(1, 1))
|
||||
for _, n := range []int{0, 1, 2, 3, 4, 5, 10, 50} {
|
||||
for _, lda := range []int{0, 2*n + 1} {
|
||||
if lda == 0 {
|
||||
@@ -70,7 +70,7 @@ func TestDlagge(t *testing.T) {
|
||||
|
||||
func TestRandomOrthogonal(t *testing.T) {
|
||||
const tol = 1e-14
|
||||
rnd := rand.New(rand.NewSource(1))
|
||||
rnd := rand.New(rand.NewPCG(1, 1))
|
||||
for n := 1; n <= 20; n++ {
|
||||
q := randomOrthogonal(n, rnd)
|
||||
if resid := residualOrthogonal(q, false); resid > tol {
|
||||
|
Reference in New Issue
Block a user