pub struct LognormalLayerModel { /* private fields */ }Expand description
Closed-form lognormal severity model parameterized by ground-up mean > 0
and log-scale standard deviation sigma > 0.
The underlying lognormal parameters satisfy
$\mu = \ln(\text{mean}) - \tfrac{1}{2}\sigma^2$ so E[X] = mean.
Implementations§
Source§impl LognormalLayerModel
impl LognormalLayerModel
Sourcepub fn try_new(mean: f64, sigma: f64) -> Result<Self, ValidationError>
pub fn try_new(mean: f64, sigma: f64) -> Result<Self, ValidationError>
Construct a validated lognormal layer model with ground-up mean > 0
and log-scale standard deviation sigma > 0.
Sourcepub fn exact_lev(&self, limit: f64) -> f64
pub fn exact_lev(&self, limit: f64) -> f64
Closed-form Limited Expected Value $E[X \wedge L]$.
Returns 0.0 for limit <= 0.0, mean for +∞, and NaN for NaN.
Sourcepub fn exact_layer(&self, attachment: f64, top: f64) -> f64
pub fn exact_layer(&self, attachment: f64, top: f64) -> f64
Closed-form expected loss in the layer (attachment, top]:
$E[\min(X, \text{top}) - \min(X, \text{attachment})]$.
Returns 0.0 when top <= attachment.
Sourcepub fn exceedance_prob(&self, threshold: f64) -> f64
pub fn exceedance_prob(&self, threshold: f64) -> f64
Exceedance probability $P(X > \text{threshold})$.
Trait Implementations§
Source§impl Clone for LognormalLayerModel
impl Clone for LognormalLayerModel
impl Copy for LognormalLayerModel
Source§impl Debug for LognormalLayerModel
impl Debug for LognormalLayerModel
Source§impl<'de> Deserialize<'de> for LognormalLayerModel
impl<'de> Deserialize<'de> for LognormalLayerModel
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
Source§impl PartialEq for LognormalLayerModel
impl PartialEq for LognormalLayerModel
Source§impl Serialize for LognormalLayerModel
impl Serialize for LognormalLayerModel
impl StructuralPartialEq for LognormalLayerModel
Auto Trait Implementations§
impl Forget for LognormalLayerModel
impl Freeze for LognormalLayerModel
impl Move for LognormalLayerModel
impl RefUnwindSafe for LognormalLayerModel
impl Send for LognormalLayerModel
impl Sync for LognormalLayerModel
impl Unpin for LognormalLayerModel
impl UnsafeUnpin for LognormalLayerModel
impl UnwindSafe for LognormalLayerModel
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