Array1 = {1,2,3,...,N}
Array2 = {1,2,3,...,N}

I want to randomly shuffle both the lists so that I end with two lists that
don't have identical elements at identical position. i.e. the following
situation should never occur

Array1[i] = Array2[i] for some i in [1,N]

I invoked gsl_ran_shuffle() once on each array in succession but was not
able to achieve the desired result every time. A non-elegant (ugly) solution
is to compare the lists and shuffle any one of them until there is no match
at identical positions.

Any help or pointer in this regard ?
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to