| Conditions | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 26 | def _init_iteration(self, _cand_): |
||
| 27 | p = SbomPositioner() |
||
| 28 | p.move_random(_cand_) |
||
| 29 | |||
| 30 | self._optimizer_eval(_cand_, p) |
||
| 31 | self._update_pos(_cand_, p) |
||
| 32 | |||
| 33 | self._all_possible_pos(_cand_) |
||
| 34 | |||
| 35 | if self._opt_args_.warm_start_smbo: |
||
| 36 | self.X_sample = _cand_.mem._get_para() |
||
| 37 | self.Y_sample = _cand_.mem._get_score() |
||
| 38 | else: |
||
| 39 | self.X_sample = _cand_.pos_best.reshape(1, -1) |
||
| 40 | self.Y_sample = np.array(_cand_.score_best).reshape(1, -1) |
||
| 41 | |||
| 42 | return p |
||
| 43 | |||
| 48 |