Popularity
5.0
Growing
Activity
0.0
Stable
5
2
4

License: BSD 3-clause "New" or "Revised" License
Tags: Math     Random     Vector

# perfect-vector-shuffle alternatives and similar packages

Based on the "Random" category.
Alternatively, view perfect-vector-shuffle alternatives based on common mentions on social networks and blogs.

• ### Random123

Haskell port of Random123 library
• ### rand-vars

Random variable library in Haskell, with Functor, Applicative and Monad instances.
• ### Clean code begins in your IDE with SonarLint

Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
• ### vector-shuffling

Algorithms for vector shuffling
• ### pcgen

A fast, pseudorandom number generator.

Do you think we are missing an alternative of perfect-vector-shuffle or a related project?

## `perfect-vector-shuffle`

A library providing Fisher--Yates in-place shuffles and related functionality.

As an example of how to use it:

``````module Main where

import           Data.Vector
import           Immutable.Shuffle

main :: IO ()
main =
do
shuffleMyVector >>= print
cycleMyVector   >>= print
derangeMyVector >>= print

myVector :: Vector Int
myVector = fromList [1..10]

shuffleMyVector :: IO (Vector Int)
shuffleMyVector = shuffleM myVector

cycleMyVector :: IO (Vector Int)
cycleMyVector = maximalCycleM myVector

derangeMyVector :: IO (Vector Int)
derangeMyVector = derangementM myVector

``````
``````    > main
[2,8,1,5,10,9,7,3,6,4]
[6,8,4,10,9,2,5,7,3,1]
[8,5,4,1,10,9,3,6,2,7]

> main
[7,9,3,5,10,6,8,1,2,4]
[2,4,10,7,8,1,5,9,3,6]
[4,8,5,2,7,3,9,6,10,1]
``````