evaluate abstract method
Returns the improvement rate calculated from before
and after
based on policy
.
If the policy
is increased
, a good trend is considered when the value of
before
increases more than the value of after
. Conversely, when the policy is
decreased
, a good trend is considered when the value of before
is less than
the value of after
. By default, the policy is set to decreased
.
The following formula is used to calculate the improvement rate.
Rate = (after - before) / |before| × 100.0
Implementation
ImprovementRate evaluate({
required double before,
required double after,
ShouldBe policy = ShouldBe.decreased,
});