Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShuffleMap ¶
type ShuffleMap struct {
// contains filtered or unexported fields
}
func Shuffle ¶
func Shuffle(random io.Reader, n int, swap func(i, j int)) *ShuffleMap
Shuffle pseudo-randomizes the order of elements. n is the number of elements. Shuffle panics if n is negative or too large. swap swaps the elements with indexes i and j.
func (*ShuffleMap) Get ¶
func (s *ShuffleMap) Get(index int) int
Click to show internal directories.
Click to hide internal directories.