Skip to content

TargetDirection ​

Rasuvaeff\PropertyTesting\Runner\TargetDirection

Enum — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2

Implements: UnitEnum, BackedEnum

Which way a Target label is pushed.

Constants ​

ConstantTypeValueDescription
MaximizeRunner\TargetDirection
MinimizeRunner\TargetDirection

Cases ​

CaseBacking value
Maximize"maximize"
Minimize"minimize"

Methods ​

improves() ​

php
improves(float $candidate, float $best): bool

Whether $candidate is an improvement on $best in this direction.

  • $candidate — The score under consideration.
  • $best — The best so far.