/// <summary>Randomly selects some of N elements without order and repetition.</summary> /// <returns>boolean array of length <c>N</c>, for each item true if it is selected.</returns> public static bool[] RandomCombination(int n) { bool[] ret = new bool[n]; for (int i = 0; i < ret.Length; i++) { ret[i] = _random.NextBoolean(); } return(ret); }