pub struct ParetoConfig {
pub alpha: f64,
pub x_min: f64,
pub max_value: Option<f64>,
pub decimal_places: u8,
}Expand description
Configuration for Pareto distribution.
Fields§
§alpha: f64Shape parameter (alpha) - controls tail heaviness. Lower values = heavier tail (more extreme values). Typical values: 1.5-3.0 for financial data.
x_min: f64Scale parameter (x_min) - minimum value. All samples will be >= x_min.
max_value: Option<f64>Maximum value (clamps output).
decimal_places: u8Number of decimal places for rounding.
Implementations§
Source§impl ParetoConfig
impl ParetoConfig
Sourcepub fn capital_expenditure() -> Self
pub fn capital_expenditure() -> Self
Create a configuration for capital expenditures (heavy tail).
Sourcepub fn maintenance_costs() -> Self
pub fn maintenance_costs() -> Self
Create a configuration for maintenance costs.
Sourcepub fn vendor_spend() -> Self
pub fn vendor_spend() -> Self
Create a configuration for vendor spend distribution.
Sourcepub fn expected_value(&self) -> Option<f64>
pub fn expected_value(&self) -> Option<f64>
Get the expected value (mean) of the distribution. Only defined for alpha > 1.
Trait Implementations§
Source§impl Clone for ParetoConfig
impl Clone for ParetoConfig
Source§fn clone(&self) -> ParetoConfig
fn clone(&self) -> ParetoConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParetoConfig
impl Debug for ParetoConfig
Source§impl Default for ParetoConfig
impl Default for ParetoConfig
Source§impl<'de> Deserialize<'de> for ParetoConfig
impl<'de> Deserialize<'de> for ParetoConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ParetoConfig
impl RefUnwindSafe for ParetoConfig
impl Send for ParetoConfig
impl Sync for ParetoConfig
impl Unpin for ParetoConfig
impl UnwindSafe for ParetoConfig
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