def _generate(self):
candidates = np.array(list(range(self._n)), np.uint32)<EOL>for i in range(self._num):<EOL><INDENT>self._random.shuffle(candidates)<EOL>pattern = candidates[<NUM_LIT:0>:self._getW()]<EOL>self._patterns[i] = set(pattern)<EOL><DEDENT>
Generates set of random patterns.