package testrand
import "gonum.org/v1/gonum/internal/testrand"
Package testrand provides random generation and flags for testing.
Index ¶
Types ¶
type Rand ¶
type Rand interface {
ExpFloat64() float64
Float32() float32
Float64() float64
Int() int
Int32() int32
Int32N(n int32) int32
Int64() int64
Int64N(n int64) int64
IntN(n int) int
NormFloat64() float64
Perm(n int) []int
Shuffle(n int, swap func(i, j int))
Uint32() uint32
Uint64() uint64
Uint64N(n uint64) uint64
}
Rand corresponds to math/rand/v2.Rand.
func New ¶
New returns a new random number generator using the global flags.
type Source ¶
type Source = rand.Source
Source corresponds to the interface in golang.org/x/exp/rand.Source.
func NewSource ¶
NewSource returns a new source for random numbers.
type TB ¶
type TB interface {
Logf(format string, args ...interface{})
}
TB is an interface that corresponds to a subset of *testing.T and *testing.B.
Source Files ¶
extreme.go extremes.go rand.go
- Version
- v0.16.0 (latest)
- Published
- Mar 21, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 1 month ago –
Tools for package owners.