pub enum AllocationCurve {
Linear,
Exponential {
exponent: f64,
},
Stepped {
thresholds: Vec<(f64, u64)>,
},
}Expand description
Curve controlling how probability maps to divisor.
Variants§
Linear
Linear: divisor = max - (max - min) * probability.
Exponential
Exponential: divisor = max * (1 - probability)^exponent.
Gives more budget to high-probability screens with sharp falloff.
Stepped
Stepped: bucket probabilities into tiers.
Thresholds are checked in descending order; first match wins. Must be sorted descending by threshold value.
Example: [(0.3, 1), (0.1, 2), (0.03, 5), (0.0, 20)]
Trait Implementations§
Source§impl Clone for AllocationCurve
impl Clone for AllocationCurve
Auto Trait Implementations§
impl Forget for AllocationCurve
impl Freeze for AllocationCurve
impl Move for AllocationCurve
impl RefUnwindSafe for AllocationCurve
impl Send for AllocationCurve
impl Sync for AllocationCurve
impl Unpin for AllocationCurve
impl UnsafeUnpin for AllocationCurve
impl UnwindSafe for AllocationCurve
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more