Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PermuteIndex ¶
func PermuteIndex(index ValidatorIndex, listSize uint64, seed Root) ValidatorIndex
PermuteIndex shuffles an individual list item without allocating a complete list. Returns the index in the would-be shuffled list.
func ShuffleList ¶
func ShuffleList(input []ValidatorIndex, seed Root)
ShuffleList shuffles a list, using the given seed for randomness.
func UnpermuteIndex ¶
func UnpermuteIndex(index ValidatorIndex, listSize uint64, seed Root) ValidatorIndex
UnpermuteIndex does the inverse of PermuteIndex, it returns the original index when given the same shuffling context parameters and permuted index.
func UnshuffleList ¶
func UnshuffleList(input []ValidatorIndex, seed Root)
UnshuffleList undoes a list shuffling using the seed of the shuffling.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.