all: replace internal rand shim with math/rand/v2

This commit is contained in:
Dan Kortschak
2025-01-02 12:07:22 +10:30
parent cf3307fa63
commit bc349ecfab
345 changed files with 1165 additions and 1214 deletions

View File

@@ -6,23 +6,23 @@ package graph_test
import (
"fmt"
"math/rand/v2"
"testing"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/graphs/gen"
"gonum.org/v1/gonum/graph/iterator"
"gonum.org/v1/gonum/graph/simple"
"gonum.org/v1/gonum/internal/rand"
)
var complementTests = []struct {
g graph.Graph
}{
{g: gnp(100, 0, rand.NewSource(1))},
{g: gnp(100, 0.05, rand.NewSource(1))},
{g: gnp(100, 0.5, rand.NewSource(1))},
{g: gnp(100, 0.95, rand.NewSource(1))},
{g: gnp(100, 1, rand.NewSource(1))},
{g: gnp(100, 0, rand.NewPCG(1, 1))},
{g: gnp(100, 0.05, rand.NewPCG(1, 1))},
{g: gnp(100, 0.5, rand.NewPCG(1, 1))},
{g: gnp(100, 0.95, rand.NewPCG(1, 1))},
{g: gnp(100, 1, rand.NewPCG(1, 1))},
}
func TestComplement(t *testing.T) {