shuffle

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 7 Imported by: 5

Documentation

Overview

Package shuffle has a Fisher-Yates shuffle algorithm that we use for mixing the slots in our Permute phases.

Package shuffle has a Fisher-Yates shuffle algorithm that we use for mixing the slots in our Permute phases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shuffle

func Shuffle(shufflee *[]uint64)

Shuffles a uint64 array using a Fisher-Yates shuffle

func Shuffle16

func Shuffle16(shufflee *[]uint16)

Shuffle16 shuffles a uint16 array using a Fisher-Yates shuffle

func Shuffle32

func Shuffle32(shufflee *[]uint32)

Shuffle32 shuffles a uint32 array using a Fisher-Yates shuffle

func ShuffleSwap

func ShuffleSwap(seedSrc []byte, n int, swap func(i, j int))

ShuffleSwap shuffles anything passed using a Fisher-Yates shuffle backed by a PRNG seeded by a passed slice Swap functions must be of the form `A[i], A[j] = A[j], A[i]` Switching i and j may not work

Types

This section is empty.

Jump to

Keyboard shortcuts

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