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 (const: unstable) · 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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.