(self, random_func, *, batchsize=10)
| 118 | self.keep_top_k[k] = t[:k] |
| 119 | |
| 120 | def stack_random_cand(self, random_func, *, batchsize=10): |
| 121 | while True: |
| 122 | cands = [random_func() for _ in range(batchsize)] |
| 123 | for cand in cands: |
| 124 | if cand not in self.vis_dict: |
| 125 | self.vis_dict[cand] = {} |
| 126 | info = self.vis_dict[cand] |
| 127 | for cand in cands: |
| 128 | yield cand |
| 129 | |
| 130 | def get_random_cand(self): |
| 131 |
no outgoing calls
no test coverage detected