random

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SampleInt

func SampleInt(take, rng int, r *rand.Rand) ([]int, error)

SampleInt takes a sample size, the maximum integer for a half-opened interval [0,n) and a random number source and returns a slize of sampled intergers within the closed interval. The sample integers are guaranteed to be unique if a sample is possible. If the range sample size is larger that the interval range an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL