1 | <?php |
||
8 | class DecisionWithScore |
||
9 | { |
||
10 | /** |
||
11 | * @var Decision |
||
12 | */ |
||
13 | public $decision = null; |
||
14 | |||
15 | /** |
||
16 | * @var float |
||
17 | */ |
||
18 | public $score; |
||
19 | |||
20 | /** |
||
21 | * @var integer How deep in the execution tree this result was found. Higher |
||
22 | * means earlier. This is to prefer earlier solutions to later solutions |
||
23 | * with the same score. |
||
24 | */ |
||
25 | public $age; |
||
26 | |||
27 | 10 | public function isBetterThan(DecisionWithScore $other): bool |
|
34 | |||
35 | 12 | public static function getBestComparator(): Closure |
|
41 | |||
42 | public static function getWorstComparator(): Closure |
||
48 | } |
||
49 |