TargetImproved
Rasuvaeff\PropertyTesting\Event\TargetImproved
Class — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Implements: Event\PropertyEvent
A passing run scored better on a Target label than any before it — in the random phase or the search phase. The arguments are the input that did it, so a listener can watch the search close in on an extreme.
Constructor
php
__construct(
string $propertyId,
string $label,
\Runner\TargetDirection $direction,
float $score,
?float $previous,
array<string,mixed> $arguments,
)| Parameter | Type | Default | Description |
|---|---|---|---|
$propertyId | string | required | The property whose target improved. |
$label | string | required | The target label, as reported to Target::maximize()/minimize(). |
$direction | Runner\TargetDirection | required | Which way the label is pushed. |
$score | float | required | The new best. |
$previous | ?float | required | The best before this run; null for the first score of the label. |
$arguments | array<string,mixed> | required | The input that scored, by parameter name. |