stratum_retention_policy_parameterizers
Functors to configure policies that satisfy evaluated requirements.
Classes
Parameterizes so evaluated property meets or exceeds a target value. |
|
Parameterizes so evaluated property falls at or below a target value. |
|
Parameterizes so evaluated property exactly equals a target value. |
- class PropertyAtLeastParameterizer
Parameterizes so evaluated property meets or exceeds a target value.
- __call__(policy_t: Type) PolicySpecBase | None [source]
Solve for policy spec satisfying parameterization requirements.
- __init__(target_value: float | int, policy_evaluator: Callable[[Type, int], float | int], param_lower_bound: int = 0, param_upper_bound: int | None = 9223372036854775807) None [source]
Init functor with parameterization requirements.
Parameters
- target_valuefloat or int
The threshold property value to parameterize the policy to meet.
- policy_evaluatorint
Functor that evaluates a policy at a particular parameter value.
- param_lower_boundint
Lower value on the range of parameter values to search, inclusive.
- param_upper_boundint, optional
Upper bound on the range of parameter values to search, inclusive. If None, no upper bound is used.
- class PropertyAtMostParameterizer
Parameterizes so evaluated property falls at or below a target value.
- __call__(policy_t: Type) PolicySpecBase | None [source]
Solve for policy spec satisfying parameterization requirements.
- __init__(target_value: float | int, policy_evaluator: Callable[[Type, int], float | int], param_lower_bound: int = 0, param_upper_bound: int | None = 9223372036854775807) None [source]
Init functor with parameterization requirements.
Parameters
- target_valuefloat or int
The threshold property value to parameterize the policy to meet.
- policy_evaluatorint
Functor that evaluates a policy at a particular parameter value.
- param_lower_boundint
Lower value on the range of parameter values to search, inclusive.
- param_upper_boundint, optional
Upper bound on the range of parameter values to search, inclusive. If None, no upper bound is used.
- class PropertyExactlyParameterizer
Parameterizes so evaluated property exactly equals a target value.
- __call__(policy_t: Type) PolicySpecBase | None [source]
Solve for policy spec satisfying parameterization requirements.
- __init__(*args, **kwargs) None [source]
Init functor with parameterization requirements.
Parameters
- target_valuefloat or int
The threshold property value to parameterize the policy to meet.
- policy_evaluatorint
Functor that evaluates a policy at a particular parameter value.
- param_lower_boundint
Lower value on the range of parameter values to search, inclusive.
- param_upper_boundint, optional
Upper bound on the range of parameter values to search, inclusive. If None, no upper bound is used.