stan-dev/stan — pull request #385 by bob-carpenter (2013-11-11 23:43:07+00:00)
Title: Feature/issue 384 arg shuffler

I added ```src/stan/command/shuffle_args.cpp``` which prints a shuffled version of its arguments to ```std::cout```.

As is, it writes a ```std::endl``` when its done.

It's a simple function based on the builtin ```std::random_shuffle``` and the ```boost::random::mt19937``` RNG using ```std::time(0)``` for a seed.

I tested that I could build it and that it worked on the command-line. I'm not sure what the best way is to test a main going forward. Test cases include 0 arguments as input, 1 argument, 2 arguments, and then some random number like 17 arguments. The only test is that all the values come out (that is, the shuffled args and original args have the same number of members when you put them in a set-like structure).