Class RiskBoundaries
java.lang.Object
be.kuleuven.cs.distrinet.sparta.analysis.util.RiskBoundaries
Pure computation of the {min, med, max} risk boundaries used to drive the
colour scale of the threat list. Extracted to be unit testable and to make
the empty-list / non-positive fallback explicit.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double[]compute(double max) Computes the colour-scale boundaries for a given maximum potential risk.
-
Method Details
-
compute
public static double[] compute(double max) Computes the colour-scale boundaries for a given maximum potential risk.- Parameters:
max- the maximum potential risk over all threats (0 when the list is empty)- Returns:
- a
{min, med, max}array; a fixed{-1, 0, 1}fallback is returned whenmax <= 0to keep the scale well defined
-