| 1 | <?php |
||
| 5 | class DecisionWithScore |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var Decision |
||
| 9 | */ |
||
| 10 | public $decision = null; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var float |
||
| 14 | */ |
||
| 15 | public $score; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var integer How deep in the execution tree this result was found. Higher |
||
| 19 | * means earlier. This is to prefer earlier solutions to later solutions |
||
| 20 | * with the same score. |
||
| 21 | */ |
||
| 22 | public $age; |
||
| 23 | |||
| 24 | 9 | public function isBetterThan(DecisionWithScore $other): bool |
|
| 31 | |||
| 32 | 11 | public static function getBestComparator(): \Closure |
|
| 38 | |||
| 39 | public static function getWorstComparator(): \Closure |
||
| 45 | } |
||
| 46 |