2017 © Pedro Peláez
 

library shuffle_slightly

image

jacobemerick/shuffle_slightly

  • Tuesday, July 1, 2014
  • by jacobemerick
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

shuffle_slightly

Function to slightly shuffle an array based on a tolerance parameter., (*1)

There may come a time when you want to shuffle an array but you don't want to completely ignore the order. This function, which behaves much like the native shuffle, will perform a slight shuffle., (*2)

For example, if you want to shuffle a simple array but you don't want to move any elements more than 2 positions away from their start, just do this., (*3)

$array = ['a', 'b', 'c', 'd', 'e'];
jacobemerick\shuffle_slightly($array, 2);

Installation

Through composer:, (*4)

$ composer require jacobemerick/shuffle_slightly:~1.0

More Information

I wrote a blog post talking about the reasoning, build, and some extra information about shuffling algorithms., (*5)

The Versions

01/07 2014

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.4

 

01/07 2014

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

  • php >=5.4