Tvern Posted March 25, 2010 Posted March 25, 2010 I recently needed to "shuffle" the rows in an array and was surprised to find there was no function for this in array.au3.A search on the forum returned This method by Yashied.* I've eliminated the need for multiple passes by switching each index with a random one at least once in one pass, making it much faster.* I've allowed for sorting 2D arrays, although only the row index is changed. The content and column order of the rows stays the same.I hope someone finds this helpfull, or suggestions and improvements are welcome. I've used _ArraySort() by Jos van der Zande as a template for the description and errorchecking as this is the first UDF I've posted here. Hope it's ok._ArrayRandom.au3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now