1 | <?php |
||
19 | final class Score |
||
20 | { |
||
21 | /** |
||
22 | * @var float The scaled score (a number between -1 and 1) |
||
23 | */ |
||
24 | private $scaled; |
||
25 | |||
26 | /** |
||
27 | * @var float The Agent's score (a number between min and max) |
||
28 | */ |
||
29 | private $raw; |
||
30 | |||
31 | /** |
||
32 | * @var float The minimum score being possible |
||
33 | */ |
||
34 | private $min; |
||
35 | |||
36 | /** |
||
37 | * @var float The maximum score being possible |
||
38 | */ |
||
39 | private $max; |
||
40 | |||
41 | /** |
||
42 | * @param float $scaled |
||
43 | * @param float $raw |
||
44 | * @param float $min |
||
45 | * @param float $max |
||
46 | */ |
||
47 | public function __construct($scaled, $raw, $min, $max) |
||
54 | |||
55 | /** |
||
56 | * Returns the Agent's scaled score (a number between -1 and 1). |
||
57 | * |
||
58 | * @return float The scaled score |
||
59 | */ |
||
60 | public function getScaled() |
||
64 | |||
65 | /** |
||
66 | * Returns the Agent's score. |
||
67 | * |
||
68 | * @return float The score |
||
69 | */ |
||
70 | public function getRaw() |
||
74 | |||
75 | /** |
||
76 | * Returns the lowest possible score. |
||
77 | * |
||
78 | * @return float The lowest possible score |
||
79 | */ |
||
80 | public function getMin() |
||
84 | |||
85 | /** |
||
86 | * Returns the highest possible score. |
||
87 | * |
||
88 | * @return float The highest possible score |
||
89 | */ |
||
90 | public function getMax() |
||
94 | |||
95 | /** |
||
96 | * Checks if another score is equal. |
||
97 | * |
||
98 | * Two scores are equal if and only if all of their properties are equal. |
||
99 | * |
||
100 | * @param Score $score The score to compare with |
||
101 | * |
||
102 | * @return bool True if the scores are equal, false otherwise |
||
103 | */ |
||
104 | public function equals(Score $score) |
||
124 | } |
||
125 |