shuffle

package
Version: v0.0.0-...-fc005be Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shuffle

func Shuffle(data Interface)

Shuffle randomizes the order of the array.

Types

type Interface

type Interface interface {
	// Len is the number of elements in the collection.
	Len() int
	// Swap swaps the elements with indexes i and j.
	Swap(i, j int)
}

Interface for shuffle. When it is satisfied, a collection can be shuffled by the routines in this package. The methods require that the elements of the collection be enumerable by an integer index. This interface is similar to sort.Interface.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL