RangePenalty
Helper type to compute penalty if a value is outside a specific Range.
The penalty corresponds to abs_penalty * |E| + squared_penalty * E^2
, where E is the amount a value is out of the specified Range.
Inherits from scone::Range< T >.
Public Attributes
Parameter | Type | Description |
---|---|---|
abs_penalty | Real | Absolute penalty factor when value is out of range; default = 0. |
squared_penalty | Real | Squared penalty factor when value out of range; default = 0. |
mode | penalty_mode | Mode to use when measuring the penalty: average , highest , lowest or sum ; default = average . |
min | T | Minimum value or lower bound of the range; default = -inf. |
max | T | Maximum value or upper bound of the range; default = inf. |
Converted from doxygen using dokugen