pub struct BetaConfig {
pub alpha: f64,
pub beta: f64,
pub lower_bound: f64,
pub upper_bound: f64,
pub decimal_places: u8,
}Expand description
Configuration for Beta distribution.
Fields§
§alpha: f64Alpha parameter (shape1) - controls skewness towards 1. Higher alpha = more mass towards 1.
beta: f64Beta parameter (shape2) - controls skewness towards 0. Higher beta = more mass towards 0.
lower_bound: f64Lower bound of the output range (default: 0.0).
upper_bound: f64Upper bound of the output range (default: 1.0).
decimal_places: u8Number of decimal places for rounding.
Implementations§
Source§impl BetaConfig
impl BetaConfig
Sourcepub fn percentage(alpha: f64, beta: f64) -> Self
pub fn percentage(alpha: f64, beta: f64) -> Self
Create a configuration scaled to a percentage range.
Sourcepub fn discount_rate() -> Self
pub fn discount_rate() -> Self
Create a configuration for discount percentages (typically 2-15%).
Sourcepub fn cash_discount() -> Self
pub fn cash_discount() -> Self
Create a configuration for cash discount rates (1-3%).
Sourcepub fn completion_rate() -> Self
pub fn completion_rate() -> Self
Create a configuration for completion rates (biased towards high).
Sourcepub fn match_rate() -> Self
pub fn match_rate() -> Self
Create a configuration for match rates (typically 85-99%).
Sourcepub fn quality_score() -> Self
pub fn quality_score() -> Self
Create a configuration for quality scores (0-100, slightly skewed high).
Sourcepub fn expected_value(&self) -> f64
pub fn expected_value(&self) -> f64
Get the expected value (mean) of the distribution.
Trait Implementations§
Source§impl Clone for BetaConfig
impl Clone for BetaConfig
Source§fn clone(&self) -> BetaConfig
fn clone(&self) -> BetaConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BetaConfig
impl Debug for BetaConfig
Source§impl Default for BetaConfig
impl Default for BetaConfig
Source§impl<'de> Deserialize<'de> for BetaConfig
impl<'de> Deserialize<'de> for BetaConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BetaConfig
impl RefUnwindSafe for BetaConfig
impl Send for BetaConfig
impl Sync for BetaConfig
impl Unpin for BetaConfig
impl UnsafeUnpin for BetaConfig
impl UnwindSafe for BetaConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.