shuffle.h
Functions | |
Randomly rearranges the elements of the given array up to the given length. | |
Randomly rearranges the elements of the given 2-D array up to the given number of rows and columns. | |
Randomly rearranges the elements of the given grid. | |
Randomly rearranges the characters of the given string. | |
Randomly rearranges the elements of the given vector. |
template <typename T> void shuffle(T* array, int length);
Usage:
shuffle(a, len);
template <typename T> void shuffle(T** array2d, int rows, int cols);
Usage:
shuffle(a2d, rows, cols);
template <typename ValueType> void shuffle(Grid<ValueType>& grid);
Usage:
shuffle(myGrid);
string shuffle(string str);
Usage:
string s2 = shuffle(str);
template <typename ValueType> void shuffle(Vector<ValueType>& vector);
Usage:
shuffle(myVector);